add settings UI to configure defaultCW and defaultCWPriority
This commit is contained in:
parent
c8f8a61a00
commit
889804b2a8
3 changed files with 64 additions and 2 deletions
34
locales/index.d.ts
vendored
34
locales/index.d.ts
vendored
|
@ -11634,6 +11634,40 @@ export interface Locale extends ILocale {
|
||||||
* Adding entries here will override the default robots.txt packaged with Sharkey.
|
* Adding entries here will override the default robots.txt packaged with Sharkey.
|
||||||
*/
|
*/
|
||||||
"robotsTxtDescription": string;
|
"robotsTxtDescription": string;
|
||||||
|
/**
|
||||||
|
* Default content warning for new posts
|
||||||
|
*/
|
||||||
|
"defaultCW": string;
|
||||||
|
/**
|
||||||
|
* The value here will be auto-filled as the content warning for all new posts and replies.
|
||||||
|
*/
|
||||||
|
"defaultCWDescription": string;
|
||||||
|
/**
|
||||||
|
* Automatic CW priority
|
||||||
|
*/
|
||||||
|
"defaultCWPriority": string;
|
||||||
|
/**
|
||||||
|
* Select preferred action when default CW and keep CW settings are both enabled at the same time.
|
||||||
|
*/
|
||||||
|
"defaultCWPriorityDescription": string;
|
||||||
|
"_defaultCWPriority": {
|
||||||
|
/**
|
||||||
|
* Use Default (use the default CW, ignoring the inherited CW)
|
||||||
|
*/
|
||||||
|
"default": string;
|
||||||
|
/**
|
||||||
|
* Use Parent (use the inherited CW, ignoring the default CW)
|
||||||
|
*/
|
||||||
|
"parent": string;
|
||||||
|
/**
|
||||||
|
* Use Default, then Parent (use the default CW, and append the inherited CW)
|
||||||
|
*/
|
||||||
|
"defaultParent": string;
|
||||||
|
/**
|
||||||
|
* Use Parent, then Default (use the inherited CW, and append the default CW)
|
||||||
|
*/
|
||||||
|
"parentDefault": string;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
declare const locales: {
|
declare const locales: {
|
||||||
[lang: string]: Locale;
|
[lang: string]: Locale;
|
||||||
|
|
|
@ -155,10 +155,24 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<MkSwitch v-model="defaultNoteLocalOnly">{{ i18n.ts._visibility.disableFederation }}</MkSwitch>
|
<MkSwitch v-model="defaultNoteLocalOnly">{{ i18n.ts._visibility.disableFederation }}</MkSwitch>
|
||||||
</div>
|
</div>
|
||||||
</MkFolder>
|
</MkFolder>
|
||||||
</div>
|
|
||||||
</FormSection>
|
|
||||||
|
|
||||||
<MkSwitch v-model="keepCw" @update:modelValue="save()">{{ i18n.ts.keepCw }}</MkSwitch>
|
<MkSwitch v-model="keepCw" @update:modelValue="save()">{{ i18n.ts.keepCw }}</MkSwitch>
|
||||||
|
|
||||||
|
<MkInput v-model="defaultCW" type="text" manualSave @update:modelValue="save()">
|
||||||
|
<template #label>{{ i18n.ts.defaultCW }}</template>
|
||||||
|
<template #caption>{{ i18n.ts.defaultCWDescription }}</template>
|
||||||
|
</MkInput>
|
||||||
|
|
||||||
|
<MkSelect v-model="defaultCWPriority" :disabled="!defaultCW || !keepCw" @update:modelValue="save()">
|
||||||
|
<template #label>{{ i18n.ts.defaultCWPriority }}</template>
|
||||||
|
<template #caption>{{ i18n.ts.defaultCWPriorityDescription }}</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>
|
||||||
|
<option value="defaultParent">{{ i18n.ts._defaultCWPriority.defaultParent }}</option>
|
||||||
|
</MkSelect>
|
||||||
|
</div>
|
||||||
|
</FormSection>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -193,6 +207,8 @@ const hideOnlineStatus = ref($i.hideOnlineStatus);
|
||||||
const publicReactions = ref($i.publicReactions);
|
const publicReactions = ref($i.publicReactions);
|
||||||
const followingVisibility = ref($i.followingVisibility);
|
const followingVisibility = ref($i.followingVisibility);
|
||||||
const followersVisibility = ref($i.followersVisibility);
|
const followersVisibility = ref($i.followersVisibility);
|
||||||
|
const defaultCW = ref($i.defaultCW);
|
||||||
|
const defaultCWPriority = ref($i.defaultCWPriority);
|
||||||
|
|
||||||
const defaultNoteVisibility = computed(defaultStore.makeGetterSetter('defaultNoteVisibility'));
|
const defaultNoteVisibility = computed(defaultStore.makeGetterSetter('defaultNoteVisibility'));
|
||||||
const defaultNoteLocalOnly = computed(defaultStore.makeGetterSetter('defaultNoteLocalOnly'));
|
const defaultNoteLocalOnly = computed(defaultStore.makeGetterSetter('defaultNoteLocalOnly'));
|
||||||
|
@ -251,6 +267,8 @@ function save() {
|
||||||
publicReactions: !!publicReactions.value,
|
publicReactions: !!publicReactions.value,
|
||||||
followingVisibility: followingVisibility.value,
|
followingVisibility: followingVisibility.value,
|
||||||
followersVisibility: followersVisibility.value,
|
followersVisibility: followersVisibility.value,
|
||||||
|
defaultCWPriority: defaultCWPriority.value,
|
||||||
|
defaultCW: defaultCW.value,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -437,3 +437,13 @@ _permissions:
|
||||||
|
|
||||||
robotsTxt: "Custom robots.txt"
|
robotsTxt: "Custom robots.txt"
|
||||||
robotsTxtDescription: "Adding entries here will override the default robots.txt packaged with Sharkey."
|
robotsTxtDescription: "Adding entries here will override the default robots.txt packaged with Sharkey."
|
||||||
|
|
||||||
|
defaultCW: "Default content warning for new posts"
|
||||||
|
defaultCWDescription: "The value here will be auto-filled as the content warning for all new posts and replies."
|
||||||
|
defaultCWPriority: "Automatic CW priority"
|
||||||
|
defaultCWPriorityDescription: "Select preferred action when default CW and keep CW settings are both enabled at the same time."
|
||||||
|
_defaultCWPriority:
|
||||||
|
default: "Use Default (use the default CW, ignoring the inherited CW)"
|
||||||
|
parent: "Use Parent (use the inherited CW, ignoring the default CW)"
|
||||||
|
defaultParent: "Use Default, then Parent (use the default CW, and append the inherited CW)"
|
||||||
|
parentDefault: "Use Parent, then Default (use the inherited CW, and append the default CW)"
|
||||||
|
|
Loading…
Add table
Reference in a new issue