Merge branch 'translations'

This commit is contained in:
brantje 2016-12-21 17:25:18 +01:00
commit f1dad4bb4e
No known key found for this signature in database
GPG key ID: 5FF1D117F918687F
45 changed files with 799 additions and 356 deletions

View file

@ -66,6 +66,10 @@ return [
['name' => 'share#getFile', 'url' => '/api/v2/sharing/credential/{item_guid}/file/{file_guid}', 'verb' => 'GET'],
['name' => 'share#updateSharedCredentialACL', 'url' => '/api/v2/sharing/credential/{item_guid}/acl', 'verb' => 'PATCH'],
//Translations
['name' => 'translation#getLanguageStrings', 'url' => '/api/v2/language', 'verb' => 'GET'],
//Internal API
['name' => 'internal#remind', 'url' => '/api/internal/notifications/remind/{credential_id}', 'verb' => 'POST'],
['name' => 'internal#read', 'url' => '/api/internal/notifications/read/{credential_id}', 'verb' => 'DELETE'],

View file

@ -0,0 +1,347 @@
<?php
/**
* Nextcloud - passman
*
* This file is licensed under the Affero General Public License version 3 or
* later. See the COPYING file.
*
* @author Sander Brand <brantje@gmail.com>
* @copyright Sander Brand 2016
*/
namespace OCA\Passman\Controller;
use OCP\IRequest;
use OCP\AppFramework\Http\JSONResponse;
use OCP\AppFramework\ApiController;
use OCP\IL10N;
class TranslationController extends ApiController {
private $trans;
public function __construct($AppName,
IRequest $request,
IL10N $trans
) {
parent::__construct($AppName, $request);
$this->trans = $trans;
}
/**
* @NoAdminRequired
* @NoCSRFRequired
* @PublicPage
*/
public function getLanguageStrings($lang) {
$translations = array(
// js/app/controllers/bookmarklet.js
'generating.sharing.keys' => $this->trans->t('Generating sharing keys ( %step / 2)'),
'invalid.vault.key' => $this->trans->t('Incorrect vault password!'),
'password.do.not.match' => $this->trans->t('Passwords do not match'),
'general' => $this->trans->t('General'),
'custom.fields' => $this->trans->t('Custom Fields'),
'error.no.label' => $this->trans->t('Please fill in a label!'),
'error.no.value' => $this->trans->t('Please fill in a value!'),
'error.loading.file' => $this->trans->t('Error loading file'),
// js/app/controllers/credential.js
'error.decrypt' => $this->trans->t('An error happend during decryption'),
'credential.created' => $this->trans->t('Credential created!'),
'credential.deleted' => $this->trans->t('Credential deleted'),
'credential.updated' => $this->trans->t('Credential updated'),
'credential.recovered' => $this->trans->t('Credential recovered'),
'credential.destroyed' => $this->trans->t('Credential recovered'),
'error.loading.file.perm' => $this->trans->t('Error downloading file, you probably don\'t have enough permissions'),
// js/app/controllers/edit_credential.js
// js/app/controllers/export.js
'export.starting' => $this->trans->t('Starting export'),
'export.decrypt' => $this->trans->t('Decrypting credentials'),
'done' => $this->trans->t('Done'),
// js/app/controllers/import.js
'import.file.read' => $this->trans->t('File read successfully!'),
'import.no.label' => $this->trans->t('Credential has no label, skipping'),
'import.adding' => $this->trans->t('Adding {{credential}}'),
'import.added' => $this->trans->t('Added {{credential}}'),
'import.loaded' => $this->trans->t('Parsed {{num}} credentials, starting to import'),
// js/app/controllers/revision.js
'revision.deleted' => $this->trans->t('Revision deleted'),
'revision.restored' => $this->trans->t('Revision restored'),
// js/app/controllers/settings.js
'bookmarklet.text' => $this->trans->t('Save in passman'),
'settings.saved' => $this->trans->t('Settings saved'),
'settings.general' => $this->trans->t('General settings'),
'settings.audit' => $this->trans->t('Password Audit'),
'settings.password' => $this->trans->t('Password settings'),
'settings.import' => $this->trans->t('Import credentials'),
'settings.export' => $this->trans->t('Export credentials'),
'settings.sharing' => $this->trans->t('Sharing'),
'changepw.navigate.away.warning' => $this->trans->t('Are you sure you want to leave? This WILL corrupt all your credentials'),
'incorrect.password' => $this->trans->t('Your old password is incorrect!'),
'password.no.match' => $this->trans->t('New passwords do not match!'),
'login.new.pass' => $this->trans->t('Please login with your new vault password'),
// js/app/controllers/share.js
'share.u.g' => $this->trans->t('Share with users and groups'),
'share.link' => $this->trans->t('Share link'),
'share.navigate.away.warning' => $this->trans->t('Are you sure you want to leave? This will corrupt this credential'),
'credential.unshared' => $this->trans->t('Credential unshared'),
'credential.shared' => $this->trans->t('Credential shared'),
'saved' => $this->trans->t('Saved!'),
// js/app/directives/credentialfield.js
'toggle.visibility' => $this->trans->t('Toggle visibility'),
'copy.field' => $this->trans->t('Copy to clipboard'),
'copied' => $this->trans->t('Copied to clipboard!'),
// js/app/directives/passwordgen.js
'password.gen' => $this->trans->t('Generate password'),
'password.copy' => $this->trans->t('Copy password to clipboard'),
'password.copied' => $this->trans->t('Password copied to clipboard!'),
// js/app/directives/progressbar.js
'complete' => $this->trans->t('Complete'),
// templates/views/partials/edit_credential/basics.html
'username' => $this->trans->t('Username'),
'password.r' => $this->trans->t('Repeat password'),
'add.tag' => $this->trans->t('Add Tag'),
// templates/views/partials/edit_credential/custom_fields.html
'field.label' => $this->trans->t('Field label'),
'field.value' => $this->trans->t('Field value'),
'select.file' => $this->trans->t('Choose a file'),
'text' => $this->trans->t('Text'),
'file' => $this->trans->t('File'),
'add' => $this->trans->t('Add'),
'value' => $this->trans->t('Value'),
'type' => $this->trans->t('Type'),
'actions' => $this->trans->t('Actions'),
'empty' => $this->trans->t('Empty'),
// templates/views/partials/edit_credential/files.html
'file.name' => $this->trans->t('Filename'),
'upload.date' => $this->trans->t('Upload date'),
'size' => $this->trans->t('Size'),
// templates/views/partials/edit_credential/otp.html
'upload.qr' => $this->trans->t('Upload your OTP qr code'),
'current.qr' => $this->trans->t('Current OTP settings'),
'issuer' => $this->trans->t('Issuer'),
'secret' => $this->trans->t('Secret'),
// templates/views/partials/edit_credential/password.html
'expire.date' => $this->trans->t('Expire date'),
'no.expire.date' => $this->trans->t('No expire date set'),
'renew.interval' => $this->trans->t('Renew interval'),
'disabled' => $this->trans->t('Disabled'),
'days' => $this->trans->t('Day(s)'),
'weeks' => $this->trans->t('Week(s)'),
'months' => $this->trans->t('Month(s)'),
'years' => $this->trans->t('Year(s)'),
'generation.settings' => $this->trans->t('Password generation settings'),
'password.generation.length' => $this->trans->t('Password length'),
'password.generation.min_digits' => $this->trans->t('Minimum amount of digits'),
'password.generation.uppercase' => $this->trans->t('Use uppercase letters'),
'password.generation.lowercase' => $this->trans->t('Use lowercase letters'),
'password.generation.digits' => $this->trans->t('Use numbers'),
'password.generation.special' => $this->trans->t('Use special characters'),
'password.generation.ambiguous' => $this->trans->t('Avoid ambiguous characters'),
'password.generation.require_same' => $this->trans->t('Require every character type'),
// templates/views/partials/forms/settings/export.html
'export.type' => $this->trans->t('Export type'),
'export' => $this->trans->t('Export'),
// templates/views/partials/forms/settings/general_settings.html
'rename.vault' => $this->trans->t('Rename vault'),
'rename.vault.name' => $this->trans->t('New vault name'),
'change' => $this->trans->t('Change'),
'change.vault.key' => $this->trans->t('Change vault key'),
'old.vault.password' => $this->trans->t('Old vault password'),
'new.vault.password' => $this->trans->t('New vault password'),
'new.vault.pw.r' => $this->trans->t('New vault password repeat'),
'warning.leave' => $this->trans->t('Please wait your vault is being updated, do not leave this page.'),
'processing' => $this->trans->t('Processing'),
'total.progress' => $this->trans->t('Total progress'),
'about.passman' => $this->trans->t('About Passman'),
'version' => $this->trans->t('Version'),
'donate.support' => $this->trans->t('Donate to support development'),
'bookmarklet' => $this->trans->t('Bookmarklet'),
'bookmarklet.info1' => $this->trans->t('Save your passwords with 1 click!'),
'bookmarklet.info2' => $this->trans->t('Drag below button to your bookmark toolbar.'),
// templates/views/partials/forms/settings/import.html
'import.type' => $this->trans->t('Import type'),
'import' => $this->trans->t('Import'),
'read.progress' => $this->trans->t('Read progress'),
'upload.progress' => $this->trans->t('Upload progress'),
// templates/views/partials/forms/settings/password_settings.html
// inherent from other pages
// templates/views/partials/forms/settings/sharing.html
'priv.key' => $this->trans->t('Private Key'),
'pub.key' => $this->trans->t('Public key'),
'key.size' => $this->trans->t('Key size'),
'save.keys' => $this->trans->t('Save keys'),
'gen.keys' => $this->trans->t('Generate sharing keys'),
'generating.keys' => $this->trans->t('Generating sharing keys'),
// templates/views/partials/forms/settings/tool.html
'tool.intro' => $this->trans->t('The password tool will scan your password, calculate the avarage crack time and, if below the threshold, show them'),
'min.strength' => $this->trans->t('Minimum password stength'),
'scan.result.msg' => $this->trans->t('Passman scanned your passwords, and here is the result.'),
'scan.result' => $this->trans->t('A total of {{scan_result}} weak credentials.'),
'score' => $this->trans->t('Score'),
'action' => $this->trans->t('Action'),
// templates/vieuws/partials/forms/share_credential/basics.html
'search.u.g' => $this->trans->t('Search users or groups...'),
'cyphering' => $this->trans->t('Cyphering'),
'uploading' => $this->trans->t('Uploading'),
'user' => $this->trans->t('User'),
'crypto.time' => $this->trans->t('Crypto time'),
'crypto.total.time' => $this->trans->t('Total time spent cyphering'),
'perm.read' => $this->trans->t('Read'),
'perm.write' => $this->trans->t('Write'),
'perm.files' => $this->trans->t('Files'),
'perm.revisions' => $this->trans->t('Revisions'),
'pending' => $this->trans->t('Pending'),
// templates/vieuws/partials/forms/share_credential/link_sharing.html
'enable.link.sharing' => $this->trans->t('Enable link sharing'),
'share.until.date' => $this->trans->t('Share until date'),
'expire.views' => $this->trans->t('Expire after views'),
'click.share' => $this->trans->t('Click share first'),
'show.files' => $this->trans->t('Show files'),
// templates/views/partials/password-meter.html
'details' => $this->trans->t('Details'),
'hide.details' => $this->trans->t('Hide details'),
'password.score' => $this->trans->t('Password score'),
'cracking.times' => $this->trans->t('Cracking times'),
'cracking.time.100h' => $this->trans->t('100 / hour'),
'cracking.time.100h.desc' => $this->trans->t('Throttled online attack'),
'cracking.time.10s' => $this->trans->t('10 / second'),
'cracking.time.10s.desc' => $this->trans->t('Unthrottled online attack'),
'cracking.time.10ks' => $this->trans->t('10k / second'),
'cracking.time.10ks.desc' => $this->trans->t('Offline attack, slow hash, many cores'),
'cracking.time.10Bs' => $this->trans->t('10B / second'),
'cracking.time.10Bs.desc' => $this->trans->t('Offline attack, fast hash, many cores'),
'match.sequence' => $this->trans->t('Match sequence'),
'match.sequence.link' => $this->trans->t('See match sequence'),
'pattern' => $this->trans->t('Pattern'),
'matched.word' => $this->trans->t('Matched word'),
'dictionary.name' => $this->trans->t('Dictionary name'),
'rank' => $this->trans->t('Rank'),
'reversed' => $this->trans->t('Reversed'),
'guesses' => $this->trans->t('Guesses'),
'base.guesses' => $this->trans->t('Base guesses'),
'uppercase.variations' => $this->trans->t('Uppercase variations'),
'leet.variations' => $this->trans->t('l33t-variations'),
// templates/views/credential_revisions.html
'showing.revisions' => $this->trans->t('Showing revisions of'),
'revision.of' => $this->trans->t('Revision of'),
'revision.edited.by' => $this->trans->t('by'),
'no.revisions' => $this->trans->t('No revisions found.'),
'label' => $this->trans->t('Label'),
'restore.revision' => $this->trans->t('Restore revision'),
'delete.revision' => $this->trans->t('Delete revision'),
// templates/views/edit_credential.html
'edit.credential' => $this->trans->t('Edit credential'),
'create.credential' => $this->trans->t('Create new credential'),
'save' => $this->trans->t('Save'),
'cancel' => $this->trans->t('Cancel'),
// templates/views/settings.html
'settings' => $this->trans->t('Settings'),
// templates/views/share_credential.html
'share.credential' => $this->trans->t('Share credential {{credential}}'),
'unshare' => $this->trans->t('Unshare'),
// templates/views/show_vault.html
'deleted.since' => $this->trans->t('Showing deleted since'),
'alltime' => $this->trans->t('All time'),
'number.filtered' => $this->trans->t('Showing {{number_filtered}} of {{credential_number}} credentials'),
'search.credential' => $this->trans->t('Search credential...'),
'account' => $this->trans->t('Account'),
'password' => $this->trans->t('Password'),
'otp' => $this->trans->t('OTP'),
'email' => $this->trans->t('E-mail'),
'url' => $this->trans->t('URL'),
'notes' => $this->trans->t('Notes'),
'files' => $this->trans->t('Files'),
'expire.time' => $this->trans->t('Expire time'),
'changed' => $this->trans->t('Changed'),
'created' => $this->trans->t('Created'),
'edit' => $this->trans->t('Edit'),
'delete' => $this->trans->t('Delete'),
'share' => $this->trans->t('Share'),
'revisions' => $this->trans->t('Revisions'),
'recover' => $this->trans->t('Recover'),
'destroy' => $this->trans->t('Destroy'),
'sharereq.title' => $this->trans->t('You have incoming share requests.'),
'sharereq.line1' => $this->trans->t('If you want to the credential in a other vault,'),
'sharereq.line2' => $this->trans->t('logout of this vault and login to the vault you want the shared credential in.'),
'permissions' => $this->trans->t('Permissions'),
'received.from' => $this->trans->t('Received from'),
'date' => $this->trans->t('Date'),
'accept' => $this->trans->t('Accept'),
'decline' => $this->trans->t('Decline'),
// templates/views/vaults.html
'last.access' => $this->trans->t('Last accessed'),
'never' => $this->trans->t('Never'),
'no.vaults' => $this->trans->t('No vaults found, why not create one?'),
'new.vault.name' => $this->trans->t('Please give your new vault a name.'),
'new.vault.pass' => $this->trans->t('Vault password'),
'new.vault.passr' => $this->trans->t('Repeat vault password'),
'new.vault.sharing_key_notice' => $this->trans->t('Your sharing key\'s will have a strength of 1024 bit, which you can change later in settings.'),
'new.vault.create' => $this->trans->t('Create vault'),
'go.back.vaults' => $this->trans->t('Go back to vaults'),
'input.vault.password' => $this->trans->t('Please input the password for'),
'vault.default' => $this->trans->t('Set this vault as default.'),
'vault.auto.login' => $this->trans->t('Login automatically to this vault.'),
'vault.decrypt' => $this->trans->t('Decrypt vault'),
// templates/bookmarklet.php
'http.warning' => $this->trans->t('Warning! Adding credentials over http can be insecure!'),
'bm.active.vault' => $this->trans->t('Logged in to {{vault_name}}'),
'change.vault' => $this->trans->t('Change vault'),
// templates/main.php
'deleted.credentials' => $this->trans->t('Deleted credentials'),
'logout' => $this->trans->t('Logout'),
'donate' => $this->trans->t('Donate'),
// templates/public_share.php
'share.page.text' => $this->trans->t('Someone has shared a credential with you.'),
'share.page.link' => $this->trans->t('Click here to request it'),
'share.page.link_loading' => $this->trans->t('Loading...'),
'expired.share' => $this->trans->t('Awwhh.... credential not found. Maybe it expired'),
);
return new JSONResponse($translations);
}
}

View file

@ -47,7 +47,8 @@
'xeditable',
'ngTagsInput',
'angularjs-datetime-picker',
'ui.sortable'
'ui.sortable',
'pascalprecht.translate'
])
.config(function ($routeProvider) {
$routeProvider
@ -85,6 +86,10 @@
}]).config(function (localStorageServiceProvider) {
localStorageServiceProvider
.setNotify(true, true);
}).config(function ($translateProvider) {
$translateProvider.useSanitizeValueStrategy('sanitize');
$translateProvider.useUrlLoader(OC.generateUrl('/apps/passman/api/v2/language'));
$translateProvider.preferredLanguage('en');
});
/**

View file

@ -32,9 +32,12 @@
'ngSanitize',
'ngTouch',
'ngclipboard',
'ui.sortable'
'pascalprecht.translate'
]).config(['$httpProvider', function ($httpProvider) {
$httpProvider.defaults.headers.common.requesttoken = oc_requesttoken;
}]);
}]).config(function ($translateProvider) {
$translateProvider.useUrlLoader(OC.generateUrl('/apps/passman/api/v2/language'));
$translateProvider.preferredLanguage('en');
});
}());

View file

@ -32,8 +32,8 @@
* Controller of the passmanApp
*/
angular.module('passmanApp')
.controller('BookmarkletCtrl', ['$scope', '$rootScope', '$location', 'VaultService', 'CredentialService', 'SettingsService', 'NotificationService', 'EncryptService', 'TagService', 'FileService', 'ShareService',
function ($scope, $rootScope, $location, VaultService, CredentialService, SettingsService, NotificationService, EncryptService, TagService, FileService, ShareService) {
.controller('BookmarkletCtrl', ['$scope', '$rootScope', '$location', 'VaultService', 'CredentialService', 'SettingsService', 'NotificationService', 'EncryptService', 'TagService', 'FileService', 'ShareService', '$translate',
function ($scope, $rootScope, $location, VaultService, CredentialService, SettingsService, NotificationService, EncryptService, TagService, FileService, ShareService, $translate) {
$scope.active_vault = false;
$scope.http_warning_hidden = true;
@ -114,7 +114,9 @@
var key_size = 1024;
ShareService.generateRSAKeys(key_size).progress(function (progress) {
var p = progress > 0 ? 2 : 1;
$scope.creating_keys = 'Generating sharing keys (' + p + ' / 2)';
var msg = $translate.instant('generating.sharing.keys');
msg = msg.replace('%step', p);
$scope.creating_keys = msg;
$scope.$digest();
}).then(function (kp) {
var pem = ShareService.rsaKeyPairToPEM(kp);
@ -149,7 +151,7 @@
_loginToVault(vault, vault_key);
} catch (e) {
$scope.error = 'Incorrect vault password!';
$scope.error = $translate.instant('invalid.vault.key');
}
};
@ -157,7 +159,7 @@
$scope.createVault = function (vault_name, vault_key, vault_key2) {
if (vault_key !== vault_key2) {
$scope.error = 'Passwords do not match';
$scope.error = $translate.instant('password.do.not.match');
return;
}
VaultService.createVault(vault_name).then(function (vault) {
@ -217,29 +219,29 @@
};
$scope.currentTab = {
title: 'General',
title: $translate.instant('general'),
url: 'views/partials/forms/edit_credential/basics.html',
color: 'blue'
};
$scope.tabs = [{
title: 'General',
title: $translate.instant('general'),
url: 'views/partials/forms/edit_credential/basics.html',
color: 'blue'
}, {
title: 'Password',
title: $translate.instant('password'),
url: 'views/partials/forms/edit_credential/password.html',
color: 'green'
}, {
title: 'Custom fields',
title: $translate.instant('custom.fields'),
url: 'views/partials/forms/edit_credential/custom_fields.html',
color: 'orange'
}, {
title: 'Files',
title: $translate.instant('files'),
url: 'views/partials/forms/edit_credential/files.html',
color: 'yellow'
}, {
title: 'OTP',
title: $translate.instant('otp'),
url: 'views/partials/forms/edit_credential/otp.html',
color: 'purple'
}];
@ -249,11 +251,6 @@
return TagService.searchTag($query);
};
$scope.currentTab = {
title: 'General',
url: 'views/partials/forms/edit_credential/basics.html',
color: 'blue'
};
$scope.onClickTab = function (tab) {
$scope.currentTab = tab;
@ -284,10 +281,10 @@
var _field = angular.copy($scope.new_custom_field);
if (!_field.label) {
NotificationService.showNotification('Please fill in a label', 3000);
NotificationService.showNotification($translate.instant('error.no.label'), 3000);
}
if (!_field.value) {
NotificationService.showNotification('Please fill in a value!', 3000);
NotificationService.showNotification($translate.instant('error.no.value'), 3000);
}
if (!_field.label || !_field.value) {
return;
@ -363,7 +360,7 @@
};
$scope.fileLoadError = function (error) {
console.log('Error loading file', error);
return error;
};
$scope.selected_file = '';
@ -409,7 +406,7 @@
$scope.storedCredential.vault_id = $scope.active_vault.vault_id;
CredentialService.createCredential($scope.storedCredential).then(function () {
NotificationService.showNotification('Credential created!', 5000);
NotificationService.showNotification($translate.instant('credential.created'), 5000);
});
}
};

View file

@ -33,8 +33,8 @@
*/
angular.module('passmanApp')
.controller('CredentialCtrl', ['$scope', 'VaultService', 'SettingsService', '$location', 'CredentialService',
'$rootScope', 'FileService', 'EncryptService', 'TagService', '$timeout', 'NotificationService', 'CacheService', 'ShareService', 'SharingACL', '$interval', '$filter', '$routeParams', '$sce',
function ($scope, VaultService, SettingsService, $location, CredentialService, $rootScope, FileService, EncryptService, TagService, $timeout, NotificationService, CacheService, ShareService, SharingACL, $interval, $filter, $routeParams, $sce) {
'$rootScope', 'FileService', 'EncryptService', 'TagService', '$timeout', 'NotificationService', 'CacheService', 'ShareService', 'SharingACL', '$interval', '$filter', '$routeParams', '$sce', '$translate',
function ($scope, VaultService, SettingsService, $location, CredentialService, $rootScope, FileService, EncryptService, TagService, $timeout, NotificationService, CacheService, ShareService, SharingACL, $interval, $filter, $routeParams, $sce, $translate) {
$scope.active_vault = VaultService.getActiveVault();
if (!SettingsService.getSetting('defaultVault') || !SettingsService.getSetting('defaultVaultPass')) {
if (!$scope.active_vault) {
@ -71,7 +71,8 @@
}
_credential.tags_raw = _credential.tags;
} catch (e) {
NotificationService.showNotification('An error happend during decryption', 5000);
NotificationService.showNotification($translate.instant('error.decrypt'), 5000);
//$rootScope.$broadcast('logout');
//SettingsService.setSetting('defaultVaultPass', null);
//.setSetting('defaultVault', null);
@ -239,7 +240,7 @@
if (notification) {
NotificationService.hideNotification(notification);
}
notification = NotificationService.showNotification('Credential deleted', 5000,
notification = NotificationService.showNotification($translate.instant('credential.deleted'), 5000,
function () {
CredentialService.updateCredential(_credential).then(function (result) {
if (result.delete_time > 0) {
@ -268,7 +269,7 @@
if (notification) {
NotificationService.hideNotification(notification);
}
NotificationService.showNotification('Credential recovered', 5000,
NotificationService.showNotification($translate.instant('credential.recovered'), 5000,
function () {
CredentialService.updateCredential(_credential).then(function () {
notification = false;
@ -284,7 +285,7 @@
for (var i = 0; i < $scope.active_vault.credentials.length; i++) {
if ($scope.active_vault.credentials[i].credential_id === credential.credential_id) {
$scope.active_vault.credentials.splice(i, 1);
NotificationService.showNotification('Credential destroyed', 5000);
NotificationService.showNotification($translate.instant('credential.destroyed)'), 5000);
break;
}
}
@ -389,7 +390,7 @@
var callback = function (result) {
var key = null;
if (!result.hasOwnProperty('file_data')) {
NotificationService.showNotification('Error downloading file, you probably don\'t have enough permissions', 5000);
NotificationService.showNotification($translate.instant('error.loading.file.perm'), 5000);
return;
}

View file

@ -32,8 +32,8 @@
* Controller of the passmanApp
*/
angular.module('passmanApp')
.controller('CredentialEditCtrl', ['$scope', 'VaultService', 'CredentialService', 'SettingsService', '$location', '$routeParams', 'FileService', 'EncryptService', 'TagService', 'NotificationService', 'ShareService',
function ($scope, VaultService, CredentialService, SettingsService, $location, $routeParams, FileService, EncryptService, TagService, NotificationService, ShareService) {
.controller('CredentialEditCtrl', ['$scope', 'VaultService', 'CredentialService', 'SettingsService', '$location', '$routeParams', 'FileService', 'EncryptService', 'TagService', 'NotificationService', 'ShareService', '$translate',
function ($scope, VaultService, CredentialService, SettingsService, $location, $routeParams, FileService, EncryptService, TagService, NotificationService, ShareService, $translate) {
$scope.active_vault = VaultService.getActiveVault();
if (!SettingsService.getSetting('defaultVault') || !SettingsService.getSetting('defaultVaultPass')) {
if (!$scope.active_vault) {
@ -67,29 +67,34 @@
});
});
$scope.currentTab = {
title: $translate.instant('general'),
url: 'views/partials/forms/edit_credential/basics.html',
color: 'blue'
};
$scope.tabs = [{
title: 'General',
title: $translate.instant('general'),
url: 'views/partials/forms/edit_credential/basics.html',
color: 'blue'
}, {
title: 'Password',
title: $translate.instant('password'),
url: 'views/partials/forms/edit_credential/password.html',
color: 'green'
}, {
title: 'Custom fields',
title: $translate.instant('custom.fields'),
url: 'views/partials/forms/edit_credential/custom_fields.html',
color: 'orange'
}, {
title: 'Files',
title: $translate.instant('files'),
url: 'views/partials/forms/edit_credential/files.html',
color: 'yellow'
}, {
title: 'OTP',
title: $translate.instant('otp'),
url: 'views/partials/forms/edit_credential/otp.html',
color: 'purple'
}];
if ($scope.active_vault) {
$scope.$parent.selectedVault = true;
}
@ -109,11 +114,6 @@
return TagService.searchTag($query);
};
$scope.currentTab = {
title: 'General',
url: 'views/partials/forms/edit_credential/basics.html',
color: 'blue'
};
$scope.onClickTab = function (tab) {
$scope.currentTab = tab;
@ -145,10 +145,10 @@
var _field = angular.copy($scope.new_custom_field);
if (!_field.label) {
NotificationService.showNotification('Please fill in a label', 3000);
NotificationService.showNotification($translate.instant('error.no.label'), 3000);
}
if (!_field.value) {
NotificationService.showNotification('Please fill in a value!', 3000);
NotificationService.showNotification($translate.instant('error.no.value'), 3000);
}
if (!_field.label || !_field.value) {
return;
@ -250,7 +250,7 @@
};
$scope.fileLoadError = function (error) {
console.log('Error loading file', error);
console.log($translate.instant('error.loading.file'), error);
};
$scope.selected_file = '';
@ -304,7 +304,7 @@
$scope.storedCredential.vault_id = $scope.active_vault.vault_id;
CredentialService.createCredential($scope.storedCredential).then(function () {
$location.path('/vault/' + $routeParams.vault_id);
NotificationService.showNotification('Credential created!', 5000);
NotificationService.showNotification($translate.instant('credential.created'), 5000);
});
} else {
@ -335,7 +335,7 @@
CredentialService.updateCredential(_credential, _useKey).then(function () {
SettingsService.setSetting('edit_credential', null);
$location.path('/vault/' + $routeParams.vault_id);
NotificationService.showNotification('Credential updated!', 5000);
NotificationService.showNotification($translate.instant('credential.updated'), 5000);
});
}

View file

@ -31,7 +31,7 @@
* Controller of the passmanApp
*/
angular.module('passmanApp')
.controller('ExportCtrl', ['$scope', '$window', 'CredentialService', 'VaultService', function ($scope, $window, CredentialService, VaultService) {
.controller('ExportCtrl', ['$scope', '$window', 'CredentialService', 'VaultService', '$translate', function ($scope, $window, CredentialService, VaultService, $translate) {
$scope.available_exporters = [];
$scope.active_vault = VaultService.getActiveVault();
@ -58,10 +58,10 @@
$scope.startExport = function () {
_log('Starting export');
_log($translate.instant('export.starting'));
var _credentials = [];
VaultService.getVault(VaultService.getActiveVault()).then(function (vault) {
_log('Decrypting credentials');
_log($translate.instant('export.decrypt'));
if (vault.hasOwnProperty('credentials')) {
if (vault.credentials.length > 0) {
for (var i = 0; i < vault.credentials.length; i++) {
@ -72,7 +72,7 @@
}
}
$window.PassmanExporter[$scope.selectedExporter.id].export(_credentials).then(function () {
_log('Done');
_log($translate.instant('done'));
});
}

View file

@ -31,7 +31,7 @@
* Controller of the passmanApp
*/
angular.module('passmanApp')
.controller('ImportCtrl', ['$scope', '$window', 'CredentialService', 'VaultService', function ($scope, $window, CredentialService, VaultService) {
.controller('ImportCtrl', ['$scope', '$window', 'CredentialService', 'VaultService', '$translate', function ($scope, $window, CredentialService, VaultService, $translate) {
$scope.available_importers = [];
$scope.active_vault = VaultService.getActiveVault();
@ -59,12 +59,12 @@
$scope.fileLoaded = function (file) {
file_data = file.data.split(',');
file_data = decodeURIComponent(escape(window.atob(file_data[1]))); //window.atob();
_log('File read successfully!');
_log($translate.instant('import.file.read'));
$scope.$digest();
};
$scope.fileLoadError = function (file) {
console.error('Error loading file', file);
console.error($translate.instant('error.loading.file'), file);
};
$scope.fileSelectProgress = function () {
@ -84,16 +84,16 @@
var _credential = parsed_data[parsed_data_index];
if (!_credential.label) {
if (parsed_data[parsed_data_index + 1]) {
_log('Credential has no label, skipping');
_log($translate.instant('import.no.label'));
addCredential(parsed_data_index + 1);
}
return;
}
_log('Adding ' + _credential.label);
_log($translate.instant('import.adding').replace('{{credential}}', _credential.label));
_credential.vault_id = $scope.active_vault.vault_id;
CredentialService.createCredential(_credential).then(function (result) {
if (result.credential_id) {
_log('Added ' + _credential.label);
_log($translate.instant('import.added').replace('{{credential}}', _credential.label));
if (parsed_data[parsed_data_index + 1]) {
$scope.import_progress = {
progress: parsed_data_index / parsed_data.length * 100,
@ -108,7 +108,7 @@
loaded: parsed_data.length,
total: parsed_data.length
};
_log('DONE!');
_log($translate.instant('done'));
}
}
});
@ -133,7 +133,8 @@
loaded: parsed_data.length,
total: parsed_data.length
};
_log('Parsed ' + parsed_data.length + ' credentials, starting to import');
var msg = $translate.instant('import.loaded').replace('{{num}}', parsed_data.length);
_log(msg);
if (parsed_data.length > 0) {
addCredential(0);
} else {

View file

@ -31,7 +31,7 @@
* Controller of the passmanApp
*/
angular.module('passmanApp')
.controller('PublicSharedCredential', ['$scope', 'ShareService', '$window', 'EncryptService', 'NotificationService', function ($scope, ShareService, $window, EncryptService, NotificationService) {
.controller('PublicSharedCredential', ['$scope', 'ShareService', '$window', 'EncryptService', 'NotificationService', '$translate', function ($scope, ShareService, $window, EncryptService, NotificationService, $translate) {
var _key;
$scope.loading = false;
$scope.loadSharedCredential = function () {
@ -54,7 +54,7 @@
$scope.downloadFile = function (credential, file) {
ShareService.downloadSharedFile(credential, file).then(function (result) {
if (!result.hasOwnProperty('file_data')) {
NotificationService.showNotification('Error downloading file, you probably don\'t have enough permissions', 5000);
NotificationService.showNotification($translate.instant('error.loading.file.perm'), 5000);
return;
}
var file_data = EncryptService.decryptString(result.file_data, _key);

View file

@ -32,8 +32,8 @@
* Controller of the passmanApp
*/
angular.module('passmanApp')
.controller('RevisionCtrl', ['$scope', 'SettingsService', 'VaultService', 'CredentialService', '$location', '$routeParams', '$rootScope', 'NotificationService', '$filter', 'ShareService', 'EncryptService',
function ($scope, SettingsService, VaultService, CredentialService, $location, $routeParams, $rootScope, NotificationService, $filter, ShareService, EncryptService) {
.controller('RevisionCtrl', ['$scope', 'SettingsService', 'VaultService', 'CredentialService', '$location', '$routeParams', '$rootScope', 'NotificationService', '$filter', 'ShareService', 'EncryptService', '$translate',
function ($scope, SettingsService, VaultService, CredentialService, $location, $routeParams, $rootScope, NotificationService, $filter, ShareService, EncryptService, $translate) {
$scope.active_vault = VaultService.getActiveVault();
if (!SettingsService.getSetting('defaultVault') || !SettingsService.getSetting('defaultVaultPass')) {
if (!$scope.active_vault) {
@ -106,7 +106,7 @@
for (var i = 0; i < $scope.revisions.length; i++) {
if ($scope.revisions[i].revision_id === revision.revision_id) {
$scope.revisions.splice(i, 1);
NotificationService.showNotification('Revision deleted', 5000);
NotificationService.showNotification($translate.instant('revision.deleted'), 5000);
break;
}
}
@ -137,7 +137,7 @@
SettingsService.setSetting('revision_credential', null);
$rootScope.$emit('app_menu', false);
$location.path('/vault/' + $routeParams.vault_id);
NotificationService.showNotification('Revision restored!', 5000);
NotificationService.showNotification($translate.instant('revision.restored'), 5000);
});
};

View file

@ -32,8 +32,8 @@
* Controller of the passmanApp
*/
angular.module('passmanApp')
.controller('SettingsCtrl', ['$scope', '$rootScope', 'SettingsService', 'VaultService', 'CredentialService', '$location', '$routeParams', '$http', 'EncryptService', 'NotificationService', '$sce',
function ($scope, $rootScope, SettingsService, VaultService, CredentialService, $location, $routeParams, $http, EncryptService, NotificationService, $sce) {
.controller('SettingsCtrl', ['$scope', '$rootScope', 'SettingsService', 'VaultService', 'CredentialService', '$location', '$routeParams', '$http', 'EncryptService', 'NotificationService', '$sce', '$translate',
function ($scope, $rootScope, SettingsService, VaultService, CredentialService, $location, $routeParams, $http, EncryptService, NotificationService, $sce, $translate) {
$scope.vault_settings = {};
$scope.new_vault_name = '';
$scope.active_vault = VaultService.getActiveVault();
@ -72,9 +72,9 @@
});
var btn_txt = $translate.instant('bookmarklet.text');
var http = location.protocol, slashes = http.concat("//"), host = slashes.concat(window.location.hostname), complete = host + location.pathname;
$scope.bookmarklet = $sce.trustAsHtml("<a class=\"button\" href=\"javascript:(function(){var a=window,b=document,c=encodeURIComponent,e=c(document.title),d=a.open('" + complete + "bookmarklet?url='+c(b.location)+'&title='+e,'bkmk_popup','left='+((a.screenX||a.screenLeft)+10)+',top='+((a.screenY||a.screenTop)+10)+',height=750px,width=475px,resizable=0,alwaysRaised=1');a.setTimeout(function(){d.focus()},300);})();\">Save in passman</a>");
$scope.bookmarklet = $sce.trustAsHtml("<a class=\"button\" href=\"javascript:(function(){var a=window,b=document,c=encodeURIComponent,e=c(document.title),d=a.open('" + complete + "bookmarklet?url='+c(b.location)+'&title='+e,'bkmk_popup','left='+((a.screenX||a.screenLeft)+10)+',top='+((a.screenY||a.screenTop)+10)+',height=750px,width=475px,resizable=0,alwaysRaised=1');a.setTimeout(function(){d.focus()},300);})();\">"+ btn_txt +"</a>");
$scope.saveVaultSettings = function () {
@ -84,38 +84,38 @@
VaultService.updateVault(_vault).then(function () {
//VaultService.setActiveVault(_vault);
$scope.active_vault.name = angular.copy(_vault.name);
NotificationService.showNotification('Settings saved', 5000);
NotificationService.showNotification($translate.instant('settings.saved'), 5000);
});
};
$scope.tabs = [
{
title: 'General settings',
title: $translate.instant('settings.general'),
url: 'views/partials/forms/settings/general_settings.html'
},
{
title: 'Password Audit',
title: $translate.instant('settings.audit'),
url: 'views/partials/forms/settings/tool.html'
},
{
title: 'Password settings',
title:$translate.instant('settings.password'),
url: 'views/partials/forms/settings/password_settings.html'
},
{
title: 'Import credentials',
title: $translate.instant('settings.import'),
url: 'views/partials/forms/settings/import.html'
},
{
title: 'Export credentials',
title: $translate.instant('settings.export'),
url: 'views/partials/forms/settings/export.html'
},
{
title: 'Sharing',
title: $translate.instant('settings.sharing'),
url: 'views/partials/forms/settings/sharing.html'
}
];
@ -186,7 +186,7 @@
$scope.$on("$locationChangeStart", function(event) {
if($scope.change_pw){
if($scope.change_pw.total > 0 && $scope.change_pw.done < $scope.change_pw.total){
if(!confirm("Are you sure you want to leave?\nThis will corrupt all your credentials")){
if(!confirm($translate.instant('changepw.navigate.away.warning'))){
event.preventDefault();
}
}
@ -196,11 +196,11 @@
$scope.changeVaultPassword = function (oldVaultPass, newVaultPass, newVaultPass2) {
if (oldVaultPass !== VaultService.getActiveVault().vaultKey) {
$scope.error = 'Your old password is incorrect!';
$scope.error = $translate.instant('incorrect.password');
return;
}
if (newVaultPass !== newVaultPass2) {
$scope.error = 'New passwords do not match!';
$scope.error = $translate.instant('password.no.match');
return;
}
VaultService.getVault($scope.active_vault).then(function (vault) {
@ -236,7 +236,7 @@
vault.private_sharing_key = EncryptService.encryptString(vault.private_sharing_key, newVaultPass);
VaultService.updateSharingKeys(vault).then(function () {
$rootScope.$broadcast('logout');
NotificationService.showNotification('Please login with your new vault password', 5000);
NotificationService.showNotification($translate.instant('login.new.pass'), 5000);
});
}
});

View file

@ -32,22 +32,19 @@
* This file is part of passman, licensed under AGPLv3
*/
angular.module('passmanApp')
.controller('ShareCtrl', ['$scope', 'VaultService', 'CredentialService', 'SettingsService', '$location', '$routeParams', 'ShareService', 'NotificationService', 'SharingACL', 'EncryptService',
function ($scope, VaultService, CredentialService, SettingsService, $location, $routeParams, ShareService, NotificationService, SharingACL, EncryptService) {
.controller('ShareCtrl', ['$scope', 'VaultService', 'CredentialService', 'SettingsService', '$location', '$routeParams', 'ShareService', 'NotificationService', 'SharingACL', 'EncryptService', '$translate',
function ($scope, VaultService, CredentialService, SettingsService, $location, $routeParams, ShareService, NotificationService, SharingACL, EncryptService, $translate) {
$scope.active_vault = VaultService.getActiveVault();
$scope.tabs = [{
title: 'Share with users and groups',
title: $translate.instant('share.u.g'),
url: 'views/partials/forms/share_credential/basics.html'
}, {
title: 'Share link',
title: $translate.instant('share.link'),
url: 'views/partials/forms/share_credential/link_sharing.html',
color: 'green'
}];
$scope.currentTab = {
title: 'General',
url: 'views/partials/forms/share_credential/basics.html'
};
$scope.currentTab = $scope.tabs[0];
$scope.onClickTab = function (tab) {
$scope.currentTab = tab;
@ -224,7 +221,7 @@
_credential = CredentialService.encryptCredential(_credential, old_key);
CredentialService.updateCredential(_credential, true).then(function () {
NotificationService.showNotification('Credential unshared', 4000);
NotificationService.showNotification($translate.instant('credential.unshared'), 4000);
CredentialService.reencryptCredential(_credential.guid, old_key, new_key).then(function () {
getAcl();
});
@ -266,7 +263,7 @@
$scope.$on("$locationChangeStart", function(event) {
if(!$scope.sharing_complete){
if(!confirm("Are you sure you want to leave?\nThis will corrupt this credential")){
if(!confirm($translate.instant('share.navigate.away.warning'))){
event.preventDefault();
}
}
@ -322,7 +319,7 @@
$scope.applyShareToUser(list[iterator], enc_key);
}
}
NotificationService.showNotification('Saved!', 4000);
NotificationService.showNotification($translate.instant('saved'), 4000);
$scope.sharing_complete = true;
} else {
@ -338,7 +335,7 @@
_credential.skip_revision = true;
_credential.shared_key = EncryptService.encryptString(key);
CredentialService.updateCredential(_credential, true).then(function () {
NotificationService.showNotification('Credential shared', 4000);
NotificationService.showNotification($translate.instant('credential.shared'), 4000);
$scope.sharing_complete = true;
});
});

View file

@ -31,7 +31,7 @@
* Controller of the passmanApp
*/
angular.module('passmanApp')
.controller('VaultCtrl', ['$scope', 'VaultService', 'SettingsService', 'CredentialService', '$location', 'ShareService', 'EncryptService', function ($scope, VaultService, SettingsService, CredentialService, $location, ShareService, EncryptService) {
.controller('VaultCtrl', ['$scope', 'VaultService', 'SettingsService', 'CredentialService', '$location', 'ShareService', 'EncryptService', '$translate', function ($scope, VaultService, SettingsService, CredentialService, $location, ShareService, EncryptService, $translate) {
VaultService.getVaults().then(function (vaults) {
$scope.vaults = vaults;
if (SettingsService.getSetting('defaultVault') != null) {
@ -96,7 +96,9 @@
var key_size = 1024;
ShareService.generateRSAKeys(key_size).progress(function (progress) {
var p = progress > 0 ? 2 : 1;
$scope.creating_keys = 'Generating sharing keys (' + p + ' / 2)';
var msg = $translate.instant('generating.sharing.keys');
msg = msg.replace('%step', p);
$scope.creating_keys = msg;
$scope.$digest();
}).then(function (kp) {
var pem = ShareService.rsaKeyPairToPEM(kp);
@ -131,7 +133,7 @@
_loginToVault(vault, vault_key);
} catch (e) {
$scope.error = 'Incorrect vault password!';
$scope.error = $translate.instant('invalid.vault.key');
}
};
@ -139,7 +141,7 @@
$scope.createVault = function (vault_name, vault_key, vault_key2) {
if (vault_key !== vault_key2) {
$scope.error = 'Passwords do not match';
$scope.error = $translate.instant('password.do.not.match');
return;
}
VaultService.createVault(vault_name).then(function (vault) {

View file

@ -30,7 +30,7 @@
*/
angular.module('passmanApp')
.directive('credentialField', ['$timeout', function ($timeout) {
.directive('credentialField', ['$timeout', '$translate', function ($timeout, $translate) {
return {
scope: {
value: '=value',
@ -45,13 +45,17 @@
'<span ng-if="valueVisible">{{value}}</span>' +
'</div>' +
'<div class="tools">' +
'<div class="cell" ng-if="toggle" tooltip="\'Toggle visibility\'" ng-click="toggleVisibility()"><i class="fa" ng-class="{\'fa-eye\': !valueVisible, \'fa-eye-slash\': valueVisible }"></i></div>' +
'<div class="cell" ng-if="toggle" tooltip="tggltxt" ng-click="toggleVisibility()"><i class="fa" ng-class="{\'fa-eye\': !valueVisible, \'fa-eye-slash\': valueVisible }"></i></div>' +
'<div class="cell" ng-if="isLink"><a ng-href="{{value}}" target="_blank"><i tooltip="\'Open in new window\'" class="link fa fa-external-link"></i></a></div>' +
'<div class="cell" ngclipboard-success="onSuccess(e);" ngclipboard-error="onError(e);" ngclipboard data-clipboard-text="{{value}}"><i tooltip="copy_msg" class="fa fa-clipboard"></i></div>' +
'</div></span>',
link: function (scope) {
var expression = /(https?:\/\/(?:www\.|(?!www))[^\s\.]+\.[^\s]{2,}|www\.[^\s]+\.[^\s]{2,})/gi;
var regex = new RegExp(expression);
$translate(['toggle.visibility', 'copy', 'copied']).then(function (translations) {
scope.tggltxt = translations['toggle.visibility'];
scope.copy_msg = translations['copy.field'];
});
scope.$watch("value", function () {
if (scope.value) {
@ -69,13 +73,13 @@
scope.toggle = true;
}
}
scope.copy_msg = 'Copy to clipboard';
var timer;
scope.onSuccess = function () {
scope.copy_msg = 'Copied to clipboard!';
scope.copy_msg = $translate.instant('copied') ;
$timeout.cancel(timer);
timer = $timeout(function () {
scope.copy_msg = 'Copy to clipboard';
scope.copy_msg = $translate.instant('copy');
}, 5000);
};
scope.valueVisible = true;

View file

@ -31,7 +31,7 @@
*/
angular.module('passmanApp')
.directive('passwordGen', function ($timeout) {
.directive('passwordGen', function ($timeout, $translate) {
/* jshint ignore:start */
function Arcfour () {
this.j = this.i = 0, this.S = []
@ -152,8 +152,8 @@
"<input ng-show=\"passwordVisible\" type=\"text\" ng-disabled=\"disabled\" class=\"form-control \" ng-model=\"password\" placeholder=\"{{placeholder}}\">" +
'<span class="generate_pw">' +
'<div class="cell" tooltip="\'Generate password\'" ng-click="generatePasswordStart()"><i class="fa fa-refresh"></i></div>' +
'<div class="cell" tooltip="\'Toggle password visibility\'" ng-click="toggleVisibility()"><i class="fa" ng-class="{\'fa-eye\': passwordVisible, \'fa-eye-slash\': !passwordVisible }"></i></div>' +
'<div class="cell" tooltip="gen_msg" ng-click="generatePasswordStart()"><i class="fa fa-refresh"></i></div>' +
'<div class="cell" tooltip="tggltxt" ng-click="toggleVisibility()"><i class="fa" ng-class="{\'fa-eye\': passwordVisible, \'fa-eye-slash\': !passwordVisible }"></i></div>' +
'<div class="cell" tooltip="\'Copy password to clipboard\'"><i class="fa fa-clipboard" ngclipboard-success="onSuccess(e);" ngclipboard-error="onError(e);" ngclipboard data-clipboard-text="{{password}}"></i></div>' +
"</button>" +
"</div>" +
@ -177,6 +177,11 @@
}
});
$translate(['password.gen', 'password.copy', 'copied', 'toggle.visibility']).then(function (translations) {
scope.tggltxt = translations['toggle.visibility'];
scope.copy_msg = translations['password.copy'];
scope.gen_msg = translations['password.gen'];
});
scope.$watch("password", function () {
scope.model = scope.password;
@ -185,7 +190,7 @@
//
scope.onSuccess = function (e) {
//@TODO move OC.Notification to a service
OC.Notification.showTemporary('Password copied to clipboard!');
OC.Notification.showTemporary($translate.instant('password.copied'));
e.clearSelection();
};

View file

@ -29,13 +29,13 @@
* # passwordGen
*/
angular.module('passmanApp')
.directive('progressBar', [function () {
.directive('progressBar', ['$translate', function ($translate) {
return {
restrict: 'A',
template: '' +
'<div class="progress">' +
'<div class="progress-bar" role="progressbar" aria-valuenow="{{progress}}"aria-valuemin="0" aria-valuemax="100" style="width:{{progress}}%;" use-theme>' +
'<span class="sr-only">{{progress}}% Complete</span>' +
'<span class="sr-only">{{progress}}% {{completed_text}}</span>' +
'<span ng-if="index && total" class="progress-label" use-theme type="\'color\'" color="\'true\'">{{index}} / {{total}}</span>' +
'<span ng-if="!index && !total" class="progress-label" use-theme type="\'color\'" color="\'true\'">{{progress}}%</span>' +
'</div>' +
@ -46,8 +46,10 @@
total: '=total'
},
link: function () {
link: function (scope) {
$translate(['complete']).then(function (translations) {
scope.completed_text = translations.complete;
});
}
};
}]);

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,6 @@
/*!
* angular-translate - v2.13.1 - 2016-12-06
*
* Copyright (c) 2016 The angular-translate team, Pascal Precht; Licensed MIT
*/
!function(a,b){"function"==typeof define&&define.amd?define([],function(){return b()}):"object"==typeof exports?module.exports=b():b()}(this,function(){function a(a,b){"use strict";return function(c){if(!c||!c.url)throw new Error("Couldn't use urlLoader since no url is given!");var d={};return d[c.queryParameter||"lang"]=c.key,b(angular.extend({url:c.url,params:d,method:"GET"},c.$http)).then(function(a){return a.data},function(){return a.reject(c.key)})}}return a.$inject=["$q","$http"],angular.module("pascalprecht.translate").factory("$translateUrlLoader",a),a.displayName="$translateUrlLoader","pascalprecht.translate"});

File diff suppressed because one or more lines are too long

View file

@ -24,6 +24,7 @@ module.exports = function (config) {
'js/vendor/angular/angular.min.js',
'tests/unit/js/mocks/*.js',
'js/vendor/angular-mocks/angular-mocks.js',
'js/vendor/angular-translate/angular-translate.min.js',
'js/vendor/**/*.js',
'js/app/**/*.js',
'js/lib/**/*.js',

View file

@ -71,7 +71,7 @@ style('passman', 'bookmarklet');
<div id="app" ng-app="passmanApp" ng-controller="BookmarkletCtrl">
<div class="warning_bar" ng-if="using_http && http_warning_hidden == false">
Warning! Adding credentials over http can be insecure!
{{ 'http.warning' | translate }}
<i class="fa fa-times fa-2x" alt="Close"
ng-click="setHttpWarning(true);"></i>
</div>
@ -81,8 +81,8 @@ style('passman', 'bookmarklet');
</div>
<div id="app-content-wrapper" ng-if="active_vault !== false">
<div class="active_vault">
Logged in to {{active_vault.name}}<br />
<span class="link" ng-click="logout()">Change vault</span>
{{ 'bm.active.vault' | translate}} {{active_vault.name}}<br />
<span class="link" ng-click="logout()">{{ 'change.vault' | translate }}</span>
</div>
<ul class="tab_header">
<li ng-repeat="tab in tabs track by $index" class="tab"
@ -94,8 +94,8 @@ style('passman', 'bookmarklet');
<div class="tab_container edit_credential">
<div ng-include="currentTab.url"></div>
<button ng-click="saveCredential()">Save</button>
<button ng-click="cancel()">Cancel</button>
<button ng-click="saveCredential()">{{ 'save' | translate }}</button>
<button ng-click="cancel()">{{ 'cancel' | translate }}</button>
</div>
</div>
</div>

View file

@ -12,6 +12,8 @@ script('passman', 'vendor/angular-touch/angular-touch.min');
script('passman', 'vendor/angular-local-storage/angular-local-storage.min');
script('passman', 'vendor/angular-off-click/angular-off-click.min');
script('passman', 'vendor/angularjs-datetime-picker/angularjs-datetime-picker.min');
script('passman', 'vendor/angular-translate/angular-translate.min');
script('passman', 'vendor/angular-translate/angular-translate-loader-url.min');
script('passman', 'vendor/ng-password-meter/ng-password-meter');
script('passman', 'vendor/sjcl/sjcl');
script('passman', 'vendor/zxcvbn/zxcvbn');
@ -98,7 +100,7 @@ style('passman', 'app');
<div id="app" ng-app="passmanApp" ng-controller="MainCtrl">
<div class="warning_bar" ng-if="using_http && http_warning_hidden == false">
Warning! Using http with passman can be insecure!
{{ 'http.warning' | translate }}
<i class="fa fa-times fa-2x" alt="Close" ng-click="setHttpWarning(true);"></i>
</div>
@ -119,7 +121,7 @@ style('passman', 'app');
<a ng-click="toggleDeleteTime()"
ng-class="{'active': delete_time > 0}">
<i href="#" class="fa fa-trash"></i>
Deleted credentials
{{ 'deleted.credentials' | translate }}
</a>
</li>
</ul>
@ -127,15 +129,15 @@ style('passman', 'app');
<div id="app-settings-header">
<button class="settings-button"
ng-click="settingsShown = !settingsShown"
>Settings
>{{ 'settings' | translate }}
</button>
</div>
<div id="app-settings-content" ng-show="settingsShown">
<!-- Your settings in here -->
<div class="settings-container">
<div><a class="link" ng-href="#/vault/{{active_vault.guid}}/settings">Settings</a></div>
<div><span class="link" ng-click="logout()">Logout</span></div>
<div><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=6YS8F97PETVU2" target="_blank" class="link">Donate</a></div>
<div><a class="link" ng-href="#/vault/{{active_vault.guid}}/settings">{{ 'settings' | translate }}</a></div>
<div><span class="link" ng-click="logout()">{{'logout' | translate }}</span></div>
<div><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=6YS8F97PETVU2" target="_blank" class="link">{{ 'donate' | translate }}</a></div>
</div>
</div>
</div>

View file

@ -13,6 +13,8 @@ script('passman', 'vendor/angular-local-storage/angular-local-storage.min');
script('passman', 'vendor/angular-off-click/angular-off-click.min');
script('passman', 'vendor/angularjs-datetime-picker/angularjs-datetime-picker.min');
script('passman', 'vendor/ng-password-meter/ng-password-meter');
script('passman', 'vendor/angular-translate/angular-translate.min');
script('passman', 'vendor/angular-translate/angular-translate-loader-url.min');
script('passman', 'vendor/sjcl/sjcl');
script('passman', 'vendor/zxcvbn/zxcvbn');
script('passman', 'vendor/ng-clipboard/clipboard.min');

View file

@ -8,7 +8,7 @@
<a ng-click="cancel()">{{active_vault.name}}</a>
</div>
<div class="crumb svg last" data-dir="/Test">
<a ng-if="storedCredential.credential_id">Showing revisions of "{{storedCredential.label}}"</a>
<a ng-if="storedCredential.credential_id">{{ 'showing.revisions' | translate}} "{{storedCredential.label}}"</a>
</div>
</div>
@ -23,11 +23,13 @@
ng-class="{'selected': selectedRevision.revision_id == revision.revision_id}">
<td>
<span class="icon"><i class="fa fa-lock"></i> </span>
<span class="label">Revision of {{revision.created * 1000 | date:'dd-MM-yyyy @ HH:mm:ss'}} ({{revision.credential_data.label}}) <span ng-if="revision.edited_by">by {{revision.edited_by}}</span></span>
<span class="label">
{{ 'revision.of' | translate}} {{revision.created * 1000 | date:'dd-MM-yyyy @ HH:mm:ss'}} ({{revision.credential_data.label}})
<span ng-if="revision.edited_by">{{ 'revision.edited.by' | translate}} {{revision.edited_by}}</span></span>
</td>
</tr>
<tr ng-show="revisions.length == 0">
<td>No revisions found.</td>
<td>{{ 'no.revisions' | translate}}</td>
</tr>
</table>
@ -35,11 +37,11 @@
ng-show="selectedRevision">
<span class="close icon-close" ng-click="closeSelected()"
alt="Close"></span>
<b ng-show="selectedRevision">Revision of {{selectedRevision.created * 1000 | date:'dd-MM-yyyy @ HH:mm:ss'}}</b>
<b ng-show="selectedRevision">{{ 'revision.of' | translate}} {{selectedRevision.created * 1000 | date:'dd-MM-yyyy @ HH:mm:ss'}}</b>
<table class="revision-details">
<tr ng-show="selectedRevision.credential_data.label">
<td>
Label
{{ 'label' | translate}}
</td>
<td>
{{selectedRevision.credential_data.label}}
@ -47,7 +49,7 @@
</tr>
<tr ng-show="selectedRevision.credential_data.username">
<td>
Account
{{ 'account' | translate}}
</td>
<td>
<span credential-field
@ -56,7 +58,7 @@
</tr>
<tr ng-show="selectedRevision.credential_data.password">
<td>
Password
{{ 'password' | translate}}
</td>
<td>
<span credential-field value="selectedRevision.credential_data.password"
@ -65,7 +67,7 @@
</tr>
<tr ng-show="selectedRevision.credential_data.otp.secret">
<td>
OTP
{{ 'otp' | translate}}
</td>
<td>
<span otp-generator
@ -74,7 +76,7 @@
</tr>
<tr ng-show="selectedRevision.credential_data.email">
<td>
E-mail
{{ 'email' | translate}}
</td>
<td>
<span credential-field
@ -83,7 +85,7 @@
</tr>
<tr ng-show="selectedRevision.credential_data.url">
<td>
URL
{{ 'url' | translate}}
</td>
<td>
<span credential-field
@ -92,7 +94,7 @@
</tr>
<tr ng-show="selectedRevision.credential_data.files.length > 0">
<td>
Files
{{ 'files' | translate}}
</td>
<td>
<div ng-repeat="file in selectedRevision.credential_data.files"
@ -112,7 +114,7 @@
</tr>
<tr ng-show="selectedRevision.credential_data.changed">
<td>
Changed
{{ 'changed' | translate}}
</td>
<td>
{{selectedRevision.credential_data.changed * 1000 | date:'dd-MM-yyyy @ HH:mm:ss'}}
@ -120,7 +122,7 @@
</tr>
<tr ng-show="selectedRevision.credential_data.created">
<td>
Created
{{ 'created' | translate}}
</td>
<td>
{{selectedRevision.credential_data.created * 1000 | date:'dd-MM-yyyy @ HH:mm:ss'}}
@ -131,10 +133,10 @@
<div ng-show="selectedRevision">
<button class="button" ng-click="restoreRevision(selectedRevision)" >
<span class="fa fa-edit"></span> Restore revision
<span class="fa fa-edit"></span> {{ 'restore.revision' | translate}}
</button>
<button class="button" ng-click="deleteRevision(selectedRevision)" >
<span class="fa fa-trash"></span> Delete revision
<span class="fa fa-trash"></span> {{ 'delete.revision' | translate}}
</button>
</div>

View file

@ -8,10 +8,9 @@
<a ng-click="cancel()">{{active_vault.name}}</a>
</div>
<div class="crumb svg last" data-dir="/Test">
<a ng-if="storedCredential.credential_id">Edit credential
<a ng-if="storedCredential.credential_id">{{ 'edit.credential' | translate}}
"{{storedCredential.label}}"</a>
<a ng-if="!storedCredential.credential_id">Create new
credential</a>
<a ng-if="!storedCredential.credential_id">{{ 'create.credential' | translate}}</a>
</div>
</div>
</div>
@ -27,6 +26,6 @@
<div class="tab_container edit_credential" use-theme type="'border-top-color'">
<div ng-include="currentTab.url"></div>
<button ng-click="saveCredential()">Save</button>
<button ng-click="cancel()">Cancel</button>
<button ng-click="saveCredential()">{{ 'save' | translate}}</button>
<button ng-click="cancel()">{{ 'cancel' | translate}}</button>
</div>

View file

@ -1,38 +1,38 @@
<div class="row">
<div class="col-xs-12 col-md-6">
<label >Label</label>
<label >{{ 'label' | translate}}</label>
<div>
<input type="text" ng-model="storedCredential.label">
</div>
<label>Usermame</label>
<label>{{ 'username' | translate}}</label>
<div>
<input type="text" ng-model="storedCredential.username">
</div>
<label>E-mail</label>
<label>{{ 'email' | translate}}</label>
<div>
<input type="text" ng-model="storedCredential.email">
</div>
<label>Password</label>
<label>{{ 'password' | translate}}</label>
<div>
<password-gen ng-model="storedCredential.password" settings="pwSettings" callback="pwGenerated"></password-gen>
<ng-password-meter password="storedCredential.password"></ng-password-meter>
</div>
<div>
<label>Repeat password</label>
<label>{{ 'password.r' | translate}}</label>
<input type="password" ng-model="storedCredential.password_repeat">
</div>
<label>URL</label>
<label>{{ 'url' | translate}}</label>
<div>
<input type="text" ng-model="storedCredential.url">
</div>
</div>
<div class="col-xs-12 col-md-6">
<label>Notes</label>
<label>{{ 'notes' | translate}}</label>
<div>
<textarea class="credential_textarea" ng-model="storedCredential.description"></textarea>
</div>
<label>Add Tag</label>
<label>{{ 'add.tag' | translate}}</label>
<div class="tags_input">
<tags-input ng-model="storedCredential.tags" replace-spaces-with-dashes="false">
<auto-complete source="getTags($query)" min-length="0"></auto-complete>

View file

@ -1,13 +1,13 @@
<div class="row">
<div class="col-xs-12 col-md-4">
<label>Field label</label>
<label>{{ 'field.label' | translate}}</label>
<input type="text" ng-model="new_custom_field.label">
</div>
<div class="col-xs-10 col-md-6 field-value">
<div class="row">
<div class="col-xs-12">
<label>Field value</label>
<label>{{ 'field.value' | translate}}</label>
</div>
</div>
<div class="row">
@ -17,14 +17,14 @@
settings="{generateOnCreate: false }" ></password-gen>
<span ng-show="selected_field_type ==='file'">
<input id="custom_field_file" class="inputfile" type="file" file-select success="addFileToCustomField" error="fileLoadError" progress="fileSelectProgress">
<label for="custom_field_file"><i class="fa fa-upload" aria-hidden="true"></i> {{ new_custom_field.value.filename || 'Choose a file'}}</label>
<label for="custom_field_file"><i class="fa fa-upload" aria-hidden="true"></i> {{ new_custom_field.value.filename || 'select.file' | translate}}</label>
</span>
</div>
<div class="col-xs-4 selectType">
<select class="form-control" ng-model="$parent.selected_field_type">
<option value="text">Text</option>
<option value="password">Password</option>
<option value="file">File</option>
<option value="text">{{ 'text' | translate}}</option>
<option value="password">{{ 'password' | translate}}</option>
<option value="file">{{ 'file' | translate}}</option>
</select>
</div>
</div>
@ -36,7 +36,7 @@
</div>
</div>
<div class="col-xs-2 col-md-2">
<label class="invisible">Add</label>
<label class="invisible">{{'add' | translate}}</label>
<button ng-click="addCustomField()">+</button>
</div>
</div>
@ -46,10 +46,10 @@
<thead>
<tr use-theme>
<td class="dragger"></td>
<th class="field_label">Label</th>
<th class="field_value">Value</th>
<th class="field_secret">Type</th>
<th class="field_actions">Actions</th>
<th class="field_label">{{ 'label' | translate}}</th>
<th class="field_value">{{ 'value' | translate}}</th>
<th class="field_secret">{{ 'type' | translate}}</th>
<th class="field_actions">{{ 'actions' | translate}}</th>
</tr>
</thead>
<tbody ui-sortable ng-model="storedCredential.custom_fields">
@ -61,7 +61,7 @@
<a href="#" editable-text="field.label">{{ field.label || "empty" }}</a>
</td>
<td>
<span ng-if="field.field_type === 'text'"><a href="#" editable-text="field.value">{{ field.value || "empty" }}</a></span>
<span ng-if="field.field_type === 'text'"><a href="#" editable-text="field.value">{{ field.value || 'empty' | translate }}</a></span>
<span ng-if="field.field_type === 'password'"><a href="#" editable-password="field.value"><span ng-repeat="n in [] | range:field.value.length">*</span></a></span>
<span ng-if="field.field_type === 'file'">{{field.value.filename}} ({{field.value.size | bytes}})</span>
</td>

View file

@ -1,7 +1,7 @@
<div class="row file_tab">
<div class="col-xs-12 col-md-6">
<input class="inputfile" id="file" type="file" file-select success="fileLoaded" error="fileLoadError" progress="fileSelectProgress">
<label for="file"><i class="fa fa-upload" aria-hidden="true"></i> Choose a file</label>
<label for="file"><i class="fa fa-upload" aria-hidden="true"></i> {{'select.file' | translate}}</label>
<span ng-if="fileprogress.file_percent > 0">
<div progress-bar="fileprogress.file_percent"></div>
</span>
@ -12,10 +12,10 @@
<table>
<thead use-theme>
<tr>
<th class="field_label">Filename</th>
<th class="field_value">Upload date</th>
<th class="field_secret">Size</th>
<th class="field_actions">Actions</th>
<th class="field_label">{{ 'file.name' | translate }}</th>
<th class="field_value">{{ 'upload.date' | translate}}</th>
<th class="field_secret">{{ 'size' | translate}}</th>
<th class="field_actions">{{ 'actions' | translate}}</th>
</tr>
</thead>
<tr ng-repeat="file in storedCredential.files">

View file

@ -1,7 +1,7 @@
<div class="row">
<div class="col-xs-12">
<div class="col-xs-2 nopadding">
Upload your OTP qr code
{{ 'upload.qr' | translate}}
</div>
<div class="col-xs-6 nopadding">
<input type="file" qrread on-read="parseQR(qrdata)"
@ -12,7 +12,7 @@
</div>
<div class="row">
<div class="col-xs-12" ng-if="storedCredential.otp">Current OTP settings
<div class="col-xs-12" ng-if="storedCredential.otp">{{ 'current.qr' | translate}}
</div>
</div>
<div class="row">
@ -22,23 +22,23 @@
<div class="col-sm-4 col-sm-5 col-md-5">
<table ng-show="storedCredential.otp">
<tr ng-show="storedCredential.otp.type">
<td>Type:</td>
<td>{{ 'type' | translate}}:</td>
<td>{{storedCredential.otp.type}}</td>
</tr>
<tr ng-show="storedCredential.otp.label">
<td>Label:</td>
<td>{{ 'label' | translate}}:</td>
<td>{{storedCredential.otp.label}}</td>
</tr>
<tr ng-show="storedCredential.otp.issuer">
<td>Issuer:</td>
<td>{{ 'issuer' | translate}}:</td>
<td>{{storedCredential.otp.issuer}}</td>
</tr>
<tr ng-show="storedCredential.otp.secret">
<td>Secret:</td>
<td>{{ 'secret' | translate}}:</td>
<td>{{storedCredential.otp.secret}}</td>
</tr>
<tr ng-show="storedCredential.otp.secret">
<td>OTP:</td>
<td>{{ 'otp' | translate}}:</td>
<td><span otp-generator
secret="storedCredential.otp.secret"></span>
</td>

View file

@ -1,55 +1,55 @@
<div class="row">
<div class="col-xs-12 col-md-5 col-lg-5">
<label>Password</label>
<label>{{ 'password' | translate}}</label>
<div>
<password-gen ng-model="storedCredential.password"
settings="pwSettings" callback="pwGenerated"></password-gen>
<ng-password-meter
password="storedCredential.password"></ng-password-meter>
</div>
<label>Repeat password</label>
<label>{{ 'password.r' | translate}}</label>
<div>
<input type="password" ng-model="storedCredential.password_repeat">
</div>
<label>Expire date</label>
<label>{{ 'expire.date' | translate}}</label>
<div>
<span datetime-picker ng-model="storedCredential.expire_time" class="link"
future-only ng-show="storedCredential.expire_time == 0"
close-on-select="false"
> No expire date set</span>
> {{'no.expire.date' | translate}}</span>
<span datetime-picker ng-model="storedCredential.expire_time" class="link"
future-only ng-show="storedCredential.expire_time != 0"
close-on-select="false"> {{ storedCredential.expire_time | date:'dd-MM-yyyy @ HH:mm:ss'}}</span>
</div>
<label>Renew interval</label>
<label>{{ 'renew.interval' | translate}}</label>
<div>
<input type="number" ng-model="renewIntervalValue" min="0" ng-change="updateInterval(renewIntervalValue, renewIntervalModifier)">
<select ng-model="renewIntervalModifier" ng-change="updateInterval(renewIntervalValue, renewIntervalModifier)">
<option value="0">Disabled</option>
<option value="86400">Day(s)</option>
<option value="604800">Week(s)</option>
<option value="2592000">Month(s)</option>
<option value="31622400">Year(s)</option>
<option value="0">{{ 'disabled' | translate}}</option>
<option value="86400">{{ 'days' | translate }}</option>
<option value="604800">{{ 'weeks' | translate}}</option>
<option value="2592000">{{ 'months' | translate}}</option>
<option value="31622400">{{ 'years' | translate}}</option>
</select>
</div>
</div>
<div class="col-xs-12 col-md-7 col-lg-7">
<b>Password generation settings</b>
<b>{{ 'generation.settings' | translate}}</b>
<div class="row">
<div class="password_settings">
<div class="col-xs-12 col-sm-5 col-lg-4">
<label>
<span class="label">Password length</span><br />
<span class="label">{{ 'password.generation.length' | translate}}</span><br />
<input type="number" ng-model="pwSettings.length" min="1">
</label>
<label>
<span class="label">Minimum amount of digits</span><br />
<span class="label">{{'password.generation.min_digits' | translate}}</span><br />
<input type="number" ng-model="pwSettings.minimumDigitCount" min="0">
</label>
@ -58,33 +58,33 @@
<label>
<input type="checkbox"
ng-model="pwSettings.useUppercase">
<span class="label sm">Use uppercase letters</span>
<span class="label sm">{{ 'password.generation.uppercase' | translate}}</span>
</label>
<label>
<input
ng-model="pwSettings.useLowercase" type="checkbox"
id="lower">
<span class="label sm">Use lowercase letters</span>
<span class="label sm">{{ 'password.generation.lowercase' | translate}}</span>
</label>
<label>
<input ng-model="pwSettings.useDigits" type="checkbox"
id="digits">
<span class="label sm">Use numbers</span>
<span class="label sm">{{ 'password.generation.digits' | translate}}</span>
</label>
<label>
<input type="checkbox" id="special"
ng-model="pwSettings.useSpecialChars">
<span class="label sm">Use special characters</span>
<span class="label sm">{{ 'password.generation.special' | translate}}</span>
</label>
<label>
<input type="checkbox" id="ambig"
ng-model="pwSettings.avoidAmbiguousCharacters">
<span class="label sm">Avoid ambiguous characters</span>
<span class="label sm">{{ 'password.generation.ambiguous' | translate}}</span>
</label>
<label>
<input type="checkbox" ng-model="pwSettings.requireEveryCharType"
id="reqevery">
<span class="label sm">Require every character type</span>
<span class="label sm">{{ 'password.generation.require_same' | translate}}</span>
</label>
</div>
</div>

View file

@ -1,7 +1,7 @@
<div ng-controller="ExportCtrl">
<div class="row">
<div class="col-xs-6">
<label>Export type
<label>{{ 'export.type' | translate}}
<select ng-init="raw" ng-model="raw"
ng-change="setExporter(raw)">
<option ng-repeat="exporter in available_exporters"
@ -11,7 +11,7 @@
</select></label>
<div><b>{{selectedExporter.description}}</b></div>
<button class="button" ng-click="startExport()"
ng-if="selectedExporter">Export
ng-if="selectedExporter">{{ 'export' | translate}}
</button>
</div>
<div class="col-xs-6">

View file

@ -1,21 +1,21 @@
<div class="row">
<div class="col-xs-12 col-md-6">
<h3>Rename vault</h3>
<label>New vault name</label>
<h3>{{ 'rename.vault' | translate}}</h3>
<label>{{ 'rename.vault.name' | translate}}</label>
<input type="text" ng-model="$parent.new_vault_name">
<button ng-click="saveVaultSettings()">
Change
{{ 'change' | translate}}
</button>
<h3>Change vault key</h3>
<label>Old vault password</label>
<h3>{{ 'change.vault.key' | translate}}</h3>
<label>{{ 'old.vault.password' | translate}}</label>
<input type="password" ng-model="oldVaultPass">
<label>New vault password</label>
<label>{{ 'new.vault.password' | translate}}</label>
<password-gen ng-model="newVaultPass"
></password-gen>
<ng-password-meter password="newVaultPass"></ng-password-meter>
<label>New vault password</label>
<label>{{ 'new.vault.pw.r' | translate}}</label>
<input type="password" ng-model="newVaultPass2">
<div ng-show="error" class="error">
<ul>
@ -23,30 +23,29 @@
</ul>
</div>
<button ng-click="changeVaultPassword(oldVaultPass,newVaultPass,newVaultPass2)"
>Change
>{{ 'change' | translate}}
</button>
<div ng-show="change_pw.total > 0">
Please wait your vault is being updated, do not leave this page.<br />
Processing {{cur_state.process}}
{{'warning.leave' | translate}}<br />
{{ 'processing' | translate}} {{cur_state.process}}
<div progress-bar="cur_state.calculated" index="cur_state.current" total="cur_state.total"></div>
Total progress
{{ 'total.progress' | translate}}
<div progress-bar="change_pw.percent" index="change_pw.done" total="change_pw.total"></div>
</div>
</div>
<div class="col-xs-12 col-md-6">
<h3>About passman</h3>
<h3>{{ 'about.passman' | translate}}</h3>
<p>
Version: <b>{{passman_version}}</b><br/>
Bla bla about passman, changelog.
{{ 'version' | translate}}: <b>{{passman_version}}</b><br/>
<br/>
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=6YS8F97PETVU2"
target="_blank" class="link">Donate to support
development</a><br/>
target="_blank" class="link">{{ 'donate.support' | translate}}</a><br/>
</p>
<h3>Bookmarklet</h3>
<div><p>Save your passwords with 1 click!<br/> Drag below button to your
bookmark toolbar.<br/></p>
<h3>{{ 'bookmarklet' | translate}}</h3>
<div><p>{{ 'bookmarklet.info1' | translate}}<br/>
{{ 'bookmarklet.info2' | translate}}
<br/></p>
</div>
<div><p ng-bind-html="bookmarklet" style="margin-top: 5px"></p></div>
</div>

View file

@ -1,7 +1,7 @@
<div ng-controller="ImportCtrl">
<div class="row">
<div class="col-xs-6">
<label>Import type
<label>{{ 'import.type' | translate}}
<select ng-init="importerType" ng-model="importerType"
ng-change="setImporter(importerType)">
<option ng-repeat="importer in available_importers"
@ -14,15 +14,15 @@
success="fileLoaded" error="fileLoadError"
progress="fileSelectProgress"><br/>
<button class="button" ng-click="startImport()"
ng-if="selectedImporter">Import
ng-if="selectedImporter">{{ 'import' | translate}}
</button>
<div ng-if="file_read_progress.percent > 0">
Read progress
{{ 'read.progress' | translate}}
<div progress-bar="file_read_progress.percent" index="file_read_progress.loaded" total="file_read_progress.total"></div>
</div>
<div ng-if="import_progress.progress > 0">
Upload progress
{{ 'upload.progress' | translate}}
<div progress-bar="import_progress.progress" index="import_progress.loaded" total="import_progress.total"></div>
</div>
</div>

View file

@ -1,12 +1,12 @@
<div class="password_settings">
<div class="col-xs-12 col-sm-5 col-lg-4">
<label>
<span class="label">Password length</span><br />
<span class="label">{{ 'password.generation.length' | translate}}</span><br />
<input type="number" ng-model="vault_settings.pwSettings.length" min="1">
</label>
<label>
<span class="label">Minimum amount of digits</span><br />
<span class="label">{{ 'password.generation.min_digits' | translate}}</span><br />
<input type="number" ng-model="vault_settings.pwSettings.minimumDigitCount" min="0">
</label>
@ -20,38 +20,38 @@
<label>
<input type="checkbox"
ng-model="vault_settings.pwSettings.useUppercase">
<span class="label sm">Use uppercase letters</span>
<span class="label sm">{{ 'password.generation.uppercase' | translate}}</span>
</label>
<label>
<input
ng-model="vault_settings.pwSettings.useLowercase" type="checkbox"
id="lower">
<span class="label sm">Use lowercase letters</span>
<span class="label sm">{{ 'password.generation.lowercase' | translate}}</span>
</label>
<label>
<input ng-model="vault_settings.pwSettings.useDigits" type="checkbox"
id="digits">
<span class="label sm">Use numbers</span>
<span class="label sm">{{ 'password.generation.digits' | translate}}</span>
</label>
<label>
<input type="checkbox" id="special"
ng-model="vault_settings.pwSettings.useSpecialChars">
<span class="label sm">Use special characters</span>
<span class="label sm">{{ 'password.generation.special' | translate}}</span>
</label>
<label>
<input type="checkbox" id="ambig"
ng-model="vault_settings.pwSettings.avoidAmbiguousCharacters">
<span class="label sm">Avoid ambiguous characters</span>
<span class="label sm">{{ 'password.generation.ambiguous' | translate}}</span>
</label>
<label>
<input type="checkbox" ng-model="vault_settings.pwSettings.requireEveryCharType"
id="reqevery">
<span class="label sm">Require every character type</span>
<span class="label sm">{{ 'password.generation.require_same' | translate}}</span>
</label>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<button class="button" ng-click="saveVaultSettings()">Save</button>
<button class="button" ng-click="saveVaultSettings()">{{ 'save' | translate}}</button>
</div>
</div>

View file

@ -2,26 +2,26 @@
<div class="row">
<div class="col-md-6">
<label>Private Key</label>
<label>{{ 'priv.key' | translate}}</label>
<textarea class="col-md-12">{{sharing_keys.private_sharing_key}}</textarea>
</div>
<div class="col-md-6">
<label>Public key</label>
<label>{{ 'pub.key' | translate}}</label>
<textarea class="col-md-12">{{sharing_keys.public_sharing_key}}</textarea>
</div>
</div>
<div class="row">
<div class="col-md-12">
<label>Key size
<label>{{ 'key.size' | translate}}
<select ng-model="key_size" ng-options="size.name for size in available_sizes">
<!--<option value="512">512</option>-->
<!--<option value="1024">1024</option>-->
<!--<option value="2048">2048</option>-->
<!--<option value="4096">4096</option>-->
</select>
<button ng-click="updateSharingKeys()"><i class="fa fa-fa-floppy-o"></i> Save keys</button>
<button ng-if="!generating" ng-click="generateKeys(key_size.size)">Generate sharing keys</button>
<button ng-if="generating"><i class="fa fa-spinner fa-spin"></i> Generating sharing keys step {{progress}}/2</button>
<button ng-click="updateSharingKeys()"><i class="fa fa-fa-floppy-o"></i> {{ 'save.keys' | translate}}</button>
<button ng-if="!generating" ng-click="generateKeys(key_size.size)"> {{ 'gen.keys' | translate}}</button>
<button ng-if="generating"><i class="fa fa-spinner fa-spin"></i> {{ 'generating.keys' | translate}} ({{progress}}/2)</button>
</label>
</div>
</div>

View file

@ -1,26 +1,27 @@
<div class="row">
<div class="col-xs-12">
<p>The password tool will scan your password, calculate the avarage
crack time and, if below the threshold, show them</p>
<p>{{ 'tool.intro' | translate}}</p>
</div>
<div class="col-xs-12" ng-init="minStrength = 3;">
Minimum password stength <input type="number" min="1" max="4" value="3"
{{ 'min.strength' | translate}} <input type="number" min="1" max="4" value="3"
ng-model="minStrength">
<button ng-click="startScan(minStrength)">Start scan</button>
</div>
</div>
<div class="row" ng-show="scan_result">
<div class="col-xs-12">
<p>Passman scanned your passwords, and here is the result.<br/>
A total of <b>{{scan_result.length}}</b> weak credentials.<br/>
<p>{{ 'scan.result.msg' | translate}}<br/>
<span translate="scan.result"
translate-values='{ scan_result: scan_result.length}'></span>
<br/>
</p>
<table class="table scan-result-table">
<thead>
<tr>
<td>Label</td>
<td>Score</td>
<td>Password</td>
<td>Action</td>
<td>{{ 'label' | translate}}</td>
<td>{{ 'score' | translate}}</td>
<td>{{ 'password' | translate}}</td>
<td>{{ 'action' | translate}}</td>
</tr>
</thead>
<tbody>

View file

@ -8,7 +8,7 @@
<tags-input ng-model="inputSharedWith"
replace-spaces-with-dashes="false"
add-from-autocomplete-only="true"
placeholder="Search users or groups...">
placeholder="{{ 'search.u.g' | translate}}">
<auto-complete source="searchUsers($query)"
min-length="0"
template="autocomplete-template"></auto-complete>
@ -26,11 +26,11 @@
</table>
<div ng-if="share_settings.cypher_progress.done > 0">
Cyphering...
{{'cyphering' | translate}}...
<div progress-bar="share_settings.cypher_progress.percent" index="share_settings.cypher_progress.done" total="share_settings.cypher_progress.total"></div>
</div>
<div ng-if="share_settings.upload_progress.done > 0">
Uploading...
{{ 'uploading' | translate}}...
<div progress-bar="share_settings.upload_progress.percent" index="share_settings.upload_progress.done" total="share_settings.upload_progress.total"></div>
</div>
</div>
@ -39,8 +39,8 @@
<table class="table">
<thead>
<tr>
<td>User</td>
<td>Crypto time</td>
<td>{{ 'user' | translate}}</td>
<td>{{ 'crypto.time' | translate}}</td>
</tr>
</thead>
<tr ng-repeat="user in share_settings.cypher_progress.times">
@ -51,7 +51,7 @@
<td>{{user.time}} s</td>
</tr>
</table>
Total time spent cyphering: {{ calculate_total_time() }}
{{ 'crypto.total.time' | translate}}: {{ calculate_total_time() }}
</div>
</div>
<div class="row">
@ -60,11 +60,11 @@
ng-show="share_settings.credentialSharedWithUserAndGroup.length > 0">
<thead>
<tr>
<td>User</td>
<td>Read</td>
<td>Write</td>
<td>Files</td>
<td>Revisions</td>
<td>{{'user' | translate}}</td>
<td>{{ 'perm.read' | translate}}</td>
<td>{{ 'perm.write' | translate}}</td>
<td>{{ 'perm.files' | translate}}</td>
<td>{{ 'perm.revisions' | translate}}</td>
<td></td>
</tr>
</thead>
@ -73,7 +73,7 @@
<i class="fa fa-user" ng-if="user.pending === false"></i>
<i class="fa fa-user-times" ng-if="user.pending === true"></i>
{{user.userId}}
<small ng-if="user.pending === true" class="pull-right col-xs-4">Pending</small>
<small ng-if="user.pending === true" class="pull-right col-xs-4">{{ 'pending' | translate}}</small>
</td>
<td><input type="checkbox" ng-click="setPermission(user.acl, default_permissions.permissions.READ)" ng-checked="hasPermission(user.acl, default_permissions.permissions.READ)"> </td>
<td><input type="checkbox" ng-click="setPermission(user.acl, default_permissions.permissions.WRITE)" ng-checked="hasPermission(user.acl, default_permissions.permissions.WRITE)"></td>

View file

@ -1,11 +1,11 @@
<div class="row">
<div class="col-xs-12 col-md-6">
<label><input type="checkbox" ng-model="share_settings.linkSharing.enabled">
Enable link sharing.</label><br/>
<input type="text" ng-model="share_link" select-on-click placeholder="Click share first!"
{{ 'enable.link.sharing' | translate}}.</label><br/>
<input type="text" ng-model="share_link" select-on-click placeholder="{{ 'click.share' | translate}}!"
ng-if="share_settings.linkSharing.enabled">
<div ng-show="share_settings.linkSharing.enabled">
Share until date
{{ 'share.until.date' | translate}}
<span datetime-picker
ng-model="share_settings.linkSharing.settings.expire_time"
class="link"
@ -16,7 +16,7 @@
</div>
<div ng-show="share_settings.linkSharing.enabled">
Expire after views<br />
{{ 'expire.views' | translate}}<br />
<input type="number"
ng-model="share_settings.linkSharing.settings.expire_views">
</div>
@ -28,7 +28,7 @@
ng-checked="hasPermission(share_settings.linkSharing.settings.acl, default_permissions.permissions.FILES)">
</td>
<td>
Show files
{{ 'show.files' | translate}}
</td>
</tr>
</table>

View file

@ -12,24 +12,24 @@
<div class="indicator"></div>
</div>
<div class="details" ng-click="toggleScore()">
<span ng-show="!scoreShown">Details</span>
<span ng-show="scoreShown">Hide details</span>
<span ng-show="!scoreShown">{{ 'details' | translate }}</span>
<span ng-show="scoreShown">{{ 'hide.details' | translate}}</span>
</div>
<div class="pass-meter-message">{{message}}</div>
<div class="detail_box" ng-show="scoreShown">
<div class="row">
<div class="col-xs-6">
Password score:
{{ 'password.score' | translate}}:
</div>
<div class="col-xs-6">
{{score.score}}
</div>
</div>
<div><b>Cracking times</b></div>
<div><b>{{ 'cracking.times' | translate}}</b></div>
<div class="row">
<div class="col-xs-6">
100 / hour<br/>
<small> Throttled online attack</small>
{{ 'cracking.time.100h' | translate}}<br/>
<small> {{ 'cracking.time.100h.desc' | translate}}</small>
</div>
<div class="col-xs-6">
{{score.crack_times_display.online_throttling_100_per_hour}}
@ -37,8 +37,8 @@
</div>
<div class="row">
<div class="col-xs-6">
10 / second<br/>
<small>Unthrottled online attack</small>
{{ 'cracking.time.10s' | translate}}<br/>
<small>{{ 'cracking.time.10s.desc' | translate}}</small>
</div>
<div class="col-xs-6">
{{score.crack_times_display.online_no_throttling_10_per_second}}
@ -46,8 +46,8 @@
</div>
<div class="row">
<div class="col-xs-6">
10k / second<br/>
<small>Offline attack, slow hash, many cores</small>
{{ 'cracking.time.10ks' | translate}}<br/>
<small>{{ 'cracking.time.10ks.desc' | translate}}</small>
</div>
<div class="col-xs-6">
{{score.crack_times_display.offline_slow_hashing_1e4_per_second}}
@ -55,8 +55,8 @@
</div>
<div class="row">
<div class="col-xs-6">
10B / second<br/>
<small>offline attack, fast hash, many cores</small>
{{ 'cracking.time.10Bs' | translate}}<br/>
<small>{{ 'cracking.time.10Bs.desc' | translate}}</small>
</div>
<div class="col-xs-6">
{{score.crack_times_display.offline_fast_hashing_1e10_per_second}}
@ -64,10 +64,10 @@
</div>
<div class="row">
<div class="col-xs-6">
Match sequence:
{{ 'match.sequence' | translate}}:
</div>
<div class="col-xs-6">
<span class="link" ng-click="toggleMatchBreakdown()">See match sequence</span>
<span class="link" ng-click="toggleMatchBreakdown()">{{ 'match.sequence.link' | translate}}</span>
</div>
</div>
</div>
@ -84,40 +84,40 @@
</td>
</tr>
<tr ng-if="sequence.pattern">
<td>Pattern</td>
<td>{{ 'pattern' | translate}}</td>
<td>{{sequence.pattern}}</td>
</tr>
<tr ng-if="sequence.matched_word">
<td>Matched word</td>
<td>{{ 'matched.word' | translate}}</td>
<td>{{sequence.matched_word}}</td>
</tr>
<tr ng-if="sequence.dictionary_name">
<td>Dictionary name</td>
<td>{{ 'dictionary.name' | translate}}</td>
<td>{{sequence.dictionary_name}}</td>
</tr>
<tr ng-if="sequence.rank">
<td>Rank</td>
<td>{{ 'rank' | translate}}</td>
<td>{{sequence.rank}}</td>
</tr>
<tr ng-if="sequence.reversed">
<td>Reversed</td>
<td>{{ 'reversed' | translate}}</td>
<td>{{sequence.reversed}}</td>
</tr>
<tr ng-if="sequence.guesses">
<td>Guesses</td>
<td>{{ 'guesses' | translate}}</td>
<td>{{sequence.guesses}}</td>
</tr>
<tr ng-if="sequence.base_guesses">
<td>Base guesses</td>
<td>{{ 'base.guesses' | translate}}</td>
<td>{{sequence.base_guesses}}</td>
</tr>
<tr ng-if="sequence.uppercase_variations">
<td>Uppercase variations</td>
<td>{{ 'uppercase.variations' | translate}}</td>
<td>{{sequence.uppercase_variations}}</td>
</tr>
<tr ng-if="sequence.l33t_variations">
<td>l33t-variations</td>
<td>{{ 'leet.variations' | translate}}</td>
<td>
{{sequence.l33t_variations}}
</td>

View file

@ -8,7 +8,7 @@
<a ng-click="cancel()">{{active_vault.name}}</a>
</div>
<div class="crumb svg last">
<a>Settings</a>
<a>{{ 'settings' | translate}}</a>
</div>
</div>
</div>

View file

@ -8,8 +8,9 @@
<a ng-click="cancel()">{{active_vault.name}}</a>
</div>
<div class="crumb svg last" data-dir="/Test">
<a ng-if="storedCredential.credential_id">Share credential
"{{storedCredential.label}}"</a>
<a ng-if="storedCredential.credential_id">
{{ 'share.credential' | translate}} {{storedCredential.label}}
</a>
</div>
</div>
</div>
@ -26,9 +27,9 @@
<div class="tab_container share_credential">
<div ng-include="currentTab.url"></div>
<button ng-click="applyShare()">Share</button>
<button ng-click="cancel()">Cancel</button>
<button class="btn btn-danger" ng-click="unshareCredential(storedCredential)">Unshare</button>
<button ng-click="applyShare()">{{ 'share' | translate}}</button>
<button ng-click="cancel()">{{ 'cancel' | translate}}</button>
<button class="btn btn-danger" ng-click="unshareCredential(storedCredential)">{{ 'unshare' | translate}}</button>
</div>

View file

@ -11,7 +11,7 @@
</div>
</div>
<span class="title" ng-if="delete_time">
Showing deleted since:
{{ 'deleted.since' | translate }}:
<span ng-if="delete_time == 1">All time</span>
<span ng-if="delete_time > 1">{{delete_time | date:'dd-MM-yyyy @ HH:mm:ss'}}</span>
@ -20,12 +20,14 @@
<span ng-click="addCredential()" class="button new">
<span >+</span></span>
</div>
<div class="title" ng-show="filtered_credentials.length > 0">
Showing {{filtered_credentials.length}} of {{active_vault.credentials.length - 1}} credentials
<div class="title" ng-show="filtered_credentials.length > 0" translate="number.filtered"
translate-values="{number_filtered: filtered_credentials.length, credential_number: active_vault.credentials.length - 1}"
>
</div>
<div class="searchboxContainer">
<input type="text" ng-model="filterOptions.filterText" class="searchbox"
placeholder="Search credential..." select-on-click clear-btn>
placeholder="{{'search.credential' | translate}}" select-on-click clear-btn>
</div>
<div class="viewModes">
<div class="view-mode" ng-class="{'active': view_mode === 'list' }"
@ -87,14 +89,14 @@
<div class="credential-data">
<div class="row" ng-show="selectedCredential.username">
<div class="col-xs-4 col-md-3 col-lg-3">Account</div>
<div class="col-xs-4 col-md-3 col-lg-3">{{ 'account' | translate }}</div>
<div class="col-xs-8 col-md-9 col-lg-9"><span credential-field
value="selectedCredential.username"></span></div>
</div>
<div class="row" ng-show="selectedCredential.password">
<div class="col-xs-4 col-md-3 col-lg-3">Password</div>
<div class="col-xs-4 col-md-3 col-lg-3">{{ 'password' | translate }}</div>
<div class="col-xs-8 col-md-9 col-lg-9">
<span credential-field value="selectedCredential.password" secret="'true'">
@ -104,31 +106,31 @@
<div class="row" ng-show="selectedCredential.otp.secret">
<div class="col-xs-4 col-md-3 col-lg-3">OTP</div>
<div class="col-xs-4 col-md-3 col-lg-3">{{'otp' | translate}}</div>
<div class="col-xs-8 col-md-9 col-lg-9"><span otp-generator
secret="selectedCredential.otp.secret"></span></div>
</div>
<div class="row" ng-show="selectedCredential.email">
<div class="col-xs-4 col-md-3 col-lg-3">E-mail</div>
<div class="col-xs-4 col-md-3 col-lg-3">{{'email' | translate}}</div>
<div class="col-xs-8 col-md-9 col-lg-9"><span credential-field
value="selectedCredential.email"></span></div>
</div>
<div class="row" ng-show="selectedCredential.url">
<div class="col-xs-4 col-md-3 col-lg-3">URL</div>
<div class="col-xs-4 col-md-3 col-lg-3">{{ 'url' | translate}}</div>
<div class="col-xs-8 col-md-9 col-lg-9"><span credential-field
value="selectedCredential.url"></span></div>
</div>
<div class="row" ng-show="selectedCredential.description">
<div class="col-xs-4 col-md-3 col-lg-3">Notes</div>
<div class="col-xs-4 col-md-3 col-lg-3">{{'notes' | translate}}</div>
<div class="col-xs-8 col-md-9 col-lg-9" ng-bind-html="selectedCredential.description_html"></div>
</div>
<div class="row" ng-show="selectedCredential.files.length > 0">
<div class="col-xs-4 col-md-3 col-lg-3">Files</div>
<div class="col-xs-4 col-md-3 col-lg-3">{{ 'files' | translate}}</div>
<div class="col-xs-8 col-md-9 col-lg-9"><div ng-repeat="file in selectedCredential.files"
class="link" ng-click="downloadFile(selectedCredential, file)">
{{file.filename}} ({{file.size | bytes}})
@ -146,7 +148,7 @@
<div class="row" ng-show="selectedCredential.expire_time > 0">
<div class="col-xs-4 col-md-3 col-lg-3">Expire time</div>
<div class="col-xs-4 col-md-3 col-lg-3">{{ 'expire.time' | translate }}</div>
<div class="col-xs-8 col-md-9 col-lg-9">
{{selectedCredential.expire_time * 1000 | date:'dd-MM-yyyy @ HH:mm:ss'}}
</div>
@ -154,7 +156,7 @@
<div class="row" ng-show="selectedCredential.changed">
<div class="col-xs-4 col-md-3 col-lg-3">Changed</div>
<div class="col-xs-4 col-md-3 col-lg-3">{{ 'changed' | translate}}</div>
<div class="col-xs-8 col-md-9 col-lg-9">
{{selectedCredential.changed * 1000 | date:'dd-MM-yyyy @ HH:mm:ss'}}
</div>
@ -162,7 +164,7 @@
<div class="row" ng-show="selectedCredential.created">
<div class="col-xs-4 col-md-3 col-lg-3">Created</div>
<div class="col-xs-4 col-md-3 col-lg-3">{{ 'created' | translate}}</div>
<div class="col-xs-8 col-md-9 col-lg-9">
{{selectedCredential.created * 1000 | date:'dd-MM-yyyy @ HH:mm:ss'}}
</div>
@ -184,34 +186,34 @@
<button class="button"
ng-click="editCredential(selectedCredential)"
ng-if="selectedCredential.delete_time == 0 && hasPermission(selectedCredential.acl.permissions, permissions.permissions.WRITE)">
<span class="fa fa-edit"></span> Edit
<span class="fa fa-edit"></span> {{ 'edit' | translate}}
</button>
<button class="button"
ng-click="deleteCredential(selectedCredential)"
ng-if="selectedCredential.delete_time == 0 && hasPermission(selectedCredential.acl.permissions, permissions.permissions.WRITE)">
<span class="fa fa-trash"></span> Delete
<span class="fa fa-trash"></span> {{ 'delete' | translate}}
</button>
<button class="button"
ng-click="shareCredential(selectedCredential)"
ng-if="selectedCredential.delete_time == 0 && selectedCredential.acl === undefined">
<span class="fa fa-share"></span> Share
<span class="fa fa-share"></span> {{ 'share' | translate}}
</button>
<button class="button"
ng-click="getRevisions(selectedCredential)"
ng-if="selectedCredential.delete_time == 0 && hasPermission(selectedCredential.acl.permissions, permissions.permissions.HISTORY)">
<span class="fa fa-undo"></span> Revisions
<span class="fa fa-undo"></span> {{ 'revisions' | translate}}
</button>
<button class="button"
ng-if="selectedCredential.delete_time > 0"
ng-click="recoverCredential(selectedCredential) && hasPermission(selectedCredential.acl.permissions, permissions.permissions.WRITE)">
<span class="fa fa-recycle"></span> Recover
<span class="fa fa-recycle"></span> {{'recover' | translate}}
</button>
<button class="button"
ng-if="selectedCredential.delete_time > 0"
ng-click="destroyCredential(selectedCredential)">
<span class="fa fa-bomb"></span> Destroy
<span class="fa fa-bomb"></span> {{'destroy' | translate}}
</button>
</div>
</div>
@ -220,17 +222,17 @@
</div>
<div class="share_popup" style="display: none">
You have incoming share requests.<br/>
If you want to the credential in a other vault,<br/> logout of this vault
and login to the vault you want the shared credential in.
{{ 'sharereq.title' | translate}}<br/>
{{ 'sharereq.line1' | translate}}<br/>
{{ 'sharereq.line2' | translate}}
{{active_vault.vault_id}}
<table class="table">
<thead>
<tr>
<td>Label</td>
<td>Permissions</td>
<td>Received from</td>
<td>Date</td>
<td>{{ 'label' | translate}}</td>
<td>{{ 'permissions' | translate}}</td>
<td>{{ 'received.from' | translate}}</td>
<td>{{ 'date' | translate}}</td>
</tr>
</thead>
<tr ng-repeat="share_request in incoming_share_requests"
@ -245,12 +247,11 @@
{{share_request.from_user_id}}
</td>
<td>
{{share_request.created * 1000 | date:'dd-MM-yyyy @
HH:mm:ss'}}
{{share_request.created * 1000 | date:'dd-MM-yyyy @ HH:mm:ss'}}
</td>
<td>
<span class="link" ng-click="acceptShareRequest(share_request)">Accept</span>
| <span class="link" ng-click="declineShareRequest(share_request)">Decline</span>
<span class="link" ng-click="acceptShareRequest(share_request)">{{ 'accept' | translate}}</span>
| <span class="link" ng-click="declineShareRequest(share_request)">{{ 'decline' | translate}}</span>
</td>
</tr>
</table>

View file

@ -11,17 +11,17 @@
<span class="ui-select-choices-row-inner">
<div class="ng-binding ng-scope">{{vault.name}}</div>
<small class="ng-binding ng-scope">
Created: {{vault.created * 1000 | date:'dd-MM-yyyy @ HH:mm:ss'}}
{{ 'created' | translate}}: {{vault.created * 1000 | date:'dd-MM-yyyy @ HH:mm:ss'}}
|
Last accessed:
{{ 'last.access' | translate}}:
<span ng-if="vault.last_access > 0">{{vault.last_access * 1000 | date:'dd-MM-yyyy @ HH:mm:ss'}}</span>
<span ng-if="vault.last_access === 0">Never</span>
<span ng-if="vault.last_access === 0">{{'never' | translate}}</span>
</small>
</span>
</div>
</li>
<li ng-if="vaults.length === 0">No vaults found, why not create
one?
<li ng-if="vaults.length === 0">{{ 'no.vaults' | translate}}
</li>
</ul>
@ -30,17 +30,17 @@
<div ng-if="creating_vault">
<div class="login_form" ng-init="vault_name = '' ">
Please give your new vault a name.
{{'new.vault.name' | translate}}
<div>
<input type="text" ng-model="vault_name" required>
</div>
<div>
Vault password
{{ 'new.vault.pass' | translate}}
<input type="password" ng-model="vault_key" required>
<ng-password-meter password="vault_key"></ng-password-meter>
</div>
<div>
Repeat vault password
{{ 'new.vault.passr' | translate}}
<input type="password" ng-model="vault_key2" required>
</div>
<div ng-show="error" class="error">
@ -49,14 +49,13 @@
</ul>
</div>
<div>
<small> Your sharing key's will have a strength of 1024
bit,<br/> which you can change later in settings.
<small> {{'new.vault.sharing_key_notice' | translate}}
</small>
</div>
<div class="button_wrapper">
<div class="button button-geen" ng-if="!creating_keys"
ng-click="createVault(vault_name, vault_key, vault_key2)">
<span>Create vault</span>
<span>{{ 'new.vault.create' | translate }}</span>
</div>
<div class="button" ng-if="creating_keys">
@ -66,7 +65,7 @@
</span>
</div>
<div class="button button-red" ng-click="clearState()">
Cancel
{{ 'cancel' | translate}}
</div>
<div class="hidden">
{{sharing_keys}}
@ -78,7 +77,7 @@
<div ng-if="list_selected_vault != false">
<div class="vaultlist">
<ul>
<li ng-click="clearState()">Go back to vaults</li>
<li ng-click="clearState()">{{ 'go.back.vaults' | translate }}</li>
</ul>
</div>
<div class="login_form">
@ -87,11 +86,11 @@
<li>{{error}}</li>
</ul>
</div>
Please input the password for {{list_selected_vault.name}}
{{ 'input.vault.password' | translate}} {{list_selected_vault.name}}
<div class="pw-input">
<input type="password" ng-model="vault_key" ng-enter="loginToVault(list_selected_vault, vault_key)">
<small class="last_access">Last accessed:
<small class="last_access">{{'last.access' | translate}}:
<span ng-if="list_selected_vault.last_access > 0">{{list_selected_vault.last_access * 1000 | date:'dd-MM-yyyy @ HH:mm:ss'}}</span>
<span ng-if="list_selected_vault.last_access === 0">Never</span>
</small>
@ -101,7 +100,7 @@
<label>
<input type="checkbox" ng-checked="default_vault"
ng-click="toggleDefaultVault()">
Set this vault as default.
{{ 'vault.default' | translate}}
</label>
</div>
<div>
@ -109,13 +108,13 @@
<input type="checkbox"
ng-checked="remember_vault_password"
ng-click="toggleRememberPassword()">
Login automatically to this vault.
{{ 'vault.auto.login' | translate}}
</label>
</div>
</div>
<div class="button button-geen"
ng-click="loginToVault(list_selected_vault, vault_key)">
Decrypt vault
{{ 'vault.decrypt' | translate}}
</div>
</div>
</div>

View file

@ -0,0 +1,56 @@
<?php
/**
* Nextcloud - passman
*
* @copyright Copyright (c) 2016, Sander Brand (brantje@gmail.com)
* @copyright Copyright (c) 2016, Marcos Zuriaga Miguel (wolfi@wolfi.es)
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
namespace OCA\Passman\Controller;
use OCP\AppFramework\Http\JSONResponse;
use PHPUnit_Framework_TestCase;
/**
* Class PageControllerTest
*
* @package OCA\Passman\Controller
* @coversDefaultClass \OCA\Passman\Controller\TranslationController
*/
class TranslationControllerTest extends PHPUnit_Framework_TestCase {
private $controller;
public function setUp() {
$request = $this->getMockBuilder('OCP\IRequest')->getMock();
$IL10N = $this->getMockBuilder('OCP\IL10N')->getMock();
$this->controller = new TranslationController(
'passman', $request, $IL10N
);
}
/**
* @covers ::getLanguageStrings
*/
public function getLanguageStrings() {
$result = $this->controller->getLanguageStrings();
$this->assertTrue($result instanceof JSONResponse);
}
}