mirror of
https://github.com/zadam/trilium.git
synced 2025-10-20 15:19:01 +02:00
feat(client/options): add a description for the editor features
This commit is contained in:
parent
5a15024e59
commit
aeb9bfc1fd
@ -1962,8 +1962,11 @@
|
||||
"editorfeatures": {
|
||||
"title": "Features",
|
||||
"emoji_completion_enabled": "Enable Emoji auto-completion",
|
||||
"emoji_completion_description": "If enabled, emojis can be easily inserted into text by typing `:`, followed by the name of an emoji.",
|
||||
"note_completion_enabled": "Enable note auto-completion",
|
||||
"slash_commands_enabled": "Enable slash commands"
|
||||
"note_completion_description": "If enabled, links to notes can be created by typing `@` followed by the title of a note.",
|
||||
"slash_commands_enabled": "Enable slash commands",
|
||||
"slash_commands_description": "If enabled, editing commands such as inserting line breaks or headings can be toggled by typing `/`."
|
||||
},
|
||||
"table_view": {
|
||||
"new-row": "New row",
|
||||
|
@ -71,20 +71,21 @@ function FormattingToolbar() {
|
||||
function EditorFeatures() {
|
||||
return (
|
||||
<OptionsSection title={t("editorfeatures.title")}>
|
||||
<EditorFeature name="emoji-completion-enabled" optionName="textNoteEmojiCompletionEnabled" label={t("editorfeatures.emoji_completion_enabled")} />
|
||||
<EditorFeature name="note-completion-enabled" optionName="textNoteCompletionEnabled" label={t("editorfeatures.note_completion_enabled")} />
|
||||
<EditorFeature name="slash-commands-enabled" optionName="textNoteSlashCommandsEnabled" label={t("editorfeatures.slash_commands_enabled")} />
|
||||
<EditorFeature name="emoji-completion-enabled" optionName="textNoteEmojiCompletionEnabled" label={t("editorfeatures.emoji_completion_enabled")} description={t("editorfeatures.emoji_completion_description")} />
|
||||
<EditorFeature name="note-completion-enabled" optionName="textNoteCompletionEnabled" label={t("editorfeatures.note_completion_enabled")} description={t("editorfeatures.emoji_completion_description")} />
|
||||
<EditorFeature name="slash-commands-enabled" optionName="textNoteSlashCommandsEnabled" label={t("editorfeatures.slash_commands_enabled")} description={t("editorfeatures.emoji_completion_description")} />
|
||||
</OptionsSection>
|
||||
);
|
||||
}
|
||||
|
||||
function EditorFeature({ optionName, name, label }: { optionName: OptionNames, name: string, label: string }) {
|
||||
function EditorFeature({ optionName, name, label, description }: { optionName: OptionNames, name: string, label: string, description: string }) {
|
||||
const [ featureEnabled, setFeatureEnabled ] = useTriliumOptionBool(optionName);
|
||||
|
||||
return (
|
||||
<FormCheckbox
|
||||
name={name} label={label}
|
||||
currentValue={featureEnabled} onChange={setFeatureEnabled}
|
||||
hint={description}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user