diff --git a/src/commands/suggest_other_repo_commands_modal.ts b/src/commands/suggest_other_repo_commands_modal.ts index fb30c433..3daf96bf 100644 --- a/src/commands/suggest_other_repo_commands_modal.ts +++ b/src/commands/suggest_other_repo_commands_modal.ts @@ -185,7 +185,7 @@ export class SuggestOtherRepoCommandsModal extends FuzzySuggestModal{{- repo.owner}}/{{- repo.repo}}: {{- repo.branch}}", diff --git a/src/i18n/locales/fr.json b/src/i18n/locales/fr.json index 9696e3ef..12f65c08 100644 --- a/src/i18n/locales/fr.json +++ b/src/i18n/locales/fr.json @@ -81,7 +81,7 @@ }, "error": { "alreadyExists": "{{- file}} existe déjà.", - "autoClean": "Le {{- what}} étant vide, l'auto-nettoyage est désactivée.", + "autoClean": "Le {{- what}} étant vide, l'auto-nettoyage est désactivée. Vous pouvez le réactiver si vous souhaitez l'utiliser, mais attention aux fichiers utilisés par votre template et qui peuvent être supprimés.", "dataview": "Impossible de convertir la requête Dataview. Veuillez mettre à jour le module Dataview à la dernière version;", "errorConfig": "Erreur de configuration pour {{- repo.owner}}/{{- repo.repo}}:{{- repo.branch}}. Merci de vérifier vos paramètres.", "errorPublish": "Erreur lors de la publication sur {{- repo.owner}}/{{- repo.repo}} : {{- repo.branch}}", diff --git a/src/settings.ts b/src/settings.ts index d1679951..c9086750 100644 --- a/src/settings.ts +++ b/src/settings.ts @@ -19,7 +19,6 @@ import { ModalRegexFilePathName, ModalRegexOnContents, OverrideAttachmentsModal import { TokenEditPath } from "./settings/modals/token_path"; import { autoCleanCondition, - autoCleanUpSettingsOnCondition, folderHideShowSettings, showHideBasedOnFolder, } from "./settings/style"; import { checkRepositoryValidity, verifyRateLimitAPI } from "./utils/data_validation_test"; @@ -609,15 +608,9 @@ export class GithubPublisherSettingsTab extends PluginSettingTab { }); } - const condition = - (uploadSettings.behavior === FolderSettings.yaml && - uploadSettings.rootFolder.length === 0) || - uploadSettings.defaultName.length === 0; - const autoCleanSetting = new Setting(this.settingsPage) .setName(i18next.t("settings.githubWorkflow.autoCleanUp.title")) .setDesc(i18next.t("settings.githubWorkflow.autoCleanUp.desc")) - .setDisabled(condition) .addToggle((toggle) => { toggle .setValue(uploadSettings.autoclean.enable) @@ -629,7 +622,7 @@ export class GithubPublisherSettingsTab extends PluginSettingTab { await this.plugin.chargeAllCommands(null, this.plugin); }); }); - if (uploadSettings.autoclean.enable && !condition) { + if (uploadSettings.autoclean.enable) { new Setting(this.settingsPage) .setName(i18next.t("settings.githubWorkflow.excludedFiles.title")) .setDesc(i18next.t("settings.githubWorkflow.excludedFiles.desc")) @@ -650,11 +643,7 @@ export class GithubPublisherSettingsTab extends PluginSettingTab { }); }); } - autoCleanUpSettingsOnCondition( - condition, - autoCleanSetting, - this.plugin - ); + folderHideShowSettings( frontmatterKeySettings, diff --git a/src/settings/help.ts b/src/settings/help.ts index c4a10ce3..8f0847d3 100644 --- a/src/settings/help.ts +++ b/src/settings/help.ts @@ -132,7 +132,7 @@ export function help(settings: GitHubPublisherSettings) { p.createEl("code", { text: "mdlinks" }); p.createEl("span", { text: `: ${i18next.t("settings.help.frontmatter.mdlinks") - }`, + }`, }); }); l.createEl("li", undefined, (p) => { @@ -142,7 +142,7 @@ export function help(settings: GitHubPublisherSettings) { text: `: ${i18next.t( "settings.help.frontmatter.convert.enableOrDisable" ) - } `, + } `, }); span.createEl("code", { text: " [[link]] " }); span.createEl("span", { @@ -171,14 +171,14 @@ export function help(settings: GitHubPublisherSettings) { p.createEl("code", { text: "send" }); p.createEl("span", { text: `: ${i18next.t("settings.help.frontmatter.embed.send") - }`, + }`, }); }); l.createEl("li", undefined, (p) => { p.createEl("code", { text: "remove" }); p.createEl("span", { text: `: ${i18next.t("settings.help.frontmatter.embed.remove.desc") - }`, + }`, }); p.createEl("ul", undefined, (ul) => { ul.createEl("li", undefined, (li) => { @@ -226,7 +226,7 @@ export function help(settings: GitHubPublisherSettings) { text: `: ${i18next.t( "settings.help.frontmatter.attachment.send" ) - }`, + }`, }); }); l.createEl("li", undefined, (p) => { @@ -235,7 +235,7 @@ export function help(settings: GitHubPublisherSettings) { text: `: ${i18next.t( "settings.help.frontmatter.attachment.folder" ) - }`, + }`, }); }); }); @@ -249,7 +249,7 @@ export function help(settings: GitHubPublisherSettings) { span.createEl("code", { text: "hardbreak", cls: "code-title" }); span.createEl("span", { text: `: ${i18next.t("settings.help.frontmatter.hardBreak") - }`, + }`, }); }); span.createEl("li", undefined, (span) => { diff --git a/src/utils/parse_frontmatter.ts b/src/utils/parse_frontmatter.ts index 11f9b9e1..ff16fe14 100644 --- a/src/utils/parse_frontmatter.ts +++ b/src/utils/parse_frontmatter.ts @@ -7,7 +7,6 @@ import { FrontMatterCache, normalizePath, TFile } from "obsidian"; import GithubPublisher from "src/main"; import { FolderSettings, FrontmatterConvert, GitHubPublisherSettings, Path, RepoFrontmatter, Repository } from "../settings/interface"; -import internal from "stream"; /** * Retrieves the frontmatter settings for a given file.