mirror of
https://github.com/versia-pub/frontend.git
synced 2025-12-06 08:28:20 +01:00
feat: 🚩 Add default note visibility preference
This commit is contained in:
parent
d267f23236
commit
6384f9ac8e
|
|
@ -120,6 +120,7 @@ import Files from "./files.vue";
|
|||
|
||||
const { Control_Enter, Command_Enter } = useMagicKeys();
|
||||
const ctrlEnterSend = useSetting(SettingIds.CtrlEnterToSend);
|
||||
const defaultVisibility = useSetting(SettingIds.DefaultVisibility);
|
||||
const { play } = useAudio();
|
||||
const fileInput = ref<HTMLInputElement | null>(null);
|
||||
|
||||
|
|
@ -178,7 +179,7 @@ const state = reactive({
|
|||
contentType: "text/markdown" as "text/markdown" | "text/plain",
|
||||
visibility: (relation?.type === "edit"
|
||||
? relation.note.visibility
|
||||
: "public") as Status["visibility"],
|
||||
: (defaultVisibility.value.value ?? "public")) as Status["visibility"],
|
||||
files: (relation?.type === "edit"
|
||||
? relation.note.media_attachments.map((a) => ({
|
||||
apiId: a.id,
|
||||
|
|
|
|||
|
|
@ -316,6 +316,7 @@
|
|||
"tired_happy_lobster_pet": "Change the ship's language. Requires resetting yer sails to apply.",
|
||||
"keen_aware_goldfish_thrive": "King's English",
|
||||
"vivid_mellow_sawfish_approve": "Fancy French",
|
||||
"these_awful_ape_reside": "Pirate",
|
||||
"gray_clean_shark_comfort": "The following URI parameters be required:",
|
||||
"grand_spry_goldfish_embrace": "Yer URI parameters be invalid",
|
||||
"honest_factual_carp_aspire": "Be yer certain yer want to send this deck decoration to Davy Jones' locker?",
|
||||
|
|
@ -342,5 +343,7 @@
|
|||
"inclusive_long_lizard_boost": "Gravatar",
|
||||
"proud_next_elk_beam": "URL",
|
||||
"lower_formal_kudu_lift": "Gravatar email",
|
||||
"witty_honest_wallaby_support": "Preview"
|
||||
"witty_honest_wallaby_support": "Preview",
|
||||
"loud_tense_kitten_exhale": "Default Visibility",
|
||||
"vivid_last_crocodile_offer": "The default visibility for new notes."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -343,5 +343,7 @@
|
|||
"inclusive_long_lizard_boost": "Gravatar",
|
||||
"proud_next_elk_beam": "URL",
|
||||
"lower_formal_kudu_lift": "Gravatar email",
|
||||
"witty_honest_wallaby_support": "Preview"
|
||||
"witty_honest_wallaby_support": "Preview",
|
||||
"loud_tense_kitten_exhale": "Default Visibility",
|
||||
"vivid_last_crocodile_offer": "The default visibility for new notes."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -345,5 +345,7 @@
|
|||
"inclusive_long_lizard_boost": "Gravatar",
|
||||
"proud_next_elk_beam": "URL",
|
||||
"lower_formal_kudu_lift": "Gravatar email",
|
||||
"witty_honest_wallaby_support": "Preview"
|
||||
"witty_honest_wallaby_support": "Preview",
|
||||
"loud_tense_kitten_exhale": "Default Visibility",
|
||||
"vivid_last_crocodile_offer": "The default visibility for new notes."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -321,11 +321,13 @@
|
|||
"kind_deft_myna_hint": "Échec de l'ajout de l'emoji.",
|
||||
"frail_great_marten_pet": "Ajoutez un nouvel emoji sur le serveur.",
|
||||
"whole_icy_puffin_smile": "Ajouter un Emoji",
|
||||
"dirty_inclusive_meerkat_nudge": "Annuler",
|
||||
"due_hour_husky_prosper": "Changer l'image",
|
||||
"suave_broad_albatross_drop": "Ajoutez une image, un e-mail Gravatar ou utilisez une URL.",
|
||||
"inclusive_long_lizard_boost": "Gravatar",
|
||||
"proud_next_elk_beam": "URL",
|
||||
"lower_formal_kudu_lift": "E-mail Gravatar",
|
||||
"witty_honest_wallaby_support": "Aperçu"
|
||||
"witty_honest_wallaby_support": "Aperçu",
|
||||
"dirty_inclusive_meerkat_nudge": "Annuler",
|
||||
"loud_tense_kitten_exhale": "Visibilité par défaut",
|
||||
"vivid_last_crocodile_offer": "La visibilité par défaut pour les nouvelles notes."
|
||||
}
|
||||
|
|
|
|||
26
settings.ts
26
settings.ts
|
|
@ -87,6 +87,7 @@ export enum SettingIds {
|
|||
NotificationsSidebar = "notifications-sidebar",
|
||||
AvatarShape = "avatar-shape",
|
||||
SidebarStyle = "sidebar-style",
|
||||
DefaultVisibility = "default-visibility",
|
||||
}
|
||||
|
||||
export const settings = (): Record<SettingIds, Setting> => {
|
||||
|
|
@ -99,6 +100,31 @@ export const settings = (): Record<SettingIds, Setting> => {
|
|||
page: SettingPages.Behaviour,
|
||||
notImplemented: true,
|
||||
} as BooleanSetting,
|
||||
[SettingIds.DefaultVisibility]: {
|
||||
title: m.loud_tense_kitten_exhale,
|
||||
description: m.vivid_last_crocodile_offer,
|
||||
type: SettingType.Enum,
|
||||
value: "public",
|
||||
options: [
|
||||
{
|
||||
value: "public",
|
||||
label: m.lost_trick_dog_grace,
|
||||
},
|
||||
{
|
||||
value: "unlisted",
|
||||
label: m.funny_slow_jannes_walk,
|
||||
},
|
||||
{
|
||||
value: "private",
|
||||
label: m.grassy_empty_raven_startle,
|
||||
},
|
||||
{
|
||||
value: "direct",
|
||||
label: m.pretty_bold_baboon_wave,
|
||||
},
|
||||
],
|
||||
page: SettingPages.Behaviour,
|
||||
} as EnumSetting,
|
||||
[SettingIds.Language]: {
|
||||
title: m.pretty_born_jackal_dial,
|
||||
description: m.tired_happy_lobster_pet,
|
||||
|
|
|
|||
Loading…
Reference in a new issue