Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1581cb3822 | ||
|
|
99926adbbd |
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"id": "remotely-save",
|
||||
"name": "Remotely Save",
|
||||
"version": "0.3.12",
|
||||
"version": "0.3.13",
|
||||
"minAppVersion": "0.13.21",
|
||||
"description": "Yet another unofficial plugin allowing users to synchronize notes between local device and the cloud service.",
|
||||
"author": "fyears",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "remotely-save",
|
||||
"version": "0.3.12",
|
||||
"version": "0.3.13",
|
||||
"description": "This is yet another sync plugin for Obsidian app.",
|
||||
"scripts": {
|
||||
"dev2": "node esbuild.config.mjs",
|
||||
|
||||
+1
-1
Submodule src/langs updated: 28730585f8...475d524994
@@ -1,5 +1,11 @@
|
||||
import { Buffer } from "buffer";
|
||||
import { Vault, request, requestUrl, requireApiVersion } from "obsidian";
|
||||
import {
|
||||
Vault,
|
||||
request,
|
||||
requestUrl,
|
||||
requireApiVersion,
|
||||
Platform,
|
||||
} from "obsidian";
|
||||
|
||||
import { Queue } from "@fyears/tsqueue";
|
||||
import chunk from "lodash/chunk";
|
||||
@@ -20,7 +26,7 @@ import type {
|
||||
ResponseDataDetailed,
|
||||
} from "webdav/web";
|
||||
import { getPatcher } from "webdav/web";
|
||||
if (requireApiVersion(API_VER_REQURL)) {
|
||||
if (requireApiVersion(API_VER_REQURL) && !Platform.isAndroidApp) {
|
||||
getPatcher().patch(
|
||||
"request",
|
||||
async (
|
||||
@@ -110,6 +116,7 @@ if (requireApiVersion(API_VER_REQURL)) {
|
||||
// return r;
|
||||
// });
|
||||
import { AuthType, BufferLike, createClient } from "webdav/web";
|
||||
import { Plane } from "lucide";
|
||||
export type { WebDAVClient } from "webdav/web";
|
||||
|
||||
export const DEFAULT_WEBDAV_CONFIG = {
|
||||
|
||||
+20
-15
@@ -1105,6 +1105,9 @@ export class RemotelySaveSettingTab extends PluginSettingTab {
|
||||
this.plugin.settings.serviceType !== "webdav"
|
||||
);
|
||||
|
||||
const webdavReq =
|
||||
requireApiVersion(API_VER_REQURL) && !Platform.isAndroidApp;
|
||||
|
||||
webdavDiv.createEl("h2", { text: t("settings_webdav") });
|
||||
|
||||
webdavDiv.createEl("p", {
|
||||
@@ -1112,7 +1115,17 @@ export class RemotelySaveSettingTab extends PluginSettingTab {
|
||||
cls: "webdav-disclaimer",
|
||||
});
|
||||
|
||||
if (!requireApiVersion(API_VER_REQURL)) {
|
||||
if (!webdavReq) {
|
||||
if (Platform.isAndroidApp) {
|
||||
webdavDiv.createEl("p", {
|
||||
text: t("settings_webdav_cors_android"),
|
||||
});
|
||||
} else {
|
||||
webdavDiv.createEl("p", {
|
||||
text: t("settings_webdav_cors_otheros"),
|
||||
});
|
||||
}
|
||||
|
||||
webdavDiv.createEl("p", {
|
||||
text: t("settings_webdav_cors"),
|
||||
});
|
||||
@@ -1168,15 +1181,12 @@ export class RemotelySaveSettingTab extends PluginSettingTab {
|
||||
.setDesc(t("settings_webdav_auth_desc"))
|
||||
.addDropdown(async (dropdown) => {
|
||||
dropdown.addOption("basic", "basic");
|
||||
if (requireApiVersion(API_VER_REQURL)) {
|
||||
if (webdavReq) {
|
||||
dropdown.addOption("digest", "digest");
|
||||
}
|
||||
|
||||
// new version config, copied to old version, we need to reset it
|
||||
if (
|
||||
!requireApiVersion(API_VER_REQURL) &&
|
||||
this.plugin.settings.webdav.authType !== "basic"
|
||||
) {
|
||||
if (!webdavReq && this.plugin.settings.webdav.authType !== "basic") {
|
||||
this.plugin.settings.webdav.authType = "basic";
|
||||
await this.plugin.saveSettings();
|
||||
}
|
||||
@@ -1249,16 +1259,11 @@ export class RemotelySaveSettingTab extends PluginSettingTab {
|
||||
if (res) {
|
||||
new Notice(t("settings_webdav_connect_succ"));
|
||||
} else {
|
||||
let corsErrMsg = "/CORS";
|
||||
if (requireApiVersion(API_VER_REQURL)) {
|
||||
corsErrMsg = "";
|
||||
if (webdavReq) {
|
||||
new Notice(t("settings_webdav_connect_fail"));
|
||||
} else {
|
||||
new Notice(t("settings_webdav_connect_fail_withcors"));
|
||||
}
|
||||
|
||||
new Notice(
|
||||
t("settings_webdav_connect_fail", {
|
||||
corsErrMsg: corsErrMsg,
|
||||
})
|
||||
);
|
||||
new Notice(errors.msg);
|
||||
}
|
||||
});
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"0.3.2": "0.12.15",
|
||||
"0.3.12": "0.13.21"
|
||||
"0.3.13": "0.13.21"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user