2020-02-12 17:04:50 +01:00
|
|
|
<template>
|
2020-02-12 23:24:35 +01:00
|
|
|
<div>
|
|
|
|
<div class="columns is-centered">
|
|
|
|
<div class="form-column column is-two-thirds-tablet is-half-desktop is-one-third-widescreen is-one-quarter-fullhd">
|
|
|
|
<div class="tabs is-centered is-fullwidth">
|
|
|
|
<ul>
|
|
|
|
<li v-for="tab in tabs" :class="{ 'is-active': tab.isActive }">
|
|
|
|
<a @click="selectTab(tab)">{{ tab.name }}</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-03-09 20:24:25 +01:00
|
|
|
<options v-if="activeTab === $t('settings.options')"></options>
|
2020-02-12 23:24:35 +01:00
|
|
|
<account v-if="activeTab === $t('settings.account')"></account>
|
|
|
|
<password v-if="activeTab === $t('settings.password')"></password>
|
|
|
|
<vue-footer :showButtons="true">
|
|
|
|
<!-- Cancel button -->
|
|
|
|
<p class="control">
|
2020-02-27 17:05:36 +01:00
|
|
|
<router-link :to="{ name: 'accounts' }" class="button is-dark is-rounded">{{ $t('commons.close') }}</router-link>
|
2020-02-12 23:24:35 +01:00
|
|
|
</p>
|
|
|
|
</vue-footer>
|
|
|
|
</div>
|
2020-02-12 17:04:50 +01:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
2020-03-09 20:24:25 +01:00
|
|
|
import Options from './Options'
|
2020-02-12 17:04:50 +01:00
|
|
|
import Account from './Account'
|
|
|
|
import Password from './Password'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
data(){
|
|
|
|
return {
|
|
|
|
tabs: [
|
|
|
|
{
|
2020-03-09 20:24:25 +01:00
|
|
|
'name' : this.$t('settings.options'),
|
2020-02-12 17:04:50 +01:00
|
|
|
'isActive': true
|
|
|
|
},
|
|
|
|
{
|
2020-02-12 23:24:35 +01:00
|
|
|
'name' : this.$t('settings.account'),
|
2020-02-12 17:04:50 +01:00
|
|
|
'isActive': false
|
|
|
|
},
|
|
|
|
{
|
2020-02-12 23:24:35 +01:00
|
|
|
'name' : this.$t('settings.password'),
|
2020-02-12 17:04:50 +01:00
|
|
|
'isActive': false
|
|
|
|
},
|
|
|
|
],
|
2020-03-09 20:24:25 +01:00
|
|
|
activeTab: this.$t('settings.options')
|
2020-02-12 17:04:50 +01:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
components: {
|
2020-03-09 20:24:25 +01:00
|
|
|
Options,
|
2020-02-12 17:04:50 +01:00
|
|
|
Account,
|
|
|
|
Password
|
|
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
selectTab(selectedTab) {
|
|
|
|
this.tabs.forEach(tab => {
|
|
|
|
tab.isActive = (tab.name == selectedTab.name);
|
|
|
|
if( tab.name == selectedTab.name ) {
|
|
|
|
this.activeTab = selectedTab.name
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
</script>
|