mirror of
https://github.com/koodo-reader/koodo-reader.git
synced 2026-06-19 05:11:09 -04:00
feat: add Yandex Disk support and update drive configurations
- Added Yandex Disk as a supported drive option in ImportDialog and SyncSetting components. - Updated driveList to include Yandex Disk with appropriate configurations. - Reorganized driveList entries for better clarity and consistency. - Increased timeout duration for third-party requests from 6 seconds to 10 seconds in request utilities.
This commit is contained in:
2
src/assets/lib/kookit-extra-browser.min.js
vendored
2
src/assets/lib/kookit-extra-browser.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
src/assets/lib/kookit.min.js
vendored
2
src/assets/lib/kookit.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -383,6 +383,7 @@ class ImportDialog extends React.Component<
|
||||
let settingDrive = item.value;
|
||||
if (
|
||||
settingDrive === "dropbox" ||
|
||||
settingDrive === "yandex" ||
|
||||
settingDrive === "yiyiwu" ||
|
||||
settingDrive === "dubox" ||
|
||||
settingDrive === "google" ||
|
||||
|
||||
@@ -8,96 +8,6 @@ export const driveList = [
|
||||
scoped: false,
|
||||
isCNAvailable: true,
|
||||
},
|
||||
{
|
||||
label: "Dropbox",
|
||||
value: "dropbox",
|
||||
icon: "icon-dropbox",
|
||||
isPro: true,
|
||||
support: ["desktop", "browser", "phone"],
|
||||
scoped: true,
|
||||
isCNAvailable: false,
|
||||
},
|
||||
{
|
||||
label: "Dubox",
|
||||
value: "dubox",
|
||||
icon: "icon-dubox",
|
||||
isPro: true,
|
||||
support: ["desktop", "phone"],
|
||||
scoped: false,
|
||||
isCNAvailable: true,
|
||||
},
|
||||
{
|
||||
label: "115 Yun",
|
||||
value: "yiyiwu",
|
||||
icon: "icon-yiyiwu",
|
||||
isPro: true,
|
||||
support: ["desktop", "phone"],
|
||||
scoped: false,
|
||||
isCNAvailable: true,
|
||||
},
|
||||
{
|
||||
label: "OneDrive",
|
||||
value: "microsoft",
|
||||
icon: "icon-onedrive",
|
||||
isPro: true,
|
||||
support: ["desktop", "browser", "phone"],
|
||||
scoped: true,
|
||||
isCNAvailable: true,
|
||||
},
|
||||
{
|
||||
label: "Google Drive",
|
||||
value: "google",
|
||||
icon: "icon-googledrive",
|
||||
isPro: true,
|
||||
support: ["desktop", "browser", "phone"],
|
||||
scoped: false,
|
||||
isCNAvailable: false,
|
||||
},
|
||||
{
|
||||
label: "MEGA",
|
||||
value: "mega",
|
||||
icon: "icon-mega",
|
||||
isPro: true,
|
||||
support: ["desktop", "browser"],
|
||||
scoped: false,
|
||||
isCNAvailable: false,
|
||||
},
|
||||
{
|
||||
label: "Box",
|
||||
value: "boxnet",
|
||||
icon: "icon-box",
|
||||
isPro: true,
|
||||
support: ["desktop", "browser", "phone"],
|
||||
scoped: false,
|
||||
isCNAvailable: false,
|
||||
},
|
||||
{
|
||||
label: "pCloud",
|
||||
value: "pcloud",
|
||||
icon: "icon-pcloud",
|
||||
isPro: true,
|
||||
support: ["desktop", "phone"],
|
||||
scoped: true,
|
||||
isCNAvailable: false,
|
||||
},
|
||||
{
|
||||
label: "Aliyun Drive",
|
||||
value: "adrive",
|
||||
icon: "icon-adrive",
|
||||
isPro: true,
|
||||
support: ["desktop", "phone"],
|
||||
scoped: false,
|
||||
isCNAvailable: true,
|
||||
},
|
||||
{
|
||||
label: "OneDrive (full access)",
|
||||
value: "microsoft_exp",
|
||||
icon: "icon-onedrive",
|
||||
isPro: true,
|
||||
support: ["desktop", "browser", "phone"],
|
||||
scoped: false,
|
||||
isCNAvailable: true,
|
||||
},
|
||||
{
|
||||
label: "S3 Compatible",
|
||||
value: "s3compatible",
|
||||
@@ -116,6 +26,111 @@ export const driveList = [
|
||||
scoped: true,
|
||||
isCNAvailable: true,
|
||||
},
|
||||
{
|
||||
label: "OneDrive",
|
||||
value: "microsoft",
|
||||
icon: "icon-onedrive",
|
||||
isPro: true,
|
||||
support: ["desktop", "browser", "phone"],
|
||||
scoped: true,
|
||||
isCNAvailable: true,
|
||||
},
|
||||
{
|
||||
label: "Google Drive",
|
||||
value: "google",
|
||||
icon: "icon-googledrive",
|
||||
isPro: true,
|
||||
support: ["desktop", "browser", "phone"],
|
||||
scoped: false,
|
||||
isCNAvailable: false,
|
||||
},
|
||||
{
|
||||
label: "Dropbox",
|
||||
value: "dropbox",
|
||||
icon: "icon-dropbox",
|
||||
isPro: true,
|
||||
support: ["desktop", "browser", "phone"],
|
||||
scoped: true,
|
||||
isCNAvailable: false,
|
||||
},
|
||||
|
||||
{
|
||||
label: "Dubox",
|
||||
value: "dubox",
|
||||
icon: "icon-dubox",
|
||||
isPro: true,
|
||||
support: ["desktop", "phone"],
|
||||
scoped: false,
|
||||
isCNAvailable: true,
|
||||
},
|
||||
|
||||
{
|
||||
label: "Box",
|
||||
value: "boxnet",
|
||||
icon: "icon-box",
|
||||
isPro: true,
|
||||
support: ["desktop", "browser", "phone"],
|
||||
scoped: false,
|
||||
isCNAvailable: false,
|
||||
},
|
||||
|
||||
{
|
||||
label: "MEGA",
|
||||
value: "mega",
|
||||
icon: "icon-mega",
|
||||
isPro: true,
|
||||
support: ["desktop", "browser"],
|
||||
scoped: false,
|
||||
isCNAvailable: false,
|
||||
},
|
||||
{
|
||||
label: "Aliyun Drive",
|
||||
value: "adrive",
|
||||
icon: "icon-adrive",
|
||||
isPro: true,
|
||||
support: ["desktop", "phone"],
|
||||
scoped: false,
|
||||
isCNAvailable: true,
|
||||
},
|
||||
{
|
||||
label: "Yandex Disk",
|
||||
value: "yandex",
|
||||
icon: "icon-yandex",
|
||||
isPro: true,
|
||||
support: ["desktop", "browser", "phone"],
|
||||
scoped: false,
|
||||
isCNAvailable: false,
|
||||
},
|
||||
{
|
||||
label: "115 Yun",
|
||||
value: "yiyiwu",
|
||||
icon: "icon-yiyiwu",
|
||||
isPro: true,
|
||||
support: ["desktop", "phone"],
|
||||
scoped: false,
|
||||
isCNAvailable: true,
|
||||
},
|
||||
|
||||
{
|
||||
label: "pCloud",
|
||||
value: "pcloud",
|
||||
icon: "icon-pcloud",
|
||||
isPro: true,
|
||||
support: ["desktop", "phone"],
|
||||
scoped: true,
|
||||
isCNAvailable: false,
|
||||
},
|
||||
|
||||
{
|
||||
label: "OneDrive (full access)",
|
||||
value: "microsoft_exp",
|
||||
icon: "icon-onedrive",
|
||||
isPro: true,
|
||||
support: ["desktop", "browser", "phone"],
|
||||
scoped: false,
|
||||
isCNAvailable: true,
|
||||
},
|
||||
|
||||
{
|
||||
label: "FTP",
|
||||
value: "ftp",
|
||||
@@ -369,6 +384,14 @@ export const driveInputConfig: DriveInputConfig = {
|
||||
required: true,
|
||||
},
|
||||
],
|
||||
yandex: [
|
||||
{
|
||||
label: "Token",
|
||||
value: "token",
|
||||
type: "text",
|
||||
required: true,
|
||||
},
|
||||
],
|
||||
dubox: [
|
||||
{
|
||||
label: "Token",
|
||||
|
||||
@@ -96,6 +96,7 @@ class SyncSetting extends React.Component<SettingInfoProps, SettingInfoState> {
|
||||
let settingDrive = targetDrive;
|
||||
if (
|
||||
settingDrive === "dropbox" ||
|
||||
settingDrive === "yandex" ||
|
||||
settingDrive === "dubox" ||
|
||||
settingDrive === "yiyiwu" ||
|
||||
settingDrive === "google" ||
|
||||
@@ -444,6 +445,7 @@ class SyncSetting extends React.Component<SettingInfoProps, SettingInfoState> {
|
||||
</div>
|
||||
{(this.props.settingDrive === "dropbox" ||
|
||||
this.props.settingDrive === "dubox" ||
|
||||
this.props.settingDrive === "yandex" ||
|
||||
this.props.settingDrive === "yiyiwu" ||
|
||||
this.props.settingDrive === "google" ||
|
||||
this.props.settingDrive === "boxnet" ||
|
||||
|
||||
@@ -37,7 +37,7 @@ export const onSyncCallback = async (service: string, authCode: string) => {
|
||||
);
|
||||
return;
|
||||
}
|
||||
}, 6000);
|
||||
}, 10000);
|
||||
let result = await syncUtil.authToken(authCode);
|
||||
clearTimeout(timer);
|
||||
if (!result.refresh_token) {
|
||||
@@ -100,7 +100,7 @@ export const encryptToken = async (service: string, config: any) => {
|
||||
);
|
||||
return;
|
||||
}
|
||||
}, 6000);
|
||||
}, 10000);
|
||||
let response = await thirdpartyRequest.encryptToken({
|
||||
token: syncToken,
|
||||
});
|
||||
@@ -148,7 +148,7 @@ export const decryptToken = async (service: string) => {
|
||||
);
|
||||
return;
|
||||
}
|
||||
}, 6000);
|
||||
}, 10000);
|
||||
let encryptedToken = await TokenService.getToken(service + "_token");
|
||||
clearTimeout(timer);
|
||||
if (!encryptedToken || encryptedToken === "{}") {
|
||||
|
||||
@@ -32,7 +32,7 @@ export const loginRegister = async (service: string, code: string) => {
|
||||
);
|
||||
return;
|
||||
}
|
||||
}, 6000);
|
||||
}, 10000);
|
||||
let response = await userRequest.loginRegister({
|
||||
code,
|
||||
provider: service,
|
||||
|
||||
Reference in New Issue
Block a user