diff --git a/src/i18n/locales b/src/i18n/locales index a25e724b..b2d50b05 160000 --- a/src/i18n/locales +++ b/src/i18n/locales @@ -1 +1 @@ -Subproject commit a25e724b8a59ea4ed14ece89464dbbbd7d0251ee +Subproject commit b2d50b05bf75ccf8b70525718924806c70f02dee diff --git a/src/interfaces/constant.ts b/src/interfaces/constant.ts index b3a27980..07b1690d 100644 --- a/src/interfaces/constant.ts +++ b/src/interfaces/constant.ts @@ -86,6 +86,8 @@ export const DEFAULT_SETTINGS: Partial = { charConvert: "->", unHandledObsidianExt: [], sendSimpleLinks: true, + forcePush: true, + }, plugin: { shareKey: "share", diff --git a/src/interfaces/settings.ts b/src/interfaces/settings.ts index a00aa8ff..1fd80970 100644 --- a/src/interfaces/settings.ts +++ b/src/interfaces/settings.ts @@ -259,6 +259,11 @@ export interface Embed { * Will apply all previous settings */ sendSimpleLinks: boolean; + /** + * Force the note to be uploaded even if they are not edited (and exists on repo) + * @default true + */ + forcePush?: boolean; } /** diff --git a/src/settings.ts b/src/settings.ts index ac0d7ace..89acc0bc 100644 --- a/src/settings.ts +++ b/src/settings.ts @@ -318,6 +318,7 @@ export class EnveloppeSettingsTab extends PluginSettingTab { await this.plugin.saveSettings(); }) ); + new Setting(this.settingsPage) .setName(i18next.t("settings.github.dryRun.enable.title")) .setDesc(i18next.t("settings.github.dryRun.enable.desc")) @@ -905,6 +906,17 @@ export class EnveloppeSettingsTab extends PluginSettingTab { await this.renderEmbedConfiguration(); }); }); + + new Setting(this.settingsPage) + .setName(i18next.t("settings.embed.forcePush.title")) + .setDesc(i18next.t("settings.embed.forcePush.desc")) + .addToggle((toggle) => + toggle.setValue(embedSettings.forcePush ?? true).onChange(async (value) => { + embedSettings.forcePush = value; + await this.plugin.saveSettings(); + }) + ); + this.settingsPage.createEl("h5", { text: i18next.t("settings.embed.attachment"), cls: "center", @@ -1013,7 +1025,8 @@ export class EnveloppeSettingsTab extends PluginSettingTab { await this.renderEmbedConfiguration(); }); }); - + + if (embedSettings.notes) { new Setting(this.settingsPage) .setName(i18next.t("settings.embed.links.title")) diff --git a/tsconfig.json b/tsconfig.json index 008cdeb6..2f9a80ad 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -21,7 +21,6 @@ "noImplicitAny": true, "skipLibCheck": true, "removeComments": true, - "sourceMap": true, "moduleResolution": "node", "importHelpers": true, "isolatedModules": true,