mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-10-31 05:24:13 +00:00 
			
		
		
		
	chore(frontend): tweak settings ui
This commit is contained in:
		
							parent
							
								
									5cd98804a2
								
							
						
					
					
						commit
						1aeae6217e
					
				
					 2 changed files with 16 additions and 11 deletions
				
			
		|  | @ -30,8 +30,6 @@ SPDX-License-Identifier: AGPL-3.0-only | ||||||
| 			<MkSwitch v-model="showFixedPostForm">{{ i18n.ts.showFixedPostForm }}</MkSwitch> | 			<MkSwitch v-model="showFixedPostForm">{{ i18n.ts.showFixedPostForm }}</MkSwitch> | ||||||
| 			<MkSwitch v-model="showFixedPostFormInChannel">{{ i18n.ts.showFixedPostFormInChannel }}</MkSwitch> | 			<MkSwitch v-model="showFixedPostFormInChannel">{{ i18n.ts.showFixedPostFormInChannel }}</MkSwitch> | ||||||
| 			<MkSwitch v-model="defaultWithReplies">{{ i18n.ts.withRepliesByDefaultForNewlyFollowed }}</MkSwitch> | 			<MkSwitch v-model="defaultWithReplies">{{ i18n.ts.withRepliesByDefaultForNewlyFollowed }}</MkSwitch> | ||||||
| 			<MkButton danger @click="updateRepliesAll(true)"><i class="ti ti-messages"></i> {{ i18n.ts.showRepliesToOthersInTimelineAll }}</MkButton> |  | ||||||
| 			<MkButton danger @click="updateRepliesAll(false)"><i class="ti ti-messages-off"></i> {{ i18n.ts.hideRepliesToOthersInTimelineAll }}</MkButton> |  | ||||||
| 			<MkFolder> | 			<MkFolder> | ||||||
| 				<template #label>{{ i18n.ts.pinnedList }}</template> | 				<template #label>{{ i18n.ts.pinnedList }}</template> | ||||||
| 				<!-- 複数ピン止め管理できるようにしたいけどめんどいので一旦ひとつのみ --> | 				<!-- 複数ピン止め管理できるようにしたいけどめんどいので一旦ひとつのみ --> | ||||||
|  | @ -336,15 +334,6 @@ async function setPinnedList() { | ||||||
| 	defaultStore.set('pinnedUserLists', [list]); | 	defaultStore.set('pinnedUserLists', [list]); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| async function updateRepliesAll(withReplies: boolean) { |  | ||||||
| 	const { canceled } = os.confirm({ |  | ||||||
| 		type: 'warning', |  | ||||||
| 		text: withReplies ? i18n.ts.confirmShowRepliesAll : i18n.ts.confirmHideRepliesAll, |  | ||||||
| 	}); |  | ||||||
| 	if (canceled) return; |  | ||||||
| 	await os.api('following/update-all', { withReplies }); |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| function removePinnedList() { | function removePinnedList() { | ||||||
| 	defaultStore.set('pinnedUserLists', []); | 	defaultStore.set('pinnedUserLists', []); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -73,6 +73,13 @@ SPDX-License-Identifier: AGPL-3.0-only | ||||||
| 	<FormSection> | 	<FormSection> | ||||||
| 		<FormLink to="/registry"><template #icon><i class="ti ti-adjustments"></i></template>{{ i18n.ts.registry }}</FormLink> | 		<FormLink to="/registry"><template #icon><i class="ti ti-adjustments"></i></template>{{ i18n.ts.registry }}</FormLink> | ||||||
| 	</FormSection> | 	</FormSection> | ||||||
|  | 
 | ||||||
|  | 	<FormSection> | ||||||
|  | 		<div class="_gaps_s"> | ||||||
|  | 			<MkButton danger @click="updateRepliesAll(true)"><i class="ti ti-messages"></i> {{ i18n.ts.showRepliesToOthersInTimelineAll }}</MkButton> | ||||||
|  | 			<MkButton danger @click="updateRepliesAll(false)"><i class="ti ti-messages-off"></i> {{ i18n.ts.hideRepliesToOthersInTimelineAll }}</MkButton> | ||||||
|  | 		</div> | ||||||
|  | 	</FormSection> | ||||||
| </div> | </div> | ||||||
| </template> | </template> | ||||||
| 
 | 
 | ||||||
|  | @ -138,6 +145,15 @@ async function reloadAsk() { | ||||||
| 	unisonReload(); | 	unisonReload(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | async function updateRepliesAll(withReplies: boolean) { | ||||||
|  | 	const { canceled } = os.confirm({ | ||||||
|  | 		type: 'warning', | ||||||
|  | 		text: withReplies ? i18n.ts.confirmShowRepliesAll : i18n.ts.confirmHideRepliesAll, | ||||||
|  | 	}); | ||||||
|  | 	if (canceled) return; | ||||||
|  | 	await os.api('following/update-all', { withReplies }); | ||||||
|  | } | ||||||
|  | 
 | ||||||
| watch([ | watch([ | ||||||
| 	enableCondensedLineForAcct, | 	enableCondensedLineForAcct, | ||||||
| ], async () => { | ], async () => { | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue