diff --git a/src/langs b/src/langs index c729c11..9a4c2d3 160000 --- a/src/langs +++ b/src/langs @@ -1 +1 @@ -Subproject commit c729c117e810fd6e01c52fe6af4f7c4764f19e48 +Subproject commit 9a4c2d3c1c444577b4a4412e9f37f263ce3ebcb3 diff --git a/src/settings.ts b/src/settings.ts index 7c81033..285ab87 100644 --- a/src/settings.ts +++ b/src/settings.ts @@ -1013,6 +1013,28 @@ export class RemotelySaveSettingTab extends PluginSettingTab { }); }); + new Setting(dropboxRevokeAuthDiv) + .setName(t("settings_dropbox_clearlocal")) + .setDesc(t("settings_dropbox_clearlocal_desc")) + .addButton(async (button) => { + button.setButtonText(t("settings_dropbox_clearlocal_button")); + button.onClick(async () => { + this.plugin.settings.dropbox = JSON.parse( + JSON.stringify(DEFAULT_DROPBOX_CONFIG) + ); + await this.plugin.saveSettings(); + dropboxAuthDiv.toggleClass( + "dropbox-auth-button-hide", + this.plugin.settings.dropbox.username !== "" + ); + dropboxRevokeAuthDiv.toggleClass( + "dropbox-revoke-auth-button-hide", + this.plugin.settings.dropbox.username === "" + ); + new Notice(t("settings_dropbox_clearlocal_notice")); + }); + }); + new Setting(dropboxAuthDiv) .setName(t("settings_dropbox_auth")) .setDesc(t("settings_dropbox_auth_desc"))