refactor clinet
This commit is contained in:
		| @@ -2,8 +2,8 @@ | |||||||
| <div class="fdidabkb" :class="{ slim: narrow, thin: thin_ }" :style="{ background: bg }" @click="onClick" ref="el"> | <div class="fdidabkb" :class="{ slim: narrow, thin: thin_ }" :style="{ background: bg }" @click="onClick" ref="el"> | ||||||
| 	<template v-if="info"> | 	<template v-if="info"> | ||||||
| 		<div class="titleContainer" @click="showTabsPopup" v-if="!hideTitle"> | 		<div class="titleContainer" @click="showTabsPopup" v-if="!hideTitle"> | ||||||
| 			<i v-if="info.icon" class="icon" :class="info.icon"></i> | 			<MkAvatar v-if="info.avatar" class="avatar" :user="info.avatar" :disable-preview="true" :show-indicator="true"/> | ||||||
| 			<MkAvatar v-else-if="info.avatar" class="avatar" :user="info.avatar" :disable-preview="true" :show-indicator="true"/> | 			<i v-else-if="info.icon" class="icon" :class="info.icon"></i> | ||||||
|  |  | ||||||
| 			<div class="title"> | 			<div class="title"> | ||||||
| 				<MkUserName v-if="info.userName" :user="info.userName" :nowrap="false" class="title"/> | 				<MkUserName v-if="info.userName" :user="info.userName" :nowrap="false" class="title"/> | ||||||
| @@ -162,11 +162,6 @@ export default defineComponent({ | |||||||
| 				onUnmounted(() => { | 				onUnmounted(() => { | ||||||
| 					ro.disconnect(); | 					ro.disconnect(); | ||||||
| 				}); | 				}); | ||||||
| 				setTimeout(() => { |  | ||||||
| 					const currentStickyTop = getComputedStyle(el.value.parentElement).getPropertyValue('--stickyTop') || '0px'; |  | ||||||
| 					el.value.style.setProperty('--stickyTop', currentStickyTop); |  | ||||||
| 					el.value.parentElement.style.setProperty('--stickyTop', `calc(${currentStickyTop} + ${el.value.offsetHeight}px)`); |  | ||||||
| 				}, 100); // レンダリング順序の関係で親のstickyTopの設定が少し遅れることがあるため |  | ||||||
| 			} | 			} | ||||||
| 		}); | 		}); | ||||||
|  |  | ||||||
|   | |||||||
							
								
								
									
										74
									
								
								src/client/components/global/sticky-container.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										74
									
								
								src/client/components/global/sticky-container.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,74 @@ | |||||||
