1
0
mirror of http://git.whoc.org.uk/git/password-manager.git synced 2025-10-25 17:47:34 +02:00

Many small overall UI improvements

- proxy are now aware of their respective features;
- updated account status info and added also proxy info (especially to show when using an offline copy)
- conditionally enabled different features across the UI, based on user account / proxy available features
This commit is contained in:
Giulio Cesare Solaroli
2015-03-10 22:59:24 +01:00
parent 3d809a71db
commit 187959fd1e
19 changed files with 270 additions and 132 deletions

View File

@@ -46,6 +46,20 @@ Clipperz.Base.extend(Clipperz.PM.Proxy.JSON, Clipperz.PM.Proxy, {
return this._url;
},
//=========================================================================
'type': function () {
return 'ONLINE';
},
'typeDescription': function () {
return 'Online service';
},
'features': function (someFeatures) {
return someFeatures;
},
//=========================================================================
'_sendMessage': function(aFunctionName, aVersion, someParameters) {

View File

@@ -21,6 +21,7 @@ refer to http://www.clipperz.com.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
@@ -32,6 +33,8 @@ Clipperz.PM.Proxy.Offline = function(args) {
Clipperz.PM.Proxy.Offline.superclass.constructor.call(this, args);
this._dataStore = args.dataStore || new Clipperz.PM.Proxy.Offline.DataStore(args);
this._type = args.type || 'OFFLINE';
this._typeDescription = args.typeDescription || 'Offline';
return this;
}
@@ -64,7 +67,29 @@ Clipperz.Base.extend(Clipperz.PM.Proxy.Offline, Clipperz.PM.Proxy, {
return this.dataStore().canRegisterNewUsers();
},
//-------------------------------------------------------------------------
//=========================================================================
'type': function () {
return this._type;
},
'typeDescription': function () {
return this._typeDescription;
},
'features': function (someFeatures) {
var result;
if (this.type() == 'OFFLINE_COPY') {
result = ['LIST_CARDS', 'CARD_DETAILS'];
} else {
result = someFeatures;
}
return result;
},
//=========================================================================
__syntaxFix__: "syntax fix"