+
+
-
+
-
+
+
@@ -184,6 +193,10 @@
const onlyV2DefaultDate = new Date(2017, 4, 10);
return Math.round(Math.abs((now.getTime() - onlyV2DefaultDate.getTime()) / (oneDay)));
},
+ saveDefaultOptions(){
+ this.$store.dispatch('saveDefaultOptions', {options: this.options});
+ Message.success(this.$t('Your options have been saved successfully'));
+ },
}
}
diff --git a/src/router.js b/src/router.js
index 653c14f..b18c0fc 100644
--- a/src/router.js
+++ b/src/router.js
@@ -1,7 +1,6 @@
import Vue from 'vue';
import VueRouter from 'vue-router';
-import ConfigureOptions from './views/ConfigureOptions.vue';
import Login from './views/Login.vue';
import PasswordGenerator from './views/PasswordGenerator.vue';
import PasswordReset from './views/PasswordReset.vue';
@@ -14,7 +13,6 @@ const routes = [
{path: '/', name: 'home', component: PasswordGenerator},
{path: '/login', name: 'login', component: Login},
{path: '/passwords/', name: 'passwords', component: Passwords},
- {path: '/options/default/', name: 'configureOptions', component: ConfigureOptions},
{path: '/passwords/:id', name: 'password', component: PasswordGenerator},
{path: '/password/reset', name: 'passwordReset', component: PasswordReset},
{path: '/password/reset/confirm/:uid/:token', name: 'passwordResetConfirm', component: PasswordResetConfirm},
diff --git a/src/services/tooltip.js b/src/services/tooltip.js
index e953b45..9479150 100644
--- a/src/services/tooltip.js
+++ b/src/services/tooltip.js
@@ -1,6 +1,6 @@
export function showTooltip(elem, msg) {
var classNames = elem.className;
- elem.setAttribute('class', classNames + ' hint--right');
+ elem.setAttribute('class', classNames + ' hint--top');
elem.setAttribute('aria-label', msg);
setTimeout(function() {
elem.setAttribute('class', classNames);
diff --git a/src/store/actions.js b/src/store/actions.js
index 19dfae3..ebef481 100644
--- a/src/store/actions.js
+++ b/src/store/actions.js
@@ -20,8 +20,8 @@ export const loadPasswordForSite = ({commit}, payload) => {
commit(types.LOAD_PASSWORD_FOR_SITE, payload);
};
-export const saveDefaultPassword = ({commit}, payload) => {
- commit(types.SET_DEFAULT_PASSWORD, payload);
+export const saveDefaultOptions = ({commit}, payload) => {
+ commit(types.SET_DEFAULT_OPTIONS, payload);
};
export const passwordGenerated = ({commit}) => {
diff --git a/src/store/mutation-types.js b/src/store/mutation-types.js
index a5a8c11..d4a8bd5 100644
--- a/src/store/mutation-types.js
+++ b/src/store/mutation-types.js
@@ -3,7 +3,7 @@ export const LOGIN = 'LOGIN';
export const SET_TOKEN = 'SET_TOKEN';
export const PASSWORD_GENERATED = 'PASSWORD_GENERATED';
export const SET_PASSWORD = 'SET_PASSWORD';
-export const SET_DEFAULT_PASSWORD = 'SET_DEFAULT_PASSWORD';
+export const SET_DEFAULT_OPTIONS = 'SET_DEFAULT_OPTIONS';
export const SET_PASSWORDS = 'SET_PASSWORDS';
export const DELETE_PASSWORD = 'DELETE_PASSWORD';
export const SET_BASE_URL = 'SET_BASE_URL';
diff --git a/src/store/mutations.js b/src/store/mutations.js
index 21a6a09..b9f18c0 100644
--- a/src/store/mutations.js
+++ b/src/store/mutations.js
@@ -19,8 +19,8 @@ export default {
[types.PASSWORD_GENERATED](state){
state.lastUse = new Date().getTime();
},
- [types.SET_DEFAULT_PASSWORD](state, {password}){
- state.defaultPassword = {...password};
+ [types.SET_DEFAULT_OPTIONS](state, {options}){
+ state.defaultPassword = Object.assign({}, state.defaultPassword, options);
},
[types.SET_PASSWORDS](state, {passwords}){
state.passwords = passwords;
diff --git a/src/views/ConfigureOptions.vue b/src/views/ConfigureOptions.vue
deleted file mode 100644
index ead75be..0000000
--- a/src/views/ConfigureOptions.vue
+++ /dev/null
@@ -1,55 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/PasswordGenerator.vue b/src/views/PasswordGenerator.vue
index 18fd095..6af62bd 100644
--- a/src/views/PasswordGenerator.vue
+++ b/src/views/PasswordGenerator.vue
@@ -115,11 +115,12 @@