Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0802767726 | ||
|
|
be4a2d3271 | ||
|
|
7ca2d19255 | ||
|
|
ff765d5ae7 | ||
|
|
bdbf0b1484 | ||
|
|
7497b5fae7 | ||
|
|
408acb6230 | ||
|
|
d9cab7b1ff | ||
|
|
5e53967e01 | ||
|
|
fb9f4a67b4 |
@@ -100,6 +100,8 @@ Additionally, the plugin author may occasionally visit Obsidian official forum a
|
|||||||
### webdav
|
### webdav
|
||||||
|
|
||||||
- Tutorials / Examples:
|
- Tutorials / Examples:
|
||||||
|
- [Nextcloud](./docs/remote_services/webdav_nextcloud/README.md)
|
||||||
|
- [The Good Cloud](./docs/remote_services/webdav_thegoodcloud/README.md)
|
||||||
- [ownCloud](./docs/remote_services/webdav_owncloud/README.md)
|
- [ownCloud](./docs/remote_services/webdav_owncloud/README.md)
|
||||||
- [InfiniCloud](./docs/remote_services/webdav_infinicloud_teracloud/README.md)
|
- [InfiniCloud](./docs/remote_services/webdav_infinicloud_teracloud/README.md)
|
||||||
- [Synology webdav server](./docs/remote_services/webdav_synology_webdav_server/README.md) | [群晖 webdav server](./docs/remote_services/webdav_synology_webdav_server/README.zh-cn.md)
|
- [Synology webdav server](./docs/remote_services/webdav_synology_webdav_server/README.md) | [群晖 webdav server](./docs/remote_services/webdav_synology_webdav_server/README.zh-cn.md)
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Nextcloud
|
||||||
|
|
||||||
|
## Link
|
||||||
|
|
||||||
|
<https://nextcloud.com/>
|
||||||
|
|
||||||
|
## Steps
|
||||||
|
|
||||||
|
1. Install, or find a hosted version.
|
||||||
|
* The docker version <https://github.com/nextcloud/docker> for internal network, and [Caddy as reverse proxy](https://caddyserver.com/docs/quick-starts/reverse-proxy) (for https), are personally recommended.
|
||||||
|
* If you find installing Nextcloud by yourselves is difficult, you can find some "Nextcloud's trusted, certified providers" on [Nextcloud Sign up page](https://nextcloud.com/sign-up/); For example, [The Good Cloud](https://thegood.cloud/) there generously provides 2 GB free stoarage space.
|
||||||
|
* Remotely Save is tested to be working with the docker version and The Good Cloud.
|
||||||
|
2. Go to Nextcloud's settings. Find the webdav url (something like `https://cloud.example.com/remote.php/dav/files/USERNAME`). Use this (without tailing slash), and your account and your password, in Remotely Save.
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
# The Good Cloud
|
||||||
|
|
||||||
|
## Link
|
||||||
|
|
||||||
|
<https://thegood.cloud/>
|
||||||
|
|
||||||
|
## Steps
|
||||||
|
|
||||||
|
It's a hosted version of Nextcloud providing 2GB free spaces. See [NextCloud](../webdav_nextcloud/README.md) for more instructions.
|
||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"id": "remotely-save",
|
"id": "remotely-save",
|
||||||
"name": "Remotely Save",
|
"name": "Remotely Save",
|
||||||
"version": "0.4.23",
|
"version": "0.4.25",
|
||||||
"minAppVersion": "0.13.21",
|
"minAppVersion": "0.13.21",
|
||||||
"description": "Yet another unofficial plugin allowing users to synchronize notes between local device and the cloud service.",
|
"description": "Yet another unofficial plugin allowing users to synchronize notes between local device and the cloud service.",
|
||||||
"author": "fyears",
|
"author": "fyears",
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"id": "remotely-save",
|
"id": "remotely-save",
|
||||||
"name": "Remotely Save",
|
"name": "Remotely Save",
|
||||||
"version": "0.4.23",
|
"version": "0.4.25",
|
||||||
"minAppVersion": "0.13.21",
|
"minAppVersion": "0.13.21",
|
||||||
"description": "Yet another unofficial plugin allowing users to synchronize notes between local device and the cloud service.",
|
"description": "Yet another unofficial plugin allowing users to synchronize notes between local device and the cloud service.",
|
||||||
"author": "fyears",
|
"author": "fyears",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "remotely-save",
|
"name": "remotely-save",
|
||||||
"version": "0.4.23",
|
"version": "0.4.25",
|
||||||
"description": "This is yet another sync plugin for Obsidian app.",
|
"description": "This is yet another sync plugin for Obsidian app.",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev2": "node esbuild.config.mjs --watch",
|
"dev2": "node esbuild.config.mjs --watch",
|
||||||
|
|||||||
+7
-1
@@ -106,7 +106,13 @@ export type SyncDirectionType =
|
|||||||
|
|
||||||
export type CipherMethodType = "rclone-base64" | "openssl-base64" | "unknown";
|
export type CipherMethodType = "rclone-base64" | "openssl-base64" | "unknown";
|
||||||
|
|
||||||
export type QRExportType = "all_but_oauth2" | "dropbox" | "onedrive";
|
export type QRExportType =
|
||||||
|
| "basic_and_advanced"
|
||||||
|
| "s3"
|
||||||
|
| "dropbox"
|
||||||
|
| "onedrive"
|
||||||
|
| "webdav"
|
||||||
|
| "webdis";
|
||||||
|
|
||||||
export interface ProfilerConfig {
|
export interface ProfilerConfig {
|
||||||
enablePrinting?: boolean;
|
enablePrinting?: boolean;
|
||||||
|
|||||||
+3
-1
@@ -87,7 +87,9 @@ export class FakeFsEncrypt extends FakeFs {
|
|||||||
this.cacheMapOrigToEnc = {};
|
this.cacheMapOrigToEnc = {};
|
||||||
this.hasCacheMap = false;
|
this.hasCacheMap = false;
|
||||||
|
|
||||||
this.kind = `encrypt(${this.innerFs.kind},${method})`;
|
this.kind = `encrypt(${this.innerFs.kind},${
|
||||||
|
this.password !== "" ? method : "no password"
|
||||||
|
})`;
|
||||||
|
|
||||||
if (method === "rclone-base64") {
|
if (method === "rclone-base64") {
|
||||||
this.cipherRClone = new rclone.CipherRclone(password, 5);
|
this.cipherRClone = new rclone.CipherRclone(password, 5);
|
||||||
|
|||||||
+10
-1
@@ -324,8 +324,17 @@ export class FakeFsWebdav extends FakeFs {
|
|||||||
await this._checkPartialSupport();
|
await this._checkPartialSupport();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <server>/remote.php/dav/files/<userid>
|
||||||
|
* => <server>/remote.php/dav/uploads/<userid>
|
||||||
|
*/
|
||||||
_getnextcloudUploadServerAddress = () => {
|
_getnextcloudUploadServerAddress = () => {
|
||||||
const s = this.webdavConfig.address.split("/");
|
let k = this.webdavConfig.address;
|
||||||
|
if (k.endsWith('/')) {
|
||||||
|
// no tailing slash
|
||||||
|
k = k.substring(0, k.length-1);
|
||||||
|
}
|
||||||
|
const s = k.split("/");
|
||||||
if (
|
if (
|
||||||
s.length > 3 &&
|
s.length > 3 &&
|
||||||
s[s.length - 3] === "dav" &&
|
s[s.length - 3] === "dav" &&
|
||||||
|
|||||||
+10
-1
@@ -17,14 +17,23 @@ export const exportQrCodeUri = async (
|
|||||||
) => {
|
) => {
|
||||||
let settings2: Partial<RemotelySavePluginSettings> = {};
|
let settings2: Partial<RemotelySavePluginSettings> = {};
|
||||||
|
|
||||||
if (exportFields === "all_but_oauth2") {
|
if (exportFields === "basic_and_advanced") {
|
||||||
settings2 = cloneDeep(settings);
|
settings2 = cloneDeep(settings);
|
||||||
|
delete settings2.s3;
|
||||||
delete settings2.dropbox;
|
delete settings2.dropbox;
|
||||||
delete settings2.onedrive;
|
delete settings2.onedrive;
|
||||||
|
delete settings2.webdav;
|
||||||
|
delete settings2.webdis;
|
||||||
|
} else if (exportFields === "s3") {
|
||||||
|
settings2 = { s3: cloneDeep(settings.s3) };
|
||||||
} else if (exportFields === "dropbox") {
|
} else if (exportFields === "dropbox") {
|
||||||
settings2 = { dropbox: cloneDeep(settings.dropbox) };
|
settings2 = { dropbox: cloneDeep(settings.dropbox) };
|
||||||
} else if (exportFields === "onedrive") {
|
} else if (exportFields === "onedrive") {
|
||||||
settings2 = { onedrive: getShrinkedSettings(settings.onedrive) };
|
settings2 = { onedrive: getShrinkedSettings(settings.onedrive) };
|
||||||
|
} else if (exportFields === "webdav") {
|
||||||
|
settings2 = { webdav: cloneDeep(settings.webdav) };
|
||||||
|
} else if (exportFields === "webdis") {
|
||||||
|
settings2 = { webdis: cloneDeep(settings.webdis) };
|
||||||
}
|
}
|
||||||
|
|
||||||
delete settings2.vaultRandomID;
|
delete settings2.vaultRandomID;
|
||||||
|
|||||||
+7
-1
@@ -289,6 +289,9 @@
|
|||||||
"settings_protectmodifypercentage_000_desc": "0 (always block)",
|
"settings_protectmodifypercentage_000_desc": "0 (always block)",
|
||||||
"settings_protectmodifypercentage_050_desc": "50 (default)",
|
"settings_protectmodifypercentage_050_desc": "50 (default)",
|
||||||
"settings_protectmodifypercentage_100_desc": "100 (disable the protection)",
|
"settings_protectmodifypercentage_100_desc": "100 (disable the protection)",
|
||||||
|
"settings_protectmodifypercentage_custom_desc": "custom",
|
||||||
|
"settings_protectmodifypercentage_customfield": "Custom Abort Sync If Modification Above Percentage",
|
||||||
|
"settings_protectmodifypercentage_customfield_desc": "You need to enter a number between 0 (inclusive) and 100 (inclusive). Float number is also allowed.",
|
||||||
"setting_syncdirection": "Sync Direction",
|
"setting_syncdirection": "Sync Direction",
|
||||||
"setting_syncdirection_desc": "Which direction should the plugin sync to? Please be aware that only CHANGED files (based on time and size) are synced regardless any option.",
|
"setting_syncdirection_desc": "Which direction should the plugin sync to? Please be aware that only CHANGED files (based on time and size) are synced regardless any option.",
|
||||||
"setting_syncdirection_bidirectional_desc": "Bidirectional (default)",
|
"setting_syncdirection_bidirectional_desc": "Bidirectional (default)",
|
||||||
@@ -299,9 +302,12 @@
|
|||||||
"settings_importexport": "Import and Export Partial Settings",
|
"settings_importexport": "Import and Export Partial Settings",
|
||||||
"settings_export": "Export",
|
"settings_export": "Export",
|
||||||
"settings_export_desc": "Export settings by generating a QR code or URI.",
|
"settings_export_desc": "Export settings by generating a QR code or URI.",
|
||||||
"settings_export_all_but_oauth2_button": "Export Non-Oauth2 Part",
|
"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_dropbox_button": "Export Dropbox Part",
|
||||||
"settings_export_onedrive_button": "Export OneDrive Part",
|
"settings_export_onedrive_button": "Export OneDrive Part",
|
||||||
|
"settings_export_webdav_button": "Export Webdav Part",
|
||||||
|
"settings_export_webdis_button": "Export Webdis Part",
|
||||||
"settings_import": "Import",
|
"settings_import": "Import",
|
||||||
"settings_import_desc": "Paste the exported URI into here and click \"Import\". Or, you can open a camera or scan-qrcode app to scan the QR code.",
|
"settings_import_desc": "Paste the exported URI into here and click \"Import\". Or, you can open a camera or scan-qrcode app to scan the QR code.",
|
||||||
"settings_import_button": "Import",
|
"settings_import_button": "Import",
|
||||||
|
|||||||
@@ -288,6 +288,9 @@
|
|||||||
"settings_protectmodifypercentage_000_desc": "0(总是强制中止)",
|
"settings_protectmodifypercentage_000_desc": "0(总是强制中止)",
|
||||||
"settings_protectmodifypercentage_050_desc": "50(默认值)",
|
"settings_protectmodifypercentage_050_desc": "50(默认值)",
|
||||||
"settings_protectmodifypercentage_100_desc": "100(去除此保护)",
|
"settings_protectmodifypercentage_100_desc": "100(去除此保护)",
|
||||||
|
"settings_protectmodifypercentage_custom_desc": "自定义",
|
||||||
|
"settings_protectmodifypercentage_customfield": "如果修改超过自定义百分比则中止同步",
|
||||||
|
"settings_protectmodifypercentage_customfield_desc": "您需要输入 0(含)~ 100(含)的数字。小数也是可以的。",
|
||||||
"setting_syncdirection": "同步方向",
|
"setting_syncdirection": "同步方向",
|
||||||
"setting_syncdirection_desc": "插件应该向哪里同步?注意每个选项都是只有修改了的文件(基于修改时间和大小判断)才会触发同步动作。",
|
"setting_syncdirection_desc": "插件应该向哪里同步?注意每个选项都是只有修改了的文件(基于修改时间和大小判断)才会触发同步动作。",
|
||||||
"setting_syncdirection_bidirectional_desc": "双向同步(默认)",
|
"setting_syncdirection_bidirectional_desc": "双向同步(默认)",
|
||||||
@@ -298,9 +301,12 @@
|
|||||||
"settings_importexport": "导入导出部分设置",
|
"settings_importexport": "导入导出部分设置",
|
||||||
"settings_export": "导出",
|
"settings_export": "导出",
|
||||||
"settings_export_desc": "用 QR 码或 URI 导出设置信息。",
|
"settings_export_desc": "用 QR 码或 URI 导出设置信息。",
|
||||||
"settings_export_all_but_oauth2_button": "导出非 Oauth2 部分",
|
"settings_export_basic_and_advanced_button": "导出基本或进阶设置",
|
||||||
|
"settings_export_s3_button": "导出 S3 部分",
|
||||||
"settings_export_dropbox_button": "导出 Dropbox 部分",
|
"settings_export_dropbox_button": "导出 Dropbox 部分",
|
||||||
"settings_export_onedrive_button": "导出 OneDrive 部分",
|
"settings_export_onedrive_button": "导出 OneDrive 部分",
|
||||||
|
"settings_export_webdav_button": "导出 Webdav 部分",
|
||||||
|
"settings_export_webdis_button": "导出 Webdis 部分",
|
||||||
"settings_import": "导入",
|
"settings_import": "导入",
|
||||||
"settings_import_desc": "粘贴之前导出的 URI 到这里然后点击“导入”。或,使用拍摄 app 或者扫描 QR 码的 app,来扫描对应的 QR 码。",
|
"settings_import_desc": "粘贴之前导出的 URI 到这里然后点击“导入”。或,使用拍摄 app 或者扫描 QR 码的 app,来扫描对应的 QR 码。",
|
||||||
"settings_import_button": "导入",
|
"settings_import_button": "导入",
|
||||||
|
|||||||
@@ -287,6 +287,9 @@
|
|||||||
"settings_protectmodifypercentage_000_desc": "0(總是強制中止)",
|
"settings_protectmodifypercentage_000_desc": "0(總是強制中止)",
|
||||||
"settings_protectmodifypercentage_050_desc": "50(預設值)",
|
"settings_protectmodifypercentage_050_desc": "50(預設值)",
|
||||||
"settings_protectmodifypercentage_100_desc": "100(去除此保護)",
|
"settings_protectmodifypercentage_100_desc": "100(去除此保護)",
|
||||||
|
"settings_protectmodifypercentage_custom_desc": "自定義",
|
||||||
|
"settings_protectmodifypercentage_customfield": "如果修改超過自定義百分比則中止同步",
|
||||||
|
"settings_protectmodifypercentage_customfield_desc": "您需要輸入 0(含)~ 100(含)的數字。小數也是可以的。",
|
||||||
"setting_syncdirection": "同步方向",
|
"setting_syncdirection": "同步方向",
|
||||||
"setting_syncdirection_desc": "外掛應該向哪裡同步?注意每個選項都是隻有修改了的檔案(基於修改時間和大小判斷)才會觸發同步動作。",
|
"setting_syncdirection_desc": "外掛應該向哪裡同步?注意每個選項都是隻有修改了的檔案(基於修改時間和大小判斷)才會觸發同步動作。",
|
||||||
"setting_syncdirection_bidirectional_desc": "雙向同步(預設)",
|
"setting_syncdirection_bidirectional_desc": "雙向同步(預設)",
|
||||||
@@ -297,9 +300,12 @@
|
|||||||
"settings_importexport": "匯入匯出部分設定",
|
"settings_importexport": "匯入匯出部分設定",
|
||||||
"settings_export": "匯出",
|
"settings_export": "匯出",
|
||||||
"settings_export_desc": "用 QR 碼或 URI 匯出設定資訊。",
|
"settings_export_desc": "用 QR 碼或 URI 匯出設定資訊。",
|
||||||
"settings_export_all_but_oauth2_button": "匯出非 Oauth2 部分",
|
"settings_export_basic_and_advanced_button": "匯出基本或進階設定",
|
||||||
|
"settings_export_s3_button": "匯出 S3 部分",
|
||||||
"settings_export_dropbox_button": "匯出 Dropbox 部分",
|
"settings_export_dropbox_button": "匯出 Dropbox 部分",
|
||||||
"settings_export_onedrive_button": "匯出 OneDrive 部分",
|
"settings_export_onedrive_button": "匯出 OneDrive 部分",
|
||||||
|
"settings_export_webdav_button": "匯出 Webdav 部分",
|
||||||
|
"settings_export_webdis_button": "匯出 Webdis 部分",
|
||||||
"settings_import": "匯入",
|
"settings_import": "匯入",
|
||||||
"settings_import_desc": "貼上之前匯出的 URI 到這裡然後點選“匯入”。或,使用拍攝 app 或者掃描 QR 碼的 app,來掃描對應的 QR 碼。",
|
"settings_import_desc": "貼上之前匯出的 URI 到這裡然後點選“匯入”。或,使用拍攝 app 或者掃描 QR 碼的 app,來掃描對應的 QR 碼。",
|
||||||
"settings_import_button": "匯入",
|
"settings_import_button": "匯入",
|
||||||
|
|||||||
+1
-1
@@ -345,7 +345,7 @@ export const unixTimeToStr = (x: number | undefined | null) => {
|
|||||||
if (x === undefined || x === null || Number.isNaN(x)) {
|
if (x === undefined || x === null || Number.isNaN(x)) {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
return new Date(x).toISOString();
|
return window.moment(x).format() as string;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+88
-21
@@ -2168,28 +2168,77 @@ export class RemotelySaveSettingTab extends PluginSettingTab {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
new Setting(advDiv)
|
const percentage1 = new Setting(advDiv)
|
||||||
.setName(t("settings_protectmodifypercentage"))
|
.setName(t("settings_protectmodifypercentage"))
|
||||||
.setDesc(t("settings_protectmodifypercentage_desc"))
|
.setDesc(t("settings_protectmodifypercentage_desc"));
|
||||||
.addDropdown((dropdown) => {
|
|
||||||
for (const i of Array.from({ length: 11 }, (x, i) => i * 10)) {
|
const percentage2 = new Setting(advDiv)
|
||||||
let desc = `${i}`;
|
.setName(t("settings_protectmodifypercentage_customfield"))
|
||||||
if (i === 0) {
|
.setDesc(t("settings_protectmodifypercentage_customfield_desc"));
|
||||||
desc = t("settings_protectmodifypercentage_000_desc");
|
if ((this.plugin.settings.protectModifyPercentage ?? 50) % 10 === 0) {
|
||||||
} else if (i === 50) {
|
percentage2.settingEl.addClass("settings-percentage-custom-hide");
|
||||||
desc = t("settings_protectmodifypercentage_050_desc");
|
}
|
||||||
} else if (i === 100) {
|
let percentage2Text: TextComponent | undefined = undefined;
|
||||||
desc = t("settings_protectmodifypercentage_100_desc");
|
percentage2.addText((text) => {
|
||||||
}
|
text.inputEl.type = "number";
|
||||||
dropdown.addOption(`${i}`, desc);
|
percentage2Text = text;
|
||||||
}
|
text
|
||||||
dropdown
|
.setPlaceholder("0 ~ 100")
|
||||||
.setValue(`${this.plugin.settings.protectModifyPercentage ?? 50}`)
|
.setValue(`${this.plugin.settings.protectModifyPercentage ?? 50}`)
|
||||||
.onChange(async (val) => {
|
.onChange(async (val) => {
|
||||||
this.plugin.settings.protectModifyPercentage = Number.parseInt(val);
|
let k = Number.parseFloat(val.trim());
|
||||||
|
if (Number.isNaN(k)) {
|
||||||
|
// do nothing!
|
||||||
|
} else {
|
||||||
|
if (k < 0) {
|
||||||
|
k = 0;
|
||||||
|
} else if (k > 100) {
|
||||||
|
k = 100;
|
||||||
|
}
|
||||||
|
this.plugin.settings.protectModifyPercentage = k;
|
||||||
await this.plugin.saveSettings();
|
await this.plugin.saveSettings();
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
percentage1.addDropdown((dropdown) => {
|
||||||
|
for (const i of Array.from({ length: 11 }, (x, i) => i * 10)) {
|
||||||
|
let desc = `${i}`;
|
||||||
|
if (i === 0) {
|
||||||
|
desc = t("settings_protectmodifypercentage_000_desc");
|
||||||
|
} else if (i === 50) {
|
||||||
|
desc = t("settings_protectmodifypercentage_050_desc");
|
||||||
|
} else if (i === 100) {
|
||||||
|
desc = t("settings_protectmodifypercentage_100_desc");
|
||||||
|
}
|
||||||
|
dropdown.addOption(`${i}`, desc);
|
||||||
|
}
|
||||||
|
dropdown.addOption(
|
||||||
|
"custom",
|
||||||
|
t("settings_protectmodifypercentage_custom_desc")
|
||||||
|
);
|
||||||
|
|
||||||
|
const p = this.plugin.settings.protectModifyPercentage ?? 50;
|
||||||
|
let initVal = "custom";
|
||||||
|
if (p % 10 === 0) {
|
||||||
|
initVal = `${p}`;
|
||||||
|
} else {
|
||||||
|
// show custom
|
||||||
|
percentage2.settingEl.removeClass("settings-percentage-custom");
|
||||||
|
}
|
||||||
|
dropdown.setValue(initVal).onChange(async (val) => {
|
||||||
|
const k = Number.parseInt(val);
|
||||||
|
if (val === "custom" || Number.isNaN(k)) {
|
||||||
|
// do nothing until user changes something in custom field
|
||||||
|
percentage2.settingEl.removeClass("settings-percentage-custom-hide");
|
||||||
|
} else {
|
||||||
|
this.plugin.settings.protectModifyPercentage = k;
|
||||||
|
percentage2.settingEl.addClass("settings-percentage-custom-hide");
|
||||||
|
percentage2Text?.setValue(`${k}`);
|
||||||
|
await this.plugin.saveSettings();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
new Setting(advDiv)
|
new Setting(advDiv)
|
||||||
.setName(t("setting_syncdirection"))
|
.setName(t("setting_syncdirection"))
|
||||||
@@ -2268,15 +2317,21 @@ export class RemotelySaveSettingTab extends PluginSettingTab {
|
|||||||
importExportDivSetting1.settingEl.addClass("setting-need-wrapping");
|
importExportDivSetting1.settingEl.addClass("setting-need-wrapping");
|
||||||
importExportDivSetting1
|
importExportDivSetting1
|
||||||
.addButton(async (button) => {
|
.addButton(async (button) => {
|
||||||
button.setButtonText(t("settings_export_all_but_oauth2_button"));
|
button.setButtonText(t("settings_export_basic_and_advanced_button"));
|
||||||
button.onClick(async () => {
|
button.onClick(async () => {
|
||||||
new ExportSettingsQrCodeModal(
|
new ExportSettingsQrCodeModal(
|
||||||
this.app,
|
this.app,
|
||||||
this.plugin,
|
this.plugin,
|
||||||
"all_but_oauth2"
|
"basic_and_advanced"
|
||||||
).open();
|
).open();
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
.addButton(async (button) => {
|
||||||
|
button.setButtonText(t("settings_export_s3_button"));
|
||||||
|
button.onClick(async () => {
|
||||||
|
new ExportSettingsQrCodeModal(this.app, this.plugin, "s3").open();
|
||||||
|
});
|
||||||
|
})
|
||||||
.addButton(async (button) => {
|
.addButton(async (button) => {
|
||||||
button.setButtonText(t("settings_export_dropbox_button"));
|
button.setButtonText(t("settings_export_dropbox_button"));
|
||||||
button.onClick(async () => {
|
button.onClick(async () => {
|
||||||
@@ -2296,6 +2351,18 @@ export class RemotelySaveSettingTab extends PluginSettingTab {
|
|||||||
"onedrive"
|
"onedrive"
|
||||||
).open();
|
).open();
|
||||||
});
|
});
|
||||||
|
})
|
||||||
|
.addButton(async (button) => {
|
||||||
|
button.setButtonText(t("settings_export_webdav_button"));
|
||||||
|
button.onClick(async () => {
|
||||||
|
new ExportSettingsQrCodeModal(this.app, this.plugin, "webdav").open();
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.addButton(async (button) => {
|
||||||
|
button.setButtonText(t("settings_export_webdis_button"));
|
||||||
|
button.onClick(async () => {
|
||||||
|
new ExportSettingsQrCodeModal(this.app, this.plugin, "webdis").open();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
let importSettingVal = "";
|
let importSettingVal = "";
|
||||||
|
|||||||
+7
-2
@@ -774,12 +774,16 @@ const getSyncPlanInplace = async (
|
|||||||
mixedEntityMappings["/$@meta"] = {
|
mixedEntityMappings["/$@meta"] = {
|
||||||
key: "/$@meta", // don't mess up with the types
|
key: "/$@meta", // don't mess up with the types
|
||||||
sideNotes: {
|
sideNotes: {
|
||||||
version: "20240508 fs version",
|
version: "20240525 fs version",
|
||||||
generateTime: currTime,
|
generateTime: currTime,
|
||||||
generateTimeFmt: currTimeFmt,
|
generateTimeFmt: currTimeFmt,
|
||||||
service: settings.serviceType,
|
service: settings.serviceType,
|
||||||
|
concurrency: settings.concurrency,
|
||||||
hasPassword: settings.password !== "",
|
hasPassword: settings.password !== "",
|
||||||
syncConfigDir: settings.syncConfigDir,
|
syncConfigDir: settings.syncConfigDir,
|
||||||
|
syncUnderscoreItems: settings.syncUnderscoreItems,
|
||||||
|
skipSizeLargerThan: settings.skipSizeLargerThan,
|
||||||
|
protectModifyPercentage: settings.protectModifyPercentage,
|
||||||
conflictAction: conflictAction,
|
conflictAction: conflictAction,
|
||||||
syncDirection: syncDirection,
|
syncDirection: syncDirection,
|
||||||
triggerSource: triggerSource,
|
triggerSource: triggerSource,
|
||||||
@@ -986,7 +990,8 @@ async function copyFile(
|
|||||||
const statsLeft = await left.stat(key);
|
const statsLeft = await left.stat(key);
|
||||||
const content = await left.readFile(key);
|
const content = await left.readFile(key);
|
||||||
|
|
||||||
if (statsLeft.size === undefined) {
|
if (statsLeft.size === undefined || statsLeft.size === 0) {
|
||||||
|
// some weird bugs on android not returning size. just ignore them
|
||||||
statsLeft.size = content.byteLength;
|
statsLeft.size = content.byteLength;
|
||||||
} else {
|
} else {
|
||||||
if (statsLeft.size !== content.byteLength) {
|
if (statsLeft.size !== content.byteLength) {
|
||||||
|
|||||||
@@ -17,6 +17,10 @@
|
|||||||
padding-top: 18px;
|
padding-top: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.settings-percentage-custom-hide {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
.s3-disclaimer {
|
.s3-disclaimer {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user