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

github.com/marius-wieschollek/passwords-webextension.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/vue
diff options
context:
space:
mode:
authorM. Wieschollek <passwords.public@mdns.eu>2021-03-06 13:13:00 +0300
committerGitHub <noreply@github.com>2021-03-06 13:13:00 +0300
commitd17aadcb31ed5960416d341523386b87ff00cbbd (patch)
tree1b71d29b3acdc6394b5fc805058179e7f28b83da /src/vue
parent0e4128033115cd601b8ce7d9129845c47c80d861 (diff)
parent32a8a134c95a75b76122e25faf314daa77c9ade0 (diff)
Merge pull request #159 from flo-mic/patch-username
Introduce "Show username next to title" option
Diffstat (limited to 'src/vue')
-rw-r--r--src/vue/Components/List/Item/Password.vue10
-rw-r--r--src/vue/Components/Options/Settings.vue13
2 files changed, 21 insertions, 2 deletions
diff --git a/src/vue/Components/List/Item/Password.vue b/src/vue/Components/List/Item/Password.vue
index 7e99be1..927a62c 100644
--- a/src/vue/Components/List/Item/Password.vue
+++ b/src/vue/Components/List/Item/Password.vue
@@ -2,7 +2,7 @@
<li class="item password-item">
<div class="label" @click="sendPassword()" :title="title">
<favicon :password="password.getId()" :size="22" v-if="favicon"/>
- {{ password.getLabel() }}
+ {{ label }}
</div>
<div class="options">
<icon icon="user" hover-icon="clipboard" @click="copy('username', 'text')" draggable="true" @dragstart="drag($event, 'username')"/>
@@ -21,6 +21,7 @@
import ErrorManager from '@js/Manager/ErrorManager';
import LocalisationService from '@js/Services/LocalisationService';
import SettingsService from '@js/Services/SettingsService';
+ import PasswordSettingsManager from '@js/Manager/PasswordSettingsManager';
export default {
components: {Favicon, Icon},
@@ -48,6 +49,13 @@
},
title() {
return LocalisationService.translate('PasswordItemTitle', this.password.getId(), this.password.getStatusCode());
+ },
+ label() {
+ var result = this.password.getLabel();
+ if(PasswordSettingsManager.getShowUserInList() && this.password.getUserName() !== "") {
+ result = result + " - " + this.password.getUserName();
+ }
+ return result;
}
},
diff --git a/src/vue/Components/Options/Settings.vue b/src/vue/Components/Options/Settings.vue
index 556fa20..4c10b66 100644
--- a/src/vue/Components/Options/Settings.vue
+++ b/src/vue/Components/Options/Settings.vue
@@ -2,6 +2,10 @@
<div class="settings-general">
<translate tag="h3" say="AutofillSettings"/>
<div class="setting">
+ <slider-field id="show-username-in-list" v-model="showUserInList"/>
+ <translate tag="label" for="show-username-in-list" say="SettingsShowUsernameInList"/>
+ </div>
+ <div class="setting">
<slider-field id="paste-autoclose" v-model="autoclose"/>
<translate tag="label" for="paste-autoclose" say="SettingsPastePopupClose"/>
</div>
@@ -87,7 +91,8 @@
recSearchMode : 'host',
recSearchRows : 8,
clearClipboard : false,
- clearClipboardDelay: 60
+ clearClipboardDelay: 60,
+ showUserInList : false,
};
},
@@ -148,6 +153,7 @@
this.getSetting('search.recommendation.maxRows', 'recSearchRows');
this.getSetting('clipboard.clear.passwords', 'clearClipboard');
this.getSetting('clipboard.clear.delay', 'clearClipboardDelay');
+ this.getSetting('password.list.show.user', 'showUserInList');
},
async getSetting(name, variable) {
try {
@@ -230,6 +236,11 @@
if(oldValue !== null && value !== oldValue) {
this.setSetting('search.recommendation.maxRows', value);
}
+ },
+ showUserInList(value, oldValue) {
+ if(oldValue !== null && value !== oldValue) {
+ this.setSetting('password.list.show.user', value);
+ }
}
}
};