mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-02 05:02:27 +08:00
chore(types): font families
This commit is contained in:
parent
8a494b220b
commit
80af0899b8
@ -1,9 +1,19 @@
|
|||||||
import OptionsWidget from "../options_widget.js";
|
import OptionsWidget from "../options_widget.js";
|
||||||
import utils from "../../../../services/utils.js";
|
import utils from "../../../../services/utils.js";
|
||||||
import { t } from "../../../../services/i18n.js";
|
import { t } from "../../../../services/i18n.js";
|
||||||
import { OptionMap, OptionNames } from "../../../../../../services/options_interface.js";
|
import { FontFamily, OptionMap, OptionNames } from "../../../../../../services/options_interface.js";
|
||||||
|
|
||||||
const FONT_FAMILIES = [
|
interface FontFamilyEntry {
|
||||||
|
value: FontFamily;
|
||||||
|
label: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface FontGroup {
|
||||||
|
title: string;
|
||||||
|
items: FontFamilyEntry[];
|
||||||
|
}
|
||||||
|
|
||||||
|
const FONT_FAMILIES: FontGroup[] = [
|
||||||
{
|
{
|
||||||
title: t("fonts.generic-fonts"),
|
title: t("fonts.generic-fonts"),
|
||||||
items: [
|
items: [
|
||||||
|
@ -12,6 +12,8 @@ type KeyboardShortcutsOptions<T extends KeyboardActionNames> = {
|
|||||||
[key in T as `keyboardShortcuts${Capitalize<key>}`]: string
|
[key in T as `keyboardShortcuts${Capitalize<key>}`]: string
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type FontFamily = "theme" | "serif" | "sans-serif" | "monospace" | string;
|
||||||
|
|
||||||
export interface OptionDefinitions extends KeyboardShortcutsOptions<KeyboardActionNames> {
|
export interface OptionDefinitions extends KeyboardShortcutsOptions<KeyboardActionNames> {
|
||||||
"openNoteContexts": string;
|
"openNoteContexts": string;
|
||||||
"lastDailyBackupDate": string;
|
"lastDailyBackupDate": string;
|
||||||
@ -22,10 +24,10 @@ export interface OptionDefinitions extends KeyboardShortcutsOptions<KeyboardActi
|
|||||||
"syncServerHost": string;
|
"syncServerHost": string;
|
||||||
"syncServerTimeout": string;
|
"syncServerTimeout": string;
|
||||||
"syncProxy": string;
|
"syncProxy": string;
|
||||||
"mainFontFamily": string;
|
"mainFontFamily": FontFamily;
|
||||||
"treeFontFamily": string;
|
"treeFontFamily": FontFamily;
|
||||||
"detailFontFamily": string;
|
"detailFontFamily": FontFamily;
|
||||||
"monospaceFontFamily": string;
|
"monospaceFontFamily": FontFamily;
|
||||||
"spellCheckLanguageCode": string;
|
"spellCheckLanguageCode": string;
|
||||||
"codeNotesMimeTypes": string;
|
"codeNotesMimeTypes": string;
|
||||||
"headingStyle": string;
|
"headingStyle": string;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user