Merge remote-tracking branch 'origin/merge/2025-03-24-dakkar' into merge/2025-03-24

This commit is contained in:
Hazelnoot 2025-04-13 13:08:00 -04:00
commit a28b80a0dd
8 changed files with 345 additions and 250 deletions

View file

@ -190,7 +190,7 @@ function parseAndMergeCategories(input: string, root: CustomEmojiFolderTree): Cu
const parts = input.split('/').map(p => p.trim());
let currentNode: CustomEmojiFolderTree = root;
const currentPath = [];
const currentPath = [] as string[];
for (const part of parts) {
currentPath.push(part);
let existingNode = currentNode.children.find((node) => node.value === part);

View file

@ -34,25 +34,25 @@ SPDX-License-Identifier: AGPL-3.0-only
</header>
<div :class="$style.noteContent">
<p v-if="appearNote.cw != null" :class="$style.cw">
<Mfm v-if="appearNote.cw != ''" style="margin-right: 8px;" :text="appearNote.cw" :isBlock="true" :author="appearNote.user" :nyaize="'account'"/>
<Mfm v-if="appearNote.cw != ''" style="margin-right: 8px;" :text="appearNote.cw" :isBlock="true" :author="appearNote.user" :nyaize="'respect'"/>
<MkCwButton v-model="showContent" :text="appearNote.text" :files="appearNote.files" :poll="appearNote.poll"/>
</p>
<div v-show="appearNote.cw == null || showContent">
<span v-if="appearNote.isHidden" style="opacity: 0.5">({{ i18n.ts.private }})</span>
<MkA v-if="appearNote.replyId" :class="$style.noteReplyTarget" :to="`/notes/${appearNote.replyId}`"><i class="ph-arrow-bend-left-up ph-bold ph-lg"></i></MkA>
<Mfm v-if="appearNote.text" :text="appearNote.text" :isBlock="true" :author="appearNote.user" :nyaize="'account'" :emojiUrls="appearNote.emojis"/>
<Mfm v-if="appearNote.text" :text="appearNote.text" :isBlock="true" :author="appearNote.user" :nyaize="'respect'" :emojiUrls="appearNote.emojis"/>
<a v-if="appearNote.renote != null" :class="$style.rn">RN:</a>
<div v-if="translating || translation" :class="$style.translation">
<MkLoading v-if="translating" mini/>
<div v-else>
<b>{{ i18n.t('translatedFrom', { x: translation.sourceLang }) }}: </b>
<Mfm :text="translation.text" :isBlock="true" :author="appearNote.user" :nyaize="'account'" :emojiUrls="appearNote.emojis"/>
<Mfm :text="translation.text" :isBlock="true" :author="appearNote.user" :nyaize="'respect'" :emojiUrls="appearNote.emojis"/>
</div>
</div>
<div v-if="appearNote.files.length > 0">
<div v-if="appearNote.files && appearNote.files.length > 0">
<MkMediaList :mediaList="appearNote.files"/>
</div>
<MkPoll v-if="appearNote.poll" ref="pollViewer" :note="appearNote" :class="$style.poll"/>
<MkPoll v-if="appearNote.poll" :noteId="appearNote.id" :poll="appearNote.poll" :local="!appearNote.user.host" :author="appearNote.user" :emojiUrls="appearNote.emojis" :class="$style.poll"/>
<MkUrlPreview v-for="url in urls" :key="url" :url="url" :compact="true" :detail="true" style="margin-top: 6px;"/>
<div v-if="appearNote.renote" :class="$style.quote"><MkNoteSimple :note="appearNote.renote" :class="$style.quoteNote"/></div>
</div>
@ -117,11 +117,18 @@ let note = ref(deepClone(props.note));
const noteViewInterruptors = getPluginHandlers('note_view_interruptor');
if (noteViewInterruptors.length > 0) {
onMounted(async () => {
let result = deepClone(note.value);
let result: Misskey.entities.Note | null = deepClone(note.value);
for (const interruptor of noteViewInterruptors) {
result = await interruptor.handler(result);
try {
result = await interruptor.handler(result!) as Misskey.entities.Note | null;
if (result === null) {
return;
}
note.value = result;
} catch (err) {
console.error(err);
}
}
note.value = result as Misskey.entities.Note;
});
}

View file

@ -70,7 +70,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<SearchMarker :keywords="['account', 'export', 'data']">
<MkFolder>
<template #icon><i class="ph-database ph-bold ph-lg"></i></template>
<template #label>{{ i18n.ts._dataRequest.title }}</template>
<template #label><SearchLabel>{{ i18n.ts._dataRequest.title }}</SearchLabel></template>
<div class="_gaps_m">
<FormInfo warn>{{ i18n.ts._dataRequest.warn }}</FormInfo>
@ -133,13 +133,15 @@ SPDX-License-Identifier: AGPL-3.0-only
<hr>
<SearchMarker :keywords="['replies']">
<FormSection>
<div class="_gaps_s">
<MkSwitch v-model="defaultWithReplies">{{ i18n.ts.withRepliesByDefaultForNewlyFollowed }}</MkSwitch>
<MkSwitch v-model="defaultWithReplies"><SearchLabel>{{ i18n.ts.withRepliesByDefaultForNewlyFollowed }}</SearchLabel></MkSwitch>
<MkButton danger @click="updateRepliesAll(true)"><i class="ph-chats ph-bold ph-lg"></i> {{ i18n.ts.showRepliesToOthersInTimelineAll }}</MkButton>
<MkButton danger @click="updateRepliesAll(false)"><i class="ph-chat ph-bold ph-lg"></i> {{ i18n.ts.hideRepliesToOthersInTimelineAll }}</MkButton>
</div>
</FormSection>
</SearchMarker>
<hr>

View file

@ -141,21 +141,35 @@ SPDX-License-Identifier: AGPL-3.0-only
</SearchMarker>
<SearchMarker :keywords="['collapse', 'repl']">
<MkPreferenceContainer k="collapseNotesRepliedTo">
<MkSwitch v-model="collapseNotesRepliedTo">
<template #label><SearchLabel>{{ i18n.ts.collapseNotesRepliedTo }}</SearchLabel></template>
</MkSwitch>
</MkPreferenceContainer>
</SearchMarker>
<SearchMarker :keywords="['collapse', 'uncollapse', 'un-collapse', 'cw', 'content', 'warning']">
<MkPreferenceContainer k="uncollapseCW">
<MkSwitch v-model="uncollapseCW">
<template #label><SearchLabel>{{ i18n.ts.uncollapseCW }}</SearchLabel></template>
</MkSwitch>
</MkPreferenceContainer>
</SearchMarker>
<SearchMarker :keywords="['collapse', 'files']">
<MkPreferenceContainer k="collapseFiles">
<MkSwitch v-model="collapseFiles">
<template #label><SearchLabel>{{ i18n.ts.collapseFiles }}</SearchLabel></template>
</MkSwitch>
</MkPreferenceContainer>
</SearchMarker>
<SearchMarker :keywords="['expand', 'long']">
<MkPreferenceContainer k="expandLongNote">
<MkSwitch v-model="expandLongNote">
<template #label><SearchLabel>{{ i18n.ts.expandLongNote }}</SearchLabel></template>
</MkSwitch>
</MkPreferenceContainer>
</SearchMarker>
<SearchMarker :keywords="['note', 'timeline', 'gap']">
@ -184,18 +198,23 @@ SPDX-License-Identifier: AGPL-3.0-only
</SearchMarker>
<SearchMarker :keywords="['show', 'ticker', 'replies']">
<MkPreferenceContainer k="showTickerOnReplies">
<MkSwitch v-model="showTickerOnReplies">
<template #label>{{ i18n.ts.showTickerOnReplies }}</template>
</MkSwitch>
</MkPreferenceContainer>
</SearchMarker>
<SearchMarker :keywords="['cat', 'speak']">
<MkPreferenceContainer k="disableCatSpeak">
<MkSwitch v-model="disableCatSpeak">
<template #label><SearchLabel>{{ i18n.ts.disableCatSpeak }}</SearchLabel></template>
</MkSwitch>
</MkPreferenceContainer>
</SearchMarker>
<SearchMarker :keywords="['search', 'engine']">
<MkPreferenceContainer k="searchEngine">
<MkSelect v-model="searchEngine" placeholder="Other">
<template #label><SearchLabel>{{ i18n.ts.searchEngine }}</SearchLabel></template>
<option
@ -210,14 +229,17 @@ SPDX-License-Identifier: AGPL-3.0-only
<!-- If one of the other options is selected show this as a blank other -->
<option v-if="!useCustomSearchEngine" value="">{{ i18n.ts.searchEngineOther }}</option>
</MkSelect>
</MkPreferenceContainer>
</SearchMarker>
<SearchMarker :keywords="['design', 'appear']">
<MkPreferenceContainer k="noteDesign">
<MkRadios v-model="noteDesign">
<template #label><SearchLabel>Note Design</SearchLabel></template>
<option value="sharkey"><i class="sk-icons sk-shark sk-icons-lg" style="top: 2px;position: relative;"></i> Sharkey</option>
<option value="misskey"><i class="sk-icons sk-misskey sk-icons-lg" style="top: 2px;position: relative;"></i> Misskey</option>
</MkRadios>
</MkPreferenceContainer>
</SearchMarker>
</div>
@ -327,11 +349,21 @@ SPDX-License-Identifier: AGPL-3.0-only
</MkPreferenceContainer>
</SearchMarker>
<SearchMarker :keywords="['load', 'conversation']">
<MkPreferenceContainer k="autoloadConversation">
<MkSwitch v-model="autoloadConversation">
<template #label><SearchLabel>{{ i18n.ts.autoloadConversation }}</SearchLabel></template>
</MkSwitch>
</MkPreferenceContainer>
</SearchMarker>
<SearchMarker :keywords="['number', 'replies']">
<MkPreferenceContainer k="numberOfReplies">
<MkRange v-model="numberOfReplies" :min="2" :max="20" :step="1" easing>
<template #label><SearchLabel>{{ i18n.ts.numberOfReplies }}</SearchLabel></template>
<template #caption>{{ i18n.ts.numberOfRepliesDescription }}</template>
</MkRange>
</MkPreferenceContainer>
</SearchMarker>
</div>
</div>
@ -415,12 +447,15 @@ SPDX-License-Identifier: AGPL-3.0-only
</SearchMarker>
<SearchMarker :keywords="['click']">
<MkPreferenceContainer k="notificationClickable">
<MkSwitch v-model="notificationClickable">
<template #label><SearchLabel>{{ i18n.ts.allowClickingNotifications }}</SearchLabel></template>
</MkSwitch>
</MkPreferenceContainer>
</SearchMarker>
<SearchMarker :keywords="['favicon', 'dot']">
<MkPreferenceContainer k="enableFaviconNotificationDot">
<MkSwitch v-model="enableFaviconNotificationDot">
<template #label><SearchLabel>{{ i18n.ts.enableFaviconNotificationDot }}</SearchLabel></template>
<template #caption>
@ -431,6 +466,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</I18n>
</template>
</MkSwitch>
</MkPreferenceContainer>
</SearchMarker>
<MkButton @click="testNotificationDot">{{ i18n.ts.verifyNotificationDotWorkingButton }}</MkButton>
@ -570,6 +606,14 @@ SPDX-License-Identifier: AGPL-3.0-only
</MkSwitch>
</MkPreferenceContainer>
</SearchMarker>
<SearchMarker :keywords="['click', 'open']">
<MkPreferenceContainer k="clickToOpen">
<MkSwitch v-model="clickToOpen">
<template #label><SearchLabel>{{ i18n.ts.clickToOpen }}</SearchLabel></template>
</MkSwitch>
</MkPreferenceContainer>
</SearchMarker>
</div>
<SearchMarker :keywords="['menu', 'style', 'popup', 'drawer']">
@ -715,15 +759,19 @@ SPDX-License-Identifier: AGPL-3.0-only
</SearchMarker>
<SearchMarker :keywords="['warn', 'missing', 'alt', 'text']">
<MkPreferenceContainer k="warnMissingAltText">
<MkSwitch v-model="warnMissingAltText">
<template #label><SearchLabel>{{ i18n.ts.warnForMissingAltText }}</SearchLabel></template>
</MkSwitch>
</MkPreferenceContainer>
</SearchMarker>
<SearchMarker :keywords="['warn', 'external', 'url']">
<MkPreferenceContainer k="warnExternalUrl">
<MkSwitch v-model="warnExternalUrl">
<template #label><SearchLabel>{{ i18n.ts.warnExternalUrl }}</SearchLabel></template>
</MkSwitch>
</MkPreferenceContainer>
</SearchMarker>
<SearchMarker :keywords="['image', 'photo', 'picture', 'media', 'thumbnail', 'new', 'tab']">
@ -763,25 +811,27 @@ SPDX-License-Identifier: AGPL-3.0-only
</MkPreferenceContainer>
</SearchMarker>
<MkFolder>
<template #label>{{ i18n.ts.boostSettings }}</template>
<div class="_gaps_m">
<SearchMarker :keywords="['boost', 'show', 'visib', 'selector']">
<MkFolder>
<template #label><SearchLabel>{{ i18n.ts.boostSettings }}</SearchLabel></template>
<div class="_gaps_m">
<MkPreferenceContainer k="showVisibilitySelectorOnBoost">
<MkSwitch v-model="showVisibilitySelectorOnBoost">
<template #label><SearchLabel>{{ i18n.ts.showVisibilitySelectorOnBoost }}</SearchLabel></template>
<template #caption>{{ i18n.ts.showVisibilitySelectorOnBoostDescription }}</template>
</MkSwitch>
</SearchMarker>
<SearchMarker :keywords="['boost', 'visib']">
</MkPreferenceContainer>
<MkPreferenceContainer k="visibilityOnBoost">
<MkSelect v-model="visibilityOnBoost">
<template #label><SearchLabel>{{ i18n.ts.visibilityOnBoost }}</SearchLabel></template>
<option value="public">{{ i18n.ts._visibility['public'] }}</option>
<option value="home">{{ i18n.ts._visibility['home'] }}</option>
<option value="followers">{{ i18n.ts._visibility['followers'] }}</option>
</MkSelect>
</SearchMarker>
</MkPreferenceContainer>
</div>
</MkFolder>
</SearchMarker>
<SearchMarker :keywords="['ad', 'show']">
<MkPreferenceContainer k="forceShowAds">
@ -792,9 +842,11 @@ SPDX-License-Identifier: AGPL-3.0-only
</SearchMarker>
<SearchMarker :keywords="['oneko', 'cat']">
<MkPreferenceContainer k="oneko">
<MkSwitch v-model="oneko">
<template #label>{{ i18n.ts.oneko }}</template>
<template #label><SearchLabel>{{ i18n.ts.oneko }}</SearchLabel></template>
</MkSwitch>
</MkPreferenceContainer>
</SearchMarker>
<SearchMarker>
@ -937,18 +989,20 @@ const showTickerOnReplies = prefer.model('showTickerOnReplies');
const searchEngine = prefer.model('searchEngine');
const noteDesign = prefer.model('noteDesign');
const uncollapseCW = prefer.model('uncollapseCW');
const collapseFiles = prefer.model('collapseFiles');
const expandLongNote = prefer.model('expandLongNote');
const disableCatSpeak = prefer.model('disableCatSpeak');
const enableFaviconNotificationDot = computed(store.makeGetterSetter('enableFaviconNotificationDot'));
const enableFaviconNotificationDot = prefer.model('enableFaviconNotificationDot');
const warnMissingAltText = prefer.model('warnMissingAltText');
const notificationClickable = computed(store.makeGetterSetter('notificationClickable'));
const notificationClickable = prefer.model('notificationClickable');
const warnExternalUrl = prefer.model('warnExternalUrl');
const showVisibilitySelectorOnBoost = prefer.model('showVisibilitySelectorOnBoost');
const visibilityOnBoost = prefer.model('visibilityOnBoost');
const cornerRadius = computed(store.makeGetterSetter('cornerRadius'));
const oneko = computed(store.makeGetterSetter('oneko'));
const numberOfReplies = computed(store.makeGetterSetter('numberOfReplies'));
const cornerRadius = ref(miLocalStorage.getItem('cornerRadius'));
const oneko = prefer.model('oneko');
const numberOfReplies = prefer.model('numberOfReplies');
const autoloadConversation = prefer.model('autoloadConversation');
const clickToOpen = prefer.model('clickToOpen');
const useCustomSearchEngine = computed(() => !Object.keys(searchEngineMap).includes(searchEngine.value));
watch(lang, () => {
@ -973,6 +1027,14 @@ watch(useSystemFont, () => {
}
});
watch(cornerRadius, () => {
if (cornerRadius.value == null) {
miLocalStorage.removeItem('cornerRadius');
} else {
miLocalStorage.setItem('cornerRadius', cornerRadius.value);
}
});
watch([
hemisphere,
lang,

View file

@ -64,10 +64,17 @@ SPDX-License-Identifier: AGPL-3.0-only
</MkSwitch>
</SearchMarker>
<SearchMarker :keywords="['crawle', 'ai']">
<MkSwitch v-model="preventAiLearning" @update:modelValue="save()">
<template #label><SearchLabel>{{ i18n.ts.preventAiLearning }}</SearchLabel></template>
<template #caption><SearchKeyword>{{ i18n.ts.preventAiLearningDescription }}</SearchKeyword></template>
</MkSwitch>
</SearchMarker>
<SearchMarker :keywords="['index', 'search']">
<MkSwitch v-model="noindex" @update:modelValue="save()">
{{ i18n.ts.makeIndexable }}
<template #caption>{{ i18n.ts.makeIndexableDescription }}</template>
<template #label><SearchLabel>{{ i18n.ts.makeIndexable }}</SearchLabel></template>
<template #caption><SearchKeyword>{{ i18n.ts.makeIndexableDescription }}</SearchKeyword></template>
</MkSwitch>
</SearchMarker>
@ -80,15 +87,8 @@ SPDX-License-Identifier: AGPL-3.0-only
<SearchMarker :keywords="['rss', 'feed']">
<MkSwitch v-model="enableRss" @update:modelValue="save()">
{{ i18n.ts.enableRss }}
<template #caption>{{ i18n.ts.enableRssDescription }}</template>
</MkSwitch>
</SearchMarker>
<SearchMarker :keywords="['crawle', 'ai']">
<MkSwitch v-model="preventAiLearning" @update:modelValue="save()">
<template #label><SearchLabel>{{ i18n.ts.preventAiLearning }}</SearchLabel></template>
<template #caption><SearchKeyword>{{ i18n.ts.preventAiLearningDescription }}</SearchKeyword></template>
<template #label><SearchLabel>{{ i18n.ts.enableRss }}</SearchLabel></template>
<template #caption><SearchKeyword>{{ i18n.ts.enableRssDescription }}</SearchKeyword></template>
</MkSwitch>
</SearchMarker>
@ -205,12 +205,12 @@ SPDX-License-Identifier: AGPL-3.0-only
<SearchMarker :keywords="['federate', 'auth', 'fetch']">
<MkFolder v-if="instance.federation !== 'none'">
<template #label>{{ i18n.ts.authorizedFetchSection }}</template>
<template #label><SearchLabel>{{ i18n.ts.authorizedFetchSection }}</SearchLabel></template>
<template #suffix>{{ computedAllowUnsignedFetch !== 'always' ? i18n.ts.enabled : i18n.ts.disabled }}</template>
<MkRadios v-model="allowUnsignedFetch" @update:modelValue="save()">
<template #label>{{ i18n.ts.authorizedFetchLabel }}</template>
<template #caption>{{ i18n.ts.authorizedFetchDescription }}</template>
<template #label><SearchLabel>{{ i18n.ts.authorizedFetchLabel }}</SearchLabel></template>
<template #caption><SearchKeyword>{{ i18n.ts.authorizedFetchDescription }}</SearchKeyword></template>
<option value="never">{{ i18n.ts._authorizedFetchValue.never }} - {{ i18n.ts._authorizedFetchValueDescription.never }}</option>
<option value="always">{{ i18n.ts._authorizedFetchValue.always }} - {{ i18n.ts._authorizedFetchValueDescription.always }}</option>
<option value="essential">{{ i18n.ts._authorizedFetchValue.essential }} - {{ i18n.ts._authorizedFetchValueDescription.essential }}</option>
@ -221,9 +221,9 @@ SPDX-License-Identifier: AGPL-3.0-only
<SearchMarker :keywords="['note', 'visib']">
<div class="_gaps_m">
<MkSwitch v-model="rememberNoteVisibility" @update:modelValue="save()">{{ i18n.ts.rememberNoteVisibility }}</MkSwitch>
<MkSwitch v-model="rememberNoteVisibility" @update:modelValue="save()"><SearchLabel>{{ i18n.ts.rememberNoteVisibility }}</SearchLabel></MkSwitch>
<MkFolder v-if="!rememberNoteVisibility">
<template #label>{{ i18n.ts.defaultNoteVisibility }}</template>
<template #label><SearchLabel>{{ i18n.ts.defaultNoteVisibility }}</SearchLabel></template>
<template v-if="defaultNoteVisibility === 'public'" #suffix>{{ i18n.ts._visibility.public }}</template>
<template v-else-if="defaultNoteVisibility === 'home'" #suffix>{{ i18n.ts._visibility.home }}</template>
<template v-else-if="defaultNoteVisibility === 'followers'" #suffix>{{ i18n.ts._visibility.followers }}</template>
@ -244,16 +244,16 @@ SPDX-License-Identifier: AGPL-3.0-only
<SearchMarker :keywords="['keep', 'cw', 'content', 'warning']">
<div class="_gaps_m">
<MkSwitch v-model="keepCw" @update:modelValue="save()">{{ i18n.ts.keepCw }}</MkSwitch>
<MkSwitch v-model="keepCw" @update:modelValue="save()"><SearchLabel>{{ i18n.ts.keepCw }}</SearchLabel></MkSwitch>
<MkInput v-model="defaultCW" type="text" manualSave @update:modelValue="save()">
<template #label>{{ i18n.ts.defaultCW }}</template>
<template #caption>{{ i18n.ts.defaultCWDescription }}</template>
<template #label><SearchLabel>{{ i18n.ts.defaultCW }}</SearchLabel></template>
<template #caption><SearchKeyword>{{ i18n.ts.defaultCWDescription }}</SearchKeyword></template>
</MkInput>
<MkSelect v-model="defaultCWPriority" :disabled="!defaultCW || !keepCw" @update:modelValue="save()">
<template #label>{{ i18n.ts.defaultCWPriority }}</template>
<template #caption>{{ i18n.ts.defaultCWPriorityDescription }}</template>
<template #label><SearchLabel>{{ i18n.ts.defaultCWPriority }}</SearchLabel></template>
<template #caption><SearchKeyword>{{ i18n.ts.defaultCWPriorityDescription }}</SearchKeyword></template>
<option value="default">{{ i18n.ts._defaultCWPriority.default }}</option>
<option value="parent">{{ i18n.ts._defaultCWPriority.parent }}</option>
<option value="parentDefault">{{ i18n.ts._defaultCWPriority.parentDefault }}</option>
@ -296,6 +296,7 @@ const $i = ensureSignin();
const isLocked = ref($i.isLocked);
const autoAcceptFollowed = ref($i.autoAcceptFollowed);
const noCrawle = ref($i.noCrawle);
const preventAiLearning = ref($i.preventAiLearning);
const noindex = ref($i.noindex);
const enableRss = ref($i.enableRss);
const isExplorable = ref($i.isExplorable);
@ -316,8 +317,6 @@ const computedAllowUnsignedFetch = computed(() => {
}
return instance.allowUnsignedFetch;
});
const preventAiLearning = ref($i.preventAiLearning);
const defaultNoteVisibility = prefer.model('defaultNoteVisibility');
const defaultNoteLocalOnly = prefer.model('defaultNoteLocalOnly');
const rememberNoteVisibility = prefer.model('rememberNoteVisibility');
@ -365,6 +364,7 @@ function save() {
isLocked: !!isLocked.value,
autoAcceptFollowed: !!autoAcceptFollowed.value,
noCrawle: !!noCrawle.value,
preventAiLearning: !!preventAiLearning.value,
noindex: !!noindex.value,
enableRss: !!enableRss.value,
isExplorable: !!isExplorable.value,

View file

@ -139,23 +139,30 @@ export function migrateOldSettings() {
prefer.commit('sound.on.reaction', store.s.sound_reaction as any);
prefer.commit('defaultNoteVisibility', store.s.defaultNoteVisibility);
prefer.commit('defaultNoteLocalOnly', store.s.defaultNoteLocalOnly);
// Sharkey migrations
prefer.commit('collapseNotesRepliedTo', store.s.collapseNotesRepliedTo);
prefer.commit('collapseFiles', store.s.collapseFiles);
prefer.commit('uncollapseCW', store.s.uncollapseCW);
prefer.commit('expandLongNote', store.s.expandLongNote);
prefer.commit('like', store.s.like);
//#region Sharkey migrations
prefer.commit('autoloadConversation', store.s.autoloadConversation);
prefer.commit('showVisibilitySelectorOnBoost', store.s.showVisibilitySelectorOnBoost);
prefer.commit('visibilityOnBoost', store.s.visibilityOnBoost);
prefer.commit('trustedDomains', store.s.trustedDomains);
prefer.commit('warnExternalUrl', store.s.warnExternalUrl);
prefer.commit('followingFeed', store.s.followingFeed);
prefer.commit('warnMissingAltText', store.s.warnMissingAltText);
prefer.commit('clickToOpen', store.s.clickToOpen);
prefer.commit('collapseFiles', store.s.collapseFiles);
prefer.commit('collapseNotesRepliedTo', store.s.collapseNotesRepliedTo);
prefer.commit('disableCatSpeak', store.s.disableCatSpeak);
prefer.commit('showTickerOnReplies', store.s.showTickerOnReplies);
prefer.commit('searchEngine', store.s.searchEngine);
prefer.commit('enableFaviconNotificationDot', store.s.enableFaviconNotificationDot);
prefer.commit('expandLongNote', store.s.expandLongNote);
prefer.commit('followingFeed', store.s.followingFeed);
prefer.commit('like', store.s.like);
prefer.commit('noteDesign', store.s.noteDesign);
prefer.commit('notificationClickable', store.s.notificationClickable);
prefer.commit('numberOfReplies', store.s.numberOfReplies);
prefer.commit('oneko', store.s.oneko);
prefer.commit('searchEngine', store.s.searchEngine);
prefer.commit('showTickerOnReplies', store.s.showTickerOnReplies);
prefer.commit('showVisibilitySelectorOnBoost', store.s.showVisibilitySelectorOnBoost);
prefer.commit('trustedDomains', store.s.trustedDomains);
prefer.commit('uncollapseCW', store.s.uncollapseCW);
prefer.commit('visibilityOnBoost', store.s.visibilityOnBoost);
prefer.commit('warnExternalUrl', store.s.warnExternalUrl);
prefer.commit('warnMissingAltText', store.s.warnMissingAltText);
//#endregion
window.setTimeout(() => {
unisonReload();

View file

@ -130,54 +130,6 @@ export const PREF_DEF = {
collapseRenotes: {
default: false,
},
collapseNotesRepliedTo: {
default: false,
},
collapseFiles: {
default: false,
},
uncollapseCW: {
default: false,
},
expandLongNote: {
default: false,
},
like: {
default: null as string | null,
},
autoloadConversation: {
default: true,
},
showVisibilitySelectorOnBoost: {
default: true,
},
visibilityOnBoost: {
default: 'public' as 'public' | 'home' | 'followers',
},
trustedDomains: {
default: [] as string[],
},
warnExternalUrl: {
default: true,
},
followingFeed: {
default: defaultFollowingFeedState as Partial<FollowingFeedState>,
},
warnMissingAltText: {
default: true,
},
disableCatSpeak: {
default: false,
},
showTickerOnReplies: {
default: false,
},
searchEngine: {
default: Object.keys(searchEngineMap)[0],
},
noteDesign: {
default: 'sharkey' as 'sharkey' | 'misskey',
},
menu: {
default: [
'notifications',
@ -452,4 +404,70 @@ export const PREF_DEF = {
'experimental.stackingRouterView': {
default: false,
},
//#region Sharkey
autoloadConversation: {
default: true,
},
clickToOpen: {
default: true,
},
collapseFiles: {
default: false,
},
collapseNotesRepliedTo: {
default: false,
},
disableCatSpeak: {
default: false,
},
enableFaviconNotificationDot: {
default: true,
},
expandLongNote: {
default: false,
},
followingFeed: {
default: defaultFollowingFeedState as Partial<FollowingFeedState>,
},
like: {
default: null as string | null,
},
noteDesign: {
default: 'sharkey' as 'sharkey' | 'misskey',
},
notificationClickable: {
default: false,
},
numberOfReplies: {
default: 5,
},
oneko: {
default: false,
},
searchEngine: {
default: Object.keys(searchEngineMap)[0],
},
showTickerOnReplies: {
default: false,
},
showVisibilitySelectorOnBoost: {
default: true,
},
trustedDomains: {
default: [] as string[],
},
uncollapseCW: {
default: false,
},
visibilityOnBoost: {
default: 'public' as 'public' | 'home' | 'followers',
},
warnExternalUrl: {
default: true,
},
warnMissingAltText: {
default: true,
},
//#endregion
} satisfies PreferencesDefinition;

View file

@ -470,95 +470,94 @@ export const store = markRaw(new Pizzax('base', {
sfxVolume: 1,
},
},
collapseNotesRepliedTo: {
//#endregion
//#region Sharkey
autoloadConversation: {
where: 'account',
default: true,
},
clickToOpen: {
where: 'device',
default: false,
default: true,
},
collapseFiles: {
where: 'device',
where: 'account',
default: false,
},
uncollapseCW: {
where: 'device',
collapseNotesRepliedTo: {
where: 'account',
default: false,
},
expandLongNote: {
where: 'device',
default: false,
},
like: {
where: 'device',
default: null as string | null,
},
autoloadConversation: {
where: 'device',
default: true,
},
showVisibilitySelectorOnBoost: {
where: 'device',
default: true,
},
visibilityOnBoost: {
where: 'device',
default: 'public' as 'public' | 'home' | 'followers',
},
trustedDomains: {
where: 'device',
default: [] as string[],
},
warnExternalUrl: {
where: 'device',
default: true,
},
followingFeed: {
where: 'device',
default: defaultFollowingFeedState as Partial<FollowingFeedState>,
},
warnMissingAltText: {
where: 'device',
default: true,
},
disableCatSpeak: {
where: 'device',
default: false,
},
showTickerOnReplies: {
where: 'device',
default: false,
},
searchEngine: {
where: 'device',
default: Object.keys(searchEngineMap)[0],
},
noteDesign: {
where: 'device',
default: 'sharkey' as 'sharkey' | 'misskey',
},
//#endregion
oneko: {
where: 'device',
where: 'account',
default: false,
},
enableFaviconNotificationDot: {
where: 'device',
default: true,
},
numberOfReplies: {
expandLongNote: {
where: 'device',
default: 5,
default: false,
},
followingFeed: {
where: 'account',
default: defaultFollowingFeedState as Partial<FollowingFeedState>,
},
like: {
where: 'account',
default: null as string | null,
},
noteDesign: {
where: 'device',
default: 'sharkey' as 'sharkey' | 'misskey',
},
notificationClickable: {
where: 'device',
default: false,
},
cornerRadius: {
numberOfReplies: {
where: 'device',
default: null as 'Misskey' | null,
default: 5,
},
clickToOpen: {
oneko: {
where: 'device',
default: false,
},
searchEngine: {
where: 'account',
default: Object.keys(searchEngineMap)[0],
},
showTickerOnReplies: {
where: 'device',
default: false,
},
showVisibilitySelectorOnBoost: {
where: 'account',
default: true,
},
trustedDomains: {
where: 'account',
default: [] as string[],
},
uncollapseCW: {
where: 'account',
default: false,
},
visibilityOnBoost: {
where: 'account',
default: 'public' as 'public' | 'home' | 'followers',
},
warnExternalUrl: {
where: 'account',
default: true,
},
warnMissingAltText: {
where: 'device',
default: true,
},
//#endregion
}));
// TODO: 他のタブと永続化されたstateを同期