@@ -7,7 +7,7 @@ | |||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> | |||
<span aria-hidden="true">×</span> | |||
</button> | |||
<h4 class="modal-title" id="copyPassword">copy_password</h4> | |||
<h4 class="modal-title" id="copyPassword">{{{ $t('entries.CopyPassword') }}}</h4> | |||
</div> | |||
<div class="modal-body text-xs-left"> | |||
<form id="password-generator-form"> | |||
@@ -17,13 +17,12 @@ | |||
<div class="form-group row"> | |||
<div class="col-lg-12 m-t-1"> | |||
<label for="pg-masterpassword" class="sr-only"> | |||
what_is_your_secret | |||
login | |||
</label> | |||
<div class="input-group"> | |||
<input id="pg-masterpassword" | |||
class="form-control" | |||
type="password" | |||
placeholder="what_is_your_secret" | |||
v-model="password" | |||
autocomplete="off"> | |||
<span class="input-group-btn" tabindex="-1" | |||
@@ -40,10 +39,10 @@ | |||
</div> | |||
<div class="modal-footer"> | |||
<button type="button" class="btn btn-secondary" data-dismiss="modal"> | |||
Cancel | |||
{{{ $t('entries.Cancel') }}} | |||
</button> | |||
<button type="button" class="btn btn-danger" @click="copyPassword()"> | |||
Copy | |||
{{{ $t('entries.Copy') }}} | |||
</button> | |||
</div> | |||
</div> | |||
@@ -74,7 +73,7 @@ | |||
password: this.entry.password | |||
}; | |||
$('#copyPasswordModal').modal('hide'); | |||
window.prompt('copy_to_clipboard', lesspass.createPassword(masterPassword, entry)); | |||
window.prompt(this.$t('entries.copyToClipboard'), lesspass.createPassword(masterPassword, entry)); | |||
}); | |||
}, | |||
changeType(id) { | |||
@@ -15,17 +15,17 @@ | |||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> | |||
<span aria-hidden="true">×</span> | |||
</button> | |||
<h4 class="modal-title" id="deleteEntry">Delete_entry</h4> | |||
<h4 class="modal-title" id="deleteEntry">{{{ $t('entries.DeleteEntry') }}}</h4> | |||
</div> | |||
<div class="modal-body text-xs-left"> | |||
delete_are_you_sure | |||
{{{ $t('entries.deleteAreYouSure') }}} | |||
</div> | |||
<div class="modal-footer"> | |||
<button type="button" class="btn btn-secondary" data-dismiss="modal"> | |||
Cancel | |||
{{{ $t('entries.Cancel') }}} | |||
</button> | |||
<button type="button" class="btn btn-danger" @click="deleteEntry()"> | |||
Confirm | |||
{{{ $t('entries.Confirm') }}} | |||
</button> | |||
</div> | |||
</div> | |||
@@ -46,11 +46,11 @@ | |||
Entries.delete(this.entry) | |||
.then(() => { | |||
$('#deleteEntryModal').modal('hide'); | |||
logging.success('entry.entry_deleted'); | |||
logging.success(this.$t('entries.entryDeleted')); | |||
this.$router.go('/entries/'); | |||
}) | |||
.catch((err) => { | |||
logging.error('entry.error_deletion'); | |||
.catch(() => { | |||
logging.error(this.$t('entries.errorDeletion')); | |||
}); | |||
}, | |||
}, | |||
@@ -3,12 +3,12 @@ | |||
<div class="form-group row"> | |||
<div class="col-lg-6 m-t-1"> | |||
<label for="pg-login" class="sr-only"> | |||
login | |||
{{ $t('entries.login') }} | |||
</label> | |||
<input id="pg-login" | |||
class="form-control" | |||
type="text" | |||
placeholder="login" | |||
placeholder="{{ $t('entries.login') }}" | |||
value="{{entry.login}}" | |||
v-model="entry.login" | |||
autofocus | |||
@@ -20,13 +20,13 @@ | |||
<div class="form-group row"> | |||
<div class="col-lg-12"> | |||
<label for="pg-site" class="sr-only"> | |||
site | |||
{{ $t('entries.site') }} | |||
</label> | |||
<input id="pg-site" | |||
class="form-control" | |||
list="domains" | |||
type="text" | |||
placeholder="site" | |||
placeholder="{{ $t('entries.site') }}" | |||
value="{{entry.site}}" | |||
v-model="entry.site" | |||
autocorrect="off" | |||
@@ -44,7 +44,7 @@ | |||
<input type="checkbox" id="lowercase" value="lowercase" | |||
v-model="entry.password.settings"> | |||
<span class="c-indicator"></span> | |||
lowercase_options | |||
{{ $t('entries.lowercaseOptions') }} | |||
</label> | |||
</div> | |||
<div class="col-lg-7"> | |||
@@ -52,7 +52,7 @@ | |||
<input type="checkbox" id="uppercase" value="uppercase" | |||
v-model="entry.password.settings"> | |||
<span class="c-indicator"></span> | |||
uppercase_options | |||
{{ $t('entries.uppercaseOptions') }} | |||
</label> | |||
</div> | |||
</div> | |||
@@ -62,7 +62,7 @@ | |||
<input type="checkbox" id="numbers" value="numbers" | |||
v-model="entry.password.settings"> | |||
<span class="c-indicator"></span> | |||
numbers_options | |||
{{ $t('entries.numbersOptions') }} | |||
</label> | |||
</div> | |||
<div class="col-lg-7"> | |||
@@ -70,18 +70,18 @@ | |||
<input type="checkbox" id="symbols" value="symbols" | |||
v-model="entry.password.settings"> | |||
<span class="c-indicator"></span> | |||
symbols_options | |||
{{ $t('entries.symbolsOptions') }} | |||
</label> | |||
</div> | |||
</div> | |||
<div class="row m-t-1"> | |||
<div class="col-lg-5 m-b-1"> | |||
<label for="passwordLength" class="sr-only"> | |||
length | |||
{{ $t('entries.length') }} | |||
</label> | |||
<div class="input-group"> | |||
<span class="input-group-addon" id="passwordLengthAddon"> | |||
length | |||
{{ $t('entries.length') }} | |||
</span> | |||
<input type="number" class="form-control" id="passwordLength" | |||
aria-describedby="passwordLengthAddon" | |||
@@ -91,11 +91,11 @@ | |||
</div> | |||
<div class="col-lg-4 m-b-1"> | |||
<label for="passwordCounter" class="sr-only"> | |||
counter | |||
{{ $t('entries.counter') }} | |||
</label> | |||
<div class="input-group"> | |||
<span class="input-group-addon" id="passwordCounterAddon"> | |||
counter | |||
{{ $t('entries.counter') }} | |||
</span> | |||
<input type="number" class="form-control" id="passwordCounter" | |||
aria-describedby="passwordCounterAddon" | |||
@@ -10,7 +10,7 @@ | |||
<br> | |||
<b>site : </b> {{ entry.site }} | |||
</p> | |||
<a href="#" class="btn btn-sm btn-primary" @click.stop.prevent="generatePassword">Copy password</a> | |||
<a href="#" class="btn btn-sm btn-primary" @click.stop.prevent="generatePassword">{{{ $t('entries.copyPassword') }}}</a> | |||
</div> | |||
</div> | |||
</template> | |||
@@ -1,7 +1,7 @@ | |||
<template> | |||
<button type="button" class="btn btn-primary" data-toggle="modal" | |||
data-target="#newEntryModal"> | |||
create new entry | |||
{{{ $t('entries.CreateNewEntry') }}} | |||
</button> | |||
<div class="modal fade" id="newEntryModal" tabindex="-1" role="dialog" aria-labelledby="newEntry" | |||
aria-hidden="true"> | |||
@@ -11,17 +11,17 @@ | |||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> | |||
<span aria-hidden="true">×</span> | |||
</button> | |||
<h4 class="modal-title" id="newEntry">Create_new_entry</h4> | |||
<h4 class="modal-title" id="newEntry">{{{ $t('entries.CreateNewEntry') }}}</h4> | |||
</div> | |||
<div class="modal-body text-xs-left"> | |||
<entry-form :entry="entry" v-bind:prop.sync></entry-form> | |||
</div> | |||
<div class="modal-footer"> | |||
<button type="button" class="btn btn-secondary" data-dismiss="modal"> | |||
Cancel | |||
{{{ $t('entries.Cancel') }}} | |||
</button> | |||
<button type="button" class="btn btn-primary" @click="create()"> | |||
Create | |||
{{{ $t('entries.Create') }}} | |||
</button> | |||
</div> | |||
</div> | |||
@@ -63,7 +63,7 @@ | |||
location.reload(); | |||
}) | |||
.catch((err) => { | |||
logging.error(this.$t('entry.error_creation')); | |||
logging.error(this.$t('entries.errorCreation')); | |||
}); | |||
}, | |||
}, | |||
@@ -151,11 +151,66 @@ locales.fr.login = { | |||
}; | |||
locales.en.entries = { | |||
search: 'search password information' | |||
search: 'search', | |||
CreateNewEntry: 'Create a new entry', | |||
createNewEntry: 'create entry', | |||
Cancel: 'Cancel', | |||
Create: 'Create', | |||
UpdateNewEntry: 'Update a new entry', | |||
Update: 'Update', | |||
entryCreated: 'Your entry has been successfully created', | |||
errorCreation: 'Your entry could not be created, try again in a moment', | |||
entryUpdated: 'Your entry has been successfully updated', | |||
errorUpdate: 'Your entry could not be updated, try again in a moment', | |||
DeleteEntry: 'Delete entry', | |||
deleteAreYouSure: 'Are you sure you want to delete this entry ?', | |||
Confirm: 'Confirm', | |||
entryDeleted: 'This entry has been deleted', | |||
errorDeletion: 'Your entry could not be deleted, try again in a moment', | |||
copyPassword: 'copy password', | |||
CopyPassword: 'Copy password', | |||
Copy: 'Copy', | |||
copyToClipboard: 'Copy to clipboard ctrl + c', | |||
login: 'Email / Username', | |||
site: 'Site', | |||
advancedOptions: 'Advanced options', | |||
lowercaseOptions: 'lowercase (a‑z)', | |||
uppercaseOptions: 'UPPERCASE (A‑Z)', | |||
numbersOptions: 'numbers (0‑9)', | |||
symbolsOptions: 'symbols (@&%?)', | |||
counter: 'Counter', | |||
length: 'Length' | |||
}; | |||
locales.fr.entries = { | |||
search: 'recherchez' | |||
search: 'recherche', | |||
CreateNewEntry: 'Créer un mot de passe', | |||
createNewEntry: 'créer un mot de passe', | |||
Cancel: 'Annuler', | |||
Create: 'Créer', | |||
UpdateNewEntry: 'Mettre à jour un mot de passe', | |||
Update: 'Mettre à jour', | |||
entryCreated: 'Votre mot de passe a bien été créé', | |||
errorCreation: 'Une erreur est survenue pendant la création, retentez dans un instant', | |||
entryUpdated: 'Votre mot de passe a bien été mis à jour', | |||
errorUpdate: 'Une erreur est survenue pendant la mise à jour, retentez dans un instant', | |||
DeleteEntry: 'Supprimer un mot de passe', | |||
deleteAreYouSure: 'Est vous sur de vouloir supprimer ce mot de passe ?', | |||
Confirm: 'Confirmer', | |||
entryDeleted: 'Votre mot de passe a bien été supprimé', | |||
errorDeletion: 'Une erreur est survenue pendant la suppression, retentez dans un instant', | |||
copyPassword: 'copier le mot de passe', | |||
Copy: 'Copier', | |||
copyToClipboard: 'Copier (CTRL + C)', | |||
login: 'Email / Nom d\'utilisateur', | |||
site: 'Site (ex: twitter.com)', | |||
advancedOptions: 'Options avancées', | |||
lowercaseOptions: 'minuscules (a‑z)', | |||
uppercaseOptions: 'MAJUSCULES (A‑Z)', | |||
numbersOptions: 'nombres (0‑9)', | |||
symbolsOptions: 'caractères spéciaux (@&%?)', | |||
counter: 'Version', | |||
length: 'Longueur' | |||
}; | |||
export default locales; |
@@ -5,7 +5,7 @@ | |||
<div class="card card-block"> | |||
<div class="row"> | |||
<div class="col-lg-9"> | |||
<h4>Update_new_entry</h4> | |||
<h4>{{{ $t('entries.UpdateNewEntry') }}}</h4> | |||
</div> | |||
<div class="col-lg-3 text-xs-right"> | |||
<delete-button :entry="entry"></delete-button> | |||
@@ -15,7 +15,7 @@ | |||
<div class="col-lg-12"> | |||
<entry-form :entry="entry" v-bind:prop.sync></entry-form> | |||
<button type="button" class="btn btn-primary" @click="update()"> | |||
Update | |||
{{{ $t('entries.Update') }}} | |||
</button> | |||
</div> | |||
</div> | |||
@@ -58,10 +58,10 @@ | |||
update() { | |||
Entries.update(this.entry) | |||
.then(() => { | |||
logging.success('entry_update'); | |||
logging.success(this.$t('entries.entryUpdated')); | |||
}) | |||
.catch((err) => { | |||
logging.error('error_update'); | |||
logging.error(this.$t('entries.errorUpdate')); | |||
}); | |||
}, | |||
delete(){ | |||
@@ -9,10 +9,10 @@ | |||
<div class="col-md-6"> | |||
<div id="searchEntries"> | |||
<div class="input-group"> | |||
<span class="input-group-addon" id="search-addon"> | |||
<i class="icon ion-ios-search"></i> | |||
</span> | |||
<input type="text" class="form-control" placeholder="{{{ $t.('entries.search') }}}" | |||
<span class="input-group-addon" id="search-addon"> | |||
<i class="icon ion-ios-search"></i> | |||
</span> | |||
<input type="text" class="form-control" placeholder="{{{ $t('entries.search') }}}" | |||
v-model="search" aria-describedby="search-addon" | |||
@keyup="filterEntry(search) | debounce 500"> | |||
</div> | |||