|  | <template> | ||||||
|  | <div ref="rootEl"> | ||||||
|  | 	<slot name="header"></slot> | ||||||
|  | 	<div ref="bodyEl"> | ||||||
|  | 		<slot></slot> | ||||||
|  | 	</div> | ||||||
|  | </div> | ||||||
|  | </template> | ||||||
|  |  | ||||||
|  | <script lang="ts"> | ||||||
|  | import { defineComponent, onMounted, onUnmounted, ref } from 'vue'; | ||||||
|  |  | ||||||
|  | export default defineComponent({ | ||||||
|  | 	props: { | ||||||
|  | 		autoSticky: { | ||||||
|  | 			type: Boolean, | ||||||
|  | 			required: false, | ||||||
|  | 			default: false, | ||||||
|  | 		}, | ||||||
|  | 	}, | ||||||
|  |  | ||||||
|  | 	setup(props, context) { | ||||||
|  | 		const rootEl = ref<HTMLElement>(null); | ||||||
|  | 		const bodyEl = ref<HTMLElement>(null); | ||||||
|  |  | ||||||
|  | 		const calc = () => { | ||||||
|  | 			const currentStickyTop = getComputedStyle(rootEl.value).getPropertyValue('--stickyTop') || '0px'; | ||||||
|  |  | ||||||
|  | 			const header = rootEl.value.children[0]; | ||||||
|  | 			if (header === bodyEl.value) { | ||||||
|  | 				bodyEl.value.style.setProperty('--stickyTop', currentStickyTop); | ||||||
|  | 			} else { | ||||||
|  | 				bodyEl.value.style.setProperty('--stickyTop', `calc(${currentStickyTop} + ${header.offsetHeight}px)`); | ||||||
|  |  | ||||||
|  | 				if (props.autoSticky) { | ||||||
|  | 					header.style.setProperty('--stickyTop', currentStickyTop); | ||||||
|  | 					header.style.position = 'sticky'; | ||||||
|  | 					header.style.top = 'var(--stickyTop)'; | ||||||
|  | 					header.style.zIndex = '1'; | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		onMounted(() => { | ||||||
|  | 			calc(); | ||||||
|  |  | ||||||
|  | 			const observer = new MutationObserver(() => { | ||||||
|  | 				setTimeout(() => { | ||||||
|  | 					calc(); | ||||||
|  | 				}, 100); | ||||||
|  | 			}); | ||||||
|  |  | ||||||
|  | 			observer.observe(rootEl.value, { | ||||||
|  | 				attributes: false, | ||||||
|  | 				childList: true, | ||||||
|  | 				subtree: false, | ||||||
|  | 			}); | ||||||
|  |  | ||||||
|  | 			onUnmounted(() => { | ||||||
|  | 				observer.disconnect(); | ||||||
|  | 			}); | ||||||
|  | 		}); | ||||||
|  |  | ||||||
|  | 		return { | ||||||
|  | 			rootEl, | ||||||
|  | 			bodyEl, | ||||||
|  | 		}; | ||||||
|  | 	}, | ||||||
|  | }); | ||||||
|  | </script> | ||||||
|  |  | ||||||
|  | <style lang="scss" module> | ||||||
|  |  | ||||||
|  | </style> | ||||||
| @@ -15,6 +15,7 @@ import error from './global/error.vue'; | |||||||
| import ad from './global/ad.vue'; | import ad from './global/ad.vue'; | ||||||
| import header from './global/header.vue'; | import header from './global/header.vue'; | ||||||
| import spacer from './global/spacer.vue'; | import spacer from './global/spacer.vue'; | ||||||
|  | import stickyContainer from './global/sticky-container.vue'; | ||||||
|  |  | ||||||
| export default function(app: App) { | export default function(app: App) { | ||||||
| 	app.component('I18n', i18n); | 	app.component('I18n', i18n); | ||||||
| @@ -32,4 +33,5 @@ export default function(app: App) { | |||||||
| 	app.component('MkAd', ad); | 	app.component('MkAd', ad); | ||||||
| 	app.component('MkHeader', header); | 	app.component('MkHeader', header); | ||||||
| 	app.component('MkSpacer', spacer); | 	app.component('MkSpacer', spacer); | ||||||
|  | 	app.component('MkStickyContainer', stickyContainer); | ||||||
| } | } | ||||||
|   | |||||||
| @@ -11,9 +11,12 @@ | |||||||
| 			<button class="_button" @click="$refs.modal.close()"><i class="fas fa-times"></i></button> | 			<button class="_button" @click="$refs.modal.close()"><i class="fas fa-times"></i></button> | ||||||
| 		</div> | 		</div> | ||||||
| 		<div class="body"> | 		<div class="body"> | ||||||
| 			<keep-alive> | 			<MkStickyContainer> | ||||||
| 				<component :is="component" v-bind="props" :ref="changePage"/> | 				<template #header><MkHeader v-if="pageInfo && !pageInfo.hideHeader" :info="pageInfo"/></template> | ||||||
| 			</keep-alive> | 				<keep-alive> | ||||||
|  | 					<component :is="component" v-bind="props" :ref="changePage"/> | ||||||
|  | 				</keep-alive> | ||||||
|  | 			</MkStickyContainer> | ||||||
| 		</div> | 		</div> | ||||||
| 	</div> | 	</div> | ||||||
| </MkModal> | </MkModal> | ||||||
|   | |||||||
| @@ -17,7 +17,10 @@ | |||||||
| 		<button v-if="history.length > 0" class="_button" @click="back()" v-tooltip="$ts.goBack"><i class="fas fa-arrow-left"></i></button> | 		<button v-if="history.length > 0" class="_button" @click="back()" v-tooltip="$ts.goBack"><i class="fas fa-arrow-left"></i></button> | ||||||
| 	</template> | 	</template> | ||||||
| 	<div class="yrolvcoq"> | 	<div class="yrolvcoq"> | ||||||
| 		<component :is="component" v-bind="props" :ref="changePage"/> | 		<MkStickyContainer> | ||||||
|  | 			<template #header><MkHeader v-if="pageInfo && !pageInfo.hideHeader" :info="pageInfo"/></template> | ||||||
|  | 			<component :is="component" v-bind="props" :ref="changePage"/> | ||||||
|  | 		</MkStickyContainer> | ||||||
| 	</div> | 	</div> | ||||||
| </XWindow> | </XWindow> | ||||||
| </template> | </template> | ||||||
|   | |||||||
| @@ -1,45 +1,42 @@ | |||||||
| <template> | <template> | ||||||
| <div> | <div class="uqshojas"> | ||||||
| 	<MkHeader :info="header"/> | 	<section class="_card _gap ads" v-for="ad in ads"> | ||||||
| 	<div class="uqshojas"> | 		<div class="_content ad"> | ||||||
| 		<section class="_card _gap ads" v-for="ad in ads"> | 			<MkAd v-if="ad.url" :specify="ad"/> | ||||||
| 			<div class="_content ad"> | 			<MkInput v-model="ad.url" type="url"> | ||||||
| 				<MkAd v-if="ad.url" :specify="ad"/> | 				<template #label>URL</template> | ||||||
| 				<MkInput v-model="ad.url" type="url"> | 			</MkInput> | ||||||
| 					<template #label>URL</template> | 			<MkInput v-model="ad.imageUrl"> | ||||||
| 				</MkInput> | 				<template #label>{{ $ts.imageUrl }}</template> | ||||||
| 				<MkInput v-model="ad.imageUrl"> | 			</MkInput> | ||||||
| 					<template #label>{{ $ts.imageUrl }}</template> | 			<div style="margin: 32px 0;"> | ||||||
| 				</MkInput> | 				<MkRadio v-model="ad.place" value="square">square</MkRadio> | ||||||
| 				<div style="margin: 32px 0;"> | 				<MkRadio v-model="ad.place" value="horizontal">horizontal</MkRadio> | ||||||
| 					<MkRadio v-model="ad.place" value="square">square</MkRadio> | 				<MkRadio v-model="ad.place" value="horizontal-big">horizontal-big</MkRadio> | ||||||
| 					<MkRadio v-model="ad.place" value="horizontal">horizontal</MkRadio> |  | ||||||
| 					<MkRadio v-model="ad.place" value="horizontal-big">horizontal-big</MkRadio> |  | ||||||
| 				</div> |  | ||||||
| 				<!-- |  | ||||||
| 				<div style="margin: 32px 0;"> |  | ||||||
| 					{{ $ts.priority }} |  | ||||||
| 					<MkRadio v-model="ad.priority" value="high">{{ $ts.high }}</MkRadio> |  | ||||||
| 					<MkRadio v-model="ad.priority" value="middle">{{ $ts.middle }}</MkRadio> |  | ||||||
| 					<MkRadio v-model="ad.priority" value="low">{{ $ts.low }}</MkRadio> |  | ||||||
| 				</div> |  | ||||||
| 				--> |  | ||||||
| 				<MkInput v-model="ad.ratio" type="number"> |  | ||||||
| 					<template #label>{{ $ts.ratio }}</template> |  | ||||||
| 				</MkInput> |  | ||||||
| 				<MkInput v-model="ad.expiresAt" type="date"> |  | ||||||
| 					<template #label>{{ $ts.expiration }}</template> |  | ||||||
| 				</MkInput> |  | ||||||
| 				<MkTextarea v-model="ad.memo"> |  | ||||||
| 					<template #label>{{ $ts.memo }}</template> |  | ||||||
| 				</MkTextarea> |  | ||||||
| 				<div class="buttons"> |  | ||||||
| 					<MkButton class="button" inline @click="save(ad)" primary><i class="fas fa-save"></i> {{ $ts.save }}</MkButton> |  | ||||||
| 					<MkButton class="button" inline @click="remove(ad)" danger><i class="fas fa-trash-alt"></i> {{ $ts.remove }}</MkButton> |  | ||||||
| 				</div> |  | ||||||
| 			</div> | 			</div> | ||||||
| 		</section> | 			<!-- | ||||||
| 	</div> | 			<div style="margin: 32px 0;"> | ||||||
|  | 				{{ $ts.priority }} | ||||||
|  | 				<MkRadio v-model="ad.priority" value="high">{{ $ts.high }}</MkRadio> | ||||||
|  | 				<MkRadio v-model="ad.priority" value="middle">{{ $ts.middle }}</MkRadio> | ||||||
|  | 				<MkRadio v-model="ad.priority" value="low">{{ $ts.low }}</MkRadio> | ||||||
|  | 			</div> | ||||||
|  | 			--> | ||||||
|  | 			<MkInput v-model="ad.ratio" type="number"> | ||||||
|  | 				<template #label>{{ $ts.ratio }}</template> | ||||||
|  | 			</MkInput> | ||||||
|  | 			<MkInput v-model="ad.expiresAt" type="date"> | ||||||
|  | 				<template #label>{{ $ts.expiration }}</template> | ||||||
|  | 			</MkInput> | ||||||
|  | 			<MkTextarea v-model="ad.memo"> | ||||||
|  | 				<template #label>{{ $ts.memo }}</template> | ||||||
|  | 			</MkTextarea> | ||||||
|  | 			<div class="buttons"> | ||||||
|  | 				<MkButton class="button" inline @click="save(ad)" primary><i class="fas fa-save"></i> {{ $ts.save }}</MkButton> | ||||||
|  | 				<MkButton class="button" inline @click="remove(ad)" danger><i class="fas fa-trash-alt"></i> {{ $ts.remove }}</MkButton> | ||||||
|  | 			</div> | ||||||
|  | 		</div> | ||||||
|  | 	</section> | ||||||
| </div> | </div> | ||||||
| </template> | </template> | ||||||
|  |  | ||||||
| @@ -68,11 +65,6 @@ export default defineComponent({ | |||||||
| 				title: this.$ts.ads, | 				title: this.$ts.ads, | ||||||
| 				icon: 'fas fa-audio-description', | 				icon: 'fas fa-audio-description', | ||||||
| 				bg: 'var(--bg)', | 				bg: 'var(--bg)', | ||||||
| 			}, |  | ||||||
| 			header: { |  | ||||||
| 				title: this.$ts.ads, |  | ||||||
| 				icon: 'fas fa-audio-description', |  | ||||||
| 				bg: 'var(--bg)', |  | ||||||
| 				actions: [{ | 				actions: [{ | ||||||
| 					asFullButton: true, | 					asFullButton: true, | ||||||
| 					icon: 'fas fa-plus', | 					icon: 'fas fa-plus', | ||||||
|   | |||||||
| @@ -1,27 +1,23 @@ | |||||||
| <template> | <template> | ||||||
| <div> | <div class="ztgjmzrw"> | ||||||
| 	<MkHeader :info="header"/> | 	<section class="_card _gap announcements" v-for="announcement in announcements"> | ||||||
|  | 		<div class="_content announcement"> | ||||||
| 	<div class="ztgjmzrw"> | 			<MkInput v-model="announcement.title"> | ||||||
| 		<section class="_card _gap announcements" v-for="announcement in announcements"> | 				<template #label>{{ $ts.title }}</template> | ||||||
| 			<div class="_content announcement"> | 			</MkInput> | ||||||
| 				<MkInput v-model="announcement.title"> | 			<MkTextarea v-model="announcement.text"> | ||||||
| 					<template #label>{{ $ts.title }}</template> | 				<template #label>{{ $ts.text }}</template> | ||||||
| 				</MkInput> | 			</MkTextarea> | ||||||
| 				<MkTextarea v-model="announcement.text"> | 			<MkInput v-model="announcement.imageUrl"> | ||||||
| 					<template #label>{{ $ts.text }}</template> | 				<template #label>{{ $ts.imageUrl }}</template> | ||||||
| 				</MkTextarea> | 			</MkInput> | ||||||
| 				<MkInput v-model="announcement.imageUrl"> | 			<p v-if="announcement.reads">{{ $t('nUsersRead', { n: announcement.reads }) }}</p> | ||||||
| 					<template #label>{{ $ts.imageUrl }}</template> | 			<div class="buttons"> | ||||||
| 				</MkInput> | 				<MkButton class="button" inline @click="save(announcement)" primary><i class="fas fa-save"></i> {{ $ts.save }}</MkButton> | ||||||
| 				<p v-if="announcement.reads">{{ $t('nUsersRead', { n: announcement.reads }) }}</p> | 				<MkButton class="button" inline @click="remove(announcement)"><i class="fas fa-trash-alt"></i> {{ $ts.remove }}</MkButton> | ||||||
| 				<div class="buttons"> |  | ||||||
| 					<MkButton class="button" inline @click="save(announcement)" primary><i class="fas fa-save"></i> {{ $ts.save }}</MkButton> |  | ||||||
| 					<MkButton class="button" inline @click="remove(announcement)"><i class="fas fa-trash-alt"></i> {{ $ts.remove }}</MkButton> |  | ||||||
| 				</div> |  | ||||||
| 			</div> | 			</div> | ||||||
| 		</section> | 		</div> | ||||||
| 	</div> | 	</section> | ||||||
| </div> | </div> | ||||||
| </template> | </template> | ||||||
|  |  | ||||||
| @@ -48,11 +44,6 @@ export default defineComponent({ | |||||||
| 				title: this.$ts.announcements, | 				title: this.$ts.announcements, | ||||||
| 				icon: 'fas fa-broadcast-tower', | 				icon: 'fas fa-broadcast-tower', | ||||||
| 				bg: 'var(--bg)', | 				bg: 'var(--bg)', | ||||||
| 			}, |  | ||||||
| 			header: { |  | ||||||
| 				title: this.$ts.announcements, |  | ||||||
| 				icon: 'fas fa-broadcast-tower', |  | ||||||
| 				bg: 'var(--bg)', |  | ||||||
| 				actions: [{ | 				actions: [{ | ||||||
| 					asFullButton: true, | 					asFullButton: true, | ||||||
| 					icon: 'fas fa-plus', | 					icon: 'fas fa-plus', | ||||||
|   | |||||||
| @@ -1,7 +1,5 @@ | |||||||
| <template> | <template> | ||||||
| <div class="ogwlenmc"> | <div class="ogwlenmc"> | ||||||
| 	<MkHeader :info="header"/> |  | ||||||
|  |  | ||||||
| 	<div class="local" v-if="tab === 'local'"> | 	<div class="local" v-if="tab === 'local'"> | ||||||
| 		<MkInput v-model="query" :debounce="true" type="search" style="margin: var(--margin);"> | 		<MkInput v-model="query" :debounce="true" type="search" style="margin: var(--margin);"> | ||||||
| 			<template #prefix><i class="fas fa-search"></i></template> | 			<template #prefix><i class="fas fa-search"></i></template> | ||||||
| @@ -71,12 +69,7 @@ export default defineComponent({ | |||||||
|  |  | ||||||
| 	data() { | 	data() { | ||||||
| 		return { | 		return { | ||||||
| 			[symbols.PAGE_INFO]: { | 			[symbols.PAGE_INFO]: computed(() => ({ | ||||||
| 				title: this.$ts.customEmojis, |  | ||||||
| 				icon: 'fas fa-laugh', |  | ||||||
| 				bg: 'var(--bg)', |  | ||||||
| 			}, |  | ||||||
| 			header: computed(() => ({ |  | ||||||
| 				title: this.$ts.customEmojis, | 				title: this.$ts.customEmojis, | ||||||
| 				icon: 'fas fa-laugh', | 				icon: 'fas fa-laugh', | ||||||
| 				bg: 'var(--bg)', | 				bg: 'var(--bg)', | ||||||
|   | |||||||
| @@ -13,7 +13,10 @@ | |||||||
| 		<MkSuperMenu :def="menuDef" :grid="page == null"></MkSuperMenu> | 		<MkSuperMenu :def="menuDef" :grid="page == null"></MkSuperMenu> | ||||||
| 	</div> | 	</div> | ||||||
| 	<div class="main"> | 	<div class="main"> | ||||||
| 		<component :is="component" :key="page" @info="onInfo" v-bind="pageProps"/> | 		<MkStickyContainer> | ||||||
|  | 			<template #header><MkHeader v-if="childInfo && !childInfo.hideHeader" :info="childInfo"/></template> | ||||||
|  | 			<component :is="component" :key="page" @info="onInfo" v-bind="pageProps"/> | ||||||
|  | 		</MkStickyContainer> | ||||||
| 	</div> | 	</div> | ||||||
| </div> | </div> | ||||||
| </template> | </template> | ||||||
| @@ -41,6 +44,10 @@ export default defineComponent({ | |||||||
| 		MkInfo, | 		MkInfo, | ||||||
| 	}, | 	}, | ||||||
|  |  | ||||||
|  | 	provide: { | ||||||
|  | 		shouldOmitHeaderTitle: false, | ||||||
|  | 	}, | ||||||
|  |  | ||||||
| 	props: { | 	props: { | ||||||
| 		initialPage: { | 		initialPage: { | ||||||
| 			type: String, | 			type: String, | ||||||
| @@ -50,17 +57,19 @@ export default defineComponent({ | |||||||
|  |  | ||||||
| 	setup(props, context) { | 	setup(props, context) { | ||||||
| 		const indexInfo = { | 		const indexInfo = { | ||||||
| 			title: i18n.locale.instance, | 			title: i18n.locale.controlPanel, | ||||||
| 			icon: 'fas fa-cog', | 			icon: 'fas fa-cog', | ||||||
| 			bg: 'var(--bg)', | 			bg: 'var(--bg)', | ||||||
|  | 			hideHeader: true, | ||||||
| 		}; | 		}; | ||||||
| 		const INFO = ref(indexInfo); | 		const INFO = ref(indexInfo); | ||||||
|  | 		const childInfo = ref(null); | ||||||
| 		const page = ref(props.initialPage); | 		const page = ref(props.initialPage); | ||||||
| 		const narrow = ref(false); | 		const narrow = ref(false); | ||||||
| 		const view = ref(null); | 		const view = ref(null); | ||||||
| 		const el = ref(null); | 		const el = ref(null); | ||||||
| 		const onInfo = (viewInfo) => { | 		const onInfo = (viewInfo) => { | ||||||
| 			INFO.value = viewInfo; | 			childInfo.value = viewInfo; | ||||||
| 		}; | 		}; | ||||||
| 		const pageProps = ref({}); | 		const pageProps = ref({}); | ||||||
|  |  | ||||||
| @@ -315,6 +324,7 @@ export default defineComponent({ | |||||||
| 			view, | 			view, | ||||||
| 			el, | 			el, | ||||||
| 			onInfo, | 			onInfo, | ||||||
|  | 			childInfo, | ||||||
| 			pageProps, | 			pageProps, | ||||||
| 			component, | 			component, | ||||||
| 			invite, | 			invite, | ||||||
|   | |||||||
| @@ -1,71 +1,67 @@ | |||||||
| <template> | <template> | ||||||
| <div> | <div class="edbbcaef" v-size="{ max: [740] }"> | ||||||
| 	<MkHeader :info="header"/> | 	<div v-if="stats" class="cfcdecdf" style="margin: var(--margin)"> | ||||||
|  | 		<div class="number _panel"> | ||||||
| 	<div class="edbbcaef" v-size="{ max: [740] }"> | 			<div class="label">Users</div> | ||||||
| 		<div v-if="stats" class="cfcdecdf" style="margin: var(--margin)"> | 			<div class="value _monospace"> | ||||||
| 			<div class="number _panel"> | 				{{ number(stats.originalUsersCount) }} | ||||||
| 				<div class="label">Users</div> | 				<MkNumberDiff v-if="usersComparedToThePrevDay != null" class="diff" :value="usersComparedToThePrevDay" v-tooltip="$ts.dayOverDayChanges"><template #before>(</template><template #after>)</template></MkNumberDiff> | ||||||
| 				<div class="value _monospace"> |  | ||||||
| 					{{ number(stats.originalUsersCount) }} |  | ||||||
| 					<MkNumberDiff v-if="usersComparedToThePrevDay != null" class="diff" :value="usersComparedToThePrevDay" v-tooltip="$ts.dayOverDayChanges"><template #before>(</template><template #after>)</template></MkNumberDiff> |  | ||||||
| 				</div> |  | ||||||
| 			</div> |  | ||||||
| 			<div class="number _panel"> |  | ||||||
| 				<div class="label">Notes</div> |  | ||||||
| 				<div class="value _monospace"> |  | ||||||
| 					{{ number(stats.originalNotesCount) }} |  | ||||||
| 					<MkNumberDiff v-if="notesComparedToThePrevDay != null" class="diff" :value="notesComparedToThePrevDay" v-tooltip="$ts.dayOverDayChanges"><template #before>(</template><template #after>)</template></MkNumberDiff> |  | ||||||
| 				</div> |  | ||||||
| 			</div> | 			</div> | ||||||
| 		</div> | 		</div> | ||||||
|  | 		<div class="number _panel"> | ||||||
| 		<MkContainer :foldable="true" class="charts"> | 			<div class="label">Notes</div> | ||||||
| 			<template #header><i class="fas fa-chart-bar"></i>{{ $ts.charts }}</template> | 			<div class="value _monospace"> | ||||||
| 			<div style="padding-top: 12px;"> | 				{{ number(stats.originalNotesCount) }} | ||||||
| 				<MkInstanceStats :chart-limit="500" :detailed="true"/> | 				<MkNumberDiff v-if="notesComparedToThePrevDay != null" class="diff" :value="notesComparedToThePrevDay" v-tooltip="$ts.dayOverDayChanges"><template #before>(</template><template #after>)</template></MkNumberDiff> | ||||||
| 			</div> | 			</div> | ||||||
| 		</MkContainer> |  | ||||||
|  |  | ||||||
| 		<div class="queue"> |  | ||||||
| 			<MkContainer :foldable="true" :thin="true" class="deliver"> |  | ||||||
| 				<template #header>Queue: deliver</template> |  | ||||||
| 				<MkQueueChart :connection="queueStatsConnection" domain="deliver"/> |  | ||||||
| 			</MkContainer> |  | ||||||
| 			<MkContainer :foldable="true" :thin="true" class="inbox"> |  | ||||||
| 				<template #header>Queue: inbox</template> |  | ||||||
| 				<MkQueueChart :connection="queueStatsConnection" domain="inbox"/> |  | ||||||
| 			</MkContainer> |  | ||||||
| 		</div> | 		</div> | ||||||
|  |  | ||||||
| 			<!--<XMetrics/>--> |  | ||||||
|  |  | ||||||
| 		<MkFolder style="margin: var(--margin)"> |  | ||||||
| 			<template #header><i class="fas fa-info-circle"></i> {{ $ts.info }}</template> |  | ||||||
| 			<div class="cfcdecdf"> |  | ||||||
| 				<div class="number _panel"> |  | ||||||
| 					<div class="label">Misskey</div> |  | ||||||
| 					<div class="value _monospace">{{ version }}</div> |  | ||||||
| 				</div> |  | ||||||
| 				<div class="number _panel" v-if="serverInfo"> |  | ||||||
| 					<div class="label">Node.js</div> |  | ||||||
| 					<div class="value _monospace">{{ serverInfo.node }}</div> |  | ||||||
| 				</div> |  | ||||||
| 				<div class="number _panel" v-if="serverInfo"> |  | ||||||
| 					<div class="label">PostgreSQL</div> |  | ||||||
| 					<div class="value _monospace">{{ serverInfo.psql }}</div> |  | ||||||
| 				</div> |  | ||||||
| 				<div class="number _panel" v-if="serverInfo"> |  | ||||||
| 					<div class="label">Redis</div> |  | ||||||
| 					<div class="value _monospace">{{ serverInfo.redis }}</div> |  | ||||||
| 				</div> |  | ||||||
| 				<div class="number _panel"> |  | ||||||
| 					<div class="label">Vue</div> |  | ||||||
| 					<div class="value _monospace">{{ vueVersion }}</div> |  | ||||||
| 				</div> |  | ||||||
| 			</div> |  | ||||||
| 		</MkFolder> |  | ||||||
| 	</div> | 	</div> | ||||||
|  |  | ||||||
|  | 	<MkContainer :foldable="true" class="charts"> | ||||||
|  | 		<template #header><i class="fas fa-chart-bar"></i>{{ $ts.charts }}</template> | ||||||
|  | 		<div style="padding-top: 12px;"> | ||||||
|  | 			<MkInstanceStats :chart-limit="500" :detailed="true"/> | ||||||
|  | 		</div> | ||||||
|  | 	</MkContainer> | ||||||
|  |  | ||||||
|  | 	<div class="queue"> | ||||||
|  | 		<MkContainer :foldable="true" :thin="true" class="deliver"> | ||||||
|  | 			<template #header>Queue: deliver</template> | ||||||
|  | 			<MkQueueChart :connection="queueStatsConnection" domain="deliver"/> | ||||||
|  | 		</MkContainer> | ||||||
|  | 		<MkContainer :foldable="true" :thin="true" class="inbox"> | ||||||
|  | 			<template #header>Queue: inbox</template> | ||||||
|  | 			<MkQueueChart :connection="queueStatsConnection" domain="inbox"/> | ||||||
|  | 		</MkContainer> | ||||||
|  | 	</div> | ||||||
|  |  | ||||||
|  | 		<!--<XMetrics/>--> | ||||||
|  |  | ||||||
|  | 	<MkFolder style="margin: var(--margin)"> | ||||||
|  | 		<template #header><i class="fas fa-info-circle"></i> {{ $ts.info }}</template> | ||||||
|  | 		<div class="cfcdecdf"> | ||||||
|  | 			<div class="number _panel"> | ||||||
|  | 				<div class="label">Misskey</div> | ||||||
|  | 				<div class="value _monospace">{{ version }}</div> | ||||||
|  | 			</div> | ||||||
|  | 			<div class="number _panel" v-if="serverInfo"> | ||||||
|  | 				<div class="label">Node.js</div> | ||||||
|  | 				<div class="value _monospace">{{ serverInfo.node }}</div> | ||||||
|  | 			</div> | ||||||
|  | 			<div class="number _panel" v-if="serverInfo"> | ||||||
|  | 				<div class="label">PostgreSQL</div> | ||||||
|  | 				<div class="value _monospace">{{ serverInfo.psql }}</div> | ||||||
|  | 			</div> | ||||||
|  | 			<div class="number _panel" v-if="serverInfo"> | ||||||
|  | 				<div class="label">Redis</div> | ||||||
|  | 				<div class="value _monospace">{{ serverInfo.redis }}</div> | ||||||
|  | 			</div> | ||||||
|  | 			<div class="number _panel"> | ||||||
|  | 				<div class="label">Vue</div> | ||||||
|  | 				<div class="value _monospace">{{ vueVersion }}</div> | ||||||
|  | 			</div> | ||||||
|  | 		</div> | ||||||
|  | 	</MkFolder> | ||||||
| </div> | </div> | ||||||
| </template> | </template> | ||||||
|  |  | ||||||
| @@ -107,10 +103,6 @@ export default defineComponent({ | |||||||
| 				icon: 'fas fa-tachometer-alt', | 				icon: 'fas fa-tachometer-alt', | ||||||
| 				bg: 'var(--bg)', | 				bg: 'var(--bg)', | ||||||
| 			}, | 			}, | ||||||
| 			header: { |  | ||||||
| 				title: this.$ts.dashboard, |  | ||||||
| 				icon: 'fas fa-tachometer-alt', |  | ||||||
| 			}, |  | ||||||
| 			version, | 			version, | ||||||
| 			vueVersion, | 			vueVersion, | ||||||
| 			url, | 			url, | ||||||
|   | |||||||
| @@ -1,7 +1,5 @@ | |||||||
| <template> | <template> | ||||||
| <div class="lknzcolw"> | <div class="lknzcolw"> | ||||||
| 	<MkHeader :info="header"/> |  | ||||||
|  |  | ||||||
| 	<div class="users"> | 	<div class="users"> | ||||||
| 		<div class="inputs"> | 		<div class="inputs"> | ||||||
| 			<MkSelect v-model="sort" style="flex: 1;"> | 			<MkSelect v-model="sort" style="flex: 1;"> | ||||||
| @@ -90,11 +88,6 @@ export default defineComponent({ | |||||||
| 				title: this.$ts.users, | 				title: this.$ts.users, | ||||||
| 				icon: 'fas fa-users', | 				icon: 'fas fa-users', | ||||||
| 				bg: 'var(--bg)', | 				bg: 'var(--bg)', | ||||||
| 			}, |  | ||||||
| 			header: { |  | ||||||
| 				title: this.$ts.users, |  | ||||||
| 				icon: 'fas fa-users', |  | ||||||
| 				bg: 'var(--bg)', |  | ||||||
| 				actions: [{ | 				actions: [{ | ||||||
| 					icon: 'fas fa-search', | 					icon: 'fas fa-search', | ||||||
| 					text: this.$ts.search, | 					text: this.$ts.search, | ||||||
| @@ -109,7 +102,7 @@ export default defineComponent({ | |||||||
| 					icon: 'fas fa-search', | 					icon: 'fas fa-search', | ||||||
| 					text: this.$ts.lookup, | 					text: this.$ts.lookup, | ||||||
| 					handler: this.lookupUser | 					handler: this.lookupUser | ||||||
| 				}] | 				}], | ||||||
| 			}, | 			}, | ||||||
| 			sort: '+createdAt', | 			sort: '+createdAt', | ||||||
| 			state: 'all', | 			state: 'all', | ||||||
|   | |||||||
| @@ -1,20 +1,17 @@ | |||||||
| <template> | <template> | ||||||
| <div> | <div class="_section"> | ||||||
| 	<MkHeader :info="header"/> | 	<MkPagination :pagination="pagination" #default="{items}" class="ruryvtyk _content"> | ||||||
| 	<div class="_section"> | 		<section class="_card announcement _gap" v-for="(announcement, i) in items" :key="announcement.id"> | ||||||
| 		<MkPagination :pagination="pagination" #default="{items}" class="ruryvtyk _content"> | 			<div class="_title"><span v-if="$i && !announcement.isRead">🆕 </span>{{ announcement.title }}</div> | ||||||
| 			<section class="_card announcement _gap" v-for="(announcement, i) in items" :key="announcement.id"> | 			<div class="_content"> | ||||||
| 				<div class="_title"><span v-if="$i && !announcement.isRead">🆕 </span>{{ announcement.title }}</div> | 				<Mfm :text="announcement.text"/> | ||||||
| 				<div class="_content"> | 				<img v-if="announcement.imageUrl" :src="announcement.imageUrl"/> | ||||||
| 					<Mfm :text="announcement.text"/> | 			</div> | ||||||
| 					<img v-if="announcement.imageUrl" :src="announcement.imageUrl"/> | 			<div class="_footer" v-if="$i && !announcement.isRead"> | ||||||
| 				</div> | 				<MkButton @click="read(items, announcement, i)" primary><i class="fas fa-check"></i> {{ $ts.gotIt }}</MkButton> | ||||||
| 				<div class="_footer" v-if="$i && !announcement.isRead"> | 			</div> | ||||||
| 					<MkButton @click="read(items, announcement, i)" primary><i class="fas fa-check"></i> {{ $ts.gotIt }}</MkButton> | 		</section> | ||||||
| 				</div> | 	</MkPagination> | ||||||
| 			</section> |  | ||||||
| 		</MkPagination> |  | ||||||
| 	</div> |  | ||||||
| </div> | </div> | ||||||
| </template> | </template> | ||||||
|  |  | ||||||
| @@ -38,11 +35,6 @@ export default defineComponent({ | |||||||
| 				icon: 'fas fa-broadcast-tower', | 				icon: 'fas fa-broadcast-tower', | ||||||
| 				bg: 'var(--bg)', | 				bg: 'var(--bg)', | ||||||
| 			}, | 			}, | ||||||
| 			header: { |  | ||||||
| 				title: this.$ts.announcements, |  | ||||||
| 				icon: 'fas fa-broadcast-tower', |  | ||||||
| 				bg: 'var(--bg)', |  | ||||||
| 			}, |  | ||||||
| 			pagination: { | 			pagination: { | ||||||
| 				endpoint: 'announcements', | 				endpoint: 'announcements', | ||||||
| 				limit: 10, | 				limit: 10, | ||||||
|   | |||||||
| @@ -1,9 +1,6 @@ | |||||||
| <template> | <template> | ||||||
| <div> | <div :class="$style.root"> | ||||||
| 	<MkHeader :info="header"/> | 	<XCategory v-if="tab === 'category'"/> | ||||||
| 	<div :class="$style.root"> |  | ||||||
| 		<XCategory v-if="tab === 'category'"/> |  | ||||||
| 	</div> |  | ||||||
| </div> | </div> | ||||||
| </template> | </template> | ||||||
|  |  | ||||||
| @@ -25,11 +22,6 @@ export default defineComponent({ | |||||||
| 				icon: 'fas fa-laugh', | 				icon: 'fas fa-laugh', | ||||||
| 				bg: 'var(--bg)', | 				bg: 'var(--bg)', | ||||||
| 			})), | 			})), | ||||||
| 			header: computed(() => ({ |  | ||||||
| 				title: this.$ts.customEmojis, |  | ||||||
| 				icon: 'fas fa-laugh', |  | ||||||
| 				bg: 'var(--bg)', |  | ||||||
| 			})), |  | ||||||
| 			tab: 'category', | 			tab: 'category', | ||||||
| 		} | 		} | ||||||
| 	}, | 	}, | ||||||
|   | |||||||
| @@ -1,7 +1,5 @@ | |||||||
| <template> | <template> | ||||||
| <div> | <div> | ||||||
| 	<MkHeader :info="header"/> |  | ||||||
|  |  | ||||||
| 	<MkSpacer :content-max="1200"> | 	<MkSpacer :content-max="1200"> | ||||||
| 		<div class="lznhrdub"> | 		<div class="lznhrdub"> | ||||||
| 			<div v-if="tab === 'local'"> | 			<div v-if="tab === 'local'"> | ||||||
| @@ -110,13 +108,7 @@ export default defineComponent({ | |||||||
|  |  | ||||||
| 	data() { | 	data() { | ||||||
| 		return { | 		return { | ||||||
| 			[symbols.PAGE_INFO]: { | 			[symbols.PAGE_INFO]: computed(() => ({ | ||||||
| 				title: this.$ts.explore, |  | ||||||
| 				icon: 'fas fa-hashtag', |  | ||||||
| 				bg: 'var(--bg)', |  | ||||||
| 			}, |  | ||||||
| 			tab: 'local', |  | ||||||
| 			header: computed(() => ({ |  | ||||||
| 				title: this.$ts.explore, | 				title: this.$ts.explore, | ||||||
| 				icon: 'fas fa-hashtag', | 				icon: 'fas fa-hashtag', | ||||||
| 				bg: 'var(--bg)', | 				bg: 'var(--bg)', | ||||||
| @@ -134,6 +126,7 @@ export default defineComponent({ | |||||||
| 					onClick: () => { this.tab = 'search'; }, | 					onClick: () => { this.tab = 'search'; }, | ||||||
| 				},] | 				},] | ||||||
| 			})), | 			})), | ||||||
|  | 			tab: 'local', | ||||||
| 			pinnedUsers: { endpoint: 'pinned-users' }, | 			pinnedUsers: { endpoint: 'pinned-users' }, | ||||||
| 			popularUsers: { endpoint: 'users', limit: 10, noPaging: true, params: { | 			popularUsers: { endpoint: 'users', limit: 10, noPaging: true, params: { | ||||||
| 				state: 'alive', | 				state: 'alive', | ||||||
|   | |||||||
| @@ -1,10 +1,7 @@ | |||||||
| <template> | <template> | ||||||
| <div> | <div class="jmelgwjh"> | ||||||
| 	<MkHeader :info="header"/> | 	<div class="body"> | ||||||
| 	<div class="jmelgwjh"> | 		<XNotes class="notes" :pagination="pagination" :detail="true" :prop="'note'" @before="before()" @after="after()"/> | ||||||
| 		<div class="body"> |  | ||||||
| 			<XNotes class="notes" :pagination="pagination" :detail="true" :prop="'note'" @before="before()" @after="after()"/> |  | ||||||
| 		</div> |  | ||||||
| 	</div> | 	</div> | ||||||
| </div> | </div> | ||||||
| </template> | </template> | ||||||
| @@ -28,11 +25,6 @@ export default defineComponent({ | |||||||
| 				icon: 'fas fa-star', | 				icon: 'fas fa-star', | ||||||
| 				bg: 'var(--bg)', | 				bg: 'var(--bg)', | ||||||
| 			}, | 			}, | ||||||
| 			header: { |  | ||||||
| 				title: this.$ts.favorites, |  | ||||||
| 				icon: 'fas fa-star', |  | ||||||
| 				bg: 'var(--bg)', |  | ||||||
| 			}, |  | ||||||
| 			pagination: { | 			pagination: { | ||||||
| 				endpoint: 'i/favorites', | 				endpoint: 'i/favorites', | ||||||
| 				limit: 10, | 				limit: 10, | ||||||
|   | |||||||
| @@ -1,9 +1,6 @@ | |||||||
| <template> | <template> | ||||||
| <div> | <div class="_section"> | ||||||
| 	<MkHeader :info="header"/> | 	<XNotes class="_content" ref="notes" :pagination="pagination" @before="before" @after="after"/> | ||||||
| 	<div class="_section"> |  | ||||||
| 		<XNotes class="_content" ref="notes" :pagination="pagination" @before="before" @after="after"/> |  | ||||||
| 	</div> |  | ||||||
| </div> | </div> | ||||||
| </template> | </template> | ||||||
|  |  | ||||||
| @@ -25,11 +22,6 @@ export default defineComponent({ | |||||||
| 				icon: 'fas fa-fire-alt', | 				icon: 'fas fa-fire-alt', | ||||||
| 				bg: 'var(--bg)', | 				bg: 'var(--bg)', | ||||||
| 			}, | 			}, | ||||||
| 			header: { |  | ||||||
| 				title: this.$ts.featured, |  | ||||||
| 				icon: 'fas fa-fire-alt', |  | ||||||
| 				bg: 'var(--bg)', |  | ||||||
| 			}, |  | ||||||
| 			pagination: { | 			pagination: { | ||||||
| 				endpoint: 'notes/featured', | 				endpoint: 'notes/featured', | ||||||
| 				limit: 10, | 				limit: 10, | ||||||
|   | |||||||
| @@ -1,98 +1,95 @@ | |||||||
| <template> | <template> | ||||||
| <div> | <div class="taeiyria"> | ||||||
| 	<MkHeader :info="header"/> | 	<div class="query"> | ||||||
| 	<div class="taeiyria"> | 		<MkInput v-model="host" :debounce="true" class=""> | ||||||
| 		<div class="query"> | 			<template #prefix><i class="fas fa-search"></i></template> | ||||||
| 			<MkInput v-model="host" :debounce="true" class=""> | 			<template #label>{{ $ts.host }}</template> | ||||||
| 				<template #prefix><i class="fas fa-search"></i></template> | 		</MkInput> | ||||||
| 				<template #label>{{ $ts.host }}</template> | 		<div class="_inputSplit"> | ||||||
| 			</MkInput> | 			<MkSelect v-model="state"> | ||||||
| 			<div class="_inputSplit"> | 				<template #label>{{ $ts.state }}</template> | ||||||
| 				<MkSelect v-model="state"> | 				<option value="all">{{ $ts.all }}</option> | ||||||
| 					<template #label>{{ $ts.state }}</template> | 				<option value="federating">{{ $ts.federating }}</option> | ||||||
| 					<option value="all">{{ $ts.all }}</option> | 				<option value="subscribing">{{ $ts.subscribing }}</option> | ||||||
| 					<option value="federating">{{ $ts.federating }}</option> | 				<option value="publishing">{{ $ts.publishing }}</option> | ||||||
| 					<option value="subscribing">{{ $ts.subscribing }}</option> | 				<option value="suspended">{{ $ts.suspended }}</option> | ||||||
| 					<option value="publishing">{{ $ts.publishing }}</option> | 				<option value="blocked">{{ $ts.blocked }}</option> | ||||||
| 					<option value="suspended">{{ $ts.suspended }}</option> | 				<option value="notResponding">{{ $ts.notResponding }}</option> | ||||||
| 					<option value="blocked">{{ $ts.blocked }}</option> | 			</MkSelect> | ||||||
| 					<option value="notResponding">{{ $ts.notResponding }}</option> | 			<MkSelect v-model="sort"> | ||||||
| 				</MkSelect> | 				<template #label>{{ $ts.sort }}</template> | ||||||
| 				<MkSelect v-model="sort"> | 				<option value="+pubSub">{{ $ts.pubSub }} ({{ $ts.descendingOrder }})</option> | ||||||
| 					<template #label>{{ $ts.sort }}</template> | 				<option value="-pubSub">{{ $ts.pubSub }} ({{ $ts.ascendingOrder }})</option> | ||||||
| 					<option value="+pubSub">{{ $ts.pubSub }} ({{ $ts.descendingOrder }})</option> | 				<option value="+notes">{{ $ts.notes }} ({{ $ts.descendingOrder }})</option> | ||||||
| 					<option value="-pubSub">{{ $ts.pubSub }} ({{ $ts.ascendingOrder }})</option> | 				<option value="-notes">{{ $ts.notes }} ({{ $ts.ascendingOrder }})</option> | ||||||
| 					<option value="+notes">{{ $ts.notes }} ({{ $ts.descendingOrder }})</option> | 				<option value="+users">{{ $ts.users }} ({{ $ts.descendingOrder }})</option> | ||||||
| 					<option value="-notes">{{ $ts.notes }} ({{ $ts.ascendingOrder }})</option> | 				<option value="-users">{{ $ts.users }} ({{ $ts.ascendingOrder }})</option> | ||||||
| 					<option value="+users">{{ $ts.users }} ({{ $ts.descendingOrder }})</option> | 				<option value="+following">{{ $ts.following }} ({{ $ts.descendingOrder }})</option> | ||||||
| 					<option value="-users">{{ $ts.users }} ({{ $ts.ascendingOrder }})</option> | 				<option value="-following">{{ $ts.following }} ({{ $ts.ascendingOrder }})</option> | ||||||
| 					<option value="+following">{{ $ts.following }} ({{ $ts.descendingOrder }})</option> | 				<option value="+followers">{{ $ts.followers }} ({{ $ts.descendingOrder }})</option> | ||||||
| 					<option value="-following">{{ $ts.following }} ({{ $ts.ascendingOrder }})</option> | 				<option value="-followers">{{ $ts.followers }} ({{ $ts.ascendingOrder }})</option> | ||||||
| 					<option value="+followers">{{ $ts.followers }} ({{ $ts.descendingOrder }})</option> | 				<option value="+caughtAt">{{ $ts.registeredAt }} ({{ $ts.descendingOrder }})</option> | ||||||
| 					<option value="-followers">{{ $ts.followers }} ({{ $ts.ascendingOrder }})</option> | 				<option value="-caughtAt">{{ $ts.registeredAt }} ({{ $ts.ascendingOrder }})</option> | ||||||
| 					<option value="+caughtAt">{{ $ts.registeredAt }} ({{ $ts.descendingOrder }})</option> | 				<option value="+lastCommunicatedAt">{{ $ts.lastCommunication }} ({{ $ts.descendingOrder }})</option> | ||||||
| 					<option value="-caughtAt">{{ $ts.registeredAt }} ({{ $ts.ascendingOrder }})</option> | 				<option value="-lastCommunicatedAt">{{ $ts.lastCommunication }} ({{ $ts.ascendingOrder }})</option> | ||||||
| 					<option value="+lastCommunicatedAt">{{ $ts.lastCommunication }} ({{ $ts.descendingOrder }})</option> | 				<option value="+driveUsage">{{ $ts.driveUsage }} ({{ $ts.descendingOrder }})</option> | ||||||
| 					<option value="-lastCommunicatedAt">{{ $ts.lastCommunication }} ({{ $ts.ascendingOrder }})</option> | 				<option value="-driveUsage">{{ $ts.driveUsage }} ({{ $ts.ascendingOrder }})</option> | ||||||
| 					<option value="+driveUsage">{{ $ts.driveUsage }} ({{ $ts.descendingOrder }})</option> | 				<option value="+driveFiles">{{ $ts.driveFilesCount }} ({{ $ts.descendingOrder }})</option> | ||||||
| 					<option value="-driveUsage">{{ $ts.driveUsage }} ({{ $ts.ascendingOrder }})</option> | 				<option value="-driveFiles">{{ $ts.driveFilesCount }} ({{ $ts.ascendingOrder }})</option> | ||||||
| 					<option value="+driveFiles">{{ $ts.driveFilesCount }} ({{ $ts.descendingOrder }})</option> | 			</MkSelect> | ||||||
| 					<option value="-driveFiles">{{ $ts.driveFilesCount }} ({{ $ts.ascendingOrder }})</option> |  | ||||||
| 				</MkSelect> |  | ||||||
| 			</div> |  | ||||||
| 		</div> | 		</div> | ||||||
|  |  | ||||||
| 		<MkPagination :pagination="pagination" #default="{items}" ref="instances" :key="host + state"> |  | ||||||
| 			<div class="dqokceoi"> |  | ||||||
| 				<MkA class="instance" v-for="instance in items" :key="instance.id" :to="`/instance-info/${instance.host}`"> |  | ||||||
| 					<div class="host"><img :src="instance.faviconUrl">{{ instance.host }}</div> |  | ||||||
| 					<div class="table"> |  | ||||||
| 						<div class="cell"> |  | ||||||
| 							<div class="key">{{ $ts.registeredAt }}</div> |  | ||||||
| 							<div class="value"><MkTime :time="instance.caughtAt"/></div> |  | ||||||
| 						</div> |  | ||||||
| 						<div class="cell"> |  | ||||||
| 							<div class="key">{{ $ts.software }}</div> |  | ||||||
| 							<div class="value">{{ instance.softwareName || `(${$ts.unknown})` }}</div> |  | ||||||
| 						</div> |  | ||||||
| 						<div class="cell"> |  | ||||||
| 							<div class="key">{{ $ts.version }}</div> |  | ||||||
| 							<div class="value">{{ instance.softwareVersion || `(${$ts.unknown})` }}</div> |  | ||||||
| 						</div> |  | ||||||
| 						<div class="cell"> |  | ||||||
| 							<div class="key">{{ $ts.users }}</div> |  | ||||||
| 							<div class="value">{{ instance.usersCount }}</div> |  | ||||||
| 						</div> |  | ||||||
| 						<div class="cell"> |  | ||||||
| 							<div class="key">{{ $ts.notes }}</div> |  | ||||||
| 							<div class="value">{{ instance.notesCount }}</div> |  | ||||||
| 						</div> |  | ||||||
| 						<div class="cell"> |  | ||||||
| 							<div class="key">{{ $ts.sent }}</div> |  | ||||||
| 							<div class="value"><MkTime v-if="instance.latestRequestSentAt" :time="instance.latestRequestSentAt"/><span v-else>N/A</span></div> |  | ||||||
| 						</div> |  | ||||||
| 						<div class="cell"> |  | ||||||
| 							<div class="key">{{ $ts.received }}</div> |  | ||||||
| 							<div class="value"><MkTime v-if="instance.latestRequestReceivedAt" :time="instance.latestRequestReceivedAt"/><span v-else>N/A</span></div> |  | ||||||
| 						</div> |  | ||||||
| 					</div> |  | ||||||
| 					<div class="footer"> |  | ||||||
| 						<span class="status" :class="getStatus(instance)">{{ getStatus(instance) }}</span> |  | ||||||
| 						<span class="pubSub"> |  | ||||||
| 							<span class="sub" v-if="instance.followersCount > 0"><i class="fas fa-caret-down icon"></i>Sub</span> |  | ||||||
| 							<span class="sub" v-else><i class="fas fa-caret-down icon"></i>-</span> |  | ||||||
| 							<span class="pub" v-if="instance.followingCount > 0"><i class="fas fa-caret-up icon"></i>Pub</span> |  | ||||||
| 							<span class="pub" v-else><i class="fas fa-caret-up icon"></i>-</span> |  | ||||||
| 						</span> |  | ||||||
| 						<span class="right"> |  | ||||||
| 							<span class="latestStatus">{{ instance.latestStatus || '-' }}</span> |  | ||||||
| 							<span class="lastCommunicatedAt"><MkTime :time="instance.lastCommunicatedAt"/></span> |  | ||||||
| 						</span> |  | ||||||
| 					</div> |  | ||||||
| 				</MkA> |  | ||||||
| 			</div> |  | ||||||
| 		</MkPagination> |  | ||||||
| 	</div> | 	</div> | ||||||
|  |  | ||||||
|  | 	<MkPagination :pagination="pagination" #default="{items}" ref="instances" :key="host + state"> | ||||||
|  | 		<div class="dqokceoi"> | ||||||
|  | 			<MkA class="instance" v-for="instance in items" :key="instance.id" :to="`/instance-info/${instance.host}`"> | ||||||
|  | 				<div class="host"><img :src="instance.faviconUrl">{{ instance.host }}</div> | ||||||
|  | 				<div class="table"> | ||||||
|  | 					<div class="cell"> | ||||||
|  | 						<div class="key">{{ $ts.registeredAt }}</div> | ||||||
|  | 						<div class="value"><MkTime :time="instance.caughtAt"/></div> | ||||||
|  | 					</div> | ||||||
|  | 					<div class="cell"> | ||||||
|  | 						<div class="key">{{ $ts.software }}</div> | ||||||
|  | 						<div class="value">{{ instance.softwareName || `(${$ts.unknown})` }}</div> | ||||||
|  | 					</div> | ||||||
|  | 					<div class="cell"> | ||||||
|  | 						<div class="key">{{ $ts.version }}</div> | ||||||
|  | 						<div class="value">{{ instance.softwareVersion || `(${$ts.unknown})` }}</div> | ||||||
|  | 					</div> | ||||||
|  | 					<div class="cell"> | ||||||
|  | 						<div class="key">{{ $ts.users }}</div> | ||||||
|  | 						<div class="value">{{ instance.usersCount }}</div> | ||||||
|  | 					</div> | ||||||
|  | 					<div class="cell"> | ||||||
|  | 						<div class="key">{{ $ts.notes }}</div> | ||||||
|  | 						<div class="value">{{ instance.notesCount }}</div> | ||||||
|  | 					</div> | ||||||
|  | 					<div class="cell"> | ||||||
|  | 						<div class="key">{{ $ts.sent }}</div> | ||||||
|  | 						<div class="value"><MkTime v-if="instance.latestRequestSentAt" :time="instance.latestRequestSentAt"/><span v-else>N/A</span></div> | ||||||
|  | 					</div> | ||||||
|  | 					<div class="cell"> | ||||||
|  | 						<div class="key">{{ $ts.received }}</div> | ||||||
|  | 						<div class="value"><MkTime v-if="instance.latestRequestReceivedAt" :time="instance.latestRequestReceivedAt"/><span v-else>N/A</span></div> | ||||||
|  | 					</div> | ||||||
|  | 				</div> | ||||||
|  | 				<div class="footer"> | ||||||
|  | 					<span class="status" :class="getStatus(instance)">{{ getStatus(instance) }}</span> | ||||||
|  | 					<span class="pubSub"> | ||||||
|  | 						<span class="sub" v-if="instance.followersCount > 0"><i class="fas fa-caret-down icon"></i>Sub</span> | ||||||
|  | 						<span class="sub" v-else><i class="fas fa-caret-down icon"></i>-</span> | ||||||
|  | 						<span class="pub" v-if="instance.followingCount > 0"><i class="fas fa-caret-up icon"></i>Pub</span> | ||||||
|  | 						<span class="pub" v-else><i class="fas fa-caret-up icon"></i>-</span> | ||||||
|  | 					</span> | ||||||
|  | 					<span class="right"> | ||||||
|  | 						<span class="latestStatus">{{ instance.latestStatus || '-' }}</span> | ||||||
|  | 						<span class="lastCommunicatedAt"><MkTime :time="instance.lastCommunicatedAt"/></span> | ||||||
|  | 					</span> | ||||||
|  | 				</div> | ||||||
|  | 			</MkA> | ||||||
|  | 		</div> | ||||||
|  | 	</MkPagination> | ||||||
| </div> | </div> | ||||||
| </template> | </template> | ||||||
|  |  | ||||||
| @@ -122,11 +119,6 @@ export default defineComponent({ | |||||||
| 				icon: 'fas fa-globe', | 				icon: 'fas fa-globe', | ||||||
| 				bg: 'var(--bg)', | 				bg: 'var(--bg)', | ||||||
| 			}, | 			}, | ||||||
| 			header: { |  | ||||||
| 				title: this.$ts.federation, |  | ||||||
| 				icon: 'fas fa-globe', |  | ||||||
| 				bg: 'var(--bg)', |  | ||||||
| 			}, |  | ||||||
| 			host: '', | 			host: '', | ||||||
| 			state: 'federating', | 			state: 'federating', | ||||||
| 			sort: '+pubSub', | 			sort: '+pubSub', | ||||||
|   | |||||||
| @@ -1,9 +1,6 @@ | |||||||
| <template> | <template> | ||||||
| <div> | <div class="_section"> | ||||||
| 	<MkHeader :info="header"/> | 	<XNotes class="_content" :pagination="pagination" @before="before()" @after="after()"/> | ||||||
| 	<div class="_section"> |  | ||||||
| 		<XNotes class="_content" :pagination="pagination" @before="before()" @after="after()"/> |  | ||||||
| 	</div> |  | ||||||
| </div> | </div> | ||||||
| </template> | </template> | ||||||
|  |  | ||||||
| @@ -25,11 +22,6 @@ export default defineComponent({ | |||||||
| 				icon: 'fas fa-at', | 				icon: 'fas fa-at', | ||||||
| 				bg: 'var(--bg)', | 				bg: 'var(--bg)', | ||||||
| 			}, | 			}, | ||||||
| 			header: { |  | ||||||
| 				title: this.$ts.mentions, |  | ||||||
| 				icon: 'fas fa-at', |  | ||||||
| 				bg: 'var(--bg)', |  | ||||||
| 			}, |  | ||||||
| 			pagination: { | 			pagination: { | ||||||
| 				endpoint: 'notes/mentions', | 				endpoint: 'notes/mentions', | ||||||
| 				limit: 10, | 				limit: 10, | ||||||
|   | |||||||
| @@ -1,9 +1,6 @@ | |||||||
| <template> | <template> | ||||||
| <div> | <div> | ||||||
| 	<MkHeader :info="header"/> | 	<XNotes :pagination="pagination" @before="before()" @after="after()"/> | ||||||
| 	<div> |  | ||||||
| 		<XNotes :pagination="pagination" @before="before()" @after="after()"/> |  | ||||||
| 	</div> |  | ||||||
| </div> | </div> | ||||||
| </template> | </template> | ||||||
|  |  | ||||||
| @@ -25,11 +22,6 @@ export default defineComponent({ | |||||||
| 				icon: 'fas fa-envelope', | 				icon: 'fas fa-envelope', | ||||||
| 				bg: 'var(--bg)', | 				bg: 'var(--bg)', | ||||||
| 			}, | 			}, | ||||||
| 			header: { |  | ||||||
| 				title: this.$ts.directNotes, |  | ||||||
| 				icon: 'fas fa-envelope', |  | ||||||
| 				bg: 'var(--bg)', |  | ||||||
| 			}, |  | ||||||
| 			pagination: { | 			pagination: { | ||||||
| 				endpoint: 'notes/mentions', | 				endpoint: 'notes/mentions', | ||||||
| 				limit: 10, | 				limit: 10, | ||||||
|   | |||||||
| @@ -1,45 +1,41 @@ | |||||||
| <template> | <template> | ||||||
| <div> | <MkSpacer :content-max="800"> | ||||||
| 	<MkHeader :info="header"/> | 	<div class="yweeujhr" v-size="{ max: [400] }"> | ||||||
|  | 		<MkButton @click="start" primary class="start"><i class="fas fa-plus"></i> {{ $ts.startMessaging }}</MkButton> | ||||||
|  |  | ||||||
| 	<MkSpacer :content-max="800"> | 		<div class="history" v-if="messages.length > 0"> | ||||||
| 		<div class="yweeujhr" v-size="{ max: [400] }"> | 			<MkA v-for="(message, i) in messages" | ||||||
| 			<MkButton @click="start" primary class="start"><i class="fas fa-plus"></i> {{ $ts.startMessaging }}</MkButton> | 				class="message _block" | ||||||
|  | 				:class="{ isMe: isMe(message), isRead: message.groupId ? message.reads.includes($i.id) : message.isRead }" | ||||||
| 			<div class="history" v-if="messages.length > 0"> | 				:to="message.groupId ? `/my/messaging/group/${message.groupId}` : `/my/messaging/${getAcct(isMe(message) ? message.recipient : message.user)}`" | ||||||
| 				<MkA v-for="(message, i) in messages" | 				:data-index="i" | ||||||
| 					class="message _block" | 				:key="message.id" | ||||||
| 					:class="{ isMe: isMe(message), isRead: message.groupId ? message.reads.includes($i.id) : message.isRead }" | 				v-anim="i" | ||||||
| 					:to="message.groupId ? `/my/messaging/group/${message.groupId}` : `/my/messaging/${getAcct(isMe(message) ? message.recipient : message.user)}`" | 			> | ||||||
| 					:data-index="i" | 				<div> | ||||||
| 					:key="message.id" | 					<MkAvatar class="avatar" :user="message.groupId ? message.user : isMe(message) ? message.recipient : message.user" :show-indicator="true"/> | ||||||
| 					v-anim="i" | 					<header v-if="message.groupId"> | ||||||
| 				> | 						<span class="name">{{ message.group.name }}</span> | ||||||
| 					<div> | 						<MkTime :time="message.createdAt" class="time"/> | ||||||
| 						<MkAvatar class="avatar" :user="message.groupId ? message.user : isMe(message) ? message.recipient : message.user" :show-indicator="true"/> | 					</header> | ||||||
| 						<header v-if="message.groupId"> | 					<header v-else> | ||||||
| 							<span class="name">{{ message.group.name }}</span> | 						<span class="name"><MkUserName :user="isMe(message) ? message.recipient : message.user"/></span> | ||||||
| 							<MkTime :time="message.createdAt" class="time"/> | 						<span class="username">@{{ acct(isMe(message) ? message.recipient : message.user) }}</span> | ||||||
| 						</header> | 						<MkTime :time="message.createdAt" class="time"/> | ||||||
| 						<header v-else> | 					</header> | ||||||
| 							<span class="name"><MkUserName :user="isMe(message) ? message.recipient : message.user"/></span> | 					<div class="body"> | ||||||
| 							<span class="username">@{{ acct(isMe(message) ? message.recipient : message.user) }}</span> | 						<p class="text"><span class="me" v-if="isMe(message)">{{ $ts.you }}:</span>{{ message.text }}</p> | ||||||
| 							<MkTime :time="message.createdAt" class="time"/> |  | ||||||
| 						</header> |  | ||||||
| 						<div class="body"> |  | ||||||
| 							<p class="text"><span class="me" v-if="isMe(message)">{{ $ts.you }}:</span>{{ message.text }}</p> |  | ||||||
| 						</div> |  | ||||||
| 					</div> | 					</div> | ||||||
| 				</MkA> | 				</div> | ||||||
| 			</div> | 			</MkA> | ||||||
| 			<div class="_fullinfo" v-if="!fetching && messages.length == 0"> |  | ||||||
| 				<img src="https://xn--931a.moe/assets/info.jpg" class="_ghost"/> |  | ||||||
| 				<div>{{ $ts.noHistory }}</div> |  | ||||||
| 			</div> |  | ||||||
| 			<MkLoading v-if="fetching"/> |  | ||||||
| 		</div> | 		</div> | ||||||
| 	</MkSpacer> | 		<div class="_fullinfo" v-if="!fetching && messages.length == 0"> | ||||||
| </div> | 			<img src="https://xn--931a.moe/assets/info.jpg" class="_ghost"/> | ||||||
|  | 			<div>{{ $ts.noHistory }}</div> | ||||||
|  | 		</div> | ||||||
|  | 		<MkLoading v-if="fetching"/> | ||||||
|  | 	</div> | ||||||
|  | </MkSpacer> | ||||||
| </template> | </template> | ||||||
|  |  | ||||||
| <script lang="ts"> | <script lang="ts"> | ||||||
| @@ -62,11 +58,6 @@ export default defineComponent({ | |||||||
| 				icon: 'fas fa-comments', | 				icon: 'fas fa-comments', | ||||||
| 				bg: 'var(--bg)', | 				bg: 'var(--bg)', | ||||||
| 			}, | 			}, | ||||||
| 			header: { |  | ||||||
| 				title: this.$ts.messaging, |  | ||||||
| 				icon: 'fas fa-comments', |  | ||||||
| 				bg: 'var(--bg)', |  | ||||||
| 			}, |  | ||||||
| 			fetching: true, | 			fetching: true, | ||||||
| 			moreFetching: false, | 			moreFetching: false, | ||||||
| 			messages: [], | 			messages: [], | ||||||
|   | |||||||
| @@ -1,16 +1,13 @@ | |||||||
| <template> | <template> | ||||||
| <div> | <div class="qkcjvfiv"> | ||||||
| 	<MkHeader :info="header"/> | 	<MkButton @click="create" primary class="add"><i class="fas fa-plus"></i> {{ $ts.createList }}</MkButton> | ||||||
| 	<div class="qkcjvfiv"> |  | ||||||
| 		<MkButton @click="create" primary class="add"><i class="fas fa-plus"></i> {{ $ts.createList }}</MkButton> |  | ||||||
|  |  | ||||||
| 		<MkPagination :pagination="pagination" #default="{items}" class="lists _content" ref="list"> | 	<MkPagination :pagination="pagination" #default="{items}" class="lists _content" ref="list"> | ||||||
| 			<MkA v-for="list in items" :key="list.id" class="list _panel" :to="`/my/lists/${ list.id }`"> | 		<MkA v-for="list in items" :key="list.id" class="list _panel" :to="`/my/lists/${ list.id }`"> | ||||||
| 				<div class="name">{{ list.name }}</div> | 			<div class="name">{{ list.name }}</div> | ||||||
| 				<MkAvatars :user-ids="list.userIds"/> | 			<MkAvatars :user-ids="list.userIds"/> | ||||||
| 			</MkA> | 		</MkA> | ||||||
| 		</MkPagination> | 	</MkPagination> | ||||||
| 	</div> |  | ||||||
| </div> | </div> | ||||||
| </template> | </template> | ||||||
|  |  | ||||||
| @@ -35,15 +32,10 @@ export default defineComponent({ | |||||||
| 				title: this.$ts.manageLists, | 				title: this.$ts.manageLists, | ||||||
| 				icon: 'fas fa-list-ul', | 				icon: 'fas fa-list-ul', | ||||||
| 				bg: 'var(--bg)', | 				bg: 'var(--bg)', | ||||||
| 			}, |  | ||||||
| 			header: { |  | ||||||
| 				title: this.$ts.manageLists, |  | ||||||
| 				icon: 'fas fa-list-ul', |  | ||||||
| 				bg: 'var(--bg)', |  | ||||||
| 				action: { | 				action: { | ||||||
| 					icon: 'fas fa-plus', | 					icon: 'fas fa-plus', | ||||||
| 					handler: this.create | 					handler: this.create | ||||||
| 				} | 				}, | ||||||
| 			}, | 			}, | ||||||
| 			pagination: { | 			pagination: { | ||||||
| 				endpoint: 'users/lists/list', | 				endpoint: 'users/lists/list', | ||||||
|   | |||||||
| @@ -1,37 +1,34 @@ | |||||||
| <template> | <template> | ||||||
| <div> | <div class="mk-list-page"> | ||||||
| 	<MkHeader v-if="header" :info="header"/> | 	<transition name="zoom" mode="out-in"> | ||||||
| 	<div class="mk-list-page"> | 		<div v-if="list" class="_section"> | ||||||
| 		<transition name="zoom" mode="out-in"> | 			<div class="_content"> | ||||||
| 			<div v-if="list" class="_section"> | 				<MkButton inline @click="addUser()">{{ $ts.addUser }}</MkButton> | ||||||
| 				<div class="_content"> | 				<MkButton inline @click="renameList()">{{ $ts.rename }}</MkButton> | ||||||
| 					<MkButton inline @click="addUser()">{{ $ts.addUser }}</MkButton> | 				<MkButton inline @click="deleteList()">{{ $ts.delete }}</MkButton> | ||||||
| 					<MkButton inline @click="renameList()">{{ $ts.rename }}</MkButton> |  | ||||||
| 					<MkButton inline @click="deleteList()">{{ $ts.delete }}</MkButton> |  | ||||||
| 				</div> |  | ||||||
| 			</div> | 			</div> | ||||||
| 		</transition> | 		</div> | ||||||
|  | 	</transition> | ||||||
|  |  | ||||||
| 		<transition name="zoom" mode="out-in"> | 	<transition name="zoom" mode="out-in"> | ||||||
| 			<div v-if="list" class="_section members _gap"> | 		<div v-if="list" class="_section members _gap"> | ||||||
| 				<div class="_title">{{ $ts.members }}</div> | 			<div class="_title">{{ $ts.members }}</div> | ||||||
| 				<div class="_content"> | 			<div class="_content"> | ||||||
| 					<div class="users"> | 				<div class="users"> | ||||||
| 						<div class="user _panel" v-for="user in users" :key="user.id"> | 					<div class="user _panel" v-for="user in users" :key="user.id"> | ||||||
| 							<MkAvatar :user="user" class="avatar" :show-indicator="true"/> | 						<MkAvatar :user="user" class="avatar" :show-indicator="true"/> | ||||||
| 							<div class="body"> | 						<div class="body"> | ||||||
| 								<MkUserName :user="user" class="name"/> | 							<MkUserName :user="user" class="name"/> | ||||||
| 								<MkAcct :user="user" class="acct"/> | 							<MkAcct :user="user" class="acct"/> | ||||||
| 							</div> | 						</div> | ||||||
| 							<div class="action"> | 						<div class="action"> | ||||||
| 								<button class="_button" @click="removeUser(user)"><i class="fas fa-times"></i></button> | 							<button class="_button" @click="removeUser(user)"><i class="fas fa-times"></i></button> | ||||||
| 							</div> |  | ||||||
| 						</div> | 						</div> | ||||||
| 					</div> | 					</div> | ||||||
| 				</div> | 				</div> | ||||||
| 			</div> | 			</div> | ||||||
| 		</transition> | 		</div> | ||||||
| 	</div> | 	</transition> | ||||||
| </div> | </div> | ||||||
| </template> | </template> | ||||||
|  |  | ||||||
| @@ -53,10 +50,6 @@ export default defineComponent({ | |||||||
| 				title: this.list.name, | 				title: this.list.name, | ||||||
| 				icon: 'fas fa-list-ul', | 				icon: 'fas fa-list-ul', | ||||||
| 			} : null), | 			} : null), | ||||||
| 			header: computed(() => this.list ? { |  | ||||||
| 				title: this.list.name, |  | ||||||
| 				icon: 'fas fa-list-ul', |  | ||||||
| 			} : null), |  | ||||||
| 			list: null, | 			list: null, | ||||||
| 			users: [], | 			users: [], | ||||||
| 		}; | 		}; | ||||||
|   | |||||||
| @@ -1,12 +1,9 @@ | |||||||
| <template> | <template> | ||||||
| <div> | <MkSpacer :content-max="800"> | ||||||
| 	<MkHeader :info="header"/> | 	<div class="clupoqwt"> | ||||||
| 	<MkSpacer :content-max="800"> | 		<XNotifications class="notifications" @before="before" @after="after" :include-types="includeTypes" :unread-only="tab === 'unread'"/> | ||||||
| 		<div class="clupoqwt"> | 	</div> | ||||||
| 			<XNotifications class="notifications" @before="before" @after="after" :include-types="includeTypes" :unread-only="tab === 'unread'"/> | </MkSpacer> | ||||||
| 		</div> |  | ||||||
| 	</MkSpacer> |  | ||||||
| </div> |  | ||||||
| </template> | </template> | ||||||
|  |  | ||||||
| <script lang="ts"> | <script lang="ts"> | ||||||
| @@ -24,14 +21,7 @@ export default defineComponent({ | |||||||
|  |  | ||||||
| 	data() { | 	data() { | ||||||
| 		return { | 		return { | ||||||
| 			[symbols.PAGE_INFO]: { | 			[symbols.PAGE_INFO]: computed(() => ({ | ||||||
| 				title: this.$ts.notifications, |  | ||||||
| 				icon: 'fas fa-bell', |  | ||||||
| 				bg: 'var(--bg)', |  | ||||||
| 			}, |  | ||||||
| 			tab: 'all', |  | ||||||
| 			includeTypes: null, |  | ||||||
| 			header: computed(() => ({ |  | ||||||
| 				title: this.$ts.notifications, | 				title: this.$ts.notifications, | ||||||
| 				icon: 'fas fa-bell', | 				icon: 'fas fa-bell', | ||||||
| 				bg: 'var(--bg)', | 				bg: 'var(--bg)', | ||||||
| @@ -57,6 +47,8 @@ export default defineComponent({ | |||||||
| 					onClick: () => { this.tab = 'unread'; }, | 					onClick: () => { this.tab = 'unread'; }, | ||||||
| 				},] | 				},] | ||||||
| 			})), | 			})), | ||||||
|  | 			tab: 'all', | ||||||
|  | 			includeTypes: null, | ||||||
| 		}; | 		}; | ||||||
| 	}, | 	}, | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,82 +1,78 @@ | |||||||
| <template> | <template> | ||||||
| <div> | <div> | ||||||
| 	<MkHeader :info="header"/> | 	<div class="jqqmcavi" style="margin: 16px;"> | ||||||
|  | 		<MkButton v-if="pageId" class="button" inline link :to="`/@${ author.username }/pages/${ currentName }`"><i class="fas fa-external-link-square-alt"></i> {{ $ts._pages.viewPage }}</MkButton> | ||||||
|  | 		<MkButton inline @click="save" primary class="button" v-if="!readonly"><i class="fas fa-save"></i> {{ $ts.save }}</MkButton> | ||||||
|  | 		<MkButton inline @click="duplicate" class="button" v-if="pageId"><i class="fas fa-copy"></i> {{ $ts.duplicate }}</MkButton> | ||||||
|  | 		<MkButton inline @click="del" class="button" v-if="pageId && !readonly" danger><i class="fas fa-trash-alt"></i> {{ $ts.delete }}</MkButton> | ||||||
|  | 	</div> | ||||||
|  |  | ||||||
| 	<div class="_root"> | 	<div v-if="tab === 'settings'"> | ||||||
| 		<div class="jqqmcavi" style="margin: 16px;"> | 		<div style="padding: 16px;" class="_formRoot"> | ||||||
| 			<MkButton v-if="pageId" class="button" inline link :to="`/@${ author.username }/pages/${ currentName }`"><i class="fas fa-external-link-square-alt"></i> {{ $ts._pages.viewPage }}</MkButton> | 			<MkInput v-model="title" class="_formBlock"> | ||||||
| 			<MkButton inline @click="save" primary class="button" v-if="!readonly"><i class="fas fa-save"></i> {{ $ts.save }}</MkButton> | 				<template #label>{{ $ts._pages.title }}</template> | ||||||
| 			<MkButton inline @click="duplicate" class="button" v-if="pageId"><i class="fas fa-copy"></i> {{ $ts.duplicate }}</MkButton> | 			</MkInput> | ||||||
| 			<MkButton inline @click="del" class="button" v-if="pageId && !readonly" danger><i class="fas fa-trash-alt"></i> {{ $ts.delete }}</MkButton> |  | ||||||
| 		</div> |  | ||||||
|  |  | ||||||
| 		<div v-if="tab === 'settings'"> | 			<MkInput v-model="summary" class="_formBlock"> | ||||||
| 			<div style="padding: 16px;" class="_formRoot"> | 				<template #label>{{ $ts._pages.summary }}</template> | ||||||
| 				<MkInput v-model="title" class="_formBlock"> | 			</MkInput> | ||||||
| 					<template #label>{{ $ts._pages.title }}</template> |  | ||||||
| 				</MkInput> |  | ||||||
|  |  | ||||||
| 				<MkInput v-model="summary" class="_formBlock"> | 			<MkInput v-model="name" class="_formBlock"> | ||||||
| 					<template #label>{{ $ts._pages.summary }}</template> | 				<template #prefix>{{ url }}/@{{ author.username }}/pages/</template> | ||||||
| 				</MkInput> | 				<template #label>{{ $ts._pages.url }}</template> | ||||||
|  | 			</MkInput> | ||||||
|  |  | ||||||
| 				<MkInput v-model="name" class="_formBlock"> | 			<MkSwitch v-model="alignCenter" class="_formBlock">{{ $ts._pages.alignCenter }}</MkSwitch> | ||||||
| 					<template #prefix>{{ url }}/@{{ author.username }}/pages/</template> |  | ||||||
| 					<template #label>{{ $ts._pages.url }}</template> |  | ||||||
| 				</MkInput> |  | ||||||
|  |  | ||||||
| 				<MkSwitch v-model="alignCenter" class="_formBlock">{{ $ts._pages.alignCenter }}</MkSwitch> | 			<MkSelect v-model="font" class="_formBlock"> | ||||||
|  | 				<template #label>{{ $ts._pages.font }}</template> | ||||||
|  | 				<option value="serif">{{ $ts._pages.fontSerif }}</option> | ||||||
|  | 				<option value="sans-serif">{{ $ts._pages.fontSansSerif }}</option> | ||||||
|  | 			</MkSelect> | ||||||
|  |  | ||||||
| 				<MkSelect v-model="font" class="_formBlock"> | 			<MkSwitch v-model="hideTitleWhenPinned" class="_formBlock">{{ $ts._pages.hideTitleWhenPinned }}</MkSwitch> | ||||||
| 					<template #label>{{ $ts._pages.font }}</template> |  | ||||||
| 					<option value="serif">{{ $ts._pages.fontSerif }}</option> |  | ||||||
| 					<option value="sans-serif">{{ $ts._pages.fontSansSerif }}</option> |  | ||||||
| 				</MkSelect> |  | ||||||
|  |  | ||||||
| 				<MkSwitch v-model="hideTitleWhenPinned" class="_formBlock">{{ $ts._pages.hideTitleWhenPinned }}</MkSwitch> | 			<div class="eyeCatch"> | ||||||
|  | 				<MkButton v-if="eyeCatchingImageId == null && !readonly" @click="setEyeCatchingImage"><i class="fas fa-plus"></i> {{ $ts._pages.eyeCatchingImageSet }}</MkButton> | ||||||
| 				<div class="eyeCatch"> | 				<div v-else-if="eyeCatchingImage"> | ||||||
| 					<MkButton v-if="eyeCatchingImageId == null && !readonly" @click="setEyeCatchingImage"><i class="fas fa-plus"></i> {{ $ts._pages.eyeCatchingImageSet }}</MkButton> | 					<img :src="eyeCatchingImage.url" :alt="eyeCatchingImage.name" style="max-width: 100%;"/> | ||||||
| 					<div v-else-if="eyeCatchingImage"> | 					<MkButton @click="removeEyeCatchingImage()" v-if="!readonly"><i class="fas fa-trash-alt"></i> {{ $ts._pages.eyeCatchingImageRemove }}</MkButton> | ||||||
| 						<img :src="eyeCatchingImage.url" :alt="eyeCatchingImage.name" style="max-width: 100%;"/> |  | ||||||
| 						<MkButton @click="removeEyeCatchingImage()" v-if="!readonly"><i class="fas fa-trash-alt"></i> {{ $ts._pages.eyeCatchingImageRemove }}</MkButton> |  | ||||||
| 					</div> |  | ||||||
| 				</div> | 				</div> | ||||||
| 			</div> | 			</div> | ||||||
| 		</div> | 		</div> | ||||||
|  | 	</div> | ||||||
|  |  | ||||||
| 		<div v-else-if="tab === 'contents'"> | 	<div v-else-if="tab === 'contents'"> | ||||||
| 			<div style="padding: 16px;"> | 		<div style="padding: 16px;"> | ||||||
| 				<XBlocks class="content" v-model="content" :hpml="hpml"/> | 			<XBlocks class="content" v-model="content" :hpml="hpml"/> | ||||||
|  |  | ||||||
| 				<MkButton @click="add()" v-if="!readonly"><i class="fas fa-plus"></i></MkButton> | 			<MkButton @click="add()" v-if="!readonly"><i class="fas fa-plus"></i></MkButton> | ||||||
| 			</div> |  | ||||||
| 		</div> | 		</div> | ||||||
|  | 	</div> | ||||||
|  |  | ||||||
| 		<div v-else-if="tab === 'variables'"> | 	<div v-else-if="tab === 'variables'"> | ||||||
| 			<div class="qmuvgica"> | 		<div class="qmuvgica"> | ||||||
| 				<XDraggable tag="div" class="variables" v-show="variables.length > 0" v-model="variables" item-key="name" handle=".drag-handle" :group="{ name: 'variables' }" animation="150" swap-threshold="0.5"> | 			<XDraggable tag="div" class="variables" v-show="variables.length > 0" v-model="variables" item-key="name" handle=".drag-handle" :group="{ name: 'variables' }" animation="150" swap-threshold="0.5"> | ||||||
| 					<template #item="{element}"> | 				<template #item="{element}"> | ||||||
| 						<XVariable | 					<XVariable | ||||||
| 							:modelValue="element" | 						:modelValue="element" | ||||||
| 							:removable="true" | 						:removable="true" | ||||||
| 							@remove="() => removeVariable(element)" | 						@remove="() => removeVariable(element)" | ||||||
| 							:hpml="hpml" | 						:hpml="hpml" | ||||||
| 							:name="element.name" | 						:name="element.name" | ||||||
| 							:title="element.name" | 						:title="element.name" | ||||||
| 							:draggable="true" | 						:draggable="true" | ||||||
| 						/> | 					/> | ||||||
| 					</template> | 				</template> | ||||||
| 				</XDraggable> | 			</XDraggable> | ||||||
|  |  | ||||||
| 				<MkButton @click="addVariable()" class="add" v-if="!readonly"><i class="fas fa-plus"></i></MkButton> | 			<MkButton @click="addVariable()" class="add" v-if="!readonly"><i class="fas fa-plus"></i></MkButton> | ||||||
| 			</div> |  | ||||||
| 		</div> | 		</div> | ||||||
|  | 	</div> | ||||||
|  |  | ||||||
| 		<div v-else-if="tab === 'script'"> | 	<div v-else-if="tab === 'script'"> | ||||||
| 			<div> | 		<div> | ||||||
| 				<MkTextarea class="_code" v-model="script"/> | 			<MkTextarea class="_code" v-model="script"/> | ||||||
| 			</div> |  | ||||||
| 		</div> | 		</div> | ||||||
| 	</div> | 	</div> | ||||||
| </div> | </div> | ||||||
| @@ -131,21 +127,6 @@ export default defineComponent({ | |||||||
| 	data() { | 	data() { | ||||||
| 		return { | 		return { | ||||||
| 			[symbols.PAGE_INFO]: computed(() => { | 			[symbols.PAGE_INFO]: computed(() => { | ||||||
| 				let title = this.$ts._pages.newPage; |  | ||||||
| 				if (this.initPageId) { |  | ||||||
| 					title = this.$ts._pages.editPage; |  | ||||||
| 				} |  | ||||||
| 				else if (this.initPageName && this.initUser) { |  | ||||||
| 					title = this.$ts._pages.readPage; |  | ||||||
| 				} |  | ||||||
| 				return { |  | ||||||
| 					title: title, |  | ||||||
| 					icon: 'fas fa-pencil-alt', |  | ||||||
| 					bg: 'var(--bg)', |  | ||||||
| 				}; |  | ||||||
| 			}), |  | ||||||
| 			tab: 'settings', |  | ||||||
| 			header: computed(() => { |  | ||||||
| 				let title = this.$ts._pages.newPage; | 				let title = this.$ts._pages.newPage; | ||||||
| 				if (this.initPageId) { | 				if (this.initPageId) { | ||||||
| 					title = this.$ts._pages.editPage; | 					title = this.$ts._pages.editPage; | ||||||
| @@ -177,9 +158,10 @@ export default defineComponent({ | |||||||
| 						title: this.$ts.script, | 						title: this.$ts.script, | ||||||
| 						icon: 'fas fa-code', | 						icon: 'fas fa-code', | ||||||
| 						onClick: () => { this.tab = 'script'; }, | 						onClick: () => { this.tab = 'script'; }, | ||||||
| 					}] | 					}], | ||||||
| 				}; | 				}; | ||||||
| 			}), | 			}), | ||||||
|  | 			tab: 'settings', | ||||||
| 			author: this.$i, | 			author: this.$i, | ||||||
| 			readonly: false, | 			readonly: false, | ||||||
| 			page: null, | 			page: null, | ||||||
|   | |||||||
| @@ -1,65 +1,61 @@ | |||||||
| <template> | <template> | ||||||
| <div> | <div> | ||||||
| 	<MkHeader :info="header"/> | 	<transition name="fade" mode="out-in"> | ||||||
|  | 		<div v-if="page" class="xcukqgmh" :key="page.id" v-size="{ max: [450] }"> | ||||||
| 	<div class="_root"> | 			<div class="_block main"> | ||||||
| 		<transition name="fade" mode="out-in"> | 				<!-- | ||||||
| 			<div v-if="page" class="xcukqgmh" :key="page.id" v-size="{ max: [450] }"> | 				<div class="header"> | ||||||
| 				<div class="_block main"> | 					<h1>{{ page.title }}</h1> | ||||||
| 					<!-- | 				</div> | ||||||
| 					<div class="header"> | 				--> | ||||||
| 						<h1>{{ page.title }}</h1> | 				<div class="banner"> | ||||||
|  | 					<img :src="page.eyeCatchingImage.url" v-if="page.eyeCatchingImageId"/> | ||||||
|  | 				</div> | ||||||
|  | 				<div class="content"> | ||||||
|  | 					<XPage :page="page"/> | ||||||
|  | 				</div> | ||||||
|  | 				<div class="actions"> | ||||||
|  | 					<div class="like"> | ||||||
|  | 						<MkButton class="button" @click="unlike()" v-if="page.isLiked" v-tooltip="$ts._pages.unlike" primary><i class="fas fa-heart"></i><span class="count" v-if="page.likedCount > 0">{{ page.likedCount }}</span></MkButton> | ||||||
|  | 						<MkButton class="button" @click="like()" v-else v-tooltip="$ts._pages.like"><i class="far fa-heart"></i><span class="count" v-if="page.likedCount > 0">{{ page.likedCount }}</span></MkButton> | ||||||
| 					</div> | 					</div> | ||||||
| 					--> | 					<div class="other"> | ||||||
| 					<div class="banner"> | 						<button class="_button" @click="shareWithNote" v-tooltip="$ts.shareWithNote" v-click-anime><i class="fas fa-retweet fa-fw"></i></button> | ||||||
| 						<img :src="page.eyeCatchingImage.url" v-if="page.eyeCatchingImageId"/> | 						<button class="_button" @click="share" v-tooltip="$ts.share" v-click-anime><i class="fas fa-share-alt fa-fw"></i></button> | ||||||
| 					</div> |  | ||||||
| 					<div class="content"> |  | ||||||
| 						<XPage :page="page"/> |  | ||||||
| 					</div> |  | ||||||
| 					<div class="actions"> |  | ||||||
| 						<div class="like"> |  | ||||||
| 							<MkButton class="button" @click="unlike()" v-if="page.isLiked" v-tooltip="$ts._pages.unlike" primary><i class="fas fa-heart"></i><span class="count" v-if="page.likedCount > 0">{{ page.likedCount }}</span></MkButton> |  | ||||||
| 							<MkButton class="button" @click="like()" v-else v-tooltip="$ts._pages.like"><i class="far fa-heart"></i><span class="count" v-if="page.likedCount > 0">{{ page.likedCount }}</span></MkButton> |  | ||||||
| 						</div> |  | ||||||
| 						<div class="other"> |  | ||||||
| 							<button class="_button" @click="shareWithNote" v-tooltip="$ts.shareWithNote" v-click-anime><i class="fas fa-retweet fa-fw"></i></button> |  | ||||||
| 							<button class="_button" @click="share" v-tooltip="$ts.share" v-click-anime><i class="fas fa-share-alt fa-fw"></i></button> |  | ||||||
| 						</div> |  | ||||||
| 					</div> |  | ||||||
| 					<div class="user"> |  | ||||||
| 						<MkAvatar :user="page.user" class="avatar"/> |  | ||||||
| 						<div class="name"> |  | ||||||
| 							<MkUserName :user="page.user" style="display: block;"/> |  | ||||||
| 							<MkAcct :user="page.user"/> |  | ||||||
| 						</div> |  | ||||||
| 						<MkFollowButton v-if="!$i || $i.id != page.user.id" :user="page.user" :inline="true" :transparent="false" :full="true" large class="koudoku"/> |  | ||||||
| 					</div> |  | ||||||
| 					<div class="links"> |  | ||||||
| 						<MkA :to="`/@${username}/pages/${pageName}/view-source`" class="link">{{ $ts._pages.viewSource }}</MkA> |  | ||||||
| 						<template v-if="$i && $i.id === page.userId"> |  | ||||||
| 							<MkA :to="`/pages/edit/${page.id}`" class="link">{{ $ts._pages.editThisPage }}</MkA> |  | ||||||
| 							<button v-if="$i.pinnedPageId === page.id" @click="pin(false)" class="link _textButton">{{ $ts.unpin }}</button> |  | ||||||
| 							<button v-else @click="pin(true)" class="link _textButton">{{ $ts.pin }}</button> |  | ||||||
| 						</template> |  | ||||||
| 					</div> | 					</div> | ||||||
| 				</div> | 				</div> | ||||||
| 				<div class="footer"> | 				<div class="user"> | ||||||
| 					<div><i class="far fa-clock"></i> {{ $ts.createdAt }}: <MkTime :time="page.createdAt" mode="detail"/></div> | 					<MkAvatar :user="page.user" class="avatar"/> | ||||||
| 					<div v-if="page.createdAt != page.updatedAt"><i class="far fa-clock"></i> {{ $ts.updatedAt }}: <MkTime :time="page.updatedAt" mode="detail"/></div> | 					<div class="name"> | ||||||
|  | 						<MkUserName :user="page.user" style="display: block;"/> | ||||||
|  | 						<MkAcct :user="page.user"/> | ||||||
|  | 					</div> | ||||||
|  | 					<MkFollowButton v-if="!$i || $i.id != page.user.id" :user="page.user" :inline="true" :transparent="false" :full="true" large class="koudoku"/> | ||||||
|  | 				</div> | ||||||
|  | 				<div class="links"> | ||||||
|  | 					<MkA :to="`/@${username}/pages/${pageName}/view-source`" class="link">{{ $ts._pages.viewSource }}</MkA> | ||||||
|  | 					<template v-if="$i && $i.id === page.userId"> | ||||||
|  | 						<MkA :to="`/pages/edit/${page.id}`" class="link">{{ $ts._pages.editThisPage }}</MkA> | ||||||
|  | 						<button v-if="$i.pinnedPageId === page.id" @click="pin(false)" class="link _textButton">{{ $ts.unpin }}</button> | ||||||
|  | 						<button v-else @click="pin(true)" class="link _textButton">{{ $ts.pin }}</button> | ||||||
|  | 					</template> | ||||||
| 				</div> | 				</div> | ||||||
| 				<MkAd :prefer="['horizontal', 'horizontal-big']"/> |  | ||||||
| 				<MkContainer :max-height="300" :foldable="true" class="other"> |  | ||||||
| 					<template #header><i class="fas fa-clock"></i> {{ $ts.recentPosts }}</template> |  | ||||||
| 					<MkPagination :pagination="otherPostsPagination" #default="{items}"> |  | ||||||
| 						<MkPagePreview v-for="page in items" :page="page" :key="page.id" class="_gap"/> |  | ||||||
| 					</MkPagination> |  | ||||||
| 				</MkContainer> |  | ||||||
| 			</div> | 			</div> | ||||||
| 			<MkError v-else-if="error" @retry="fetch()"/> | 			<div class="footer"> | ||||||
| 			<MkLoading v-else/> | 				<div><i class="far fa-clock"></i> {{ $ts.createdAt }}: <MkTime :time="page.createdAt" mode="detail"/></div> | ||||||
| 		</transition> | 				<div v-if="page.createdAt != page.updatedAt"><i class="far fa-clock"></i> {{ $ts.updatedAt }}: <MkTime :time="page.updatedAt" mode="detail"/></div> | ||||||
| 	</div> | 			</div> | ||||||
|  | 			<MkAd :prefer="['horizontal', 'horizontal-big']"/> | ||||||
|  | 			<MkContainer :max-height="300" :foldable="true" class="other"> | ||||||
|  | 				<template #header><i class="fas fa-clock"></i> {{ $ts.recentPosts }}</template> | ||||||
|  | 				<MkPagination :pagination="otherPostsPagination" #default="{items}"> | ||||||
|  | 					<MkPagePreview v-for="page in items" :page="page" :key="page.id" class="_gap"/> | ||||||
|  | 				</MkPagination> | ||||||
|  | 			</MkContainer> | ||||||
|  | 		</div> | ||||||
|  | 		<MkError v-else-if="error" @retry="fetch()"/> | ||||||
|  | 		<MkLoading v-else/> | ||||||
|  | 	</transition> | ||||||
| </div> | </div> | ||||||
| </template> | </template> | ||||||
|  |  | ||||||
| @@ -101,10 +97,6 @@ export default defineComponent({ | |||||||
| 			[symbols.PAGE_INFO]: computed(() => this.page ? { | 			[symbols.PAGE_INFO]: computed(() => this.page ? { | ||||||
| 				title: computed(() => this.page.title || this.page.name), | 				title: computed(() => this.page.title || this.page.name), | ||||||
| 				avatar: this.page.user, | 				avatar: this.page.user, | ||||||
| 			} : null), |  | ||||||
| 			header: computed(() => this.page ? { |  | ||||||
| 				title: computed(() => this.page.title || this.page.name), |  | ||||||
| 				avatar: this.page.user, |  | ||||||
| 				path: `/@${this.page.user.username}/pages/${this.page.name}`, | 				path: `/@${this.page.user.username}/pages/${this.page.name}`, | ||||||
| 				share: { | 				share: { | ||||||
| 					title: this.page.title || this.page.name, | 					title: this.page.title || this.page.name, | ||||||
|   | |||||||
| @@ -1,37 +1,33 @@ | |||||||
| <template> | <template> | ||||||
| <div> | <MkSpacer> | ||||||
| 	<MkHeader :info="header"/> | 	<!-- TODO: MkHeaderに統合 --> | ||||||
|  | 	<MkTab v-model="tab" v-if="$i"> | ||||||
|  | 		<option value="featured"><i class="fas fa-fire-alt"></i> {{ $ts._pages.featured }}</option> | ||||||
|  | 		<option value="my"><i class="fas fa-edit"></i> {{ $ts._pages.my }}</option> | ||||||
|  | 		<option value="liked"><i class="fas fa-heart"></i> {{ $ts._pages.liked }}</option> | ||||||
|  | 	</MkTab> | ||||||
|  |  | ||||||
| 	<MkSpacer> | 	<div class="_section"> | ||||||
| 		<!-- TODO: MkHeaderに統合 --> | 		<div class="rknalgpo _content" v-if="tab === 'featured'"> | ||||||
| 		<MkTab v-model="tab" v-if="$i"> | 			<MkPagination :pagination="featuredPagesPagination" #default="{items}"> | ||||||
| 			<option value="featured"><i class="fas fa-fire-alt"></i> {{ $ts._pages.featured }}</option> | 				<MkPagePreview v-for="page in items" class="ckltabjg" :page="page" :key="page.id"/> | ||||||
| 			<option value="my"><i class="fas fa-edit"></i> {{ $ts._pages.my }}</option> | 			</MkPagination> | ||||||
| 			<option value="liked"><i class="fas fa-heart"></i> {{ $ts._pages.liked }}</option> |  | ||||||
| 		</MkTab> |  | ||||||
|  |  | ||||||
| 		<div class="_section"> |  | ||||||
| 			<div class="rknalgpo _content" v-if="tab === 'featured'"> |  | ||||||
| 				<MkPagination :pagination="featuredPagesPagination" #default="{items}"> |  | ||||||
| 					<MkPagePreview v-for="page in items" class="ckltabjg" :page="page" :key="page.id"/> |  | ||||||
| 				</MkPagination> |  | ||||||
| 			</div> |  | ||||||
|  |  | ||||||
| 			<div class="rknalgpo _content my" v-if="tab === 'my'"> |  | ||||||
| 				<MkButton class="new" @click="create()"><i class="fas fa-plus"></i></MkButton> |  | ||||||
| 				<MkPagination :pagination="myPagesPagination" #default="{items}"> |  | ||||||
| 					<MkPagePreview v-for="page in items" class="ckltabjg" :page="page" :key="page.id"/> |  | ||||||
| 				</MkPagination> |  | ||||||
| 			</div> |  | ||||||
|  |  | ||||||
| 			<div class="rknalgpo _content" v-if="tab === 'liked'"> |  | ||||||
| 				<MkPagination :pagination="likedPagesPagination" #default="{items}"> |  | ||||||
| 					<MkPagePreview v-for="like in items" class="ckltabjg" :page="like.page" :key="like.page.id"/> |  | ||||||
| 				</MkPagination> |  | ||||||
| 			</div> |  | ||||||
| 		</div> | 		</div> | ||||||
| 	</MkSpacer> |  | ||||||
| </div> | 		<div class="rknalgpo _content my" v-if="tab === 'my'"> | ||||||
|  | 			<MkButton class="new" @click="create()"><i class="fas fa-plus"></i></MkButton> | ||||||
|  | 			<MkPagination :pagination="myPagesPagination" #default="{items}"> | ||||||
|  | 				<MkPagePreview v-for="page in items" class="ckltabjg" :page="page" :key="page.id"/> | ||||||
|  | 			</MkPagination> | ||||||
|  | 		</div> | ||||||
|  |  | ||||||
|  | 		<div class="rknalgpo _content" v-if="tab === 'liked'"> | ||||||
|  | 			<MkPagination :pagination="likedPagesPagination" #default="{items}"> | ||||||
|  | 				<MkPagePreview v-for="like in items" class="ckltabjg" :page="like.page" :key="like.page.id"/> | ||||||
|  | 			</MkPagination> | ||||||
|  | 		</div> | ||||||
|  | 	</div> | ||||||
|  | </MkSpacer> | ||||||
| </template> | </template> | ||||||
|  |  | ||||||
| <script lang="ts"> | <script lang="ts"> | ||||||
| @@ -52,11 +48,6 @@ export default defineComponent({ | |||||||
| 				title: this.$ts.pages, | 				title: this.$ts.pages, | ||||||
| 				icon: 'fas fa-sticky-note', | 				icon: 'fas fa-sticky-note', | ||||||
| 				bg: 'var(--bg)', | 				bg: 'var(--bg)', | ||||||
| 			}, |  | ||||||
| 			header: { |  | ||||||
| 				title: this.$ts.pages, |  | ||||||
| 				icon: 'fas fa-sticky-note', |  | ||||||
| 				bg: 'var(--bg)', |  | ||||||
| 				actions: [{ | 				actions: [{ | ||||||
| 					icon: 'fas fa-plus', | 					icon: 'fas fa-plus', | ||||||
| 					text: this.$ts.create, | 					text: this.$ts.create, | ||||||
|   | |||||||
| @@ -1,10 +1,7 @@ | |||||||
| <template> | <template> | ||||||
| <div> | <div class="_section"> | ||||||
| 	<MkHeader :info="header"/> | 	<div class="_content"> | ||||||
| 	<div class="_section"> | 		<XNotes ref="notes" :pagination="pagination" @before="before" @after="after"/> | ||||||
| 		<div class="_content"> |  | ||||||
| 			<XNotes ref="notes" :pagination="pagination" @before="before" @after="after"/> |  | ||||||
| 		</div> |  | ||||||
| 	</div> | 	</div> | ||||||
| </div> | </div> | ||||||
| </template> | </template> | ||||||
| @@ -26,10 +23,6 @@ export default defineComponent({ | |||||||
| 				title: computed(() => this.$t('searchWith', { q: this.$route.query.q })), | 				title: computed(() => this.$t('searchWith', { q: this.$route.query.q })), | ||||||
| 				icon: 'fas fa-search', | 				icon: 'fas fa-search', | ||||||
| 			}, | 			}, | ||||||
| 			header: { |  | ||||||
| 				title: computed(() => this.$t('searchWith', { q: this.$route.query.q })), |  | ||||||
| 				icon: 'fas fa-search', |  | ||||||
| 			}, |  | ||||||
| 			pagination: { | 			pagination: { | ||||||
| 				endpoint: 'notes/search', | 				endpoint: 'notes/search', | ||||||
| 				limit: 10, | 				limit: 10, | ||||||
|   | |||||||
| @@ -41,6 +41,7 @@ export default defineComponent({ | |||||||
| 			title: i18n.locale.settings, | 			title: i18n.locale.settings, | ||||||
| 			icon: 'fas fa-cog', | 			icon: 'fas fa-cog', | ||||||
| 			bg: 'var(--bg)', | 			bg: 'var(--bg)', | ||||||
|  | 			hideHeader: true, | ||||||
| 		}; | 		}; | ||||||
| 		const INFO = ref(indexInfo); | 		const INFO = ref(indexInfo); | ||||||
| 		const page = ref(props.initialPage); | 		const page = ref(props.initialPage); | ||||||
|   | |||||||
| @@ -1,21 +1,18 @@ | |||||||
| <template> | <template> | ||||||
| <div v-hotkey.global="keymap"> | <div class="cmuxhskf" v-size="{ min: [800] }" v-hotkey.global="keymap"> | ||||||
| 	<MkHeader :info="header"/> | 	<XTutorial v-if="$store.reactiveState.tutorial.value != -1" class="tutorial _block"/> | ||||||
| 	<div class="cmuxhskf" v-size="{ min: [800] }"> | 	<XPostForm v-if="$store.reactiveState.showFixedPostForm.value" class="post-form _block" fixed/> | ||||||
| 		<XTutorial v-if="$store.reactiveState.tutorial.value != -1" class="tutorial _block"/> |  | ||||||
| 		<XPostForm v-if="$store.reactiveState.showFixedPostForm.value" class="post-form _block" fixed/> |  | ||||||
|  |  | ||||||
| 		<div class="new" v-if="queue > 0"><button class="_buttonPrimary" @click="top()">{{ $ts.newNoteRecived }}</button></div> | 	<div class="new" v-if="queue > 0"><button class="_buttonPrimary" @click="top()">{{ $ts.newNoteRecived }}</button></div> | ||||||
| 		<div class="tl _block"> | 	<div class="tl _block"> | ||||||
| 			<XTimeline ref="tl" class="tl" | 		<XTimeline ref="tl" class="tl" | ||||||
| 				:key="src" | 			:key="src" | ||||||
| 				:src="src" | 			:src="src" | ||||||
| 				:sound="true" | 			:sound="true" | ||||||
| 				@before="before()" | 			@before="before()" | ||||||
| 				@after="after()" | 			@after="after()" | ||||||
| 				@queue="queueUpdated" | 			@queue="queueUpdated" | ||||||
| 			/> | 		/> | ||||||
| 		</div> |  | ||||||
| 	</div> | 	</div> | ||||||
| </div> | </div> | ||||||
| </template> | </template> | ||||||
| @@ -46,11 +43,6 @@ export default defineComponent({ | |||||||
| 				title: this.$ts.timeline, | 				title: this.$ts.timeline, | ||||||
| 				icon: this.src === 'local' ? 'fas fa-comments' : this.src === 'social' ? 'fas fa-share-alt' : this.src === 'global' ? 'fas fa-globe' : 'fas fa-home', | 				icon: this.src === 'local' ? 'fas fa-comments' : this.src === 'social' ? 'fas fa-share-alt' : this.src === 'global' ? 'fas fa-globe' : 'fas fa-home', | ||||||
| 				bg: 'var(--bg)', | 				bg: 'var(--bg)', | ||||||
| 			})), |  | ||||||
| 			header: computed(() => ({ |  | ||||||
| 				title: this.$ts.timeline, |  | ||||||
| 				icon: this.src === 'local' ? 'fas fa-comments' : this.src === 'social' ? 'fas fa-share-alt' : this.src === 'global' ? 'fas fa-globe' : 'fas fa-home', |  | ||||||
| 				bg: 'var(--bg)', |  | ||||||
| 				actions: [{ | 				actions: [{ | ||||||
| 					icon: 'fas fa-list-ul', | 					icon: 'fas fa-list-ul', | ||||||
| 					text: this.$ts.lists, | 					text: this.$ts.lists, | ||||||
| @@ -92,7 +84,7 @@ export default defineComponent({ | |||||||
| 					icon: 'fas fa-globe', | 					icon: 'fas fa-globe', | ||||||
| 					iconOnly: true, | 					iconOnly: true, | ||||||
| 					onClick: () => { this.src = 'global'; this.saveSrc(); }, | 					onClick: () => { this.src = 'global'; this.saveSrc(); }, | ||||||
| 				}] | 				}], | ||||||
| 			})), | 			})), | ||||||
| 		}; | 		}; | ||||||
| 	}, | 	}, | ||||||
|   | |||||||
| @@ -1,34 +1,123 @@ | |||||||
| <template> | <template> | ||||||
| <div> | <transition name="fade" mode="out-in"> | ||||||
| 	<MkHeader :info="header"/> | 	<div class="ftskorzw wide" v-if="user && narrow === false"> | ||||||
| 	<transition name="fade" mode="out-in"> | 		<MkRemoteCaution v-if="user.host != null" :href="user.url"/> | ||||||
| 		<div class="ftskorzw wide" v-if="user && narrow === false"> |  | ||||||
| 			<MkRemoteCaution v-if="user.host != null" :href="user.url"/> |  | ||||||
|  |  | ||||||
| 			<div class="banner-container" :style="style"> | 		<div class="banner-container" :style="style"> | ||||||
| 				<div class="banner" ref="banner" :style="style"></div> | 			<div class="banner" ref="banner" :style="style"></div> | ||||||
|  | 		</div> | ||||||
|  | 		<div class="contents"> | ||||||
|  | 			<div class="side _forceContainerFull_"> | ||||||
|  | 				<MkAvatar class="avatar" :user="user" :disable-preview="true" :show-indicator="true"/> | ||||||
|  | 				<div class="name"> | ||||||
|  | 					<MkUserName :user="user" :nowrap="false" class="name"/> | ||||||
|  | 					<MkAcct :user="user" :detail="true" class="acct"/> | ||||||
|  | 				</div> | ||||||
|  | 				<div class="followed" v-if="$i && $i.id != user.id && user.isFollowed"><span>{{ $ts.followsYou }}</span></div> | ||||||
|  | 				<div class="status"> | ||||||
|  | 					<MkA :to="userPage(user)" :class="{ active: page === 'index' }"> | ||||||
|  | 						<b>{{ number(user.notesCount) }}</b> | ||||||
|  | 						<span>{{ $ts.notes }}</span> | ||||||
|  | 					</MkA> | ||||||
|  | 					<MkA :to="userPage(user, 'following')" :class="{ active: page === 'following' }"> | ||||||
|  | 						<b>{{ number(user.followingCount) }}</b> | ||||||
|  | 						<span>{{ $ts.following }}</span> | ||||||
|  | 					</MkA> | ||||||
|  | 					<MkA :to="userPage(user, 'followers')" :class="{ active: page === 'followers' }"> | ||||||
|  | 						<b>{{ number(user.followersCount) }}</b> | ||||||
|  | 						<span>{{ $ts.followers }}</span> | ||||||
|  | 					</MkA> | ||||||
|  | 				</div> | ||||||
|  | 				<div class="description"> | ||||||
|  | 					<Mfm v-if="user.description" :text="user.description" :is-note="false" :author="user" :i="$i" :custom-emojis="user.emojis"/> | ||||||
|  | 					<p v-else class="empty">{{ $ts.noAccountDescription }}</p> | ||||||
|  | 				</div> | ||||||
|  | 				<div class="fields system"> | ||||||
|  | 					<dl class="field" v-if="user.location"> | ||||||
|  | 						<dt class="name"><i class="fas fa-map-marker fa-fw"></i> {{ $ts.location }}</dt> | ||||||
|  | 						<dd class="value">{{ user.location }}</dd> | ||||||
|  | 					</dl> | ||||||
|  | 					<dl class="field" v-if="user.birthday"> | ||||||
|  | 						<dt class="name"><i class="fas fa-birthday-cake fa-fw"></i> {{ $ts.birthday }}</dt> | ||||||
|  | 						<dd class="value">{{ user.birthday.replace('-', '/').replace('-', '/') }} ({{ $t('yearsOld', { age }) }})</dd> | ||||||
|  | 					</dl> | ||||||
|  | 					<dl class="field"> | ||||||
|  | 						<dt class="name"><i class="fas fa-calendar-alt fa-fw"></i> {{ $ts.registeredDate }}</dt> | ||||||
|  | 						<dd class="value">{{ new Date(user.createdAt).toLocaleString() }} (<MkTime :time="user.createdAt"/>)</dd> | ||||||
|  | 					</dl> | ||||||
|  | 				</div> | ||||||
|  | 				<div class="fields" v-if="user.fields.length > 0"> | ||||||
|  | 					<dl class="field" v-for="(field, i) in user.fields" :key="i"> | ||||||
|  | 						<dt class="name"> | ||||||
|  | 							<Mfm :text="field.name" :plain="true" :custom-emojis="user.emojis" :colored="false"/> | ||||||
|  | 						</dt> | ||||||
|  | 						<dd class="value"> | ||||||
|  | 							<Mfm :text="field.value" :author="user" :i="$i" :custom-emojis="user.emojis" :colored="false"/> | ||||||
|  | 						</dd> | ||||||
|  | 					</dl> | ||||||
|  | 				</div> | ||||||
|  | 				<XActivity :user="user" :key="user.id" class="_gap"/> | ||||||
|  | 				<XPhotos :user="user" :key="user.id" class="_gap"/> | ||||||
| 			</div> | 			</div> | ||||||
| 			<div class="contents"> | 			<div class="main"> | ||||||
| 				<div class="side _forceContainerFull_"> | 				<div class="actions"> | ||||||
| 					<MkAvatar class="avatar" :user="user" :disable-preview="true" :show-indicator="true"/> | 					<button @click="menu" class="menu _button"><i class="fas fa-ellipsis-h"></i></button> | ||||||
| 					<div class="name"> | 					<MkFollowButton v-if="!$i || $i.id != user.id" :user="user" :inline="true" :transparent="false" :full="true" large class="koudoku"/> | ||||||
| 						<MkUserName :user="user" :nowrap="false" class="name"/> | 				</div> | ||||||
| 						<MkAcct :user="user" :detail="true" class="acct"/> | 				<template v-if="page === 'index'"> | ||||||
|  | 					<div v-if="user.pinnedNotes.length > 0" class="_gap"> | ||||||
|  | 						<XNote v-for="note in user.pinnedNotes" class="note _gap" :note="note" @update:note="pinnedNoteUpdated(note, $event)" :key="note.id" :pinned="true"/> | ||||||
| 					</div> | 					</div> | ||||||
| 					<div class="followed" v-if="$i && $i.id != user.id && user.isFollowed"><span>{{ $ts.followsYou }}</span></div> | 					<div class="_gap"> | ||||||
| 					<div class="status"> | 						<XUserTimeline :user="user"/> | ||||||
| 						<MkA :to="userPage(user)" :class="{ active: page === 'index' }"> | 					</div> | ||||||
| 							<b>{{ number(user.notesCount) }}</b> | 				</template> | ||||||
| 							<span>{{ $ts.notes }}</span> | 				<XFollowList v-else-if="page === 'following'" type="following" :user="user" class="_gap"/> | ||||||
| 						</MkA> | 				<XFollowList v-else-if="page === 'followers'" type="followers" :user="user" class="_gap"/> | ||||||
| 						<MkA :to="userPage(user, 'following')" :class="{ active: page === 'following' }"> | 				<XClips v-else-if="page === 'clips'" :user="user" class="_gap"/> | ||||||
| 							<b>{{ number(user.followingCount) }}</b> | 				<XPages v-else-if="page === 'pages'" :user="user" class="_gap"/> | ||||||
| 							<span>{{ $ts.following }}</span> | 			</div> | ||||||
| 						</MkA> | 		</div> | ||||||
| 						<MkA :to="userPage(user, 'followers')" :class="{ active: page === 'followers' }"> | 	</div> | ||||||
| 							<b>{{ number(user.followersCount) }}</b> | 	<MkSpacer v-else-if="user && narrow === true" :content-max="800"> | ||||||
| 							<span>{{ $ts.followers }}</span> | 		<div class="ftskorzw narrow" v-size="{ max: [500] }"> | ||||||
| 						</MkA> | 			<!-- TODO --> | ||||||
|  | 			<!-- <div class="punished" v-if="user.isSuspended"><i class="fas fa-exclamation-triangle" style="margin-right: 8px;"></i> {{ $ts.userSuspended }}</div> --> | ||||||
|  | 			<!-- <div class="punished" v-if="user.isSilenced"><i class="fas fa-exclamation-triangle" style="margin-right: 8px;"></i> {{ $ts.userSilenced }}</div> --> | ||||||
|  |  | ||||||
|  | 			<div class="profile"> | ||||||
|  | 				<MkRemoteCaution v-if="user.host != null" :href="user.url" class="warn"/> | ||||||
|  |  | ||||||
|  | 				<div class="_block main" :key="user.id"> | ||||||
|  | 					<div class="banner-container" :style="style"> | ||||||
|  | 						<div class="banner" ref="banner" :style="style"></div> | ||||||
|  | 						<div class="fade"></div> | ||||||
|  | 						<div class="title"> | ||||||
|  | 							<MkUserName class="name" :user="user" :nowrap="true"/> | ||||||
|  | 							<div class="bottom"> | ||||||
|  | 								<span class="username"><MkAcct :user="user" :detail="true" /></span> | ||||||
|  | 								<span v-if="user.isAdmin" :title="$ts.isAdmin" style="color: var(--badge);"><i class="fas fa-bookmark"></i></span> | ||||||
|  | 								<span v-if="!user.isAdmin && user.isModerator" :title="$ts.isModerator" style="color: var(--badge);"><i class="far fa-bookmark"></i></span> | ||||||
|  | 								<span v-if="user.isLocked" :title="$ts.isLocked"><i class="fas fa-lock"></i></span> | ||||||
|  | 								<span v-if="user.isBot" :title="$ts.isBot"><i class="fas fa-robot"></i></span> | ||||||
|  | 							</div> | ||||||
|  | 						</div> | ||||||
|  | 						<span class="followed" v-if="$i && $i.id != user.id && user.isFollowed">{{ $ts.followsYou }}</span> | ||||||
|  | 						<div class="actions" v-if="$i"> | ||||||
|  | 							<button @click="menu" class="menu _button"><i class="fas fa-ellipsis-h"></i></button> | ||||||
|  | 							<MkFollowButton v-if="$i.id != user.id" :user="user" :inline="true" :transparent="false" :full="true" class="koudoku"/> | ||||||
|  | 						</div> | ||||||
|  | 					</div> | ||||||
|  | 					<MkAvatar class="avatar" :user="user" :disable-preview="true" :show-indicator="true"/> | ||||||
|  | 					<div class="title"> | ||||||
|  | 						<MkUserName :user="user" :nowrap="false" class="name"/> | ||||||
|  | 						<div class="bottom"> | ||||||
|  | 							<span class="username"><MkAcct :user="user" :detail="true" /></span> | ||||||
|  | 							<span v-if="user.isAdmin" :title="$ts.isAdmin" style="color: var(--badge);"><i class="fas fa-bookmark"></i></span> | ||||||
|  | 							<span v-if="!user.isAdmin && user.isModerator" :title="$ts.isModerator" style="color: var(--badge);"><i class="far fa-bookmark"></i></span> | ||||||
|  | 							<span v-if="user.isLocked" :title="$ts.isLocked"><i class="fas fa-lock"></i></span> | ||||||
|  | 							<span v-if="user.isBot" :title="$ts.isBot"><i class="fas fa-robot"></i></span> | ||||||
|  | 						</div> | ||||||
| 					</div> | 					</div> | ||||||
| 					<div class="description"> | 					<div class="description"> | ||||||
| 						<Mfm v-if="user.description" :text="user.description" :is-note="false" :author="user" :i="$i" :custom-emojis="user.emojis"/> | 						<Mfm v-if="user.description" :text="user.description" :is-note="false" :author="user" :i="$i" :custom-emojis="user.emojis"/> | ||||||
| @@ -58,141 +147,49 @@ | |||||||
| 							</dd> | 							</dd> | ||||||
| 						</dl> | 						</dl> | ||||||
| 					</div> | 					</div> | ||||||
| 					<XActivity :user="user" :key="user.id" class="_gap"/> | 					<div class="status"> | ||||||
| 					<XPhotos :user="user" :key="user.id" class="_gap"/> | 						<MkA :to="userPage(user)" :class="{ active: page === 'index' }" v-click-anime> | ||||||
| 				</div> | 							<b>{{ number(user.notesCount) }}</b> | ||||||
| 				<div class="main"> | 							<span>{{ $ts.notes }}</span> | ||||||
| 					<div class="actions"> | 						</MkA> | ||||||
| 						<button @click="menu" class="menu _button"><i class="fas fa-ellipsis-h"></i></button> | 						<MkA :to="userPage(user, 'following')" :class="{ active: page === 'following' }" v-click-anime> | ||||||
| 						<MkFollowButton v-if="!$i || $i.id != user.id" :user="user" :inline="true" :transparent="false" :full="true" large class="koudoku"/> | 							<b>{{ number(user.followingCount) }}</b> | ||||||
|  | 							<span>{{ $ts.following }}</span> | ||||||
|  | 						</MkA> | ||||||
|  | 						<MkA :to="userPage(user, 'followers')" :class="{ active: page === 'followers' }" v-click-anime> | ||||||
|  | 							<b>{{ number(user.followersCount) }}</b> | ||||||
|  | 							<span>{{ $ts.followers }}</span> | ||||||
|  | 						</MkA> | ||||||
| 					</div> | 					</div> | ||||||
| 					<template v-if="page === 'index'"> |  | ||||||
| 						<div v-if="user.pinnedNotes.length > 0" class="_gap"> |  | ||||||
| 							<XNote v-for="note in user.pinnedNotes" class="note _gap" :note="note" @update:note="pinnedNoteUpdated(note, $event)" :key="note.id" :pinned="true"/> |  | ||||||
| 						</div> |  | ||||||
| 						<div class="_gap"> |  | ||||||
| 							<XUserTimeline :user="user"/> |  | ||||||
| 						</div> |  | ||||||
| 					</template> |  | ||||||
| 					<XFollowList v-else-if="page === 'following'" type="following" :user="user" class="_gap"/> |  | ||||||
| 					<XFollowList v-else-if="page === 'followers'" type="followers" :user="user" class="_gap"/> |  | ||||||
| 					<XClips v-else-if="page === 'clips'" :user="user" class="_gap"/> |  | ||||||
| 					<XPages v-else-if="page === 'pages'" :user="user" class="_gap"/> |  | ||||||
| 				</div> | 				</div> | ||||||
| 			</div> | 			</div> | ||||||
|  |  | ||||||
|  | 			<div class="contents"> | ||||||
|  | 				<template v-if="page === 'index'"> | ||||||
|  | 					<div> | ||||||
|  | 						<div v-if="user.pinnedNotes.length > 0" class="_gap"> | ||||||
|  | 							<XNote v-for="note in user.pinnedNotes" class="note _block" :note="note" @update:note="pinnedNoteUpdated(note, $event)" :key="note.id" :pinned="true"/> | ||||||
|  | 						</div> | ||||||
|  | 						<MkInfo v-else-if="$i && $i.id === user.id">{{ $ts.userPagePinTip }}</MkInfo> | ||||||
|  | 						<XPhotos :user="user" :key="user.id"/> | ||||||
|  | 						<XActivity :user="user" :key="user.id"/> | ||||||
|  | 					</div> | ||||||
|  | 					<div> | ||||||
|  | 						<XUserTimeline :user="user"/> | ||||||
|  | 					</div> | ||||||
|  | 				</template> | ||||||
|  | 				<XFollowList v-else-if="page === 'following'" type="following" :user="user" class="_content _gap"/> | ||||||
|  | 				<XFollowList v-else-if="page === 'followers'" type="followers" :user="user" class="_content _gap"/> | ||||||
|  | 				<XReactions v-else-if="page === 'reactions'" :user="user" class="_gap"/> | ||||||
|  | 				<XClips v-else-if="page === 'clips'" :user="user" class="_gap"/> | ||||||
|  | 				<XPages v-else-if="page === 'pages'" :user="user" class="_gap"/> | ||||||
|  | 				<XGallery v-else-if="page === 'gallery'" :user="user" class="_gap"/> | ||||||
|  | 			</div> | ||||||
| 		</div> | 		</div> | ||||||
| 		<MkSpacer v-else-if="user && narrow === true" :content-max="800"> | 	</MkSpacer> | ||||||
| 			<div class="ftskorzw narrow" v-size="{ max: [500] }"> | 	<MkError v-else-if="error" @retry="fetch()"/> | ||||||
| 				<!-- TODO --> | 	<MkLoading v-else/> | ||||||
| 				<!-- <div class="punished" v-if="user.isSuspended"><i class="fas fa-exclamation-triangle" style="margin-right: 8px;"></i> {{ $ts.userSuspended }}</div> --> | </transition> | ||||||
| 				<!-- <div class="punished" v-if="user.isSilenced"><i class="fas fa-exclamation-triangle" style="margin-right: 8px;"></i> {{ $ts.userSilenced }}</div> --> |  | ||||||
|  |  | ||||||
| 				<div class="profile"> |  | ||||||
| 					<MkRemoteCaution v-if="user.host != null" :href="user.url" class="warn"/> |  | ||||||
|  |  | ||||||
| 					<div class="_block main" :key="user.id"> |  | ||||||
| 						<div class="banner-container" :style="style"> |  | ||||||
| 							<div class="banner" ref="banner" :style="style"></div> |  | ||||||
| 							<div class="fade"></div> |  | ||||||
| 							<div class="title"> |  | ||||||
| 								<MkUserName class="name" :user="user" :nowrap="true"/> |  | ||||||
| 								<div class="bottom"> |  | ||||||
| 									<span class="username"><MkAcct :user="user" :detail="true" /></span> |  | ||||||
| 									<span v-if="user.isAdmin" :title="$ts.isAdmin" style="color: var(--badge);"><i class="fas fa-bookmark"></i></span> |  | ||||||
| 									<span v-if="!user.isAdmin && user.isModerator" :title="$ts.isModerator" style="color: var(--badge);"><i class="far fa-bookmark"></i></span> |  | ||||||
| 									<span v-if="user.isLocked" :title="$ts.isLocked"><i class="fas fa-lock"></i></span> |  | ||||||
| 									<span v-if="user.isBot" :title="$ts.isBot"><i class="fas fa-robot"></i></span> |  | ||||||
| 								</div> |  | ||||||
| 							</div> |  | ||||||
| 							<span class="followed" v-if="$i && $i.id != user.id && user.isFollowed">{{ $ts.followsYou }}</span> |  | ||||||
| 							<div class="actions" v-if="$i"> |  | ||||||
| 								<button @click="menu" class="menu _button"><i class="fas fa-ellipsis-h"></i></button> |  | ||||||
| 								<MkFollowButton v-if="$i.id != user.id" :user="user" :inline="true" :transparent="false" :full="true" class="koudoku"/> |  | ||||||
| 							</div> |  | ||||||
| 						</div> |  | ||||||
| 						<MkAvatar class="avatar" :user="user" :disable-preview="true" :show-indicator="true"/> |  | ||||||
| 						<div class="title"> |  | ||||||
| 							<MkUserName :user="user" :nowrap="false" class="name"/> |  | ||||||
| 							<div class="bottom"> |  | ||||||
| 								<span class="username"><MkAcct :user="user" :detail="true" /></span> |  | ||||||
| 								<span v-if="user.isAdmin" :title="$ts.isAdmin" style="color: var(--badge);"><i class="fas fa-bookmark"></i></span> |  | ||||||
| 								<span v-if="!user.isAdmin && user.isModerator" :title="$ts.isModerator" style="color: var(--badge);"><i class="far fa-bookmark"></i></span> |  | ||||||
| 								<span v-if="user.isLocked" :title="$ts.isLocked"><i class="fas fa-lock"></i></span> |  | ||||||
| 								<span v-if="user.isBot" :title="$ts.isBot"><i class="fas fa-robot"></i></span> |  | ||||||
| 							</div> |  | ||||||
| 						</div> |  | ||||||
| 						<div class="description"> |  | ||||||
| 							<Mfm v-if="user.description" :text="user.description" :is-note="false" :author="user" :i="$i" :custom-emojis="user.emojis"/> |  | ||||||
| 							<p v-else class="empty">{{ $ts.noAccountDescription }}</p> |  | ||||||
| 						</div> |  | ||||||
| 						<div class="fields system"> |  | ||||||
| 							<dl class="field" v-if="user.location"> |  | ||||||
| 								<dt class="name"><i class="fas fa-map-marker fa-fw"></i> {{ $ts.location }}</dt> |  | ||||||
| 								<dd class="value">{{ user.location }}</dd> |  | ||||||
| 							</dl> |  | ||||||
| 							<dl class="field" v-if="user.birthday"> |  | ||||||
| 								<dt class="name"><i class="fas fa-birthday-cake fa-fw"></i> {{ $ts.birthday }}</dt> |  | ||||||
| 								<dd class="value">{{ user.birthday.replace('-', '/').replace('-', '/') }} ({{ $t('yearsOld', { age }) }})</dd> |  | ||||||
| 							</dl> |  | ||||||
| 							<dl class="field"> |  | ||||||
| 								<dt class="name"><i class="fas fa-calendar-alt fa-fw"></i> {{ $ts.registeredDate }}</dt> |  | ||||||
| 								<dd class="value">{{ new Date(user.createdAt).toLocaleString() }} (<MkTime :time="user.createdAt"/>)</dd> |  | ||||||
| 							</dl> |  | ||||||
| 						</div> |  | ||||||
| 						<div class="fields" v-if="user.fields.length > 0"> |  | ||||||
| 							<dl class="field" v-for="(field, i) in user.fields" :key="i"> |  | ||||||
| 								<dt class="name"> |  | ||||||
| 									<Mfm :text="field.name" :plain="true" :custom-emojis="user.emojis" :colored="false"/> |  | ||||||
| 								</dt> |  | ||||||
| 								<dd class="value"> |  | ||||||
| 									<Mfm :text="field.value" :author="user" :i="$i" :custom-emojis="user.emojis" :colored="false"/> |  | ||||||
| 								</dd> |  | ||||||
| 							</dl> |  | ||||||
| 						</div> |  | ||||||
| 						<div class="status"> |  | ||||||
| 							<MkA :to="userPage(user)" :class="{ active: page === 'index' }" v-click-anime> |  | ||||||
| 								<b>{{ number(user.notesCount) }}</b> |  | ||||||
| 								<span>{{ $ts.notes }}</span> |  | ||||||
| 							</MkA> |  | ||||||
| 							<MkA :to="userPage(user, 'following')" :class="{ active: page === 'following' }" v-click-anime> |  | ||||||
| 								<b>{{ number(user.followingCount) }}</b> |  | ||||||
| 								<span>{{ $ts.following }}</span> |  | ||||||
| 							</MkA> |  | ||||||
| 							<MkA :to="userPage(user, 'followers')" :class="{ active: page === 'followers' }" v-click-anime> |  | ||||||
| 								<b>{{ number(user.followersCount) }}</b> |  | ||||||
| 								<span>{{ $ts.followers }}</span> |  | ||||||
| 							</MkA> |  | ||||||
| 						</div> |  | ||||||
| 					</div> |  | ||||||
| 				</div> |  | ||||||
|  |  | ||||||
| 				<div class="contents"> |  | ||||||
| 					<template v-if="page === 'index'"> |  | ||||||
| 						<div> |  | ||||||
| 							<div v-if="user.pinnedNotes.length > 0" class="_gap"> |  | ||||||
| 								<XNote v-for="note in user.pinnedNotes" class="note _block" :note="note" @update:note="pinnedNoteUpdated(note, $event)" :key="note.id" :pinned="true"/> |  | ||||||
| 							</div> |  | ||||||
| 							<MkInfo v-else-if="$i && $i.id === user.id">{{ $ts.userPagePinTip }}</MkInfo> |  | ||||||
| 							<XPhotos :user="user" :key="user.id"/> |  | ||||||
| 							<XActivity :user="user" :key="user.id"/> |  | ||||||
| 						</div> |  | ||||||
| 						<div> |  | ||||||
| 							<XUserTimeline :user="user"/> |  | ||||||
| 						</div> |  | ||||||
| 					</template> |  | ||||||
| 					<XFollowList v-else-if="page === 'following'" type="following" :user="user" class="_content _gap"/> |  | ||||||
| 					<XFollowList v-else-if="page === 'followers'" type="followers" :user="user" class="_content _gap"/> |  | ||||||
| 					<XReactions v-else-if="page === 'reactions'" :user="user" class="_gap"/> |  | ||||||
| 					<XClips v-else-if="page === 'clips'" :user="user" class="_gap"/> |  | ||||||
| 					<XPages v-else-if="page === 'pages'" :user="user" class="_gap"/> |  | ||||||
| 					<XGallery v-else-if="page === 'gallery'" :user="user" class="_gap"/> |  | ||||||
| 				</div> |  | ||||||
| 			</div> |  | ||||||
| 		</MkSpacer> |  | ||||||
| 		<MkError v-else-if="error" @retry="fetch()"/> |  | ||||||
| 		<MkLoading v-else/> |  | ||||||
| 	</transition> |  | ||||||
| </div> |  | ||||||
| </template> | </template> | ||||||
|  |  | ||||||
| <script lang="ts"> | <script lang="ts"> | ||||||
| @@ -250,14 +247,6 @@ export default defineComponent({ | |||||||
| 		return { | 		return { | ||||||
| 			[symbols.PAGE_INFO]: computed(() => this.user ? { | 			[symbols.PAGE_INFO]: computed(() => this.user ? { | ||||||
| 				icon: 'fas fa-user', | 				icon: 'fas fa-user', | ||||||
| 				title: this.user.name ? `${this.user.name} (@${this.user.username})` : `@${this.user.username}`, |  | ||||||
| 				path: `/@${this.user.username}`, |  | ||||||
| 				share: { |  | ||||||
| 					title: this.user.name, |  | ||||||
| 				}, |  | ||||||
| 				bg: 'var(--bg)', |  | ||||||
| 			} : null), |  | ||||||
| 			header: computed(() => this.user ? { |  | ||||||
| 				title: this.user.name ? `${this.user.name} (@${this.user.username})` : `@${this.user.username}`, | 				title: this.user.name ? `${this.user.name} (@${this.user.username})` : `@${this.user.username}`, | ||||||
| 				subtitle: `@${getAcct(this.user)}`, | 				subtitle: `@${getAcct(this.user)}`, | ||||||
| 				userName: this.user, | 				userName: this.user, | ||||||
| @@ -292,7 +281,7 @@ export default defineComponent({ | |||||||
| 					title: this.$ts.gallery, | 					title: this.$ts.gallery, | ||||||
| 					icon: 'fas fa-icons', | 					icon: 'fas fa-icons', | ||||||
| 					onClick: () => { this.$router.push('/@' + getAcct(this.user) + '/gallery'); }, | 					onClick: () => { this.$router.push('/@' + getAcct(this.user) + '/gallery'); }, | ||||||
| 				}] | 				}], | ||||||
| 			} : null), | 			} : null), | ||||||
| 			user: null, | 			user: null, | ||||||
| 			error: null, | 			error: null, | ||||||
|   | |||||||
| @@ -7,13 +7,16 @@ | |||||||
| 		</template> | 		</template> | ||||||
| 	</template> | 	</template> | ||||||
|  |  | ||||||
| 	<router-view v-slot="{ Component }"> | 	<MkStickyContainer> | ||||||
| 		<transition> | 		<template #header><MkHeader v-if="pageInfo && !pageInfo.hideHeader" :info="pageInfo"/></template> | ||||||
| 			<keep-alive :include="['timeline']"> | 		<router-view v-slot="{ Component }"> | ||||||
| 				<component :is="Component" :ref="changePage" @contextmenu.stop="onContextmenu"/> | 			<transition> | ||||||
| 			</keep-alive> | 				<keep-alive :include="['timeline']"> | ||||||
| 		</transition> | 					<component :is="Component" :ref="changePage" @contextmenu.stop="onContextmenu"/> | ||||||
| 	</router-view> | 				</keep-alive> | ||||||
|  | 			</transition> | ||||||
|  | 		</router-view> | ||||||
|  | 	</MkStickyContainer> | ||||||
| </XColumn> | </XColumn> | ||||||
| </template> | </template> | ||||||
|  |  | ||||||
|   | |||||||
| @@ -14,13 +14,16 @@ | |||||||
|  |  | ||||||
| 		<main class="main" @contextmenu.stop="onContextmenu" :style="{ background: pageInfo?.bg }"> | 		<main class="main" @contextmenu.stop="onContextmenu" :style="{ background: pageInfo?.bg }"> | ||||||
| 			<div class="content"> | 			<div class="content"> | ||||||
| 				<router-view v-slot="{ Component }"> | 				<MkStickyContainer> | ||||||
| 					<transition :name="$store.state.animation ? 'page' : ''" mode="out-in" @enter="onTransition"> | 					<template #header><MkHeader v-if="pageInfo && !pageInfo.hideHeader" :info="pageInfo"/></template> | ||||||
| 						<keep-alive :include="['timeline']"> | 					<router-view v-slot="{ Component }"> | ||||||
| 							<component :is="Component" :ref="changePage"/> | 						<transition :name="$store.state.animation ? 'page' : ''" mode="out-in" @enter="onTransition"> | ||||||
| 						</keep-alive> | 							<keep-alive :include="['timeline']"> | ||||||
| 					</transition> | 								<component :is="Component" :ref="changePage"/> | ||||||
| 				</router-view> | 							</keep-alive> | ||||||
|  | 						</transition> | ||||||
|  | 					</router-view> | ||||||
|  | 				</MkStickyContainer> | ||||||
| 			</div> | 			</div> | ||||||
| 		</main> | 		</main> | ||||||
|  |  | ||||||
|   | |||||||
| @@ -5,13 +5,16 @@ | |||||||
| 	<div class="contents" ref="contents" @contextmenu.stop="onContextmenu" :style="{ background: pageInfo?.bg }"> | 	<div class="contents" ref="contents" @contextmenu.stop="onContextmenu" :style="{ background: pageInfo?.bg }"> | ||||||
| 		<main ref="main"> | 		<main ref="main"> | ||||||
| 			<div class="content"> | 			<div class="content"> | ||||||
| 				<router-view v-slot="{ Component }"> | 				<MkStickyContainer> | ||||||
| 					<transition :name="$store.state.animation ? 'page' : ''" mode="out-in" @enter="onTransition"> | 					<template #header><MkHeader v-if="pageInfo && !pageInfo.hideHeader" :info="pageInfo"/></template> | ||||||
| 						<keep-alive :include="['timeline']"> | 					<router-view v-slot="{ Component }"> | ||||||
| 							<component :is="Component" :ref="changePage"/> | 						<transition :name="$store.state.animation ? 'page' : ''" mode="out-in" @enter="onTransition"> | ||||||
| 						</keep-alive> | 							<keep-alive :include="['timeline']"> | ||||||
| 					</transition> | 								<component :is="Component" :ref="changePage"/> | ||||||
| 				</router-view> | 							</keep-alive> | ||||||
|  | 						</transition> | ||||||
|  | 					</router-view> | ||||||
|  | 				</MkStickyContainer> | ||||||
| 			</div> | 			</div> | ||||||
| 			<div class="spacer"></div> | 			<div class="spacer"></div> | ||||||
| 		</main> | 		</main> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 syuilo
					syuilo