refactor
This commit is contained in:
		
							parent
							
								
									9cd918f12b
								
							
						
					
					
						commit
						f0833cffe9
					
				|  | @ -84,7 +84,6 @@ const bound = computed(() => props.link | |||
| 	: {}); | ||||
| 
 | ||||
| const url = computed(() => { | ||||
| 	if (props.user.avatarUrl == null) return null; | ||||
| 	if (prefer.s.disableShowingAnimatedImages || prefer.s.dataSaver.avatar) return getStaticImageUrl(props.user.avatarUrl); | ||||
| 	return props.user.avatarUrl; | ||||
| }); | ||||
|  |  | |||
|  | @ -54,14 +54,10 @@ router.useListener('change', ({ resolved }) => { | |||
| 	if (resolved == null || 'redirect' in resolved.route) return; | ||||
| 	if (resolved.route.path === currentRoutePath && deepEqual(resolved.props, currentPageProps.value)) return; | ||||
| 
 | ||||
| 	function _() { | ||||
| 		currentPageComponent.value = resolved.route.component; | ||||
| 		currentPageProps.value = resolved.props; | ||||
| 		key.value = router.getCurrentFullPath(); | ||||
| 		currentRoutePath = resolved.route.path; | ||||
| 	} | ||||
| 
 | ||||
| 	_(); | ||||
| 	currentPageComponent.value = resolved.route.component; | ||||
| 	currentPageProps.value = resolved.props; | ||||
| 	key.value = router.getCurrentFullPath(); | ||||
| 	currentRoutePath = resolved.route.path; | ||||
| }); | ||||
| </script> | ||||
| 
 | ||||
|  |  | |||
|  | @ -40,6 +40,7 @@ SPDX-License-Identifier: AGPL-3.0-only | |||
| 
 | ||||
| <script lang="ts" setup> | ||||
| import { ref, computed } from 'vue'; | ||||
| import * as Misskey from 'misskey-js'; | ||||
| import MkInput from '@/components/MkInput.vue'; | ||||
| import FormSection from '@/components/form/section.vue'; | ||||
| import MkSwitch from '@/components/MkSwitch.vue'; | ||||
|  | @ -61,7 +62,7 @@ const event_reaction = ref(true); | |||
| const event_mention = ref(true); | ||||
| 
 | ||||
| async function create(): Promise<void> { | ||||
| 	const events: string[] = []; | ||||
| 	const events = [] as Misskey.entities.UserWebhook['on']; | ||||
| 	if (event_follow.value) events.push('follow'); | ||||
| 	if (event_followed.value) events.push('followed'); | ||||
| 	if (event_note.value) events.push('note'); | ||||
|  |  | |||
|  | @ -469,6 +469,8 @@ export class PreferencesManager { | |||
| 				return local; | ||||
| 			} else if (choice === 'merge') { | ||||
| 				return mergedValue!; | ||||
| 			} else { // TSを黙らすため
 | ||||
| 				return undefined; | ||||
| 			} | ||||
| 		} | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue