diff --git a/src/renderer/components/GlobalHeader.vue b/src/renderer/components/GlobalHeader.vue index 7b5557fe..abc61891 100644 --- a/src/renderer/components/GlobalHeader.vue +++ b/src/renderer/components/GlobalHeader.vue @@ -18,25 +18,12 @@ v-bind:key="account._id" role="menuitem" > - - - + + + {{ account.domain }} - + New @@ -57,17 +44,17 @@ export default { components: { FailoverImg, ElIconMenu, - ElIconPlus, + ElIconPlus }, name: 'global-header', computed: { ...mapState('GlobalHeader', { - accounts: (state) => state.accounts, - hide: (state) => state.hide, + accounts: state => state.accounts, + hide: state => state.hide }), ...mapState({ - themeColor: (state) => state.App.theme.global_header_color, - }), + themeColor: state => state.App.theme.global_header_color + }) }, created() { this.initialize() @@ -79,14 +66,14 @@ export default { async initialize() { await this.$store .dispatch('GlobalHeader/initLoad') - .then((accounts) => { - this.$store.dispatch('GlobalHeader/startStreamings').catch((err) => { + .then(accounts => { + this.$store.dispatch('GlobalHeader/startStreamings').catch(err => { if (err instanceof StreamingError) { this.$message({ message: this.$t('message.start_all_streamings_error', { - domain: err.domain, + domain: err.domain }), - type: 'error', + type: 'error' }) } }) @@ -94,11 +81,11 @@ export default { this.$router.push({ path: `/${accounts[0]._id}/home` }) } }) - .catch((_) => { + .catch(_ => { return this.$router.push({ path: '/login' }) }) - }, - }, + } + } } diff --git a/src/renderer/components/Login/LoginForm.vue b/src/renderer/components/Login/LoginForm.vue index aa53fd8e..2fda3b64 100644 --- a/src/renderer/components/Login/LoginForm.vue +++ b/src/renderer/components/Login/LoginForm.vue @@ -9,18 +9,10 @@ :model="form" > - +

- {{ $t('login.proxy_info') - }}{{ - $t('login.proxy_here') - }} + {{ $t('login.proxy_info') }}{{ $t('login.proxy_here') }}

@@ -52,20 +38,18 @@ export default { data() { return { form: { - domainName: '', - }, + domainName: '' + } } }, computed: { ...mapState({ - selectedInstance: (state) => state.Login.selectedInstance, - searching: (state) => state.Login.searching, - sns: (state) => state.Login.sns, + selectedInstance: state => state.Login.selectedInstance, + searching: state => state.Login.searching, + sns: state => state.Login.sns }), allowLogin: function () { - return ( - this.selectedInstance && this.form.domainName === this.selectedInstance - ) + return this.selectedInstance && this.form.domainName === this.selectedInstance }, rules: { get() { @@ -74,17 +58,17 @@ export default { { type: 'string', required: true, - message: this.$t('validation.login.require_domain_name'), + message: this.$t('validation.login.require_domain_name') }, { pattern: domainFormat, trigger: 'change', - message: this.$t('validation.login.domain_format'), - }, - ], + message: this.$t('validation.login.domain_format') + } + ] } - }, - }, + } + } }, methods: { login() { @@ -92,51 +76,51 @@ export default { lock: true, text: this.$t('message.loading'), spinner: 'el-icon-loading', - background: 'rgba(0, 0, 0, 0.7)', + background: 'rgba(0, 0, 0, 0.7)' }) this.$store .dispatch('Login/fetchLogin') - .then((url) => { + .then(url => { loading.close() this.$store.dispatch('Login/pageBack') this.$router.push({ path: '/authorize', - query: { url: url, sns: this.sns }, + query: { url: url, sns: this.sns } }) }) .catch(() => { loading.close() this.$message({ message: this.$t('message.authorize_url_error'), - type: 'error', + type: 'error' }) }) }, confirm(formName) { - this.$refs[formName].validate((valid) => { + this.$refs[formName].validate(valid => { if (valid) { this.$store .dispatch('Login/confirmInstance', this.form.domainName) .then(() => { this.$message({ message: this.$t('message.domain_confirmed', { - domain: this.form.domainName, + domain: this.form.domainName }), - type: 'success', + type: 'success' }) }) .catch(() => { this.$message({ message: this.$t('message.domain_doesnt_exist', { - domain: this.form.domainName, + domain: this.form.domainName }), - type: 'error', + type: 'error' }) }) } else { this.$message({ message: this.$t('validation.login.domain_format'), - type: 'error', + type: 'error' }) return false } @@ -148,8 +132,8 @@ export default { } else { this.login() } - }, - }, + } + } } diff --git a/src/renderer/components/Preferences/Account.vue b/src/renderer/components/Preferences/Account.vue index 01b26ab4..675c77ae 100644 --- a/src/renderer/components/Preferences/Account.vue +++ b/src/renderer/components/Preferences/Account.vue @@ -12,36 +12,24 @@ v-loading="accountLoading" :element-loading-background="backgroundColor" > - - - - + + - @@ -62,15 +50,15 @@ export default { name: 'Filters', computed: { ...mapState('Settings/Filters', { - filters: (state) => state.filters, - filtersLoading: (state) => state.filtersLoading, + filters: state => state.filters, + filtersLoading: state => state.filtersLoading }), ...mapState({ - backgroundColor: (state) => state.App.theme.background_color, + backgroundColor: state => state.App.theme.background_color }), ...mapState('TimelineSpace', { - sns: (state) => state.sns, - }), + sns: state => state.sns + }) }, async created() { await this.$store.dispatch('Settings/Filters/fetchFilters') @@ -83,12 +71,12 @@ export default { this.$confirm(this.$t('settings.filters.delete.confirm'), 'Warning', { confirmButtonText: this.$t('settings.filters.delete.confirm_ok'), cancelButtonText: this.$t('settings.filters.delete.confirm_cancel'), - type: 'warning', + type: 'warning' }).then(() => { return this.$store.dispatch('Settings/Filters/deleteFilter', id) }) - }, - }, + } + } } diff --git a/src/renderer/components/Settings/Filters/form.vue b/src/renderer/components/Settings/Filters/form.vue index ab9cc5a8..c29c48df 100644 --- a/src/renderer/components/Settings/Filters/form.vue +++ b/src/renderer/components/Settings/Filters/form.vue @@ -1,56 +1,31 @@ @@ -61,48 +36,48 @@ export default { props: { loading: { type: Boolean, - default: false, + default: false }, value: { - type: Object, + type: Object }, sns: { type: String, - default: 'mastodon', - }, + default: 'mastodon' + } }, data() { return { expires: [ { label: this.$t('settings.filters.expires.never'), - value: null, + value: null }, { label: this.$t('settings.filters.expires.30_minutes'), - value: 60 * 30, + value: 60 * 30 }, { label: this.$t('settings.filters.expires.1_hour'), - value: 3600, + value: 3600 }, { label: this.$t('settings.filters.expires.6_hours'), - value: 3600 * 6, + value: 3600 * 6 }, { label: this.$t('settings.filters.expires.12_hours'), - value: 3600 * 12, + value: 3600 * 12 }, { label: this.$t('settings.filters.expires.1_day'), - value: 3600 * 24, + value: 3600 * 24 }, { label: this.$t('settings.filters.expires.1_week'), - value: 3600 * 24 * 7, - }, - ], + value: 3600 * 24 * 7 + } + ] } }, computed: { @@ -112,7 +87,7 @@ export default { }, set(value) { this.$emit('input', value) - }, + } }, filterPhrase: { get() { @@ -120,9 +95,9 @@ export default { }, set(value) { this.filter = Object.assign({}, this.filter, { - phrase: value, + phrase: value }) - }, + } }, filterExpire: { get() { @@ -130,9 +105,9 @@ export default { }, set(value) { this.filter = Object.assign({}, this.filter, { - expires_at: value, + expires_at: value }) - }, + } }, filterContext: { get() { @@ -140,9 +115,9 @@ export default { }, set(value) { this.filter = Object.assign({}, this.filter, { - context: value, + context: value }) - }, + } }, filterIrreversible: { get() { @@ -150,9 +125,9 @@ export default { }, set(value) { this.filter = Object.assign({}, this.filter, { - irreversible: value, + irreversible: value }) - }, + } }, filterWholeWord: { get() { @@ -160,10 +135,10 @@ export default { }, set(value) { this.filter = Object.assign({}, this.filter, { - whole_word: value, + whole_word: value }) - }, - }, + } + } }, methods: { cancel() { @@ -174,8 +149,8 @@ export default { }, accountDisabled() { return this.sns === 'pleroma' - }, - }, + } + } } diff --git a/src/renderer/components/TimelineSpace/Contents/SideBar/AccountProfile/Timeline/Posts.vue b/src/renderer/components/TimelineSpace/Contents/SideBar/AccountProfile/Timeline/Posts.vue index 4d6d4934..c049b74d 100644 --- a/src/renderer/components/TimelineSpace/Contents/SideBar/AccountProfile/Timeline/Posts.vue +++ b/src/renderer/components/TimelineSpace/Contents/SideBar/AccountProfile/Timeline/Posts.vue @@ -1,9 +1,8 @@