mirror of
https://github.com/mara-li/obsidian-simple-colored-folder.git
synced 2026-07-22 05:46:20 +00:00
style(biome): format with biome v2
This commit is contained in:
parent
2659873be8
commit
677b439e90
4 changed files with 137 additions and 107 deletions
|
|
@ -1,49 +1,49 @@
|
|||
{
|
||||
"common": {
|
||||
"background": "Background color",
|
||||
"color": "Text color",
|
||||
"folderName": "FolderName",
|
||||
"radius": "Folder radius",
|
||||
"saturate": "Saturation while being dragged",
|
||||
"saturateHover": "Saturation during hover",
|
||||
"space": "Space between folder",
|
||||
"warning": "Warning"
|
||||
},
|
||||
"notEnabled": "Style Settings is not installed or enabled. Please, activate it before using this plugin.",
|
||||
"prefix": {
|
||||
"settings": {
|
||||
"generation": "The variable will be generated as follow:"
|
||||
}
|
||||
},
|
||||
"reload": "It is possible that you need to reload Obsidian to make it works.",
|
||||
"settings": {
|
||||
"customCss": {
|
||||
"desc": "Custom CSS template to generate a style from folders. Please use the following variables:",
|
||||
"title": "Custom CSS"
|
||||
},
|
||||
"defaultColor": "Defaults colors",
|
||||
"export": {
|
||||
"desc": "Add the plugin style into the exported style snippets.",
|
||||
"title": "Export plugin style"
|
||||
},
|
||||
"prefix": {
|
||||
"desc": "Prefix for variable generation. This will allow Style Settings to works, but you can edit them also in a CSS snippets.",
|
||||
"folderName": "where folder name will be standardized (removing all points, space and set to lowercase).",
|
||||
"title": "Prefix"
|
||||
},
|
||||
"reload": "Reload style",
|
||||
"snippets": {
|
||||
"desc": "Use a local css snippet file instead of inject the styles into the DOM.",
|
||||
"title": "CSS snippets file"
|
||||
},
|
||||
"styleSettings": {
|
||||
"consigne": "Please use the syntax of",
|
||||
"desc": "Custom “Style settings” template to generate a style from folders. Please use the following variables:",
|
||||
"plugin": "the plugin",
|
||||
"title": "Custom style settings",
|
||||
"without": "without the properties"
|
||||
},
|
||||
"warning": "This will reset your Style Settings! "
|
||||
},
|
||||
"warning": "Please enable 'Style Settings' plugin"
|
||||
"common": {
|
||||
"background": "Background color",
|
||||
"color": "Text color",
|
||||
"folderName": "FolderName",
|
||||
"radius": "Folder radius",
|
||||
"saturate": "Saturation while being dragged",
|
||||
"saturateHover": "Saturation during hover",
|
||||
"space": "Space between folder",
|
||||
"warning": "Warning"
|
||||
},
|
||||
"notEnabled": "Style Settings is not installed or enabled. Please, activate it before using this plugin.",
|
||||
"prefix": {
|
||||
"settings": {
|
||||
"generation": "The variable will be generated as follow:"
|
||||
}
|
||||
},
|
||||
"reload": "It is possible that you need to reload Obsidian to make it works.",
|
||||
"settings": {
|
||||
"customCss": {
|
||||
"desc": "Custom CSS template to generate a style from folders. Please use the following variables:",
|
||||
"title": "Custom CSS"
|
||||
},
|
||||
"defaultColor": "Defaults colors",
|
||||
"export": {
|
||||
"desc": "Add the plugin style into the exported style snippets.",
|
||||
"title": "Export plugin style"
|
||||
},
|
||||
"prefix": {
|
||||
"desc": "Prefix for variable generation. This will allow Style Settings to works, but you can edit them also in a CSS snippets.",
|
||||
"folderName": "where folder name will be standardized (removing all points, space and set to lowercase).",
|
||||
"title": "Prefix"
|
||||
},
|
||||
"reload": "Reload style",
|
||||
"snippets": {
|
||||
"desc": "Use a local css snippet file instead of inject the styles into the DOM.",
|
||||
"title": "CSS snippets file"
|
||||
},
|
||||
"styleSettings": {
|
||||
"consigne": "Please use the syntax of",
|
||||
"desc": "Custom “Style settings” template to generate a style from folders. Please use the following variables:",
|
||||
"plugin": "the plugin",
|
||||
"title": "Custom style settings",
|
||||
"without": "without the properties"
|
||||
},
|
||||
"warning": "This will reset your Style Settings! "
|
||||
},
|
||||
"warning": "Please enable 'Style Settings' plugin"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,49 +1,49 @@
|
|||
{
|
||||
"common": {
|
||||
"background": "Couleur du fond",
|
||||
"color": "Couleur du texte",
|
||||
"folderName": "NomDossier",
|
||||
"radius": "Radius du dossier",
|
||||
"saturate": "Saturation durant le déplacement",
|
||||
"saturateHover": "Saturation durant la sélection",
|
||||
"space": "Espace entre les dossiers",
|
||||
"warning": "Attention"
|
||||
},
|
||||
"notEnabled": "Style Settings n'est pas installé ou activé. Merci de l'activer avant d'utiliser ce plugin.",
|
||||
"prefix": {
|
||||
"settings": {
|
||||
"generation": "Les variables seront générées tel que :"
|
||||
}
|
||||
},
|
||||
"reload": "Il est possible que vous ayez besoin de recharger Obsidian pour que cela fonctionne.",
|
||||
"settings": {
|
||||
"customCss": {
|
||||
"desc": "Modèle CSS personnalisé qui sera utilisé pour générer un CSS depuis les dossiers. Merci d'utiliser les variables suivantes : ",
|
||||
"title": "CSS personnalisé"
|
||||
},
|
||||
"defaultColor": "Couleurs par défaut",
|
||||
"export": {
|
||||
"desc": "Ajouter les styles du plugin dans le fichier exporté.",
|
||||
"title": "Exporter le style du plugin"
|
||||
},
|
||||
"prefix": {
|
||||
"desc": "Préfixe pour la génération de variable. Cela permettra au plugin \"Style settings\" de fonctionner, mais vous pourrez aussi les utiliser dans un snippet css.",
|
||||
"folderName": "où le nom du dossier sera normalisé (en supprimant tous les points, les espaces et en mettant le nom en minuscules).",
|
||||
"title": "Préfixe"
|
||||
},
|
||||
"reload": "Recharger le style",
|
||||
"snippets": {
|
||||
"desc": "Utiliser un fichier d'extrait CSS à la place d'injecter le style dans le DOM.",
|
||||
"title": "Fichier de snippets CSS"
|
||||
},
|
||||
"styleSettings": {
|
||||
"consigne": "Merci d'utiliser la syntaxe de",
|
||||
"desc": "Modèle \"Style settings\" personnalisé pour générer un style depuis les dossiers. Merci d'utiliser les variables suivantes :",
|
||||
"plugin": "le module",
|
||||
"title": "Style settings personnalisé",
|
||||
"without": "sans les propriétés"
|
||||
},
|
||||
"warning": "Cela aura pour conséquence de réinitialiser vos paramètres Style Settings ! "
|
||||
},
|
||||
"warning": "Merci d'activer le module \"Style Settings\"."
|
||||
"common": {
|
||||
"background": "Couleur du fond",
|
||||
"color": "Couleur du texte",
|
||||
"folderName": "NomDossier",
|
||||
"radius": "Radius du dossier",
|
||||
"saturate": "Saturation durant le déplacement",
|
||||
"saturateHover": "Saturation durant la sélection",
|
||||
"space": "Espace entre les dossiers",
|
||||
"warning": "Attention"
|
||||
},
|
||||
"notEnabled": "Style Settings n'est pas installé ou activé. Merci de l'activer avant d'utiliser ce plugin.",
|
||||
"prefix": {
|
||||
"settings": {
|
||||
"generation": "Les variables seront générées tel que :"
|
||||
}
|
||||
},
|
||||
"reload": "Il est possible que vous ayez besoin de recharger Obsidian pour que cela fonctionne.",
|
||||
"settings": {
|
||||
"customCss": {
|
||||
"desc": "Modèle CSS personnalisé qui sera utilisé pour générer un CSS depuis les dossiers. Merci d'utiliser les variables suivantes : ",
|
||||
"title": "CSS personnalisé"
|
||||
},
|
||||
"defaultColor": "Couleurs par défaut",
|
||||
"export": {
|
||||
"desc": "Ajouter les styles du plugin dans le fichier exporté.",
|
||||
"title": "Exporter le style du plugin"
|
||||
},
|
||||
"prefix": {
|
||||
"desc": "Préfixe pour la génération de variable. Cela permettra au plugin \"Style settings\" de fonctionner, mais vous pourrez aussi les utiliser dans un snippet css.",
|
||||
"folderName": "où le nom du dossier sera normalisé (en supprimant tous les points, les espaces et en mettant le nom en minuscules).",
|
||||
"title": "Préfixe"
|
||||
},
|
||||
"reload": "Recharger le style",
|
||||
"snippets": {
|
||||
"desc": "Utiliser un fichier d'extrait CSS à la place d'injecter le style dans le DOM.",
|
||||
"title": "Fichier de snippets CSS"
|
||||
},
|
||||
"styleSettings": {
|
||||
"consigne": "Merci d'utiliser la syntaxe de",
|
||||
"desc": "Modèle \"Style settings\" personnalisé pour générer un style depuis les dossiers. Merci d'utiliser les variables suivantes :",
|
||||
"plugin": "le module",
|
||||
"title": "Style settings personnalisé",
|
||||
"without": "sans les propriétés"
|
||||
},
|
||||
"warning": "Cela aura pour conséquence de réinitialiser vos paramètres Style Settings ! "
|
||||
},
|
||||
"warning": "Merci d'activer le module \"Style Settings\"."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,10 @@
|
|||
import { type App, MarkdownRenderer, PluginSettingTab, sanitizeHTMLToDom, Setting } from "obsidian";
|
||||
import {
|
||||
type App,
|
||||
MarkdownRenderer,
|
||||
PluginSettingTab,
|
||||
sanitizeHTMLToDom,
|
||||
Setting,
|
||||
} from "obsidian";
|
||||
import type SimpleColoredFolder from "./main";
|
||||
import i18next from "i18next";
|
||||
import type { ColorCompiler } from "./compiler";
|
||||
|
|
@ -24,11 +30,17 @@ export class SimpleColoredFolderSettingTab extends PluginSettingTab {
|
|||
containerEl.empty();
|
||||
const styleSettings = this.app.plugins.getPlugin("obsidian-style-settings");
|
||||
if (!styleSettings?._loaded) {
|
||||
await MarkdownRenderer.render(this.app, dedent`> [!warning]
|
||||
await MarkdownRenderer.render(
|
||||
this.app,
|
||||
dedent`> [!warning]
|
||||
> ${i18next.t("notEnabled")}
|
||||
>
|
||||
> ${i18next.t("reload")}
|
||||
`, this.containerEl, "", this.plugin);
|
||||
`,
|
||||
this.containerEl,
|
||||
"",
|
||||
this.plugin
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -61,7 +73,10 @@ export class SimpleColoredFolderSettingTab extends PluginSettingTab {
|
|||
);
|
||||
}
|
||||
this.containerEl.createEl("hr");
|
||||
new Setting(containerEl).setName(i18next.t("settings.defaultColor")).setClass("no-border").setHeading();
|
||||
new Setting(containerEl)
|
||||
.setName(i18next.t("settings.defaultColor"))
|
||||
.setClass("no-border")
|
||||
.setHeading();
|
||||
|
||||
new PickerSettingsComponent(
|
||||
containerEl,
|
||||
|
|
@ -88,12 +103,18 @@ export class SimpleColoredFolderSettingTab extends PluginSettingTab {
|
|||
this.containerEl.createEl("hr");
|
||||
new Setting(containerEl).setName(i18next.t("settings.prefix.title")).setHeading();
|
||||
|
||||
await MarkdownRenderer.render(this.app, dedent`
|
||||
await MarkdownRenderer.render(
|
||||
this.app,
|
||||
dedent`
|
||||
${i18next.t("settings.prefix.desc")}
|
||||
${i18next.t("prefix.settings.generation")} « \`prefix.${i18next.t("common.folderName")}\` » ${i18next.t("settings.prefix.folderName")}
|
||||
> [!warning] ${i18next.t("common.warning")}
|
||||
> ${i18next.t("settings.warning")}
|
||||
`, this.containerEl, "", this.plugin);
|
||||
`,
|
||||
this.containerEl,
|
||||
"",
|
||||
this.plugin
|
||||
);
|
||||
|
||||
new Setting(containerEl)
|
||||
.setName(i18next.t("common.color"))
|
||||
|
|
|
|||
|
|
@ -35,11 +35,17 @@ body:not(.is-grabbing) .nav-folder-title:hover .nav-folder-collapse-indicator {
|
|||
filter: saturate(var(--spf-saturate-dragging)) !important;
|
||||
}
|
||||
|
||||
.nav-files-container.node-insert-event>div>.tree-item.nav-folder>.tree-item-self.nav-folder-title {
|
||||
.nav-files-container.node-insert-event
|
||||
> div
|
||||
> .tree-item.nav-folder
|
||||
> .tree-item-self.nav-folder-title {
|
||||
margin-top: 5px !important;
|
||||
}
|
||||
|
||||
.nav-files-container.node-insert-event>div>.tree-item.nav-folder>.tree-item-self.nav-folder-title {
|
||||
.nav-files-container.node-insert-event
|
||||
> div
|
||||
> .tree-item.nav-folder
|
||||
> .tree-item-self.nav-folder-title {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
|
|
@ -47,18 +53,21 @@ body:not(.is-grabbing) .nav-folder-title:hover .nav-folder-collapse-indicator {
|
|||
margin: 0 5px;
|
||||
}
|
||||
|
||||
.nav-folder.mod-root>.nav-folder-children>.nav-folder>.nav-folder-title {
|
||||
.nav-folder.mod-root > .nav-folder-children > .nav-folder > .nav-folder-title {
|
||||
padding-left: 5px;
|
||||
margin-top: 7px;
|
||||
/* space between top level sections */
|
||||
border-radius: var(--spf-FolderRadius) var(--spf-FolderRadius) 0 0;
|
||||
}
|
||||
|
||||
.nav-folder.mod-root>.nav-folder-children>.nav-folder.is-collapsed>.nav-folder-title {
|
||||
.nav-folder.mod-root
|
||||
> .nav-folder-children
|
||||
> .nav-folder.is-collapsed
|
||||
> .nav-folder-title {
|
||||
border-radius: var(--spf-FolderRadius);
|
||||
}
|
||||
|
||||
.nav-folder.mod-root>.nav-folder-children>.nav-folder>.nav-folder-children {
|
||||
.nav-folder.mod-root > .nav-folder-children > .nav-folder > .nav-folder-children {
|
||||
padding-left: 0;
|
||||
border-radius: 0 0 var(--spf-FolderRadius) var(--spf-FolderRadius);
|
||||
}
|
||||
|
|
@ -69,7 +78,7 @@ body:not(.is-grabbing) .nav-folder-title:hover {
|
|||
border-radius: var(--spf-FolderRadius);
|
||||
}
|
||||
|
||||
.nav-files-container>div>.tree-item.nav-folder:not(.mod-root) {
|
||||
.nav-files-container > div > .tree-item.nav-folder:not(.mod-root) {
|
||||
margin-bottom: var(--spf-space-between) !important;
|
||||
}
|
||||
|
||||
|
|
@ -155,4 +164,4 @@ body:not(.is-grabbing) .nav-folder-title:hover {
|
|||
.spf .setting-item .pickr .pcr-button:after,
|
||||
.spf .setting-item .pickr .pcr-button:before {
|
||||
border-radius: 0 !important;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue