refactor: improve rtl support
This commit is contained in:
@@ -15,8 +15,8 @@
|
||||
<el-input
|
||||
ref="uri"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 3, maxRows: 5 }"
|
||||
auto-complete="off"
|
||||
:autosize="{ minRows: 3, maxRows: 5 }"
|
||||
:placeholder="$t('task.uri-task-tips')"
|
||||
@paste.native="handleUriPaste"
|
||||
v-model="form.uris"
|
||||
@@ -82,8 +82,8 @@
|
||||
>
|
||||
<el-input
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 2, maxRows: 3 }"
|
||||
auto-complete="off"
|
||||
:autosize="{ minRows: 2, maxRows: 3 }"
|
||||
:placeholder="$t('task.task-user-agent')"
|
||||
v-model="form.userAgent"
|
||||
>
|
||||
@@ -95,8 +95,8 @@
|
||||
>
|
||||
<el-input
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 2, maxRows: 3 }"
|
||||
auto-complete="off"
|
||||
:autosize="{ minRows: 2, maxRows: 3 }"
|
||||
:placeholder="$t('task.task-referer')"
|
||||
v-model="form.referer"
|
||||
>
|
||||
@@ -108,8 +108,8 @@
|
||||
>
|
||||
<el-input
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 2, maxRows: 3 }"
|
||||
auto-complete="off"
|
||||
:autosize="{ minRows: 2, maxRows: 3 }"
|
||||
:placeholder="$t('task.task-cookie')"
|
||||
v-model="form.cookie"
|
||||
>
|
||||
|
||||
@@ -15,8 +15,7 @@
|
||||
|
||||
<script>
|
||||
import is from 'electron-is'
|
||||
import { mapState } from 'vuex'
|
||||
import { getLangDirection } from '@shared/utils'
|
||||
import { mapGetters, mapState } from 'vuex'
|
||||
import { APP_THEME } from '@shared/constants'
|
||||
import DynamicTray from '@/components/Native/DynamicTray'
|
||||
import EngineClient from '@/components/Native/EngineClient'
|
||||
@@ -42,11 +41,13 @@
|
||||
return (is.windows() || is.linux()) && state.config.hideAppMenu
|
||||
},
|
||||
traySpeedometer: state => state.config.traySpeedometer,
|
||||
rpcSecret: state => state.config.rpcSecret,
|
||||
theme: state => state.config.theme,
|
||||
locale: state => state.config.locale,
|
||||
dir: state => getLangDirection(state.config.locale)
|
||||
rpcSecret: state => state.config.rpcSecret
|
||||
}),
|
||||
...mapGetters('preference', [
|
||||
'theme',
|
||||
'locale',
|
||||
'dir'
|
||||
]),
|
||||
themeClass () {
|
||||
if (this.theme === APP_THEME.AUTO) {
|
||||
return `theme-${this.systemTheme}`
|
||||
|
||||
@@ -1,12 +1,20 @@
|
||||
import api from '@/api'
|
||||
import { fetchBtTrackerFromSource } from '@shared/utils/tracker'
|
||||
import { isEmpty } from 'lodash'
|
||||
|
||||
import api from '@/api'
|
||||
import { getLangDirection } from '@shared/utils'
|
||||
import { fetchBtTrackerFromSource } from '@shared/utils/tracker'
|
||||
|
||||
const state = {
|
||||
engineMode: 'MAX',
|
||||
config: {}
|
||||
}
|
||||
|
||||
const getters = {
|
||||
theme: state => state.config.theme,
|
||||
locale: state => state.config.locale,
|
||||
dir: state => getLangDirection(state.config.locale)
|
||||
}
|
||||
|
||||
const mutations = {
|
||||
UPDATE_PREFERENCE_DATA (state, config) {
|
||||
state.config = { ...state.config, ...config }
|
||||
@@ -49,6 +57,7 @@ const actions = {
|
||||
export default {
|
||||
namespaced: true,
|
||||
state,
|
||||
getters,
|
||||
mutations,
|
||||
actions
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user