diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2023-09-10 17:16:50 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2023-09-10 17:16:50 +0900 |
| commit | 295665a177985e1f7c460e1de23b3d8a96afb2b0 (patch) | |
| tree | 33a87f4c3d2a46088f001fa31e8928921686f168 /packages/frontend | |
| parent | enhance(frontend): add Ui:C:postForm to play (diff) | |
| download | misskey-295665a177985e1f7c460e1de23b3d8a96afb2b0.tar.gz misskey-295665a177985e1f7c460e1de23b3d8a96afb2b0.tar.bz2 misskey-295665a177985e1f7c460e1de23b3d8a96afb2b0.zip | |
enhance(frontend): リアクションの表示サイズをより大きくできるように
Diffstat (limited to 'packages/frontend')
| -rw-r--r-- | packages/frontend/src/components/MkReactionsViewer.reaction.vue | 32 | ||||
| -rw-r--r-- | packages/frontend/src/pages/settings/general.vue | 10 | ||||
| -rw-r--r-- | packages/frontend/src/store.ts | 4 |
3 files changed, 32 insertions, 14 deletions
diff --git a/packages/frontend/src/components/MkReactionsViewer.reaction.vue b/packages/frontend/src/components/MkReactionsViewer.reaction.vue index 2bc88907a8..7da5790122 100644 --- a/packages/frontend/src/components/MkReactionsViewer.reaction.vue +++ b/packages/frontend/src/components/MkReactionsViewer.reaction.vue @@ -8,7 +8,7 @@ SPDX-License-Identifier: AGPL-3.0-only ref="buttonEl" v-ripple="canToggle" class="_button" - :class="[$style.root, { [$style.reacted]: note.myReaction == reaction, [$style.canToggle]: canToggle, [$style.large]: defaultStore.state.largeNoteReactions }]" + :class="[$style.root, { [$style.reacted]: note.myReaction == reaction, [$style.canToggle]: canToggle, [$style.small]: defaultStore.state.reactionsDisplaySize === 'small', [$style.large]: defaultStore.state.reactionsDisplaySize === 'large' }]" @click="toggleReaction()" > <MkReactionIcon :class="$style.icon" :reaction="reaction" :emojiUrl="note.reactionEmojis[reaction.substring(1, reaction.length - 1)]"/> @@ -115,10 +115,11 @@ useTooltip(buttonEl, async (showing) => { <style lang="scss" module> .root { display: inline-block; - height: 32px; + height: 42px; margin: 2px; padding: 0 6px; - border-radius: 4px; + font-size: 1.5em; + border-radius: 6px; &.canToggle { background: var(--buttonBg); @@ -132,14 +133,25 @@ useTooltip(buttonEl, async (showing) => { cursor: default; } + &.small { + height: 32px; + font-size: 1em; + border-radius: 4px; + + > .count { + font-size: 0.9em; + line-height: 32px; + } + } + &.large { - height: 42px; - font-size: 1.5em; - border-radius: 6px; + height: 52px; + font-size: 2em; + border-radius: 8px; > .count { - font-size: 0.7em; - line-height: 42px; + font-size: 0.6em; + line-height: 52px; } } @@ -159,8 +171,8 @@ useTooltip(buttonEl, async (showing) => { } .count { - font-size: 0.9em; - line-height: 32px; + font-size: 0.7em; + line-height: 42px; margin: 0 0 0 4px; } </style> diff --git a/packages/frontend/src/pages/settings/general.vue b/packages/frontend/src/pages/settings/general.vue index 3b39a5c00a..85a3a2e2e3 100644 --- a/packages/frontend/src/pages/settings/general.vue +++ b/packages/frontend/src/pages/settings/general.vue @@ -40,13 +40,18 @@ SPDX-License-Identifier: AGPL-3.0-only <div class="_gaps_s"> <MkSwitch v-model="showNoteActionsOnlyHover">{{ i18n.ts.showNoteActionsOnlyHover }}</MkSwitch> <MkSwitch v-model="showClipButtonInNoteFooter">{{ i18n.ts.showClipButtonInNoteFooter }}</MkSwitch> - <MkSwitch v-model="largeNoteReactions">{{ i18n.ts.largeNoteReactions }}</MkSwitch> <MkSwitch v-model="collapseRenotes">{{ i18n.ts.collapseRenotes }}</MkSwitch> <MkSwitch v-model="advancedMfm">{{ i18n.ts.enableAdvancedMfm }}</MkSwitch> <MkSwitch v-if="advancedMfm" v-model="animatedMfm">{{ i18n.ts.enableAnimatedMfm }}</MkSwitch> <MkSwitch v-model="showGapBetweenNotesInTimeline">{{ i18n.ts.showGapBetweenNotesInTimeline }}</MkSwitch> <MkSwitch v-model="loadRawImages">{{ i18n.ts.loadRawImages }}</MkSwitch> <MkSwitch v-model="useReactionPickerForContextMenu">{{ i18n.ts.useReactionPickerForContextMenu }}</MkSwitch> + <MkRadios v-model="reactionsDisplaySize"> + <template #label>{{ i18n.ts.reactionsDisplaySize }}</template> + <option value="small">{{ i18n.ts.small }}</option> + <option value="medium">{{ i18n.ts.medium }}</option> + <option value="large">{{ i18n.ts.large }}</option> + </MkRadios> </div> <MkSelect v-model="instanceTicker"> @@ -204,7 +209,7 @@ const overridedDeviceKind = computed(defaultStore.makeGetterSetter('overridedDev const serverDisconnectedBehavior = computed(defaultStore.makeGetterSetter('serverDisconnectedBehavior')); const showNoteActionsOnlyHover = computed(defaultStore.makeGetterSetter('showNoteActionsOnlyHover')); const showClipButtonInNoteFooter = computed(defaultStore.makeGetterSetter('showClipButtonInNoteFooter')); -const largeNoteReactions = computed(defaultStore.makeGetterSetter('largeNoteReactions')); +const reactionsDisplaySize = computed(defaultStore.makeGetterSetter('reactionsDisplaySize')); const collapseRenotes = computed(defaultStore.makeGetterSetter('collapseRenotes')); const reduceAnimation = computed(defaultStore.makeGetterSetter('animation', v => !v, v => !v)); const useBlurEffectForModal = computed(defaultStore.makeGetterSetter('useBlurEffectForModal')); @@ -264,6 +269,7 @@ watch([ instanceTicker, overridedDeviceKind, mediaListWithOneImageAppearance, + reactionsDisplaySize, ], async () => { await reloadAsk(); }); diff --git a/packages/frontend/src/store.ts b/packages/frontend/src/store.ts index 2b7a16b6bb..787a584f83 100644 --- a/packages/frontend/src/store.ts +++ b/packages/frontend/src/store.ts @@ -316,9 +316,9 @@ export const defaultStore = markRaw(new Storage('base', { where: 'device', default: false, }, - largeNoteReactions: { + reactionsDisplaySize: { where: 'device', - default: false, + default: 'medium' as 'small' | 'medium' | 'large', }, forceShowAds: { where: 'device', |