forked from FoundKeyGang/FoundKey
client: fix default-selected reply scopes
As a side-effect, I remove the broken "remember privacy scope" setting. Co-authored-by: Johann150 <johann.galle@protonmail.com> Changelog: Fixed
This commit is contained in:
parent
f4b9244a88
commit
d434343a09
27 changed files with 24 additions and 54 deletions
|
@ -108,7 +108,6 @@ add: "إضافة"
|
|||
reaction: "التفاعلات"
|
||||
reactionSetting: "التفاعلات المراد عرضها في منتقي التفاعلات."
|
||||
reactionSettingDescription2: "اسحب لترتيب ، انقر للحذف ، استخدم \"+\" للإضافة."
|
||||
rememberNoteVisibility: "تذكر إعدادت مدى رؤية الملاحظات"
|
||||
attachCancel: "أزل المرفق"
|
||||
markAsSensitive: "علّمه كمحتوى حساس"
|
||||
unmarkAsSensitive: "ألغ تعيينه كمحتوى حساس"
|
||||
|
|
|
@ -108,7 +108,6 @@ add: "যুক্ত করুন"
|
|||
reaction: "প্রতিক্রিয়া"
|
||||
reactionSetting: "রিঅ্যাকশন পিকারে যেসকল প্রতিক্রিয়া দেখানো হবে"
|
||||
reactionSettingDescription2: "পুনরায় সাজাতে টেনে আনুন, মুছতে ক্লিক করুন, যোগ করতে + টিপুন।"
|
||||
rememberNoteVisibility: "নোটের দৃশ্যমান্যতার সেটিংস মনে রাখুন"
|
||||
attachCancel: "অ্যাটাচমেন্ট সরান "
|
||||
markAsSensitive: "সংবেদনশীল হিসাবে চিহ্নিত করুন"
|
||||
unmarkAsSensitive: "সংবেদনশীল চিহ্ন সরান"
|
||||
|
|
|
@ -108,7 +108,6 @@ add: "Afegir"
|
|||
reaction: "Reaccions"
|
||||
reactionSetting: "Reaccions a mostrar al selector de reaccions"
|
||||
reactionSettingDescription2: "Arrossega per reordenar, fes clic per suprimir, prem \"+\" per afegir."
|
||||
rememberNoteVisibility: "Recorda la configuració de visibilitat de les notes"
|
||||
attachCancel: "Eliminar el fitxer adjunt"
|
||||
markAsSensitive: "Marcar com a NSFW"
|
||||
instances: "Instàncies"
|
||||
|
|
|
@ -105,7 +105,6 @@ sensitive: "NSFW"
|
|||
add: "Přidat"
|
||||
reaction: "Reakce"
|
||||
reactionSettingDescription2: "Přetažením změníte pořadí, kliknutím smažete, zmáčkněte \"+\" k přidání"
|
||||
rememberNoteVisibility: "Zapamatovat nastavení zobrazení poznámky"
|
||||
attachCancel: "Odstranit přílohu"
|
||||
markAsSensitive: "Označit jako NSFW"
|
||||
unmarkAsSensitive: "Odznačit jako NSFW"
|
||||
|
|
|
@ -109,7 +109,6 @@ add: "Hinzufügen"
|
|||
reaction: "Reaktionen"
|
||||
reactionSetting: "In der Reaktionsauswahl anzuzeigende Reaktionen"
|
||||
reactionSettingDescription2: "Ziehe um Anzuordnen, klicke um zu löschen, drücke „+“ um hinzuzufügen"
|
||||
rememberNoteVisibility: "Notizsichtbarkeit merken"
|
||||
attachCancel: "Anhang entfernen"
|
||||
markAsSensitive: "Als NSFW markieren"
|
||||
unmarkAsSensitive: "Als nicht NSFW markieren"
|
||||
|
|
|
@ -109,7 +109,6 @@ add: "Add"
|
|||
reaction: "Reactions"
|
||||
reactionSetting: "Reactions to show in the reaction picker"
|
||||
reactionSettingDescription2: "Drag to reorder, click to delete, press \"+\" to add."
|
||||
rememberNoteVisibility: "Remember note visibility settings"
|
||||
attachCancel: "Remove attachment"
|
||||
markAsSensitive: "Mark as NSFW"
|
||||
unmarkAsSensitive: "Unmark as NSFW"
|
||||
|
|
|
@ -108,7 +108,6 @@ add: "Agregar"
|
|||
reaction: "Reacción"
|
||||
reactionSetting: "Reacciones para mostrar en el menú de reacciones"
|
||||
reactionSettingDescription2: "Arrastre para reordenar, click para borrar, apriete la tecla + para añadir."
|
||||
rememberNoteVisibility: "Recordar visibilidad"
|
||||
attachCancel: "Quitar adjunto"
|
||||
markAsSensitive: "Marcar como sensible"
|
||||
unmarkAsSensitive: "Desmarcar como sensible"
|
||||
|
|
|
@ -108,7 +108,6 @@ add: "Ajouter"
|
|||
reaction: "Réactions"
|
||||
reactionSetting: "Réactions à afficher dans le sélecteur de réactions"
|
||||
reactionSettingDescription2: "Déplacer pour réorganiser, cliquer pour effacer, utiliser « + » pour ajouter."
|
||||
rememberNoteVisibility: "Activer l'option \" se souvenir de la visibilité des notes \" vous permet de réutiliser automatiquement la visibilité utilisée lors de la publication de votre note précédente."
|
||||
attachCancel: "Supprimer le fichier attaché"
|
||||
markAsSensitive: "Marquer comme sensible"
|
||||
unmarkAsSensitive: "Supprimer le marquage comme sensible"
|
||||
|
|
|
@ -108,7 +108,6 @@ add: "Tambahkan"
|
|||
reaction: "Reaksi"
|
||||
reactionSetting: "Reaksi untuk dimunculkan di bilah reaksi"
|
||||
reactionSettingDescription2: "Geser untuk memindah urutkan, klik untuk menghapus, tekan \"+\" untuk menambahkan"
|
||||
rememberNoteVisibility: "Ingat pengaturan visibilitas catatan"
|
||||
attachCancel: "Hapus lampiran"
|
||||
markAsSensitive: "Tandai sebagai konten sensitif"
|
||||
unmarkAsSensitive: "Hapus tanda konten sensitif"
|
||||
|
|
|
@ -108,7 +108,6 @@ add: "Aggiungi"
|
|||
reaction: "Reazione"
|
||||
reactionSetting: "Reazioni visualizzate sul pannello"
|
||||
reactionSettingDescription2: "Trascina per riorganizzare, clicca per cancellare, usa il pulsante \"+\" per aggiungere."
|
||||
rememberNoteVisibility: "Ricordare le impostazioni di visibilità delle note"
|
||||
attachCancel: "Rimuovi allegato"
|
||||
markAsSensitive: "Segna come sensibile"
|
||||
unmarkAsSensitive: "Segna come non sensibile"
|
||||
|
|
|
@ -109,7 +109,6 @@ add: "追加"
|
|||
reaction: "リアクション"
|
||||
reactionSetting: "ピッカーに表示するリアクション"
|
||||
reactionSettingDescription2: "ドラッグして並び替え、クリックして削除、+を押して追加します。"
|
||||
rememberNoteVisibility: "公開範囲を記憶する"
|
||||
attachCancel: "添付取り消し"
|
||||
markAsSensitive: "閲覧注意にする"
|
||||
unmarkAsSensitive: "閲覧注意を解除する"
|
||||
|
|
|
@ -108,7 +108,6 @@ add: "増やす"
|
|||
reaction: "リアクション"
|
||||
reactionSetting: "Reaction that will be displayed in Picker. "
|
||||
reactionSettingDescription2: "ドラッグで並び替え、クリックで削除、+を押して追加やで。"
|
||||
rememberNoteVisibility: "公開範囲覚えといて"
|
||||
attachCancel: "のっけるのやめる"
|
||||
markAsSensitive: "ちょっとこれはアカン"
|
||||
unmarkAsSensitive: "そこまでアカンことないやろ"
|
||||
|
|
|
@ -108,7 +108,6 @@ add: "추가"
|
|||
reaction: "리액션"
|
||||
reactionSetting: "선택기에 표시할 리액션"
|
||||
reactionSettingDescription2: "끌어서 순서 변경, 클릭해서 삭제, +를 눌러서 추가할 수 있습니다."
|
||||
rememberNoteVisibility: "공개 범위를 기억하기"
|
||||
attachCancel: "첨부 취소"
|
||||
markAsSensitive: "열람주의로 설정"
|
||||
unmarkAsSensitive: "열람주의 해제"
|
||||
|
|
|
@ -108,7 +108,6 @@ sensitive: "NSFW"
|
|||
add: "Toevoegen"
|
||||
reaction: "Reacties"
|
||||
reactionSettingDescription2: "Sleep om opnieuw te ordenen, Klik om te verwijderen, Druk op \"+\" om toe te voegen"
|
||||
rememberNoteVisibility: "Vergeet niet de notitie zichtbaarheidsinstellingen"
|
||||
attachCancel: "Verwijder bijlage"
|
||||
markAsSensitive: "Markeren als NSFW"
|
||||
unmarkAsSensitive: "Geen NSFW"
|
||||
|
|
|
@ -108,7 +108,6 @@ add: "Dodaj"
|
|||
reaction: "Reakcja"
|
||||
reactionSetting: "Reakcje do pokazania w wyborniku reakcji"
|
||||
reactionSettingDescription2: "Przeciągnij aby zmienić kolejność, naciśnij aby usunąć, naciśnij „+” aby dodać"
|
||||
rememberNoteVisibility: "Zapamiętuj ustawienia widoczności wpisu"
|
||||
attachCancel: "Usuń załącznik"
|
||||
markAsSensitive: "Oznacz jako NSFW"
|
||||
unmarkAsSensitive: "Cofnij NSFW"
|
||||
|
|
|
@ -106,7 +106,6 @@ sensitive: "Conteúdo sensível"
|
|||
add: "Adicionar"
|
||||
reaction: "Reações"
|
||||
reactionSetting: "Quais reações a mostrar no selecionador de reações"
|
||||
rememberNoteVisibility: "Lembrar das configurações de visibilidade de notas"
|
||||
attachCancel: "Remover anexo"
|
||||
markAsSensitive: "Marcar como sensível"
|
||||
unmarkAsSensitive: "Desmarcar como sensível"
|
||||
|
|
|
@ -108,7 +108,6 @@ add: "Adaugă"
|
|||
reaction: "Reacție"
|
||||
reactionSetting: "Reacții care să apară in selectorul de reacții"
|
||||
reactionSettingDescription2: "Trage pentru a rearanja, apasă pe \"+\" pentru a adăuga."
|
||||
rememberNoteVisibility: "Amintește setarea de vizibilitate a notelor"
|
||||
attachCancel: "Înlătură atașament"
|
||||
markAsSensitive: "Marchează ca NSFW"
|
||||
unmarkAsSensitive: "Demarchează ca NSFW"
|
||||
|
|
|
@ -108,7 +108,6 @@ add: "Добавить"
|
|||
reaction: "Реакции"
|
||||
reactionSetting: "Реакции, отображаемые в палитре"
|
||||
reactionSettingDescription2: "Расставляйте перетаскиванием, удаляйте нажатием, добавляйте кнопкой «+»."
|
||||
rememberNoteVisibility: "Запоминать видимость заметок"
|
||||
attachCancel: "Удалить вложение"
|
||||
markAsSensitive: "Отметить как «не для всех»"
|
||||
unmarkAsSensitive: "Снять отметку «не для всех»"
|
||||
|
|
|
@ -108,7 +108,6 @@ add: "Pridať"
|
|||
reaction: "Reakcie"
|
||||
reactionSetting: "Reakcie zobrazené vo výbere reakcií"
|
||||
reactionSettingDescription2: "Ťahaním preusporiadate, kliknutím odstránite, Stlačením \"+\" pridáte"
|
||||
rememberNoteVisibility: "Zapamätať nastavenia viditeľnosti poznámky"
|
||||
attachCancel: "Odstrániť prílohu"
|
||||
markAsSensitive: "Označiť ako NSFW"
|
||||
unmarkAsSensitive: "Odznačiť NSFW"
|
||||
|
|
|
@ -108,7 +108,6 @@ add: "Lägg till"
|
|||
reaction: "Reaktioner"
|
||||
reactionSetting: "Reaktioner som ska visas i reaktionsväljaren"
|
||||
reactionSettingDescription2: "Dra för att omordna, klicka för att radera, tryck \"+\" för att lägga till."
|
||||
rememberNoteVisibility: "Komihåg notvisningsinställningar"
|
||||
attachCancel: "Ta bort bilaga"
|
||||
markAsSensitive: "Markera som känsligt innehåll"
|
||||
unmarkAsSensitive: "Avmarkera som känsligt innehåll"
|
||||
|
|
|
@ -108,7 +108,6 @@ add: "Додати"
|
|||
reaction: "Реакції"
|
||||
reactionSetting: "Налаштування реакцій"
|
||||
reactionSettingDescription2: "Перемістити щоб змінити порядок, Клацнути мишою щоб видалити, Натиснути \"+\" щоб додати."
|
||||
rememberNoteVisibility: "Пам’ятати параметри видимісті"
|
||||
attachCancel: "Видалити вкладення"
|
||||
markAsSensitive: "Позначити як NSFW"
|
||||
unmarkAsSensitive: "Зняти позначку NSFW"
|
||||
|
|
|
@ -108,7 +108,6 @@ add: "Thêm"
|
|||
reaction: "Biểu cảm"
|
||||
reactionSetting: "Chọn những biểu cảm hiển thị"
|
||||
reactionSettingDescription2: "Kéo để sắp xếp, nhấn để xóa, nhấn \"+\" để thêm."
|
||||
rememberNoteVisibility: "Lưu kiểu tút mặc định"
|
||||
attachCancel: "Gỡ tập tin đính kèm"
|
||||
markAsSensitive: "Đánh dấu là nhạy cảm"
|
||||
unmarkAsSensitive: "Bỏ đánh dấu nhạy cảm"
|
||||
|
|
|
@ -108,7 +108,6 @@ add: "添加"
|
|||
reaction: "回应"
|
||||
reactionSetting: "在选择器中显示的回应"
|
||||
reactionSettingDescription2: "拖动重新排序,单击删除,点击 + 添加。"
|
||||
rememberNoteVisibility: "保存上次设置的可见性"
|
||||
attachCancel: "删除附件"
|
||||
markAsSensitive: "标记为敏感内容"
|
||||
unmarkAsSensitive: "取消标记为敏感内容"
|
||||
|
|
|
@ -108,7 +108,6 @@ add: "新增"
|
|||
reaction: "情感"
|
||||
reactionSetting: "在選擇器中顯示反應"
|
||||
reactionSettingDescription2: "拖動以重新列序,點擊以刪除,按下 + 添加。"
|
||||
rememberNoteVisibility: "記住貼文可見性"
|
||||
attachCancel: "移除附件"
|
||||
markAsSensitive: "標記為敏感內容"
|
||||
unmarkAsSensitive: "取消標記為敏感內容"
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
<span v-if="localOnly" class="local-only"><i class="fas fa-biohazard"></i></span>
|
||||
<button ref="visibilityButton" v-tooltip="i18n.ts.visibility" class="_button visibility" :disabled="channel != null" @click="setVisibility">
|
||||
<span v-if="visibility === 'public'"><i class="fas fa-globe"></i></span>
|
||||
<span v-if="visibility === 'home'"><i class="fas fa-home"></i></span>
|
||||
<span v-if="visibility === 'followers'"><i class="fas fa-unlock"></i></span>
|
||||
<span v-if="visibility === 'specified'"><i class="fas fa-envelope"></i></span>
|
||||
<span v-else-if="visibility === 'home'"><i class="fas fa-home"></i></span>
|
||||
<span v-else-if="visibility === 'followers'"><i class="fas fa-unlock"></i></span>
|
||||
<span v-else-if="visibility === 'specified'"><i class="fas fa-envelope"></i></span>
|
||||
</button>
|
||||
<button v-tooltip="i18n.ts.previewNoteText" class="_button preview" :class="{ active: showPreview }" @click="showPreview = !showPreview"><i class="fas fa-file-code"></i></button>
|
||||
<button class="submit _buttonGradate" :disabled="!canPost" data-cy-open-post-form-submit @click="post">{{ submitText }}<i :class="reply ? 'fas fa-reply' : renote ? 'fas fa-quote-right' : 'fas fa-paper-plane'"></i></button>
|
||||
|
@ -133,8 +133,8 @@ let poll = $ref<{
|
|||
let useCw = $ref(false);
|
||||
let showPreview = $ref(false);
|
||||
let cw = $ref<string | null>(null);
|
||||
let localOnly = $ref<boolean>(props.initialLocalOnly ?? defaultStore.state.rememberNoteVisibility ? defaultStore.state.localOnly : defaultStore.state.defaultNoteLocalOnly);
|
||||
let visibility = $ref(props.initialVisibility ?? (defaultStore.state.rememberNoteVisibility ? defaultStore.state.visibility : defaultStore.state.defaultNoteVisibility) as typeof foundkey.noteVisibilities[number]);
|
||||
let localOnly = $ref<boolean>(props.initialLocalOnly ?? defaultStore.state.defaultNoteLocalOnly);
|
||||
let visibility = $ref(props.initialVisibility ?? defaultStore.state.defaultNoteVisibility as typeof foundkey.noteVisibilities[number]);
|
||||
let visibleUsers = $ref([]);
|
||||
if (props.initialVisibleUsers) {
|
||||
props.initialVisibleUsers.forEach(pushVisibleUser);
|
||||
|
@ -144,6 +144,21 @@ let hasNotSpecifiedMentions = $ref(false);
|
|||
let recentHashtags = $ref(JSON.parse(localStorage.getItem('hashtags') || '[]'));
|
||||
let imeText = $ref('');
|
||||
|
||||
// TODO: compat with misskey-js, should likely be moved into foundkey-js
|
||||
const visibilityScore = (a: string): number => {
|
||||
switch (a) {
|
||||
case 'specified':
|
||||
return 0;
|
||||
case 'followers':
|
||||
return 1;
|
||||
case 'home':
|
||||
return 2;
|
||||
case 'public': default:
|
||||
return 3;
|
||||
}
|
||||
};
|
||||
const minVisibility = (a: string, b: string): string => visibilityScore(b) > visibilityScore(a) ? a : b;
|
||||
|
||||
const typing = throttle(3000, () => {
|
||||
if (props.channel) {
|
||||
stream.send('typingOnChannel', { channel: props.channel.id });
|
||||
|
@ -255,10 +270,9 @@ if (props.channel) {
|
|||
localOnly = true; // TODO: チャンネルが連合するようになった折には消す
|
||||
}
|
||||
|
||||
// 公開以外へのリプライ時は元の公開範囲を引き継ぐ
|
||||
if (props.reply && ['home', 'followers', 'specified'].includes(props.reply.visibility)) {
|
||||
visibility = props.reply.visibility;
|
||||
if (props.reply.visibility === 'specified') {
|
||||
if (props.reply) {
|
||||
visibility = minVisibility(props.reply.visibility, visibility);
|
||||
if (visibility === 'specified') {
|
||||
os.api('users/show', {
|
||||
userIds: props.reply.visibleUserIds.filter(uid => uid !== $i.id && uid !== props.reply.userId),
|
||||
}).then(users => {
|
||||
|
@ -383,15 +397,9 @@ function setVisibility() {
|
|||
}, {
|
||||
changeVisibility: v => {
|
||||
visibility = v;
|
||||
if (defaultStore.state.rememberNoteVisibility) {
|
||||
defaultStore.set('visibility', visibility);
|
||||
}
|
||||
},
|
||||
changeLocalOnly: v => {
|
||||
localOnly = v;
|
||||
if (defaultStore.state.rememberNoteVisibility) {
|
||||
defaultStore.set('localOnly', localOnly);
|
||||
}
|
||||
},
|
||||
}, 'closed');
|
||||
}
|
||||
|
|
|
@ -30,8 +30,7 @@
|
|||
</FormSwitch>
|
||||
|
||||
<FormSection>
|
||||
<FormSwitch v-model="rememberNoteVisibility" class="_formBlock" @update:modelValue="save()">{{ i18n.ts.rememberNoteVisibility }}</FormSwitch>
|
||||
<FormFolder v-if="!rememberNoteVisibility" class="_formBlock">
|
||||
<FormFolder class="_formBlock">
|
||||
<template #label>{{ i18n.ts.defaultNoteVisibility }}</template>
|
||||
<template v-if="defaultNoteVisibility === 'public'" #suffix>{{ i18n.ts._visibility.public }}</template>
|
||||
<template v-else-if="defaultNoteVisibility === 'home'" #suffix>{{ i18n.ts._visibility.home }}</template>
|
||||
|
@ -73,7 +72,6 @@ let ffVisibility = $ref($i.ffVisibility);
|
|||
|
||||
let defaultNoteVisibility = $computed(defaultStore.makeGetterSetter('defaultNoteVisibility'));
|
||||
let defaultNoteLocalOnly = $computed(defaultStore.makeGetterSetter('defaultNoteLocalOnly'));
|
||||
let rememberNoteVisibility = $computed(defaultStore.makeGetterSetter('rememberNoteVisibility'));
|
||||
let keepCw = $computed(defaultStore.makeGetterSetter('keepCw'));
|
||||
|
||||
function save() {
|
||||
|
|
|
@ -23,10 +23,6 @@ export const defaultStore = markRaw(new Storage('base', {
|
|||
where: 'account',
|
||||
default: false,
|
||||
},
|
||||
rememberNoteVisibility: {
|
||||
where: 'account',
|
||||
default: false,
|
||||
},
|
||||
defaultNoteVisibility: {
|
||||
where: 'account',
|
||||
default: 'public',
|
||||
|
@ -75,14 +71,6 @@ export const defaultStore = markRaw(new Storage('base', {
|
|||
'ui',
|
||||
],
|
||||
},
|
||||
visibility: {
|
||||
where: 'deviceAccount',
|
||||
default: 'public' as 'public' | 'home' | 'followers' | 'specified',
|
||||
},
|
||||
localOnly: {
|
||||
where: 'deviceAccount',
|
||||
default: false,
|
||||
},
|
||||
widgets: {
|
||||
where: 'deviceAccount',
|
||||
default: [] as {
|
||||
|
|
Loading…
Reference in a new issue