Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/duplicati/duplicati.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMuhammad Abrar <abrar1984@gmail.com>2022-06-13 10:40:29 +0300
committerMuhammad Abrar <abrar1984@gmail.com>2022-06-13 10:40:29 +0300
commit70a60978cb45977105b06b47aabe3a8f7031ee8c (patch)
tree9859fdc4b3cedd1866cbe7be3d9c9de8a6de22ae /Duplicati/Server/webroot
parent713fce2acb69d04c2a67acc17b7ea838dc91acdd (diff)
parentfd0a62eb4fa0d36677760d2f08a45825f95857e6 (diff)
Syncing with upstream
Diffstat (limited to 'Duplicati/Server/webroot')
-rw-r--r--Duplicati/Server/webroot/ngax/scripts/services/EditUriBuiltins.js44
-rw-r--r--Duplicati/Server/webroot/ngax/scripts/services/SystemInfo.js1
-rw-r--r--Duplicati/Server/webroot/ngax/templates/backends/idrive.html13
-rw-r--r--Duplicati/Server/webroot/ngax/templates/backends/jottacloud.html13
4 files changed, 29 insertions, 42 deletions
diff --git a/Duplicati/Server/webroot/ngax/scripts/services/EditUriBuiltins.js b/Duplicati/Server/webroot/ngax/scripts/services/EditUriBuiltins.js
index e8e90ffda..7ec3a522c 100644
--- a/Duplicati/Server/webroot/ngax/scripts/services/EditUriBuiltins.js
+++ b/Duplicati/Server/webroot/ngax/scripts/services/EditUriBuiltins.js
@@ -25,11 +25,12 @@ backupApp.service('EditUriBuiltins', function (AppService, AppUtils, SystemInfo,
EditUriBackendConfig.templates['gcs'] = 'templates/backends/gcs.html';
EditUriBackendConfig.templates['b2'] = 'templates/backends/b2.html';
EditUriBackendConfig.templates['mega'] = 'templates/backends/mega.html';
- EditUriBackendConfig.templates['jottacloud'] = 'templates/backends/jottacloud.html';
+ EditUriBackendConfig.templates['jottacloud'] = 'templates/backends/oauth.html';
+ EditUriBackendConfig.templates['idrive'] = 'templates/backends/idrive.html';
EditUriBackendConfig.templates['box'] = 'templates/backends/oauth.html';
- EditUriBackendConfig.templates['dropbox'] = 'templates/backends/oauth.html';
- EditUriBackendConfig.templates['sia'] = 'templates/backends/sia.html';
- EditUriBackendConfig.templates['storj'] = 'templates/backends/storj.html';
+ EditUriBackendConfig.templates['dropbox'] = 'templates/backends/oauth.html';
+ EditUriBackendConfig.templates['sia'] = 'templates/backends/sia.html';
+ EditUriBackendConfig.templates['storj'] = 'templates/backends/storj.html';
EditUriBackendConfig.templates['tardigrade'] = 'templates/backends/tardigrade.html';
EditUriBackendConfig.templates['rclone'] = 'templates/backends/rclone.html';
EditUriBackendConfig.templates['cos'] = 'templates/backends/cos.html';
@@ -268,6 +269,7 @@ backupApp.service('EditUriBuiltins', function (AppService, AppUtils, SystemInfo,
EditUriBackendConfig.loaders['onedrivev2'] = function() { return this['oauth-base'].apply(this, arguments); };
EditUriBackendConfig.loaders['sharepoint'] = function() { return this['oauth-base'].apply(this, arguments); };
EditUriBackendConfig.loaders['msgroup'] = function() { return this['oauth-base'].apply(this, arguments); };
+ EditUriBackendConfig.loaders['jottacloud'] = function() { return this['oauth-base'].apply(this, arguments); };
EditUriBackendConfig.loaders['box'] = function() { return this['oauth-base'].apply(this, arguments); };
EditUriBackendConfig.loaders['dropbox'] = function() { return this['oauth-base'].apply(this, arguments); };
@@ -422,6 +424,7 @@ backupApp.service('EditUriBuiltins', function (AppService, AppUtils, SystemInfo,
EditUriBackendConfig.parsers['onedrive'] = function() { return this['oauth-base'].apply(this, arguments); };
EditUriBackendConfig.parsers['onedrivev2'] = function() { return this['oauth-base'].apply(this, arguments); };
EditUriBackendConfig.parsers['sharepoint'] = function() { return this['oauth-base'].apply(this, arguments); };
+ EditUriBackendConfig.parsers['jottacloud'] = function() { return this['oauth-base'].apply(this, arguments); };
EditUriBackendConfig.parsers['box'] = function() { return this['oauth-base'].apply(this, arguments); };
EditUriBackendConfig.parsers['dropbox'] = function() { return this['oauth-base'].apply(this, arguments); };
@@ -494,10 +497,6 @@ backupApp.service('EditUriBuiltins', function (AppService, AppUtils, SystemInfo,
EditUriBackendConfig.mergeServerAndPath(scope);
};
- EditUriBackendConfig.parsers['jottacloud'] = function (scope, module, server, port, path, options) {
- EditUriBackendConfig.mergeServerAndPath(scope);
- };
-
EditUriBackendConfig.parsers['rclone'] = function (scope, module, server, port, path, options) {
if (options['--rclone-local-repository'])
scope.rclone_local_repository = options['--rclone-local-repository'];
@@ -655,6 +654,7 @@ backupApp.service('EditUriBuiltins', function (AppService, AppUtils, SystemInfo,
EditUriBackendConfig.builders['onedrivev2'] = function() { return this['oauth-base'].apply(this, arguments); };
EditUriBackendConfig.builders['sharepoint'] = function() { return this['oauth-base'].apply(this, arguments); };
EditUriBackendConfig.builders['msgroup'] = function() { return this['oauth-base'].apply(this, arguments); };
+ EditUriBackendConfig.builders['jottacloud'] = function() { return this['oauth-base'].apply(this, arguments); };
EditUriBackendConfig.builders['box'] = function() { return this['oauth-base'].apply(this, arguments); };
EditUriBackendConfig.builders['dropbox'] = function() { return this['oauth-base'].apply(this, arguments); };
@@ -895,23 +895,6 @@ backupApp.service('EditUriBuiltins', function (AppService, AppUtils, SystemInfo,
}
- EditUriBackendConfig.builders['jottacloud'] = function (scope) {
- var opts = {};
-
- EditUriBackendConfig.merge_in_advanced_options(scope, opts);
-
- // Slightly better error message
- scope.Folder = scope.Path;
-
- var url = AppUtils.format('{0}://{1}{2}',
- scope.Backend.Key,
- scope.Path,
- AppUtils.encodeDictAsUrl(opts)
- );
-
- return url;
- };
-
EditUriBackendConfig.builders['cos'] = function (scope) {
var opts = {
@@ -978,6 +961,7 @@ backupApp.service('EditUriBuiltins', function (AppService, AppUtils, SystemInfo,
EditUriBackendConfig.validaters['googledrive'] = EditUriBackendConfig.validaters['authid-base'];
EditUriBackendConfig.validaters['gcs'] = EditUriBackendConfig.validaters['authid-base'];
+ EditUriBackendConfig.validaters['jottacloud'] = EditUriBackendConfig.validaters['authid-base'];
EditUriBackendConfig.validaters['box'] = EditUriBackendConfig.validaters['authid-base'];
EditUriBackendConfig.validaters['dropbox'] = EditUriBackendConfig.validaters['authid-base'];
EditUriBackendConfig.validaters['onedrive'] = EditUriBackendConfig.validaters['authid-base'];
@@ -1187,16 +1171,6 @@ backupApp.service('EditUriBuiltins', function (AppService, AppUtils, SystemInfo,
continuation();
};
- EditUriBackendConfig.validaters['jottacloud'] = function (scope, continuation) {
- scope.Path = scope.Path || '';
- var res =
- EditUriBackendConfig.require_field(scope, 'Username', gettextCatalog.getString('Username')) &&
- EditUriBackendConfig.require_field(scope, 'Password', gettextCatalog.getString('Password'));
-
- if (res)
- continuation();
- };
-
EditUriBackendConfig.validaters['sia'] = function (scope, continuation) {
var res =
EditUriBackendConfig.require_field(scope, 'Server', gettextCatalog.getString('Server'));
diff --git a/Duplicati/Server/webroot/ngax/scripts/services/SystemInfo.js b/Duplicati/Server/webroot/ngax/scripts/services/SystemInfo.js
index 7569b5eab..deef0c821 100644
--- a/Duplicati/Server/webroot/ngax/scripts/services/SystemInfo.js
+++ b/Duplicati/Server/webroot/ngax/scripts/services/SystemInfo.js
@@ -67,6 +67,7 @@ backupApp.service('SystemInfo', function($rootScope, $timeout, $cookies, AppServ
'hubic': null,
'b2': null,
'mega': null,
+ 'idrive': null,
'box': null,
'od4b': null,
'mssp': null,
diff --git a/Duplicati/Server/webroot/ngax/templates/backends/idrive.html b/Duplicati/Server/webroot/ngax/templates/backends/idrive.html
new file mode 100644
index 000000000..1a5973341
--- /dev/null
+++ b/Duplicati/Server/webroot/ngax/templates/backends/idrive.html
@@ -0,0 +1,13 @@
+<div class="input text">
+ <label for="idrive_path" translate>IDrive Sync directory path</label>
+ <input type="text" name="idrive_path" id="idrive_path" ng-model="$parent.Path" placeholder="{{'Enter directory path' | translate}}" />
+</div>
+
+<div class="input text">
+ <label for="idrive_username" translate>Username</label>
+ <input type="text" name="idrive_username" id="idrive_username" ng-model="$parent.Username" placeholder="{{'Username' | translate}}" />
+</div>
+<div class="input password">
+ <label for="idrive_password" translate>Password</label>
+ <input autocomplete="new-password" type="password" name="idrive_password" id="idrive_password" ng-model="$parent.Password" placeholder="{{'Password' | translate}}" />
+</div>
diff --git a/Duplicati/Server/webroot/ngax/templates/backends/jottacloud.html b/Duplicati/Server/webroot/ngax/templates/backends/jottacloud.html
index 04efe6d28..dcff7dab5 100644
--- a/Duplicati/Server/webroot/ngax/templates/backends/jottacloud.html
+++ b/Duplicati/Server/webroot/ngax/templates/backends/jottacloud.html
@@ -1,13 +1,12 @@
<div class="input text">
<label for="jottacloud_path" translate>Folder path</label>
- <input type="text" name="jottacloud_path" id="jottacloud_path" ng-model="$parent.Path" placeholder="{{'Enter folder path name' | translate}}" />
+ <input type="text" name="jottacloud_path" id="jottacloud_path" ng-model="$parent.Path" placeholder="{{'Enter the destination path' | translate}}" />
</div>
<div class="input text">
- <label for="jottacloud_username" translate>Username</label>
- <input type="text" name="jottacloud_username" id="jottacloud_username" ng-model="$parent.Username" placeholder="{{'Username' | translate}}" />
-</div>
-<div class="input password">
- <label for="jottacloud_password" translate>Password</label>
- <input autocomplete="new-password" type="password" name="jottacloud_password" id="jottacloud_password" ng-model="$parent.Password" placeholder="{{'Password' | translate}}" />
+ <label for="jottacloud_authid">
+ <a ng-show="oauth_in_progress" href="{{oauth_start_link}}" target="_blank" translate>AuthID</a>
+ <a ng-hide="oauth_in_progress" href ng-click="oauth_start_token_creation()" translate>AuthID</a>
+ </label>
+ <input type="text" name="jottacloud_authid" id="jottacloud_authid" ng-model="$parent.AuthID" placeholder="{{'Click the AuthID link to create an AuthID' | translate}}" />
</div>