mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-23 21:33:08 +02:00
upd: use null
as default on user like setting
This commit is contained in:
parent
44fe3e4ebb
commit
c9112b2949
5 changed files with 8 additions and 7 deletions
|
@ -288,7 +288,7 @@ const translating = ref(false);
|
|||
const showTicker = (defaultStore.state.instanceTicker === 'always') || (defaultStore.state.instanceTicker === 'remote' && appearNote.user.instance);
|
||||
const canRenote = computed(() => ['public', 'home'].includes(appearNote.visibility) || (appearNote.visibility === 'followers' && appearNote.userId === $i.id));
|
||||
let renoteCollapsed = $ref(defaultStore.state.collapseRenotes && isRenote && (($i && ($i.id === note.userId || $i.id === appearNote.userId)) || (appearNote.myReaction != null)));
|
||||
const defaultLike = computed(() => defaultStore.state.like !== '❤️' ? defaultStore.state.like : null);
|
||||
const defaultLike = computed(() => defaultStore.state.like ? defaultStore.state.like : null);
|
||||
|
||||
const keymap = {
|
||||
'r': () => reply(true),
|
||||
|
|
|
@ -323,7 +323,7 @@ const conversation = ref<Misskey.entities.Note[]>([]);
|
|||
const replies = ref<Misskey.entities.Note[]>([]);
|
||||
const quotes = ref<Misskey.entities.Note[]>([]);
|
||||
const canRenote = computed(() => ['public', 'home'].includes(appearNote.visibility) || appearNote.userId === $i.id);
|
||||
const defaultLike = computed(() => defaultStore.state.like !== '❤️' ? defaultStore.state.like : null);
|
||||
const defaultLike = computed(() => defaultStore.state.like ? defaultStore.state.like : null);
|
||||
|
||||
watch(() => props.expandAllCws, (expandAllCws) => {
|
||||
if (expandAllCws !== showContent.value) showContent.value = expandAllCws;
|
||||
|
|
|
@ -133,7 +133,7 @@ const menuButton = shallowRef<HTMLElement>();
|
|||
const likeButton = shallowRef<HTMLElement>();
|
||||
|
||||
let appearNote = $computed(() => isRenote ? props.note.renote as Misskey.entities.Note : props.note);
|
||||
const defaultLike = computed(() => defaultStore.state.like !== '❤️' ? defaultStore.state.like : null);
|
||||
const defaultLike = computed(() => defaultStore.state.like ? defaultStore.state.like : null);
|
||||
|
||||
const isRenote = (
|
||||
props.note.renote != null &&
|
||||
|
|
|
@ -25,8 +25,9 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
|
||||
<FromSlot>
|
||||
<template #label>Default like emoji</template>
|
||||
<MkCustomEmoji v-if="like.startsWith(':')" style="max-height: 3em; font-size: 1.1em;" :useOriginalSize="false" :class="$style.reaction" :name="like" :normal="true" :noStyle="true"/>
|
||||
<MkEmoji v-else :emoji="like" style="max-height: 3em; font-size: 1.1em;" :normal="true" :noStyle="true"/>
|
||||
<MkCustomEmoji v-if="like && like.startsWith(':')" style="max-height: 3em; font-size: 1.1em;" :useOriginalSize="false" :class="$style.reaction" :name="like" :normal="true" :noStyle="true"/>
|
||||
<MkEmoji v-else-if="like && !like.startsWith(':')" :emoji="like" style="max-height: 3em; font-size: 1.1em;" :normal="true" :noStyle="true"/>
|
||||
<span v-else-if="!like">Not Set</span>
|
||||
<div class="_buttons" style="padding-top: 8px;">
|
||||
<MkButton rounded :small="true" inline @click="chooseNewLike"><i class="ph-smiley ph-bold ph-lg"></i> Change</MkButton>
|
||||
<MkButton rounded :small="true" inline @click="resetLike"><i class="ph-arrow-clockwise ph-bold ph-lg"></i> Reset</MkButton>
|
||||
|
@ -140,7 +141,7 @@ function chooseNewLike(ev: MouseEvent) {
|
|||
}
|
||||
|
||||
function resetLike() {
|
||||
defaultStore.set('like', '❤️');
|
||||
defaultStore.set('like', null);
|
||||
}
|
||||
|
||||
watch($$(reactions), () => {
|
||||
|
|
|
@ -112,7 +112,7 @@ export const defaultStore = markRaw(new Storage('base', {
|
|||
},
|
||||
like: {
|
||||
where: 'account',
|
||||
default: '❤️',
|
||||
default: null as string | null,
|
||||
},
|
||||
mutedAds: {
|
||||
where: 'account',
|
||||
|
|
Loading…
Reference in a new issue