wip
This commit is contained in:
		
							parent
							
								
									bb3e2c123a
								
							
						
					
					
						commit
						d892819a9e
					
				
					 26 changed files with 493 additions and 419 deletions
				
			
		|  | @ -1,5 +1,5 @@ | |||
| <template> | ||||
| <div class="fdidabkb" :class="{ slim: narrow, thin }" :style="{ background: bg }"> | ||||
| <div class="fdidabkb" :class="{ slim: narrow, thin }" :style="{ background: bg }" @click="onClick"> | ||||
| 	<template v-if="info"> | ||||
| 		<div class="titleContainer" @click="showTabsPopup"> | ||||
| 			<i v-if="info.icon" class="icon" :class="info.icon"></i> | ||||
|  | @ -35,9 +35,10 @@ | |||
| 
 | ||||
| <script lang="ts"> | ||||
| import { defineComponent } from 'vue'; | ||||
| import * as tinycolor from 'tinycolor2'; | ||||
| import { popupMenu } from '@client/os'; | ||||
| import { url } from '@client/config'; | ||||
| import * as tinycolor from 'tinycolor2'; | ||||
| import { scrollToTop } from '@client/scripts/scroll'; | ||||
| 
 | ||||
| export default defineComponent({ | ||||
| 	props: { | ||||
|  | @ -77,7 +78,7 @@ export default defineComponent({ | |||
| 	}, | ||||
| 
 | ||||
| 	mounted() { | ||||
| 		const rawBg = this.info.bg || 'var(--bg)'; | ||||
| 		const rawBg = this.info?.bg || 'var(--bg)'; | ||||
| 		const bg = tinycolor(rawBg.startsWith('var(') ? getComputedStyle(document.documentElement).getPropertyValue(rawBg.slice(4, -1)) : rawBg); | ||||
| 		bg.setAlpha(0.85); | ||||
| 		this.bg = bg.toRgbString(); | ||||
|  | @ -136,6 +137,10 @@ export default defineComponent({ | |||
| 
 | ||||
| 		preventDrag(ev) { | ||||
| 			ev.stopPropagation(); | ||||
| 		}, | ||||
| 
 | ||||
| 		onClick(ev) { | ||||
| 			scrollToTop(this.$el, { behavior: 'smooth' }); | ||||
| 		} | ||||
| 	} | ||||
| }); | ||||
|  | @ -146,7 +151,7 @@ export default defineComponent({ | |||
| 	--height: 60px; | ||||
| 	display: flex; | ||||
| 	position: sticky; | ||||
| 	top: 0; | ||||
| 	top: var(--stickyTop, 0); | ||||
| 	z-index: 1000; | ||||
| 	width: 100%; | ||||
| 	-webkit-backdrop-filter: var(--blur, blur(15px)); | ||||
|  |  | |||
|  | @ -11,7 +11,6 @@ | |||
| 			<button class="_button" @click="$refs.modal.close()"><i class="fas fa-times"></i></button> | ||||
| 		</div> | ||||
| 		<div class="body _flat_"> | ||||
| 			<MkHeader v-if="!pageInfo?.hide" :info="pageInfo"/> | ||||
| 			<keep-alive> | ||||
| 				<component :is="component" v-bind="props" :ref="changePage"/> | ||||
| 			</keep-alive> | ||||
|  |  | |||
|  | @ -9,14 +9,14 @@ | |||
| > | ||||
| 	<template #header> | ||||
| 		<template v-if="pageInfo"> | ||||
| 			{{ pageInfo.title }} | ||||
| 			<i v-if="pageInfo.icon" class="icon" :class="pageInfo.icon" style="margin-right: 0.5em;"></i> | ||||
| 			<span>{{ pageInfo.title }}</span> | ||||
| 		</template> | ||||
| 	</template> | ||||
| 	<template #headerLeft> | ||||
| 		<button v-if="history.length > 0" class="_button" @click="back()"><i class="fas fa-arrow-left"></i></button> | ||||
| 	</template> | ||||
| 	<div class="yrolvcoq _flat_"> | ||||
| 		<MkHeader :info="pageInfo"/> | ||||
| 		<component :is="component" v-bind="props" :ref="changePage"/> | ||||
| 	</div> | ||||
| </XWindow> | ||||
|  |  | |||
|  | @ -1,17 +1,20 @@ | |||
| <template> | ||||
| <div class="_section"> | ||||
| 	<MkPagination :pagination="pagination" #default="{items}" class="ruryvtyk _content"> | ||||
| 		<section class="_card announcement _gap" v-for="(announcement, i) in items" :key="announcement.id"> | ||||
| 			<div class="_title"><span v-if="$i && !announcement.isRead">🆕 </span>{{ announcement.title }}</div> | ||||
| 			<div class="_content"> | ||||
| 				<Mfm :text="announcement.text"/> | ||||
| 				<img v-if="announcement.imageUrl" :src="announcement.imageUrl"/> | ||||
| 			</div> | ||||
| 			<div class="_footer" v-if="$i && !announcement.isRead"> | ||||
| 				<MkButton @click="read(items, announcement, i)" primary><i class="fas fa-check"></i> {{ $ts.gotIt }}</MkButton> | ||||
| 			</div> | ||||
| 		</section> | ||||
| 	</MkPagination> | ||||
| <div> | ||||
| 	<MkHeader :info="header"/> | ||||
| 	<div class="_section"> | ||||
| 		<MkPagination :pagination="pagination" #default="{items}" class="ruryvtyk _content"> | ||||
| 			<section class="_card announcement _gap" v-for="(announcement, i) in items" :key="announcement.id"> | ||||
| 				<div class="_title"><span v-if="$i && !announcement.isRead">🆕 </span>{{ announcement.title }}</div> | ||||
| 				<div class="_content"> | ||||
| 					<Mfm :text="announcement.text"/> | ||||
| 					<img v-if="announcement.imageUrl" :src="announcement.imageUrl"/> | ||||
| 				</div> | ||||
| 				<div class="_footer" v-if="$i && !announcement.isRead"> | ||||
| 					<MkButton @click="read(items, announcement, i)" primary><i class="fas fa-check"></i> {{ $ts.gotIt }}</MkButton> | ||||
| 				</div> | ||||
| 			</section> | ||||
| 		</MkPagination> | ||||
| 	</div> | ||||
| </div> | ||||
| </template> | ||||
| 
 | ||||
|  | @ -35,6 +38,11 @@ export default defineComponent({ | |||
| 				icon: 'fas fa-broadcast-tower', | ||||
| 				bg: 'var(--bg)', | ||||
| 			}, | ||||
| 			header: { | ||||
| 				title: this.$ts.announcements, | ||||
| 				icon: 'fas fa-broadcast-tower', | ||||
| 				bg: 'var(--bg)', | ||||
| 			}, | ||||
| 			pagination: { | ||||
| 				endpoint: 'announcements', | ||||
| 				limit: 10, | ||||
|  |  | |||
|  | @ -89,7 +89,7 @@ export default defineComponent({ | |||
| 		}, | ||||
| 
 | ||||
| 		top() { | ||||
| 			scroll(this.$el, 0); | ||||
| 			scroll(this.$el, { top: 0 }); | ||||
| 		}, | ||||
| 
 | ||||
| 		async timetravel() { | ||||
|  |  | |||
|  | @ -1,6 +1,9 @@ | |||
| <template> | ||||
| <div :class="$style.root"> | ||||
| 	<XCategory v-if="tab === 'category'"/> | ||||
| <div> | ||||
| 	<MkHeader :info="header"/> | ||||
| 	<div :class="$style.root"> | ||||
| 		<XCategory v-if="tab === 'category'"/> | ||||
| 	</div> | ||||
| </div> | ||||
| </template> | ||||
| 
 | ||||
|  | @ -22,6 +25,11 @@ export default defineComponent({ | |||
| 				icon: 'fas fa-laugh', | ||||
| 				bg: 'var(--bg)', | ||||
| 			})), | ||||
| 			header: computed(() => ({ | ||||
| 				title: this.$ts.customEmojis, | ||||
| 				icon: 'fas fa-laugh', | ||||
| 				bg: 'var(--bg)', | ||||
| 			})), | ||||
| 			tab: 'category', | ||||
| 		} | ||||
| 	}, | ||||
|  |  | |||
|  | @ -1,7 +1,10 @@ | |||
| <template> | ||||
| <div class="jmelgwjh"> | ||||
| 	<div class="body"> | ||||
| 		<XNotes class="notes" :pagination="pagination" :detail="true" :prop="'note'" @before="before()" @after="after()"/> | ||||
| <div> | ||||
| 	<MkHeader :info="header"/> | ||||
| 	<div class="jmelgwjh"> | ||||
| 		<div class="body"> | ||||
| 			<XNotes class="notes" :pagination="pagination" :detail="true" :prop="'note'" @before="before()" @after="after()"/> | ||||
| 		</div> | ||||
| 	</div> | ||||
| </div> | ||||
| </template> | ||||
|  | @ -25,6 +28,11 @@ export default defineComponent({ | |||
| 				icon: 'fas fa-star', | ||||
| 				bg: 'var(--bg)', | ||||
| 			}, | ||||
| 			header: { | ||||
| 				title: this.$ts.favorites, | ||||
| 				icon: 'fas fa-star', | ||||
| 				bg: 'var(--bg)', | ||||
| 			}, | ||||
| 			pagination: { | ||||
| 				endpoint: 'i/favorites', | ||||
| 				limit: 10, | ||||
|  |  | |||
|  | @ -1,6 +1,9 @@ | |||
| <template> | ||||
| <div class="_section"> | ||||
| 	<XNotes class="_content" ref="notes" :pagination="pagination" @before="before" @after="after"/> | ||||
| <div> | ||||
| 	<MkHeader :info="header"/> | ||||
| 	<div class="_section"> | ||||
| 		<XNotes class="_content" ref="notes" :pagination="pagination" @before="before" @after="after"/> | ||||
| 	</div> | ||||
| </div> | ||||
| </template> | ||||
| 
 | ||||
|  | @ -19,12 +22,18 @@ export default defineComponent({ | |||
| 		return { | ||||
| 			[symbols.PAGE_INFO]: { | ||||
| 				title: this.$ts.featured, | ||||
| 				icon: 'fas fa-fire-alt' | ||||
| 				icon: 'fas fa-fire-alt', | ||||
| 				bg: 'var(--bg)', | ||||
| 			}, | ||||
| 			header: { | ||||
| 				title: this.$ts.featured, | ||||
| 				icon: 'fas fa-fire-alt', | ||||
| 				bg: 'var(--bg)', | ||||
| 			}, | ||||
| 			pagination: { | ||||
| 				endpoint: 'notes/featured', | ||||
| 				limit: 10, | ||||
| 				offsetMode: true | ||||
| 				offsetMode: true, | ||||
| 			}, | ||||
| 		}; | ||||
| 	}, | ||||
|  |  | |||
|  | @ -1,95 +1,98 @@ | |||
| <template> | ||||
| <div class="taeiyria"> | ||||
| 	<div class="query"> | ||||
| 		<MkInput v-model="host" :debounce="true" class=""> | ||||
| 			<template #prefix><i class="fas fa-search"></i></template> | ||||
| 			<template #label>{{ $ts.host }}</template> | ||||
| 		</MkInput> | ||||
| 		<div class="_inputSplit"> | ||||
| 			<MkSelect v-model="state"> | ||||
| 				<template #label>{{ $ts.state }}</template> | ||||
| 				<option value="all">{{ $ts.all }}</option> | ||||
| 				<option value="federating">{{ $ts.federating }}</option> | ||||
| 				<option value="subscribing">{{ $ts.subscribing }}</option> | ||||
| 				<option value="publishing">{{ $ts.publishing }}</option> | ||||
| 				<option value="suspended">{{ $ts.suspended }}</option> | ||||
| 				<option value="blocked">{{ $ts.blocked }}</option> | ||||
| 				<option value="notResponding">{{ $ts.notResponding }}</option> | ||||
| 			</MkSelect> | ||||
| 			<MkSelect v-model="sort"> | ||||
| 				<template #label>{{ $ts.sort }}</template> | ||||
| 				<option value="+pubSub">{{ $ts.pubSub }} ({{ $ts.descendingOrder }})</option> | ||||
| 				<option value="-pubSub">{{ $ts.pubSub }} ({{ $ts.ascendingOrder }})</option> | ||||
| 				<option value="+notes">{{ $ts.notes }} ({{ $ts.descendingOrder }})</option> | ||||
| 				<option value="-notes">{{ $ts.notes }} ({{ $ts.ascendingOrder }})</option> | ||||
| 				<option value="+users">{{ $ts.users }} ({{ $ts.descendingOrder }})</option> | ||||
| 				<option value="-users">{{ $ts.users }} ({{ $ts.ascendingOrder }})</option> | ||||
| 				<option value="+following">{{ $ts.following }} ({{ $ts.descendingOrder }})</option> | ||||
| 				<option value="-following">{{ $ts.following }} ({{ $ts.ascendingOrder }})</option> | ||||
| 				<option value="+followers">{{ $ts.followers }} ({{ $ts.descendingOrder }})</option> | ||||
| 				<option value="-followers">{{ $ts.followers }} ({{ $ts.ascendingOrder }})</option> | ||||
| 				<option value="+caughtAt">{{ $ts.registeredAt }} ({{ $ts.descendingOrder }})</option> | ||||
| 				<option value="-caughtAt">{{ $ts.registeredAt }} ({{ $ts.ascendingOrder }})</option> | ||||
| 				<option value="+lastCommunicatedAt">{{ $ts.lastCommunication }} ({{ $ts.descendingOrder }})</option> | ||||
| 				<option value="-lastCommunicatedAt">{{ $ts.lastCommunication }} ({{ $ts.ascendingOrder }})</option> | ||||
| 				<option value="+driveUsage">{{ $ts.driveUsage }} ({{ $ts.descendingOrder }})</option> | ||||
| 				<option value="-driveUsage">{{ $ts.driveUsage }} ({{ $ts.ascendingOrder }})</option> | ||||
| 				<option value="+driveFiles">{{ $ts.driveFilesCount }} ({{ $ts.descendingOrder }})</option> | ||||
| 				<option value="-driveFiles">{{ $ts.driveFilesCount }} ({{ $ts.ascendingOrder }})</option> | ||||
| 			</MkSelect> | ||||
| <div> | ||||
| 	<MkHeader :info="header"/> | ||||
| 	<div class="taeiyria"> | ||||
| 		<div class="query"> | ||||
| 			<MkInput v-model="host" :debounce="true" class=""> | ||||
| 				<template #prefix><i class="fas fa-search"></i></template> | ||||
| 				<template #label>{{ $ts.host }}</template> | ||||
| 			</MkInput> | ||||
| 			<div class="_inputSplit"> | ||||
| 				<MkSelect v-model="state"> | ||||
| 					<template #label>{{ $ts.state }}</template> | ||||
| 					<option value="all">{{ $ts.all }}</option> | ||||
| 					<option value="federating">{{ $ts.federating }}</option> | ||||
| 					<option value="subscribing">{{ $ts.subscribing }}</option> | ||||
| 					<option value="publishing">{{ $ts.publishing }}</option> | ||||
| 					<option value="suspended">{{ $ts.suspended }}</option> | ||||
| 					<option value="blocked">{{ $ts.blocked }}</option> | ||||
| 					<option value="notResponding">{{ $ts.notResponding }}</option> | ||||
| 				</MkSelect> | ||||
| 				<MkSelect v-model="sort"> | ||||
| 					<template #label>{{ $ts.sort }}</template> | ||||
| 					<option value="+pubSub">{{ $ts.pubSub }} ({{ $ts.descendingOrder }})</option> | ||||
| 					<option value="-pubSub">{{ $ts.pubSub }} ({{ $ts.ascendingOrder }})</option> | ||||
| 					<option value="+notes">{{ $ts.notes }} ({{ $ts.descendingOrder }})</option> | ||||
| 					<option value="-notes">{{ $ts.notes }} ({{ $ts.ascendingOrder }})</option> | ||||
| 					<option value="+users">{{ $ts.users }} ({{ $ts.descendingOrder }})</option> | ||||
| 					<option value="-users">{{ $ts.users }} ({{ $ts.ascendingOrder }})</option> | ||||
| 					<option value="+following">{{ $ts.following }} ({{ $ts.descendingOrder }})</option> | ||||
| 					<option value="-following">{{ $ts.following }} ({{ $ts.ascendingOrder }})</option> | ||||
| 					<option value="+followers">{{ $ts.followers }} ({{ $ts.descendingOrder }})</option> | ||||
| 					<option value="-followers">{{ $ts.followers }} ({{ $ts.ascendingOrder }})</option> | ||||
| 					<option value="+caughtAt">{{ $ts.registeredAt }} ({{ $ts.descendingOrder }})</option> | ||||
| 					<option value="-caughtAt">{{ $ts.registeredAt }} ({{ $ts.ascendingOrder }})</option> | ||||
| 					<option value="+lastCommunicatedAt">{{ $ts.lastCommunication }} ({{ $ts.descendingOrder }})</option> | ||||
| 					<option value="-lastCommunicatedAt">{{ $ts.lastCommunication }} ({{ $ts.ascendingOrder }})</option> | ||||
| 					<option value="+driveUsage">{{ $ts.driveUsage }} ({{ $ts.descendingOrder }})</option> | ||||
| 					<option value="-driveUsage">{{ $ts.driveUsage }} ({{ $ts.ascendingOrder }})</option> | ||||
| 					<option value="+driveFiles">{{ $ts.driveFilesCount }} ({{ $ts.descendingOrder }})</option> | ||||
| 					<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> | ||||
| 		<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="cell"> | ||||
| 						<div class="key">{{ $ts.software }}</div> | ||||
| 						<div class="value">{{ instance.softwareName || `(${$ts.unknown})` }}</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> | ||||
| 					<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> | ||||
| 				</MkA> | ||||
| 			</div> | ||||
| 		</MkPagination> | ||||
| 	</div> | ||||
| </div> | ||||
| </template> | ||||
| 
 | ||||
|  | @ -119,6 +122,11 @@ export default defineComponent({ | |||
| 				icon: 'fas fa-globe', | ||||
| 				bg: 'var(--bg)', | ||||
| 			}, | ||||
| 			header: { | ||||
| 				title: this.$ts.federation, | ||||
| 				icon: 'fas fa-globe', | ||||
| 				bg: 'var(--bg)', | ||||
| 			}, | ||||
| 			host: '', | ||||
| 			state: 'federating', | ||||
| 			sort: '+pubSub', | ||||
|  |  | |||
|  | @ -127,7 +127,7 @@ export default defineComponent({ | |||
| 			pageProps.value = {}; | ||||
| 
 | ||||
| 			nextTick(() => { | ||||
| 				scroll(el.value, 0); | ||||
| 				scroll(el.value, { top: 0 }); | ||||
| 			}); | ||||
| 		}, { immediate: true }); | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,6 +1,9 @@ | |||
| <template> | ||||
| <div class="_section"> | ||||
| 	<XNotes class="_content" :pagination="pagination" @before="before()" @after="after()"/> | ||||
| <div> | ||||
| 	<MkHeader :info="header"/> | ||||
| 	<div class="_section"> | ||||
| 		<XNotes class="_content" :pagination="pagination" @before="before()" @after="after()"/> | ||||
| 	</div> | ||||
| </div> | ||||
| </template> | ||||
| 
 | ||||
|  | @ -19,7 +22,13 @@ export default defineComponent({ | |||
| 		return { | ||||
| 			[symbols.PAGE_INFO]: { | ||||
| 				title: this.$ts.mentions, | ||||
| 				icon: 'fas fa-at' | ||||
| 				icon: 'fas fa-at', | ||||
| 				bg: 'var(--bg)', | ||||
| 			}, | ||||
| 			header: { | ||||
| 				title: this.$ts.mentions, | ||||
| 				icon: 'fas fa-at', | ||||
| 				bg: 'var(--bg)', | ||||
| 			}, | ||||
| 			pagination: { | ||||
| 				endpoint: 'notes/mentions', | ||||
|  |  | |||
|  | @ -1,6 +1,9 @@ | |||
| <template> | ||||
| <div> | ||||
| 	<XNotes :pagination="pagination" @before="before()" @after="after()"/> | ||||
| 	<MkHeader :info="header"/> | ||||
| 	<div> | ||||
| 		<XNotes :pagination="pagination" @before="before()" @after="after()"/> | ||||
| 	</div> | ||||
| </div> | ||||
| </template> | ||||
| 
 | ||||
|  | @ -19,7 +22,13 @@ export default defineComponent({ | |||
| 		return { | ||||
| 			[symbols.PAGE_INFO]: { | ||||
| 				title: this.$ts.directNotes, | ||||
| 				icon: 'fas fa-envelope' | ||||
| 				icon: 'fas fa-envelope', | ||||
| 				bg: 'var(--bg)', | ||||
| 			}, | ||||
| 			header: { | ||||
| 				title: this.$ts.directNotes, | ||||
| 				icon: 'fas fa-envelope', | ||||
| 				bg: 'var(--bg)', | ||||
| 			}, | ||||
| 			pagination: { | ||||
| 				endpoint: 'notes/mentions', | ||||
|  |  | |||
|  | @ -1,38 +1,42 @@ | |||
| <template> | ||||
| <div class="yweeujhr _root" v-size="{ max: [400] }"> | ||||
| 	<MkButton @click="start" primary class="start"><i class="fas fa-plus"></i> {{ $ts.startMessaging }}</MkButton> | ||||
| <div> | ||||
| 	<MkHeader :info="header"/> | ||||
| 
 | ||||
| 	<div class="history" v-if="messages.length > 0"> | ||||
| 		<MkA v-for="(message, i) in messages" | ||||
| 			class="message _block" | ||||
| 			:class="{ isMe: isMe(message), isRead: message.groupId ? message.reads.includes($i.id) : message.isRead }" | ||||
| 			:to="message.groupId ? `/my/messaging/group/${message.groupId}` : `/my/messaging/${getAcct(isMe(message) ? message.recipient : message.user)}`" | ||||
| 			:data-index="i" | ||||
| 			:key="message.id" | ||||
| 			v-anim="i" | ||||
| 		> | ||||
| 			<div> | ||||
| 				<MkAvatar class="avatar" :user="message.groupId ? message.user : isMe(message) ? message.recipient : message.user" :show-indicator="true"/> | ||||
| 				<header v-if="message.groupId"> | ||||
| 					<span class="name">{{ message.group.name }}</span> | ||||
| 					<MkTime :time="message.createdAt" class="time"/> | ||||
| 				</header> | ||||
| 				<header v-else> | ||||
| 					<span class="name"><MkUserName :user="isMe(message) ? message.recipient : message.user"/></span> | ||||
| 					<span class="username">@{{ acct(isMe(message) ? message.recipient : message.user) }}</span> | ||||
| 					<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 class="yweeujhr _root" v-size="{ max: [400] }"> | ||||
| 		<MkButton @click="start" primary class="start"><i class="fas fa-plus"></i> {{ $ts.startMessaging }}</MkButton> | ||||
| 
 | ||||
| 		<div class="history" v-if="messages.length > 0"> | ||||
| 			<MkA v-for="(message, i) in messages" | ||||
| 				class="message _block" | ||||
| 				:class="{ isMe: isMe(message), isRead: message.groupId ? message.reads.includes($i.id) : message.isRead }" | ||||
| 				:to="message.groupId ? `/my/messaging/group/${message.groupId}` : `/my/messaging/${getAcct(isMe(message) ? message.recipient : message.user)}`" | ||||
| 				:data-index="i" | ||||
| 				:key="message.id" | ||||
| 				v-anim="i" | ||||
| 			> | ||||
| 				<div> | ||||
| 					<MkAvatar class="avatar" :user="message.groupId ? message.user : isMe(message) ? message.recipient : message.user" :show-indicator="true"/> | ||||
| 					<header v-if="message.groupId"> | ||||
| 						<span class="name">{{ message.group.name }}</span> | ||||
| 						<MkTime :time="message.createdAt" class="time"/> | ||||
| 					</header> | ||||
| 					<header v-else> | ||||
| 						<span class="name"><MkUserName :user="isMe(message) ? message.recipient : message.user"/></span> | ||||
| 						<span class="username">@{{ acct(isMe(message) ? message.recipient : message.user) }}</span> | ||||
| 						<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> | ||||
| 			</MkA> | ||||
| 		</div> | ||||
| 		<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 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> | ||||
| </template> | ||||
| 
 | ||||
|  | @ -56,6 +60,11 @@ export default defineComponent({ | |||
| 				icon: 'fas fa-comments', | ||||
| 				bg: 'var(--bg)', | ||||
| 			}, | ||||
| 			header: { | ||||
| 				title: this.$ts.messaging, | ||||
| 				icon: 'fas fa-comments', | ||||
| 				bg: 'var(--bg)', | ||||
| 			}, | ||||
| 			fetching: true, | ||||
| 			moreFetching: false, | ||||
| 			messages: [], | ||||
|  |  | |||
|  | @ -284,7 +284,7 @@ const Component = defineComponent({ | |||
| 		}, | ||||
| 
 | ||||
| 		scrollToBottom() { | ||||
| 			scroll(this.$el, this.$el.offsetHeight); | ||||
| 			scroll(this.$el, { top: this.$el.offsetHeight }); | ||||
| 		}, | ||||
| 
 | ||||
| 		onIndicatorClick() { | ||||
|  |  | |||
|  | @ -1,13 +1,16 @@ | |||
| <template> | ||||
| <div class="qkcjvfiv"> | ||||
| 	<MkButton @click="create" primary class="add"><i class="fas fa-plus"></i> {{ $ts.createList }}</MkButton> | ||||
| <div> | ||||
| 	<MkHeader :info="header"/> | ||||
| 	<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"> | ||||
| 		<MkA v-for="list in items" :key="list.id" class="list _panel" :to="`/my/lists/${ list.id }`"> | ||||
| 			<div class="name">{{ list.name }}</div> | ||||
| 			<MkAvatars :user-ids="list.userIds"/> | ||||
| 		</MkA> | ||||
| 	</MkPagination> | ||||
| 		<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 }`"> | ||||
| 				<div class="name">{{ list.name }}</div> | ||||
| 				<MkAvatars :user-ids="list.userIds"/> | ||||
| 			</MkA> | ||||
| 		</MkPagination> | ||||
| 	</div> | ||||
| </div> | ||||
| </template> | ||||
| 
 | ||||
|  | @ -31,6 +34,12 @@ export default defineComponent({ | |||
| 			[symbols.PAGE_INFO]: { | ||||
| 				title: this.$ts.manageLists, | ||||
| 				icon: 'fas fa-list-ul', | ||||
| 				bg: 'var(--bg)', | ||||
| 			}, | ||||
| 			header: { | ||||
| 				title: this.$ts.manageLists, | ||||
| 				icon: 'fas fa-list-ul', | ||||
| 				bg: 'var(--bg)', | ||||
| 				action: { | ||||
| 					icon: 'fas fa-plus', | ||||
| 					handler: this.create | ||||
|  |  | |||
|  | @ -1,34 +1,37 @@ | |||
| <template> | ||||
| <div class="mk-list-page"> | ||||
| 	<transition name="zoom" mode="out-in"> | ||||
| 		<div v-if="list" class="_section"> | ||||
| 			<div class="_content"> | ||||
| 				<MkButton inline @click="addUser()">{{ $ts.addUser }}</MkButton> | ||||
| 				<MkButton inline @click="renameList()">{{ $ts.rename }}</MkButton> | ||||
| 				<MkButton inline @click="deleteList()">{{ $ts.delete }}</MkButton> | ||||
| <div> | ||||
| 	<MkHeader v-if="header" :info="header"/> | ||||
| 	<div class="mk-list-page"> | ||||
| 		<transition name="zoom" mode="out-in"> | ||||
| 			<div v-if="list" class="_section"> | ||||
| 				<div class="_content"> | ||||
| 					<MkButton inline @click="addUser()">{{ $ts.addUser }}</MkButton> | ||||
| 					<MkButton inline @click="renameList()">{{ $ts.rename }}</MkButton> | ||||
| 					<MkButton inline @click="deleteList()">{{ $ts.delete }}</MkButton> | ||||
| 				</div> | ||||
| 			</div> | ||||
| 		</div> | ||||
| 	</transition> | ||||
| 		</transition> | ||||
| 
 | ||||
| 	<transition name="zoom" mode="out-in"> | ||||
| 		<div v-if="list" class="_section members _gap"> | ||||
| 			<div class="_title">{{ $ts.members }}</div> | ||||
| 			<div class="_content"> | ||||
| 				<div class="users"> | ||||
| 					<div class="user _panel" v-for="user in users" :key="user.id"> | ||||
| 						<MkAvatar :user="user" class="avatar" :show-indicator="true"/> | ||||
| 						<div class="body"> | ||||
| 							<MkUserName :user="user" class="name"/> | ||||
| 							<MkAcct :user="user" class="acct"/> | ||||
| 						</div> | ||||
| 						<div class="action"> | ||||
| 							<button class="_button" @click="removeUser(user)"><i class="fas fa-times"></i></button> | ||||
| 		<transition name="zoom" mode="out-in"> | ||||
| 			<div v-if="list" class="_section members _gap"> | ||||
| 				<div class="_title">{{ $ts.members }}</div> | ||||
| 				<div class="_content"> | ||||
| 					<div class="users"> | ||||
| 						<div class="user _panel" v-for="user in users" :key="user.id"> | ||||
| 							<MkAvatar :user="user" class="avatar" :show-indicator="true"/> | ||||
| 							<div class="body"> | ||||
| 								<MkUserName :user="user" class="name"/> | ||||
| 								<MkAcct :user="user" class="acct"/> | ||||
| 							</div> | ||||
| 							<div class="action"> | ||||
| 								<button class="_button" @click="removeUser(user)"><i class="fas fa-times"></i></button> | ||||
| 							</div> | ||||
| 						</div> | ||||
| 					</div> | ||||
| 				</div> | ||||
| 			</div> | ||||
| 		</div> | ||||
| 	</transition> | ||||
| 		</transition> | ||||
| 	</div> | ||||
| </div> | ||||
| </template> | ||||
| 
 | ||||
|  | @ -50,6 +53,10 @@ export default defineComponent({ | |||
| 				title: this.list.name, | ||||
| 				icon: 'fas fa-list-ul', | ||||
| 			} : null), | ||||
| 			header: computed(() => this.list ? { | ||||
| 				title: this.list.name, | ||||
| 				icon: 'fas fa-list-ul', | ||||
| 			} : null), | ||||
| 			list: null, | ||||
| 			users: [], | ||||
| 		}; | ||||
|  |  | |||
|  | @ -1,5 +1,8 @@ | |||
| <template> | ||||
| <div> | ||||
| 	<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> | ||||
|  | @ -46,11 +49,17 @@ export default defineComponent({ | |||
| 			[symbols.PAGE_INFO]: { | ||||
| 				title: this.$ts.pages, | ||||
| 				icon: 'fas fa-sticky-note', | ||||
| 				bg: 'var(--bg)', | ||||
| 			}, | ||||
| 			header: { | ||||
| 				title: this.$ts.pages, | ||||
| 				icon: 'fas fa-sticky-note', | ||||
| 				bg: 'var(--bg)', | ||||
| 				actions: [{ | ||||
| 					icon: 'fas fa-plus', | ||||
| 					text: this.$ts.create, | ||||
| 					handler: this.create | ||||
| 				}] | ||||
| 					handler: this.create, | ||||
| 				}], | ||||
| 			}, | ||||
| 			tab: 'featured', | ||||
| 			featuredPagesPagination: { | ||||
|  |  | |||
|  | @ -1,7 +1,10 @@ | |||
| <template> | ||||
| <div class="_section"> | ||||
| 	<div class="_content"> | ||||
| 		<XNotes ref="notes" :pagination="pagination" @before="before" @after="after"/> | ||||
| <div> | ||||
| 	<MkHeader :info="header"/> | ||||
| 	<div class="_section"> | ||||
| 		<div class="_content"> | ||||
| 			<XNotes ref="notes" :pagination="pagination" @before="before" @after="after"/> | ||||
| 		</div> | ||||
| 	</div> | ||||
| </div> | ||||
| </template> | ||||
|  | @ -21,7 +24,11 @@ export default defineComponent({ | |||
| 		return { | ||||
| 			[symbols.PAGE_INFO]: { | ||||
| 				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: { | ||||
| 				endpoint: 'notes/search', | ||||
|  |  | |||
|  | @ -143,7 +143,7 @@ export default defineComponent({ | |||
| 			} | ||||
| 
 | ||||
| 			nextTick(() => { | ||||
| 				scroll(el.value, 0); | ||||
| 				scroll(el.value, { top: 0 }); | ||||
| 			}); | ||||
| 		}, { immediate: true }); | ||||
| 
 | ||||
|  |  | |||
|  | @ -137,7 +137,7 @@ export default defineComponent({ | |||
| 		}, | ||||
| 
 | ||||
| 		top() { | ||||
| 			scroll(this.$el, 0); | ||||
| 			scroll(this.$el, { top: 0 }); | ||||
| 		}, | ||||
| 
 | ||||
| 		async chooseList(ev) { | ||||
|  |  | |||
|  | @ -89,7 +89,7 @@ export default defineComponent({ | |||
| 		}, | ||||
| 
 | ||||
| 		top() { | ||||
| 			scroll(this.$el, 0); | ||||
| 			scroll(this.$el, { top: 0 }); | ||||
| 		}, | ||||
| 
 | ||||
| 		settings() { | ||||
|  |  | |||
|  | @ -1,98 +1,117 @@ | |||
| <template> | ||||
| <transition name="fade" mode="out-in"> | ||||
| 	<div class="ftskorzw wide" v-if="user && narrow === false"> | ||||
| 		<MkRemoteCaution v-if="user.host != null" :href="user.url"/> | ||||
| <div> | ||||
| 	<MkHeader :info="header"/> | ||||
| 	<transition name="fade" mode="out-in"> | ||||
| 		<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" 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 class="banner-container" :style="style"> | ||||
| 				<div class="banner" ref="banner" :style="style"></div> | ||||
| 			</div> | ||||
| 			<div class="main"> | ||||
| 				<div class="actions"> | ||||
| 					<button @click="menu" class="menu _button"><i class="fas fa-ellipsis-h"></i></button> | ||||
| 					<MkFollowButton v-if="!$i || $i.id != user.id" :user="user" :inline="true" :transparent="false" :full="true" large class="koudoku"/> | ||||
| 			<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> | ||||
| 				<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 class="main"> | ||||
| 					<div class="actions"> | ||||
| 						<button @click="menu" class="menu _button"><i class="fas fa-ellipsis-h"></i></button> | ||||
| 						<MkFollowButton v-if="!$i || $i.id != user.id" :user="user" :inline="true" :transparent="false" :full="true" large class="koudoku"/> | ||||
| 					</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"/> | ||||
| 					<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="ftskorzw narrow _root" v-else-if="user && narrow === true" v-size="{ max: [500] }"> | ||||
| 		<!-- 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="ftskorzw narrow _root" v-else-if="user && narrow === true" v-size="{ max: [500] }"> | ||||
| 			<!-- 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="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="_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 class="name" :user="user" :nowrap="true"/> | ||||
| 						<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> | ||||
|  | @ -101,92 +120,76 @@ | |||
| 							<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 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> | ||||
| 				<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 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 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 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> | ||||
| 					<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"/> | ||||
| 			<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> | ||||
| 						<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"/> | ||||
| 				<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> | ||||
| 	<MkError v-else-if="error" @retry="fetch()"/> | ||||
| 	<MkLoading v-else/> | ||||
| </transition> | ||||
| 		<MkError v-else-if="error" @retry="fetch()"/> | ||||
| 		<MkLoading v-else/> | ||||
| 	</transition> | ||||
| </div> | ||||
| </template> | ||||
| 
 | ||||
| <script lang="ts"> | ||||
|  | @ -242,6 +245,15 @@ export default defineComponent({ | |||
| 	data() { | ||||
| 		return { | ||||
| 			[symbols.PAGE_INFO]: computed(() => this.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}`, | ||||
| 				subtitle: `@${getAcct(this.user)}`, | ||||
| 				userName: this.user, | ||||
|  |  | |||
|  | @ -1,3 +1,5 @@ | |||
| type ScrollBehavior = 'auto' | 'smooth' | 'instant'; | ||||
| 
 | ||||
| export function getScrollContainer(el: Element | null): Element | null { | ||||
| 	if (el == null || el.tagName === 'BODY') return null; | ||||
| 	const overflow = window.getComputedStyle(el).getPropertyValue('overflow'); | ||||
|  | @ -45,21 +47,25 @@ export function onScrollBottom(el: Element, cb) { | |||
| 	container.addEventListener('scroll', onScroll, { passive: true }); | ||||
| } | ||||
| 
 | ||||
| export function scroll(el: Element, top: number) { | ||||
| export function scroll(el: Element, options: { | ||||
| 	top?: number; | ||||
| 	left?: number; | ||||
| 	behavior?: ScrollBehavior; | ||||
| }) { | ||||
| 	const container = getScrollContainer(el); | ||||
| 	if (container == null) { | ||||
| 		window.scroll({ top: top, behavior: 'instant' }); | ||||
| 		window.scroll(options); | ||||
| 	} else { | ||||
| 		container.scrollTop = top; | ||||
| 		container.scroll(options); | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| export function scrollToTop(el: Element) { | ||||
| 	scroll(el, 0); | ||||
| export function scrollToTop(el: Element, options: { behavior?: ScrollBehavior; } = {}) { | ||||
| 	scroll(el, { top: 0, ...options }); | ||||
| } | ||||
| 
 | ||||
| export function scrollToBottom(el: Element) { | ||||
| 	scroll(el, 99999); // TODO: ちゃんと計算する
 | ||||
| export function scrollToBottom(el: Element, options: { behavior?: ScrollBehavior; } = {}) { | ||||
| 	scroll(el, { top: 99999, ...options }); // TODO: ちゃんと計算する
 | ||||
| } | ||||
| 
 | ||||
| export function isBottom(el: Element, asobi = 0) { | ||||
|  |  | |||
|  | @ -6,7 +6,6 @@ | |||
| 		</template> | ||||
| 	</template> | ||||
| 
 | ||||
| 	<MkHeader :info="pageInfo"/> | ||||
| 	<router-view v-slot="{ Component }" class="_flat_"> | ||||
| 		<transition> | ||||
| 			<keep-alive :include="['timeline']"> | ||||
|  |  | |||
|  | @ -1,6 +1,6 @@ | |||
| <template> | ||||
| <div class="mk-app" :class="{ wallpaper, isMobile }" :style="`--headerHeight:` + headerHeight + 'px'"> | ||||
| 	<XHeaderMenu v-if="showMenuOnTop"/> | ||||
| <div class="mk-app" :class="{ wallpaper, isMobile }" :style="`--globalHeaderHeight:${globalHeaderHeight}px`"> | ||||
| 	<XHeaderMenu v-if="showMenuOnTop" v-get-size="(w, h) => globalHeaderHeight = h"/> | ||||
| 
 | ||||
| 	<div class="columns" :class="{ fullView, withGlobalHeader: showMenuOnTop }"> | ||||
| 		<template v-if="!isMobile"> | ||||
|  | @ -13,9 +13,6 @@ | |||
| 		</template> | ||||
| 
 | ||||
| 		<main class="main" @contextmenu.stop="onContextmenu" :style="{ background: pageInfo?.bg }"> | ||||
| 			<header class="header" @click="onHeaderClick"> | ||||
| 				<MkHeader :info="pageInfo" v-get-size="(w, h) => headerHeight = h" :thin="true"/> | ||||
| 			</header> | ||||
| 			<div class="content" :class="{ _flat_: !fullView }"> | ||||
| 				<router-view v-slot="{ Component }"> | ||||
| 					<transition :name="$store.state.animation ? 'page' : ''" mode="out-in" @enter="onTransition"> | ||||
|  | @ -86,8 +83,8 @@ export default defineComponent({ | |||
| 	data() { | ||||
| 		return { | ||||
| 			pageInfo: null, | ||||
| 			headerHeight: 0, | ||||
| 			menuDef: menuDef, | ||||
| 			globalHeaderHeight: 0, | ||||
| 			isMobile: window.innerWidth <= MOBILE_THRESHOLD, | ||||
| 			isDesktop: window.innerWidth >= DESKTOP_THRESHOLD, | ||||
| 			widgetsShowing: false, | ||||
|  | @ -192,10 +189,6 @@ export default defineComponent({ | |||
| 			if (window._scroll) window._scroll(); | ||||
| 		}, | ||||
| 
 | ||||
| 		onHeaderClick() { | ||||
| 			window.scroll({ top: 0, behavior: 'smooth' }); | ||||
| 		}, | ||||
| 
 | ||||
| 		onContextmenu(e) { | ||||
| 			const isLink = (el: HTMLElement) => { | ||||
| 				if (el.tagName === 'A') return true; | ||||
|  | @ -280,10 +273,6 @@ export default defineComponent({ | |||
| 				border: none; | ||||
| 				width: 100%; | ||||
| 				border-radius: 0; | ||||
| 
 | ||||
| 				> .header { | ||||
| 					width: 100%; | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
|  | @ -323,29 +312,6 @@ export default defineComponent({ | |||
| 			border-radius: 0; | ||||
| 			overflow: clip; | ||||
| 			--margin: 12px; | ||||
| 
 | ||||
| 			> .header { | ||||
| 				position: sticky; | ||||
| 				z-index: 1000; | ||||
| 				top: var(--globalHeaderHeight, 0px); | ||||
| 				-webkit-backdrop-filter: var(--blur, blur(32px)); | ||||
| 				backdrop-filter: var(--blur, blur(32px)); | ||||
| 				background-color: var(--header); | ||||
| 				border-bottom: solid 0.5px var(--divider); | ||||
| 			} | ||||
| 
 | ||||
| 			> .content { | ||||
| 				--stickyTop: calc(var(--globalHeaderHeight, 0px) + var(--headerHeight)); | ||||
| 			} | ||||
| 
 | ||||
| 			@media (max-width: 850px) { | ||||
| 				padding-top: var(--headerHeight); | ||||
| 
 | ||||
| 				> .header { | ||||
| 					position: fixed; | ||||
| 					width: calc(100% - #{$nav-icon-only-width}); | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
| 
 | ||||
| 		> .widgets { | ||||
|  | @ -367,12 +333,11 @@ export default defineComponent({ | |||
| 		} | ||||
| 
 | ||||
| 		&.withGlobalHeader { | ||||
| 			--globalHeaderHeight: 60px; // TODO: 60pxと決め打ちしているのを直す | ||||
| 
 | ||||
| 			> .main { | ||||
| 				margin-top: 0; | ||||
| 				border: solid 1px var(--divider); | ||||
| 				border-radius: var(--radius); | ||||
| 				--stickyTop: var(--globalHeaderHeight); | ||||
| 			} | ||||
| 
 | ||||
| 			> .widgets { | ||||
|  |  | |||
|  | @ -252,18 +252,6 @@ export default defineComponent({ | |||
| 		min-width: 0; | ||||
| 		background: var(--panel); | ||||
| 
 | ||||
| 		> .header { | ||||
| 			position: fixed; | ||||
| 			z-index: 1000; | ||||
| 			top: 0; | ||||
| 			//background-color: var(--panel); | ||||
| 			-webkit-backdrop-filter: var(--blur, blur(32px)); | ||||
| 			backdrop-filter: var(--blur, blur(32px)); | ||||
| 			background-color: var(--header); | ||||
| 			border-bottom: solid 0.5px var(--divider); | ||||
| 			user-select: none; | ||||
| 		} | ||||
| 
 | ||||
| 		> main { | ||||
| 			min-width: 0; | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue