diff --git a/src/components/tab_switcher/tab_switcher.jsx b/src/components/tab_switcher/tab_switcher.jsx new file mode 100644 index 00000000..0a6eec11 --- /dev/null +++ b/src/components/tab_switcher/tab_switcher.jsx @@ -0,0 +1,44 @@ +import Vue from 'vue' + +import './tab_switcher.scss' + +export default Vue.component('tab-switcher', { + name: 'TabSwitcher', + data () { + return { + active: 0 + } + }, + methods: { + activateTab(index) { + return () => this.active = index; + } + }, + render(h) { + const tabs = this.$slots.default + .filter(slot => slot.data) + .map((slot, index) => { + const classes = ['tab'] + + if (index === this.active) { + classes.push('active') + } + return () + }); + const contents = ( +
{{$t('settings.name')}}
- -{{$t('settings.bio')}}
- -- - -
-{{$t('settings.name')}}
+ +{{$t('settings.bio')}}
+ ++ + +
+{{$t('settings.current_avatar')}}
+ +{{$t('settings.set_new_avatar')}}
+ + +{{$t('settings.current_profile_banner')}}
+ +{{$t('settings.set_new_profile_banner')}}
+ + +{{$t('settings.set_new_profile_background')}}
+ + +{{$t('settings.current_avatar')}}
- -{{$t('settings.set_new_avatar')}}
- - -{{$t('settings.current_password')}}
+ +{{$t('settings.new_password')}}
+ +{{$t('settings.confirm_new_password')}}
+ +{{$t('settings.changed_password')}}
+{{$t('settings.change_password_error')}}
+{{changePasswordError}}
+{{$t('settings.delete_account_description')}}
+{{$t('settings.delete_account_instructions')}}
+{{$t('login.password')}}
+ + +{{$t('settings.delete_account_error')}}
+{{deleteAccountError}}
+ +{{$t('settings.current_profile_banner')}}
- -{{$t('settings.set_new_profile_banner')}}
- - -{{$t('settings.import_followers_from_a_csv_file')}}
+ + + +{{$t('settings.follows_imported')}}
+{{$t('settings.follow_import_error')}}
+{{$t('settings.set_new_profile_background')}}
- - -{{$t('settings.current_password')}}
- -{{$t('settings.new_password')}}
- -{{$t('settings.confirm_new_password')}}
- -{{$t('settings.changed_password')}}
-{{$t('settings.change_password_error')}}
-{{changePasswordError}}
-{{$t('settings.import_followers_from_a_csv_file')}}
- - - -{{$t('settings.follows_imported')}}
-{{$t('settings.follow_import_error')}}
-{{$t('settings.delete_account_description')}}
-{{$t('settings.delete_account_instructions')}}
-{{$t('login.password')}}
- - -{{$t('settings.delete_account_error')}}
-{{deleteAccountError}}
- -