enhance: タイムラインからRenoteを除外するオプションを追加
This commit is contained in:
		| @@ -29,7 +29,6 @@ SPDX-License-Identifier: AGPL-3.0-only | ||||
| 		<div class="_gaps_s"> | ||||
| 			<MkSwitch v-model="showFixedPostForm">{{ i18n.ts.showFixedPostForm }}</MkSwitch> | ||||
| 			<MkSwitch v-model="showFixedPostFormInChannel">{{ i18n.ts.showFixedPostFormInChannel }}</MkSwitch> | ||||
| 			<MkSwitch v-model="showTimelineReplies">{{ i18n.ts.flagShowTimelineReplies }}<template #caption>{{ i18n.ts.flagShowTimelineRepliesDescription }} {{ i18n.ts.reflectMayTakeTime }}</template></MkSwitch> | ||||
| 			<MkFolder> | ||||
| 				<template #label>{{ i18n.ts.pinnedList }}</template> | ||||
| 				<!-- 複数ピン止め管理できるようにしたいけどめんどいので一旦ひとつのみ --> | ||||
| @@ -249,7 +248,6 @@ const squareAvatars = computed(defaultStore.makeGetterSetter('squareAvatars')); | ||||
| const mediaListWithOneImageAppearance = computed(defaultStore.makeGetterSetter('mediaListWithOneImageAppearance')); | ||||
| const notificationPosition = computed(defaultStore.makeGetterSetter('notificationPosition')); | ||||
| const notificationStackAxis = computed(defaultStore.makeGetterSetter('notificationStackAxis')); | ||||
| const showTimelineReplies = computed(defaultStore.makeGetterSetter('showTimelineReplies')); | ||||
| const keepScreenOn = computed(defaultStore.makeGetterSetter('keepScreenOn')); | ||||
|  | ||||
| watch(lang, () => { | ||||
|   | ||||
| @@ -15,9 +15,11 @@ SPDX-License-Identifier: AGPL-3.0-only | ||||
| 			<div :class="$style.tl"> | ||||
| 				<MkTimeline | ||||
| 					ref="tlComponent" | ||||
| 					:key="src" | ||||
| 					:key="src + withRenotes + withReplies" | ||||
| 					:src="src.split(':')[0]" | ||||
| 					:list="src.split(':')[1]" | ||||
| 					:withRenotes="withRenotes" | ||||
| 					:withReplies="withReplies" | ||||
| 					:sound="true" | ||||
| 					@queue="queueUpdated" | ||||
| 				/> | ||||
| @@ -58,6 +60,8 @@ const rootEl = $shallowRef<HTMLElement>(); | ||||
| let queue = $ref(0); | ||||
| let srcWhenNotSignin = $ref(isLocalTimelineAvailable ? 'local' : 'global'); | ||||
| const src = $computed({ get: () => ($i ? defaultStore.reactiveState.tl.value.src : srcWhenNotSignin), set: (x) => saveSrc(x) }); | ||||
| const withRenotes = $ref(true); | ||||
| const withReplies = $ref(false); | ||||
|  | ||||
| watch($$(src), () => queue = 0); | ||||
|  | ||||
| @@ -129,7 +133,23 @@ function focus(): void { | ||||
| 	tlComponent.focus(); | ||||
| } | ||||
|  | ||||
| const headerActions = $computed(() => []); | ||||
| const headerActions = $computed(() => [{ | ||||
| 	icon: 'ti ti-dots', | ||||
| 	text: i18n.ts.options, | ||||
| 	handler: (ev) => { | ||||
| 		os.popupMenu([{ | ||||
| 			type: 'switch', | ||||
| 			text: i18n.ts.showRenotes, | ||||
| 			icon: 'ti ti-repeat', | ||||
| 			ref: $$(withRenotes), | ||||
| 		}, { | ||||
| 			type: 'switch', | ||||
| 			text: i18n.ts.withReplies, | ||||
| 			icon: 'ti ti-arrow-back-up', | ||||
| 			ref: $$(withReplies), | ||||
| 		}], ev.currentTarget ?? ev.target); | ||||
| 	}, | ||||
| }]); | ||||
|  | ||||
| const headerTabs = $computed(() => [...(defaultStore.reactiveState.pinnedUserLists.value.map(l => ({ | ||||
| 	key: 'list:' + l.id, | ||||
|   | ||||
| @@ -36,8 +36,8 @@ const pagination = { | ||||
| 	limit: 10, | ||||
| 	params: computed(() => ({ | ||||
| 		userId: props.user.id, | ||||
| 		includeRenotes: include.value === 'all', | ||||
| 		includeReplies: include.value === 'all' || include.value === 'files', | ||||
| 		withRenotes: include.value === 'all', | ||||
| 		withReplies: include.value === 'all' || include.value === 'files', | ||||
| 		withFiles: include.value === 'files', | ||||
| 	})), | ||||
| }; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 syuilo
					syuilo