Merge branch 'develop' into upstream/2025.5.0
This commit is contained in:
commit
3ebf9c4a71
317 changed files with 6144 additions and 2603 deletions
|
|
@ -22,24 +22,9 @@ import { unisonReload } from '@/utility/unison-reload.js';
|
|||
import { i18n } from '@/i18n.js';
|
||||
import { definePage } from '@/page.js';
|
||||
import { miLocalStorage } from '@/local-storage.js';
|
||||
import { prefer } from '@/preferences.js';
|
||||
|
||||
const localCustomCss = ref(miLocalStorage.getItem('customCss') ?? '');
|
||||
|
||||
async function apply() {
|
||||
miLocalStorage.setItem('customCss', localCustomCss.value);
|
||||
|
||||
const { canceled } = await os.confirm({
|
||||
type: 'info',
|
||||
text: i18n.ts.reloadToApplySetting,
|
||||
});
|
||||
if (canceled) return;
|
||||
|
||||
unisonReload();
|
||||
}
|
||||
|
||||
watch(localCustomCss, async () => {
|
||||
await apply();
|
||||
});
|
||||
const localCustomCss = prefer.model('customCss');
|
||||
|
||||
const headerActions = computed(() => []);
|
||||
|
||||
|
|
|
|||
|
|
@ -15,36 +15,50 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, watch } from 'vue';
|
||||
import { ref, watch, computed } from 'vue';
|
||||
import MkTextarea from '@/components/MkTextarea.vue';
|
||||
import MkInfo from '@/components/MkInfo.vue';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
import { ensureSignin } from '@/i.js';
|
||||
import { misskeyApi } from '@/utility/misskey-api.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import * as os from '@/os.js';
|
||||
|
||||
const $i = ensureSignin();
|
||||
|
||||
const instanceMutes = ref($i.mutedInstances.join('\n'));
|
||||
const domainArray = computed(() => {
|
||||
return instanceMutes.value
|
||||
.trim().split('\n')
|
||||
.map(el => el.trim().toLowerCase())
|
||||
.filter(el => el);
|
||||
});
|
||||
const changed = ref(false);
|
||||
|
||||
async function save() {
|
||||
let mutes = instanceMutes.value
|
||||
.trim().split('\n')
|
||||
.map(el => el.trim())
|
||||
.filter(el => el);
|
||||
// checks for a full line without whitespace.
|
||||
if (!domainArray.value.every(d => /^\S+$/.test(d))) {
|
||||
os.alert({
|
||||
type: 'error',
|
||||
title: i18n.ts.invalidValue,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
await misskeyApi('i/update', {
|
||||
mutedInstances: mutes,
|
||||
mutedInstances: domainArray.value,
|
||||
});
|
||||
|
||||
changed.value = false;
|
||||
|
||||
// Refresh filtered list to signal to the user how they've been saved
|
||||
instanceMutes.value = mutes.join('\n');
|
||||
instanceMutes.value = domainArray.value.join('\n');
|
||||
|
||||
changed.value = false;
|
||||
}
|
||||
|
||||
watch(instanceMutes, () => {
|
||||
changed.value = true;
|
||||
watch(domainArray, (newArray, oldArray) => {
|
||||
// compare arrays
|
||||
if (newArray.length !== oldArray.length || !newArray.every((a, i) => a === oldArray[i])) {
|
||||
changed.value = true;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -12,10 +12,11 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
|
||||
<div class="_gaps_s">
|
||||
<SearchMarker
|
||||
v-slot="slotProps"
|
||||
:label="i18n.ts.wordMute"
|
||||
:keywords="['note', 'word', 'soft', 'mute', 'hide']"
|
||||
>
|
||||
<MkFolder>
|
||||
<MkFolder :defaultOpen="slotProps.isParentOfTarget">
|
||||
<template #icon><i class="ph-envelope ph-bold ph-lg"></i></template>
|
||||
<template #label>{{ i18n.ts.wordMute }}</template>
|
||||
|
||||
|
|
@ -37,10 +38,11 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</SearchMarker>
|
||||
|
||||
<SearchMarker
|
||||
v-slot="slotProps"
|
||||
:label="i18n.ts.hardWordMute"
|
||||
:keywords="['note', 'word', 'hard', 'mute', 'hide']"
|
||||
>
|
||||
<MkFolder>
|
||||
<MkFolder :defaultOpen="slotProps.isParentOfTarget">
|
||||
<template #icon><i class="ph-x-square ph-bold ph-lg"></i></template>
|
||||
<template #label>{{ i18n.ts.hardWordMute }}</template>
|
||||
|
||||
|
|
@ -55,10 +57,11 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</SearchMarker>
|
||||
|
||||
<SearchMarker
|
||||
v-slot="slotProps"
|
||||
:label="i18n.ts.instanceMute"
|
||||
:keywords="['note', 'server', 'instance', 'host', 'federation', 'mute', 'hide']"
|
||||
>
|
||||
<MkFolder v-if="instance.federation !== 'none'">
|
||||
<MkFolder v-if="instance.federation !== 'none'" :defaultOpen="slotProps.isParentOfTarget">
|
||||
<template #icon><i class="ti ti-planet-off"></i></template>
|
||||
<template #label>{{ i18n.ts.instanceMute }}</template>
|
||||
|
||||
|
|
@ -67,9 +70,10 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</SearchMarker>
|
||||
|
||||
<SearchMarker
|
||||
v-slot="slotProps"
|
||||
:keywords="['renote', 'mute', 'hide', 'user']"
|
||||
>
|
||||
<MkFolder>
|
||||
<MkFolder :defaultOpen="slotProps.isParentOfTarget">
|
||||
<template #icon><i class="ti ti-repeat-off"></i></template>
|
||||
<template #label><SearchLabel>{{ i18n.ts.mutedUsers }} ({{ i18n.ts.renote }})</SearchLabel></template>
|
||||
|
||||
|
|
@ -97,10 +101,11 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</SearchMarker>
|
||||
|
||||
<SearchMarker
|
||||
v-slot="slotProps"
|
||||
:label="i18n.ts.mutedUsers"
|
||||
:keywords="['note', 'mute', 'hide', 'user']"
|
||||
>
|
||||
<MkFolder>
|
||||
<MkFolder :defaultOpen="slotProps.isParentOfTarget">
|
||||
<template #icon><i class="ti ti-eye-off"></i></template>
|
||||
<template #label>{{ i18n.ts.mutedUsers }}</template>
|
||||
|
||||
|
|
@ -130,10 +135,11 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</SearchMarker>
|
||||
|
||||
<SearchMarker
|
||||
v-slot="slotProps"
|
||||
:label="i18n.ts.blockedUsers"
|
||||
:keywords="['block', 'user']"
|
||||
>
|
||||
<MkFolder>
|
||||
<MkFolder :defaultOpen="slotProps.isParentOfTarget">
|
||||
<template #icon><i class="ti ti-ban"></i></template>
|
||||
<template #label>{{ i18n.ts.blockedUsers }}</template>
|
||||
|
||||
|
|
@ -208,12 +214,6 @@ const expandedBlockItems = ref([]);
|
|||
|
||||
const showSoftWordMutedWord = prefer.model('showSoftWordMutedWord');
|
||||
|
||||
watch([
|
||||
showSoftWordMutedWord,
|
||||
], async () => {
|
||||
await reloadAsk({ reason: i18n.ts.reloadToApplySetting, unison: true });
|
||||
});
|
||||
|
||||
async function unrenoteMute(user, ev) {
|
||||
os.popupMenu([{
|
||||
text: i18n.ts.renoteUnmute,
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</SearchMarker>
|
||||
</div>
|
||||
|
||||
<SearchMarker :keywords="['emoji', 'style', 'native', 'system', 'fluent', 'twemoji']">
|
||||
<SearchMarker :keywords="['emoji', 'style', 'native', 'system', 'fluent', 'twemoji', 'tossface']">
|
||||
<MkPreferenceContainer k="emojiStyle">
|
||||
<div>
|
||||
<MkRadios v-model="emojiStyle">
|
||||
|
|
@ -107,6 +107,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<option value="native">{{ i18n.ts.native }}</option>
|
||||
<option value="fluentEmoji">Fluent Emoji</option>
|
||||
<option value="twemoji">Twemoji</option>
|
||||
<option value="tossface">Tossface</option>
|
||||
</MkRadios>
|
||||
<div style="margin: 8px 0 0 0; font-size: 1.5em;"><Mfm :key="emojiStyle" text="🍮🍦🍭🍩🍰🍫🍬🥞🍪"/></div>
|
||||
</div>
|
||||
|
|
@ -237,6 +238,13 @@ 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>
|
||||
|
||||
<div v-if="useCustomSearchEngine">
|
||||
<MkInput v-model="searchEngine" :max="300" :manualSave="true">
|
||||
<template #label>{{ i18n.ts.searchEngineCusomURI }}</template>
|
||||
<template #caption>{{ i18n.ts.searchEngineCustomURIDescription }}</template>
|
||||
</MkInput>
|
||||
</div>
|
||||
</MkPreferenceContainer>
|
||||
</SearchMarker>
|
||||
|
||||
|
|
@ -395,9 +403,13 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<div class="_gaps_s">
|
||||
<SearchMarker :keywords="['remember', 'keep', 'note', 'cw']">
|
||||
<MkPreferenceContainer k="keepCw">
|
||||
<MkSwitch v-model="keepCw">
|
||||
<MkSelect v-model="keepCw">
|
||||
<template #label><SearchLabel>{{ i18n.ts.keepCw }}</SearchLabel></template>
|
||||
</MkSwitch>
|
||||
<template #caption><SearchKeyword>{{ i18n.ts.keepCwDescription }}</SearchKeyword></template>
|
||||
<option :value="false">{{ i18n.ts.keepCwDisabled }}</option>>
|
||||
<option :value="true">{{ i18n.ts.keepCwEnabled }}</option>>
|
||||
<option value="prepend-re">{{ i18n.ts.keepCwPrependRe }}</option>
|
||||
</MkSelect>
|
||||
</MkPreferenceContainer>
|
||||
</SearchMarker>
|
||||
|
||||
|
|
@ -684,7 +696,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<SearchMarker :keywords="['font', 'size']">
|
||||
<MkRadios v-model="fontSize">
|
||||
<template #label><SearchLabel>{{ i18n.ts.fontSize }}</SearchLabel></template>
|
||||
<option :value="null"><span style="font-size: 14px;">Aa</span></option>
|
||||
<option value="0"><span style="font-size: 14px;">Aa</span></option>
|
||||
<option value="1"><span style="font-size: 15px;">Aa</span></option>
|
||||
<option value="2"><span style="font-size: 16px;">Aa</span></option>
|
||||
<option value="3"><span style="font-size: 17px;">Aa</span></option>
|
||||
|
|
@ -796,7 +808,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<SearchMarker :keywords="['corner', 'radius']">
|
||||
<MkRadios v-model="cornerRadius">
|
||||
<template #label><SearchLabel>{{ i18n.ts.cornerRadius }}</SearchLabel></template>
|
||||
<option :value="null"><i class="sk-icons sk-shark sk-icons-lg" style="top: 2px;position: relative;"></i> Sharkey</option>
|
||||
<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>
|
||||
</SearchMarker>
|
||||
|
|
@ -975,7 +987,6 @@ import { worksOnInstance } from '@/utility/favicon-dot.js';
|
|||
|
||||
const $i = ensureSignin();
|
||||
|
||||
const lang = ref(miLocalStorage.getItem('lang'));
|
||||
const dataSaver = ref(prefer.s.dataSaver);
|
||||
|
||||
const overridedDeviceKind = prefer.model('overridedDeviceKind');
|
||||
|
|
@ -1036,9 +1047,6 @@ const contextMenu = prefer.model('contextMenu');
|
|||
const menuStyle = prefer.model('menuStyle');
|
||||
const makeEveryTextElementsSelectable = prefer.model('makeEveryTextElementsSelectable');
|
||||
|
||||
const fontSize = ref(miLocalStorage.getItem('fontSize'));
|
||||
const useSystemFont = ref(miLocalStorage.getItem('useSystemFont') != null);
|
||||
|
||||
// Sharkey options
|
||||
const collapseNotesRepliedTo = prefer.model('collapseNotesRepliedTo');
|
||||
const showTickerOnReplies = prefer.model('showTickerOnReplies');
|
||||
|
|
@ -1054,7 +1062,6 @@ const notificationClickable = prefer.model('notificationClickable');
|
|||
const warnExternalUrl = prefer.model('warnExternalUrl');
|
||||
const showVisibilitySelectorOnBoost = prefer.model('showVisibilitySelectorOnBoost');
|
||||
const visibilityOnBoost = prefer.model('visibilityOnBoost');
|
||||
const cornerRadius = ref(miLocalStorage.getItem('cornerRadius'));
|
||||
const oneko = prefer.model('oneko');
|
||||
const numberOfReplies = prefer.model('numberOfReplies');
|
||||
const autoloadConversation = prefer.model('autoloadConversation');
|
||||
|
|
@ -1062,40 +1069,13 @@ const clickToOpen = prefer.model('clickToOpen');
|
|||
const useCustomSearchEngine = computed(() => !Object.keys(searchEngineMap).includes(searchEngine.value));
|
||||
const defaultCW = ref($i.defaultCW);
|
||||
const defaultCWPriority = ref($i.defaultCWPriority);
|
||||
|
||||
watch(lang, () => {
|
||||
miLocalStorage.setItem('lang', lang.value as string);
|
||||
miLocalStorage.removeItem('locale');
|
||||
miLocalStorage.removeItem('localeVersion');
|
||||
});
|
||||
|
||||
watch(fontSize, () => {
|
||||
if (fontSize.value == null) {
|
||||
miLocalStorage.removeItem('fontSize');
|
||||
} else {
|
||||
miLocalStorage.setItem('fontSize', fontSize.value);
|
||||
}
|
||||
});
|
||||
|
||||
watch(useSystemFont, () => {
|
||||
if (useSystemFont.value) {
|
||||
miLocalStorage.setItem('useSystemFont', 't');
|
||||
} else {
|
||||
miLocalStorage.removeItem('useSystemFont');
|
||||
}
|
||||
});
|
||||
|
||||
watch(cornerRadius, () => {
|
||||
if (cornerRadius.value == null) {
|
||||
miLocalStorage.removeItem('cornerRadius');
|
||||
} else {
|
||||
miLocalStorage.setItem('cornerRadius', cornerRadius.value);
|
||||
}
|
||||
});
|
||||
const lang = prefer.model('lang');
|
||||
const fontSize = prefer.model('fontSize');
|
||||
const useSystemFont = prefer.model('useSystemFont');
|
||||
const cornerRadius = prefer.model('cornerRadius');
|
||||
|
||||
watch([
|
||||
hemisphere,
|
||||
lang,
|
||||
enableInfiniteScroll,
|
||||
showNoteActionsOnlyHover,
|
||||
overridedDeviceKind,
|
||||
|
|
@ -1117,8 +1097,6 @@ watch([
|
|||
useStickyIcons,
|
||||
keepScreenOn,
|
||||
contextMenu,
|
||||
fontSize,
|
||||
useSystemFont,
|
||||
makeEveryTextElementsSelectable,
|
||||
enableHorizontalSwipe,
|
||||
enablePullToRefresh,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,67 @@
|
|||
<!--
|
||||
SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
SPDX-License-Identifier: AGPL-3.0-only
|
||||
-->
|
||||
|
||||
<template>
|
||||
<MkTextarea v-model="attributionDomains">
|
||||
<template #label><SearchLabel>{{ i18n.ts.attributionDomains }}</SearchLabel></template>
|
||||
<template #caption>
|
||||
{{ i18n.ts.attributionDomainsDescription }}
|
||||
<br/>
|
||||
<Mfm :text="tutorialTag"/>
|
||||
</template>
|
||||
</MkTextarea>
|
||||
<MkButton primary :disabled="!changed" @click="save()"><i class="ti ti-device-floppy"></i> {{ i18n.ts.save }}</MkButton>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, watch, computed } from 'vue';
|
||||
import { host as hostRaw } from '@@/js/config.js';
|
||||
import { toUnicode } from 'punycode.js';
|
||||
import MkTextarea from '@/components/MkTextarea.vue';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
import { ensureSignin } from '@/i.js';
|
||||
import { misskeyApi } from '@/utility/misskey-api.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import * as os from '@/os.js';
|
||||
|
||||
const $i = ensureSignin();
|
||||
|
||||
const attributionDomains = ref($i.attributionDomains.join('\n'));
|
||||
const domainArray = computed(() => {
|
||||
return attributionDomains.value
|
||||
.trim().split('\n')
|
||||
.map(el => el.trim().toLowerCase())
|
||||
.filter(el => el);
|
||||
});
|
||||
const changed = ref(false);
|
||||
const tutorialTag = '`<meta name="fediverse:creator" content="' + $i.username + '@' + toUnicode(hostRaw) + '" />`';
|
||||
|
||||
async function save() {
|
||||
// checks for a full line without whitespace.
|
||||
if (!domainArray.value.every(d => /^\S+$/.test(d))) {
|
||||
os.alert({
|
||||
type: 'error',
|
||||
title: i18n.ts.invalidValue,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
await misskeyApi('i/update', {
|
||||
attributionDomains: domainArray.value,
|
||||
});
|
||||
|
||||
// Refresh filtered list to signal to the user how they've been saved
|
||||
attributionDomains.value = domainArray.value.join('\n');
|
||||
|
||||
changed.value = false;
|
||||
}
|
||||
|
||||
watch(domainArray, (newArray, oldArray) => {
|
||||
// compare arrays
|
||||
if (newArray.length !== oldArray.length || !newArray.every((a, i) => a === oldArray[i])) {
|
||||
changed.value = true;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
|
@ -163,6 +163,13 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<template #caption>{{ i18n.ts.flagAsBotDescription }}</template>
|
||||
</MkSwitch>
|
||||
</SearchMarker>
|
||||
|
||||
<SearchMarker
|
||||
:label="i18n.ts.attributionDomains"
|
||||
:keywords="['attribution', 'domains', 'preview', 'url']"
|
||||
>
|
||||
<AttributionDomainsSettings/>
|
||||
</SearchMarker>
|
||||
</div>
|
||||
</MkFolder>
|
||||
</SearchMarker>
|
||||
|
|
@ -172,6 +179,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { computed, reactive, ref, watch, defineAsyncComponent } from 'vue';
|
||||
import AttributionDomainsSettings from './profile.attribution-domains-setting.vue';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
import MkInput from '@/components/MkInput.vue';
|
||||
import MkSwitch from '@/components/MkSwitch.vue';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue