onedrive full
This commit is contained in:
@@ -8,6 +8,7 @@ import type {
|
||||
BoxConfig,
|
||||
GoogleDriveConfig,
|
||||
KoofrConfig,
|
||||
OnedriveFullConfig,
|
||||
PCloudConfig,
|
||||
ProConfig,
|
||||
YandexDiskConfig,
|
||||
@@ -31,6 +32,7 @@ export type SUPPORTED_SERVICES_TYPE =
|
||||
| "webdav"
|
||||
| "dropbox"
|
||||
| "onedrive"
|
||||
| "onedrivefull"
|
||||
| "webdis"
|
||||
| "googledrive"
|
||||
| "box"
|
||||
@@ -114,6 +116,7 @@ export interface OnedriveConfig {
|
||||
credentialsShouldBeDeletedAtTime?: number;
|
||||
remoteBaseDir?: string;
|
||||
emptyFile: "skip" | "error";
|
||||
kind: "onedrive";
|
||||
}
|
||||
|
||||
export interface WebdisConfig {
|
||||
@@ -144,6 +147,7 @@ export interface RemotelySavePluginSettings {
|
||||
webdav: WebdavConfig;
|
||||
dropbox: DropboxConfig;
|
||||
onedrive: OnedriveConfig;
|
||||
onedrivefull: OnedriveFullConfig;
|
||||
webdis: WebdisConfig;
|
||||
googledrive: GoogleDriveConfig;
|
||||
box: BoxConfig;
|
||||
|
||||
@@ -2,6 +2,7 @@ import { FakeFsAzureBlobStorage } from "../pro/src/fsAzureBlobStorage";
|
||||
import { FakeFsBox } from "../pro/src/fsBox";
|
||||
import { FakeFsGoogleDrive } from "../pro/src/fsGoogleDrive";
|
||||
import { FakeFsKoofr } from "../pro/src/fsKoofr";
|
||||
import { FakeFsOnedriveFull } from "../pro/src/fsOnedriveFull";
|
||||
import { FakeFsPCloud } from "../pro/src/fsPCloud";
|
||||
import { FakeFsYandexDisk } from "../pro/src/fsYandexDisk";
|
||||
import type { RemotelySavePluginSettings } from "./baseTypes";
|
||||
@@ -41,6 +42,12 @@ export function getClient(
|
||||
vaultName,
|
||||
saveUpdatedConfigFunc
|
||||
);
|
||||
case "onedrivefull":
|
||||
return new FakeFsOnedriveFull(
|
||||
settings.onedrivefull,
|
||||
vaultName,
|
||||
saveUpdatedConfigFunc
|
||||
);
|
||||
case "webdis":
|
||||
return new FakeFsWebdis(
|
||||
settings.webdis,
|
||||
|
||||
@@ -35,6 +35,7 @@ export const DEFAULT_ONEDRIVE_CONFIG: OnedriveConfig = {
|
||||
username: "",
|
||||
credentialsShouldBeDeletedAtTime: 0,
|
||||
emptyFile: "skip",
|
||||
kind: "onedrive",
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
+8
-2
@@ -1,13 +1,14 @@
|
||||
import cloneDeep from "lodash/cloneDeep";
|
||||
import QRCode from "qrcode";
|
||||
|
||||
import { getShrinkedSettings as getShrinkedSettingsOnedriveFull } from "../pro/src/fsOnedriveFull";
|
||||
import {
|
||||
COMMAND_URI,
|
||||
type QRExportType,
|
||||
type RemotelySavePluginSettings,
|
||||
type UriParams,
|
||||
} from "./baseTypes";
|
||||
import { getShrinkedSettings } from "./fsOnedrive";
|
||||
import { getShrinkedSettings as getShrinkedSettingsOnedrive } from "./fsOnedrive";
|
||||
|
||||
export const exportQrCodeUri = async (
|
||||
settings: RemotelySavePluginSettings,
|
||||
@@ -22,6 +23,7 @@ export const exportQrCodeUri = async (
|
||||
delete settings2.s3;
|
||||
delete settings2.dropbox;
|
||||
delete settings2.onedrive;
|
||||
delete settings2.onedrivefull;
|
||||
delete settings2.webdav;
|
||||
delete settings2.webdis;
|
||||
delete settings2.googledrive;
|
||||
@@ -36,7 +38,11 @@ export const exportQrCodeUri = async (
|
||||
} else if (exportFields === "dropbox") {
|
||||
settings2 = { dropbox: cloneDeep(settings.dropbox) };
|
||||
} else if (exportFields === "onedrive") {
|
||||
settings2 = { onedrive: getShrinkedSettings(settings.onedrive) };
|
||||
settings2 = { onedrive: getShrinkedSettingsOnedrive(settings.onedrive) };
|
||||
} else if (exportFields === "onedrivefull") {
|
||||
settings2 = {
|
||||
onedrivefull: getShrinkedSettingsOnedriveFull(settings.onedrivefull),
|
||||
};
|
||||
} else if (exportFields === "webdav") {
|
||||
settings2 = { webdav: cloneDeep(settings.webdav) };
|
||||
} else if (exportFields === "webdis") {
|
||||
|
||||
+3
-3
@@ -215,7 +215,7 @@
|
||||
"settings_dropbox_auth_button": "Auth",
|
||||
"settings_dropbox_connect_succ": "Great! We can connect to Dropbox!",
|
||||
"settings_dropbox_connect_fail": "We cannot connect to Dropbox.",
|
||||
"settings_onedrive": "Remote For Onedrive (for personal)",
|
||||
"settings_onedrive": "Remote For Onedrive (for personal) (App Folder)",
|
||||
"settings_onedrive_disclaimer1": "Disclaimer: This app is NOT an official Microsoft / OneDrive product.",
|
||||
"settings_onedrive_disclaimer2": "Disclaimer: The information is stored locally. Other malicious/harmful/faulty plugins could read the info. If you see any unintentional access to your Onedrive, please immediately disconnect this app on https://microsoft.com/consent .",
|
||||
"settings_onedrive_folder": "We will create and sync inside the folder /Apps/{{pluginID}}/{{remoteBaseDir}} on your OneDrive.",
|
||||
@@ -269,7 +269,7 @@
|
||||
"settings_chooseservice_s3": "S3 or compatible",
|
||||
"settings_chooseservice_dropbox": "Dropbox",
|
||||
"settings_chooseservice_webdav": "Webdav",
|
||||
"settings_chooseservice_onedrive": "OneDrive for personal",
|
||||
"settings_chooseservice_onedrive": "OneDrive for personal (App Folder)",
|
||||
"settings_chooseservice_webdis": "Webdis (HTTP for Redis®)",
|
||||
"settings_adv": "Advanced Settings",
|
||||
"settings_concurrency": "Concurrency",
|
||||
@@ -315,7 +315,7 @@
|
||||
"settings_export_basic_and_advanced_button": "Export Basic And Advanced Part",
|
||||
"settings_export_s3_button": "Export S3 Part",
|
||||
"settings_export_dropbox_button": "Export Dropbox Part",
|
||||
"settings_export_onedrive_button": "Export OneDrive Part",
|
||||
"settings_export_onedrive_button": "Export OneDrive (App Folder) Part",
|
||||
"settings_export_webdav_button": "Export Webdav Part",
|
||||
"settings_export_webdis_button": "Export Webdis Part",
|
||||
"settings_import": "Import",
|
||||
|
||||
@@ -214,7 +214,7 @@
|
||||
"settings_dropbox_auth_button": "鉴权",
|
||||
"settings_dropbox_connect_succ": "很好!我们可连接上 Dropbox!",
|
||||
"settings_dropbox_connect_fail": "我们未能连接上 Dropbox。",
|
||||
"settings_onedrive": "Onedrive(个人版)设置",
|
||||
"settings_onedrive": "Onedrive(个人版)(App Folder)设置",
|
||||
"settings_onedrive_disclaimer1": "声明:此插件不是微软或 OneDrive 的官方产品。",
|
||||
"settings_onedrive_disclaimer2": "声明:您所输入的信息存储于本地。其它有害的或者出错的插件,是有可能读取到这些信息的。如果您发现了 OneDrive 有不符合预期的访问,请立刻从 https://microsoft.com/consent 删除记录于此插件的连接鉴权。",
|
||||
"settings_onedrive_folder": "我们会在您的 OneDrive 上创建此文件夹并在里面同步:/Apps/{{pluginID}}/{{remoteBaseDir}}。",
|
||||
@@ -268,7 +268,7 @@
|
||||
"settings_chooseservice_s3": "S3 或兼容 S3 的服务",
|
||||
"settings_chooseservice_dropbox": "Dropbox",
|
||||
"settings_chooseservice_webdav": "Webdav",
|
||||
"settings_chooseservice_onedrive": "OneDrive(个人版)",
|
||||
"settings_chooseservice_onedrive": "OneDrive(个人版)(App Folder)",
|
||||
"settings_chooseservice_webdis": "Webdis (an HTTP interface for Redis)",
|
||||
"settings_adv": "进阶设置",
|
||||
"settings_concurrency": "并行度",
|
||||
@@ -314,7 +314,7 @@
|
||||
"settings_export_basic_and_advanced_button": "导出基本或进阶设置",
|
||||
"settings_export_s3_button": "导出 S3 部分",
|
||||
"settings_export_dropbox_button": "导出 Dropbox 部分",
|
||||
"settings_export_onedrive_button": "导出 OneDrive 部分",
|
||||
"settings_export_onedrive_button": "导出 OneDrive (App Folder) 部分",
|
||||
"settings_export_webdav_button": "导出 Webdav 部分",
|
||||
"settings_export_webdis_button": "导出 Webdis 部分",
|
||||
"settings_import": "导入",
|
||||
|
||||
@@ -213,7 +213,7 @@
|
||||
"settings_dropbox_auth_button": "鑑權",
|
||||
"settings_dropbox_connect_succ": "很好!我們可連線上 Dropbox!",
|
||||
"settings_dropbox_connect_fail": "我們未能連線上 Dropbox。",
|
||||
"settings_onedrive": "Onedrive(個人版)設定",
|
||||
"settings_onedrive": "Onedrive(個人版)(App Folder)設定",
|
||||
"settings_onedrive_disclaimer1": "宣告:此外掛不是微軟或 OneDrive 的官方產品。",
|
||||
"settings_onedrive_disclaimer2": "宣告:您所輸入的資訊儲存於本地。其它有害的或者出錯的外掛,是有可能讀取到這些資訊的。如果您發現了 OneDrive 有不符合預期的訪問,請立刻從 https://microsoft.com/consent 刪除記錄於此外掛的連線鑑權。",
|
||||
"settings_onedrive_folder": "我們會在您的 OneDrive 上建立此資料夾並在裡面同步:/Apps/{{pluginID}}/{{remoteBaseDir}}。",
|
||||
@@ -267,7 +267,7 @@
|
||||
"settings_chooseservice_s3": "S3 或相容 S3 的服務",
|
||||
"settings_chooseservice_dropbox": "Dropbox",
|
||||
"settings_chooseservice_webdav": "Webdav",
|
||||
"settings_chooseservice_onedrive": "OneDrive(個人版)",
|
||||
"settings_chooseservice_onedrive": "OneDrive(個人版)(App Folder)",
|
||||
"settings_chooseservice_webdis": "Webdis (an HTTP interface for Redis®)",
|
||||
"settings_adv": "進階設定",
|
||||
"settings_concurrency": "並行度",
|
||||
@@ -313,7 +313,7 @@
|
||||
"settings_export_basic_and_advanced_button": "匯出基本或進階設定",
|
||||
"settings_export_s3_button": "匯出 S3 部分",
|
||||
"settings_export_dropbox_button": "匯出 Dropbox 部分",
|
||||
"settings_export_onedrive_button": "匯出 OneDrive 部分",
|
||||
"settings_export_onedrive_button": "匯出 OneDrive (App Folder) 部分",
|
||||
"settings_export_webdav_button": "匯出 Webdav 部分",
|
||||
"settings_export_webdis_button": "匯出 Webdis 部分",
|
||||
"settings_import": "匯入",
|
||||
|
||||
+122
-3
@@ -26,6 +26,7 @@ import {
|
||||
import {
|
||||
COMMAND_CALLBACK_BOX,
|
||||
COMMAND_CALLBACK_KOOFR,
|
||||
COMMAND_CALLBACK_ONEDRIVEFULL,
|
||||
COMMAND_CALLBACK_PCLOUD,
|
||||
COMMAND_CALLBACK_PRO,
|
||||
COMMAND_CALLBACK_YANDEXDISK,
|
||||
@@ -43,6 +44,12 @@ import {
|
||||
sendAuthReq as sendAuthReqKoofr,
|
||||
setConfigBySuccessfullAuthInplace as setConfigBySuccessfullAuthInplaceKoofr,
|
||||
} from "../pro/src/fsKoofr";
|
||||
import {
|
||||
type AccessCodeResponseSuccessfulType as AccessCodeResponseSuccessfulTypeOnedriveFull,
|
||||
DEFAULT_ONEDRIVEFULL_CONFIG,
|
||||
sendAuthReq as sendAuthReqOnedriveFull,
|
||||
setConfigBySuccessfullAuthInplace as setConfigBySuccessfullAuthInplaceOnedriveFull,
|
||||
} from "../pro/src/fsOnedriveFull";
|
||||
import {
|
||||
type AuthAllowFirstRes as AuthAllowFirstResPCloud,
|
||||
DEFAULT_PCLOUD_CONFIG,
|
||||
@@ -78,7 +85,7 @@ import { FakeFsEncrypt } from "./fsEncrypt";
|
||||
import { getClient } from "./fsGetter";
|
||||
import { FakeFsLocal } from "./fsLocal";
|
||||
import {
|
||||
type AccessCodeResponseSuccessfulType,
|
||||
type AccessCodeResponseSuccessfulType as AccessCodeResponseSuccessfulTypeOnedrive,
|
||||
DEFAULT_ONEDRIVE_CONFIG,
|
||||
sendAuthReq as sendAuthReqOnedrive,
|
||||
setConfigBySuccessfullAuthInplace as setConfigBySuccessfullAuthInplaceOnedrive,
|
||||
@@ -110,6 +117,7 @@ const DEFAULT_SETTINGS: RemotelySavePluginSettings = {
|
||||
webdav: DEFAULT_WEBDAV_CONFIG,
|
||||
dropbox: DEFAULT_DROPBOX_CONFIG,
|
||||
onedrive: DEFAULT_ONEDRIVE_CONFIG,
|
||||
onedrivefull: DEFAULT_ONEDRIVEFULL_CONFIG,
|
||||
webdis: DEFAULT_WEBDIS_CONFIG,
|
||||
googledrive: DEFAULT_GOOGLEDRIVE_CONFIG,
|
||||
box: DEFAULT_BOX_CONFIG,
|
||||
@@ -727,7 +735,7 @@ export default class RemotelySavePlugin extends Plugin {
|
||||
const self = this;
|
||||
setConfigBySuccessfullAuthInplaceOnedrive(
|
||||
this.settings.onedrive,
|
||||
rsp as AccessCodeResponseSuccessfulType,
|
||||
rsp as AccessCodeResponseSuccessfulTypeOnedrive,
|
||||
() => self.saveSettings()
|
||||
);
|
||||
|
||||
@@ -771,6 +779,91 @@ export default class RemotelySavePlugin extends Plugin {
|
||||
}
|
||||
);
|
||||
|
||||
this.registerObsidianProtocolHandler(
|
||||
COMMAND_CALLBACK_ONEDRIVEFULL,
|
||||
async (inputParams) => {
|
||||
if (
|
||||
inputParams.code !== undefined &&
|
||||
this.oauth2Info?.verifier !== undefined
|
||||
) {
|
||||
if (this.oauth2Info.helperModal !== undefined) {
|
||||
const k = this.oauth2Info.helperModal.contentEl;
|
||||
k.empty();
|
||||
|
||||
t("protocol_onedrivefull_connecting")
|
||||
.split("\n")
|
||||
.forEach((val) => {
|
||||
k.createEl("p", {
|
||||
text: val,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
const rsp = await sendAuthReqOnedriveFull(
|
||||
this.settings.onedrivefull.clientID,
|
||||
this.settings.onedrivefull.authority,
|
||||
inputParams.code,
|
||||
this.oauth2Info.verifier,
|
||||
async (e: any) => {
|
||||
new Notice(t("protocol_onedrivefull_connect_fail"));
|
||||
new Notice(`${e}`);
|
||||
return; // throw?
|
||||
}
|
||||
);
|
||||
|
||||
if ((rsp as any).error !== undefined) {
|
||||
new Notice(`${JSON.stringify(rsp)}`);
|
||||
throw Error(`${JSON.stringify(rsp)}`);
|
||||
}
|
||||
|
||||
const self = this;
|
||||
setConfigBySuccessfullAuthInplaceOnedriveFull(
|
||||
this.settings.onedrivefull,
|
||||
rsp as AccessCodeResponseSuccessfulTypeOnedriveFull,
|
||||
() => self.saveSettings()
|
||||
);
|
||||
|
||||
const client = getClient(
|
||||
this.settings,
|
||||
this.app.vault.getName(),
|
||||
() => self.saveSettings()
|
||||
);
|
||||
this.settings.onedrivefull.username =
|
||||
await client.getUserDisplayName();
|
||||
await this.saveSettings();
|
||||
|
||||
this.oauth2Info.verifier = ""; // reset it
|
||||
this.oauth2Info.helperModal?.close(); // close it
|
||||
this.oauth2Info.helperModal = undefined;
|
||||
|
||||
this.oauth2Info.authDiv?.toggleClass(
|
||||
"onedrivefull-auth-button-hide",
|
||||
this.settings.onedrivefull.username !== ""
|
||||
);
|
||||
this.oauth2Info.authDiv = undefined;
|
||||
|
||||
this.oauth2Info.revokeAuthSetting?.setDesc(
|
||||
t("protocol_onedrivefull_connect_succ_revoke", {
|
||||
username: this.settings.onedrivefull.username,
|
||||
})
|
||||
);
|
||||
this.oauth2Info.revokeAuthSetting = undefined;
|
||||
this.oauth2Info.revokeDiv?.toggleClass(
|
||||
"onedrivefull-revoke-auth-button-hide",
|
||||
this.settings.onedrivefull.username === ""
|
||||
);
|
||||
this.oauth2Info.revokeDiv = undefined;
|
||||
} else {
|
||||
new Notice(t("protocol_onedrivefull_connect_fail"));
|
||||
throw Error(
|
||||
t("protocol_onedrivefull_connect_unknown", {
|
||||
params: JSON.stringify(inputParams),
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
this.registerObsidianProtocolHandler(
|
||||
COMMAND_CALLBACK_PRO,
|
||||
async (inputParams) => {
|
||||
@@ -1243,12 +1336,14 @@ export default class RemotelySavePlugin extends Plugin {
|
||||
cloneDeep(DEFAULT_SETTINGS),
|
||||
messyConfigToNormal(await this.loadData())
|
||||
);
|
||||
|
||||
if (this.settings.dropbox.clientID === "") {
|
||||
this.settings.dropbox.clientID = DEFAULT_SETTINGS.dropbox.clientID;
|
||||
}
|
||||
if (this.settings.dropbox.remoteBaseDir === undefined) {
|
||||
this.settings.dropbox.remoteBaseDir = "";
|
||||
}
|
||||
|
||||
if (this.settings.onedrive.clientID === "") {
|
||||
this.settings.onedrive.clientID = DEFAULT_SETTINGS.onedrive.clientID;
|
||||
}
|
||||
@@ -1261,6 +1356,14 @@ export default class RemotelySavePlugin extends Plugin {
|
||||
if (this.settings.onedrive.emptyFile === undefined) {
|
||||
this.settings.onedrive.emptyFile = "skip";
|
||||
}
|
||||
if (this.settings.onedrive.kind === undefined) {
|
||||
this.settings.onedrive.kind = "onedrive";
|
||||
}
|
||||
|
||||
if (this.settings.onedrivefull === undefined) {
|
||||
this.settings.onedrivefull = DEFAULT_ONEDRIVEFULL_CONFIG;
|
||||
}
|
||||
|
||||
if (this.settings.webdav.manualRecursive === undefined) {
|
||||
this.settings.webdav.manualRecursive = true;
|
||||
}
|
||||
@@ -1454,6 +1557,16 @@ export default class RemotelySavePlugin extends Plugin {
|
||||
needSave = true;
|
||||
}
|
||||
|
||||
let onedriveFullExpired = false;
|
||||
if (
|
||||
this.settings.onedrivefull.refreshToken !== "" &&
|
||||
current >= this.settings!.onedrivefull!.credentialsShouldBeDeletedAtTime!
|
||||
) {
|
||||
onedriveFullExpired = true;
|
||||
this.settings.onedrivefull = cloneDeep(DEFAULT_ONEDRIVEFULL_CONFIG);
|
||||
needSave = true;
|
||||
}
|
||||
|
||||
let googleDriveExpired = false;
|
||||
if (
|
||||
this.settings.googledrive.refreshToken !== "" &&
|
||||
@@ -1522,7 +1635,13 @@ export default class RemotelySavePlugin extends Plugin {
|
||||
}
|
||||
if (onedriveExpired) {
|
||||
new Notice(
|
||||
`${this.manifest.name}: You haven't manually auth OneDrive for many days, you need to re-auth it again.`,
|
||||
`${this.manifest.name}: You haven't manually auth OneDrive (App Folder) for many days, you need to re-auth it again.`,
|
||||
6000
|
||||
);
|
||||
}
|
||||
if (onedriveFullExpired) {
|
||||
new Notice(
|
||||
`${this.manifest.name}: You haven't manually auth OneDrive (Full) for many days, you need to re-auth it again.`,
|
||||
6000
|
||||
);
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ import { generateAzureBlobStorageSettingsPart } from "../pro/src/settingsAzureBl
|
||||
import { generateBoxSettingsPart } from "../pro/src/settingsBox";
|
||||
import { generateGoogleDriveSettingsPart } from "../pro/src/settingsGoogleDrive";
|
||||
import { generateKoofrSettingsPart } from "../pro/src/settingsKoofr";
|
||||
import { generateOnedriveFullSettingsPart } from "../pro/src/settingsOnedriveFull";
|
||||
import { generatePCloudSettingsPart } from "../pro/src/settingsPCloud";
|
||||
import { generateProSettingsPart } from "../pro/src/settingsPro";
|
||||
import { generateYandexDiskSettingsPart } from "../pro/src/settingsYandexDisk";
|
||||
@@ -1815,6 +1816,22 @@ export class RemotelySaveSettingTab extends PluginSettingTab {
|
||||
});
|
||||
});
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// below for Onedrive (Full)
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
const {
|
||||
onedriveFullDiv,
|
||||
onedriveFullAllowedToUsedDiv,
|
||||
onedriveFullNotShowUpHintSetting,
|
||||
} = generateOnedriveFullSettingsPart(
|
||||
containerEl,
|
||||
t,
|
||||
this.app,
|
||||
this.plugin,
|
||||
() => this.plugin.saveSettings()
|
||||
);
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// below for googledrive
|
||||
//////////////////////////////////////////////////
|
||||
@@ -1904,6 +1921,10 @@ export class RemotelySaveSettingTab extends PluginSettingTab {
|
||||
dropdown.addOption("dropbox", t("settings_chooseservice_dropbox"));
|
||||
dropdown.addOption("webdav", t("settings_chooseservice_webdav"));
|
||||
dropdown.addOption("onedrive", t("settings_chooseservice_onedrive"));
|
||||
dropdown.addOption(
|
||||
"onedrivefull",
|
||||
t("settings_chooseservice_onedrivefull")
|
||||
);
|
||||
dropdown.addOption("webdis", t("settings_chooseservice_webdis"));
|
||||
dropdown.addOption(
|
||||
"googledrive",
|
||||
@@ -1937,6 +1958,10 @@ export class RemotelySaveSettingTab extends PluginSettingTab {
|
||||
"onedrive-hide",
|
||||
this.plugin.settings.serviceType !== "onedrive"
|
||||
);
|
||||
onedriveFullDiv.toggleClass(
|
||||
"onedrivefull-hide",
|
||||
this.plugin.settings.serviceType !== "onedrivefull"
|
||||
);
|
||||
webdavDiv.toggleClass(
|
||||
"webdav-hide",
|
||||
this.plugin.settings.serviceType !== "webdav"
|
||||
@@ -2519,6 +2544,16 @@ export class RemotelySaveSettingTab extends PluginSettingTab {
|
||||
).open();
|
||||
});
|
||||
})
|
||||
.addButton(async (button) => {
|
||||
button.setButtonText(t("settings_export_onedrivefull_button"));
|
||||
button.onClick(async () => {
|
||||
new ExportSettingsQrCodeModal(
|
||||
this.app,
|
||||
this.plugin,
|
||||
"onedrivefull"
|
||||
).open();
|
||||
});
|
||||
})
|
||||
.addButton(async (button) => {
|
||||
button.setButtonText(t("settings_export_webdav_button"));
|
||||
button.onClick(async () => {
|
||||
@@ -2643,6 +2678,8 @@ export class RemotelySaveSettingTab extends PluginSettingTab {
|
||||
this.app,
|
||||
this.plugin,
|
||||
() => this.plugin.saveSettings(),
|
||||
onedriveFullAllowedToUsedDiv,
|
||||
onedriveFullNotShowUpHintSetting,
|
||||
googleDriveAllowedToUsedDiv,
|
||||
googleDriveNotShowUpHintSetting,
|
||||
boxAllowedToUsedDiv,
|
||||
|
||||
Reference in New Issue
Block a user