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:
authorflo-mic <florianmichel@hotmail.de>2021-03-01 21:02:59 +0300
committerflo-mic <florianmichel@hotmail.de>2021-03-01 21:02:59 +0300
commit974a65efbea888ad3f771a71f7a157855e3a7d98 (patch)
treee44cc5801f4a9bdfd6e7d7b0059cceba4c28e630 /src/vue
parentaa8cdf89e5406273a9fe8214f40676a30539bae1 (diff)
add possibility to show username in title
Diffstat (limited to 'src/vue')
-rw-r--r--src/vue/Components/List/Item/Password.vue10
-rw-r--r--src/vue/Components/Options/Settings.vue12
2 files changed, 20 insertions, 2 deletions
diff --git a/src/vue/Components/List/Item/Password.vue b/src/vue/Components/List/Item/Password.vue
index 7e99be1..ab3e4f4 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() }}
+ {{ getLabel() }}
</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},
@@ -92,6 +93,13 @@
ErrorManager.logError(e);
}
},
+ getLabel() {
+ var result = this.password.getLabel();
+ if(PasswordSettingsManager.getShowUserInList()) {
+ result = result + " - " + this.password.getUserName();
+ }
+ return result;
+ },
copy(property, type) {
let data = this.password.getProperty(property);
MessageService.send({type: 'clipboard.write', payload: {type: type, value: data}}).catch(ErrorManager.catch);
diff --git a/src/vue/Components/Options/Settings.vue b/src/vue/Components/Options/Settings.vue
index b2474e6..5fd8334 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,
};
},
@@ -228,6 +233,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);
+ }
}
}
};