use composition i18n

This commit is contained in:
Alexander Drozdov
2021-01-13 17:36:11 +02:00
parent 89107d4d40
commit 8db286a47e
11 changed files with 375 additions and 419 deletions
+1 -1
View File
@@ -37,7 +37,7 @@
"tippy.js": "^6.2.7",
"uiohook-napi": "1.0.x",
"vue": "3.0.x",
"vue-i18n": "9.0.0-rc.1",
"vue-i18n": "9.0.0-rc.2",
"vue-router": "4.x.x",
"vue-slider-component": "4.0.0-beta.3",
"vuedraggable": "4.0.1",
+5 -1
View File
@@ -2,13 +2,14 @@
<input
@keyup="handleKeyup"
@keydown.prevent
:placeholder="modelValue || $t('Not Set')"
:placeholder="modelValue || t('Not Set')"
:class="{ 'placeholder-red-500': !modelValue }"
class="rounded bg-gray-900 px-1 text-center font-fontin-regular" />
</template>
<script lang="ts">
import { defineComponent, PropType } from 'vue'
import { useI18n } from 'vue-i18n'
import { KeyToCode, forbidden } from '@/ipc/KeyToCode'
export default defineComponent({
@@ -28,7 +29,10 @@ export default defineComponent({
}
},
setup (props, ctx) {
const { t } = useI18n()
return {
t,
handleKeyup (e: KeyboardEvent) {
e.preventDefault()
e.stopPropagation()
+7 -3
View File
@@ -3,9 +3,9 @@
<div class="flex-1 truncate px-2">{{ matcher }}</div>
<div class="flex" :class="{ [$style.controlsAutoHide]: !entryInSelected }">
<div class="pr-1"><ui-toggle v-model="invert" /></div>
<div><input v-model.trim="valueWarning" @focus="handleFocus($event, 'valueWarning')" :placeholder="$t(!invert ? 'min' : 'max')" class="bg-gray-900 w-12 text-center rounded-l"></div>
<div><input v-model.trim="valueDanger" @focus="handleFocus($event, 'valueDanger')" :placeholder="$t(!invert ? 'min' : 'max')" class="bg-gray-900 w-12 text-center mx-px"></div>
<div><input v-model.trim="valueDesirable" @focus="handleFocus($event, 'valueDesirable')" :placeholder="$t(!invert ? 'min' : 'max')" class="bg-gray-900 w-12 text-center rounded-r"></div>
<div><input v-model.trim="valueWarning" @focus="handleFocus($event, 'valueWarning')" :placeholder="t(!invert ? 'min' : 'max')" class="bg-gray-900 w-12 text-center rounded-l"></div>
<div><input v-model.trim="valueDanger" @focus="handleFocus($event, 'valueDanger')" :placeholder="t(!invert ? 'min' : 'max')" class="bg-gray-900 w-12 text-center mx-px"></div>
<div><input v-model.trim="valueDesirable" @focus="handleFocus($event, 'valueDesirable')" :placeholder="t(!invert ? 'min' : 'max')" class="bg-gray-900 w-12 text-center rounded-r"></div>
<div class="flex w-6">
<button v-if="entryInSelected"
@click="remove"
@@ -17,6 +17,7 @@
<script lang="ts">
import { defineComponent, computed, nextTick } from 'vue'
import { useI18n } from 'vue-i18n'
import { Config } from '@/web/Config'
import { MapCheckWidget } from '../overlay/interfaces'
@@ -114,7 +115,10 @@ export default defineComponent({
}
}
const { t } = useI18n()
return {
t,
entryInSelected,
invert,
valueWarning,
+15 -11
View File
@@ -1,17 +1,17 @@
<template>
<div class="flex-grow layout-column bg-gray-800">
<app-titlebar @close="cancel" :title="$t('Settings - Awakened PoE Trade')" native />
<app-titlebar @close="cancel" :title="t('Settings - Awakened PoE Trade')" native />
<div class="flex flex-grow min-h-0">
<div class="px-2 pb-10 bg-gray-900 flex flex-col">
<router-link :to="{ name: 'settings.hotkeys' }" class="menu-item">{{ $t('Hotkeys') }}</router-link>
<router-link :to="{ name: 'settings.chat' }" class="menu-item">{{ $t('Chat') }}</router-link>
<router-link :to="{ name: 'settings.hotkeys' }" class="menu-item">{{ t('Hotkeys') }}</router-link>
<router-link :to="{ name: 'settings.chat' }" class="menu-item">{{ t('Chat') }}</router-link>
<div class="border-b m-1 border-gray-800"></div>
<router-link :to="{ name: 'settings.general' }" class="menu-item">{{ $t('General') }}</router-link>
<router-link :to="{ name: 'settings.general' }" class="menu-item">{{ t('General') }}</router-link>
<div class="border-b m-1 border-gray-800"></div>
<router-link :to="{ name: 'settings.price-check' }" class="menu-item">{{ $t('Price check') }}</router-link>
<router-link :to="{ name: 'settings.maps' }" class="menu-item">{{ $t('Maps') }}</router-link>
<router-link :to="{ name: 'settings.price-check' }" class="menu-item">{{ t('Price check') }}</router-link>
<router-link :to="{ name: 'settings.maps' }" class="menu-item">{{ t('Maps') }}</router-link>
<div class="border-b m-1 border-gray-800"></div>
<router-link :to="{ name: 'settings.debug' }" class="menu-item">{{ $t('Debug') }}</router-link>
<router-link :to="{ name: 'settings.debug' }" class="menu-item">{{ t('Debug') }}</router-link>
<div style="min-width: 9.5rem;"></div>
</div>
<div class="text-gray-100 flex-grow layout-column">
@@ -19,8 +19,8 @@
<router-view />
</div>
<div class="border-t bg-gray-900 border-gray-600 p-2 flex justify-end">
<button @click="save" class="px-3 bg-gray-800 rounded mr-2">{{ $t('Save') }}</button>
<button @click="cancel" class="px-3">{{ $t('Cancel') }}</button>
<button @click="save" class="px-3 bg-gray-800 rounded mr-2">{{ t('Save') }}</button>
<button @click="cancel" class="px-3">{{ t('Cancel') }}</button>
</div>
</div>
</div>
@@ -28,15 +28,19 @@
</template>
<script lang="ts">
import { defineComponent } from 'vue'
import { useI18n } from 'vue-i18n'
import { Config } from '@/web/Config'
import { MainProcess } from '@/ipc/main-process-bindings'
import i18n from '../i18n'
export default {
setup () {
document.title = i18n.global.t('Settings - Awakened PoE Trade')
const { t } = useI18n()
document.title = t('Settings - Awakened PoE Trade')
return {
t,
save () {
MainProcess.closeSettingsWindow(Config.store)
},
+9 -5
View File
@@ -4,25 +4,29 @@
<div class="mb-4" v-for="command in commands">
<input v-model.trim="command.text" class="rounded bg-gray-900 px-1 block w-full mb-1 font-fontin-regular" />
<div class="flex justify-end">
<button @click="removeCommand(command)" class="mr-2 text-gray-500">{{ $t('Remove') }}</button>
<button @click="removeCommand(command)" class="mr-2 text-gray-500">{{ t('Remove') }}</button>
<hotkey-input v-model="command.hotkey" class="w-48" />
</div>
</div>
<button @click="addComand" class="bg-gray-900 rounded flex items-baseline px-2 py-1 leading-none"><i class="fas fa-plus mr-1"></i> {{ $t('Add command') }}</button>
<button @click="addComand" class="bg-gray-900 rounded flex items-baseline px-2 py-1 leading-none"><i class="fas fa-plus mr-1"></i> {{ t('Add command') }}</button>
</div>
</div>
</template>
<script lang="ts">
import { computed, defineComponent } from 'vue'
import { defineComponent, computed } from 'vue'
import { useI18n } from 'vue-i18n'
import HotkeyInput from './HotkeyInput.vue'
import { Config } from '@/web/Config'
import { Config as IConfig } from '@/ipc/types'
export default {
export default defineComponent({
components: { HotkeyInput },
setup () {
const { t } = useI18n()
return {
t,
commands: computed(() => Config.store.commands),
addComand () {
Config.store.commands.push({
@@ -35,7 +39,7 @@ export default {
}
}
}
}
})
</script>
<i18n>
+18 -14
View File
@@ -1,7 +1,7 @@
<template>
<div class="max-w-md p-2">
<div class="mb-2">
<div class="flex-1 mb-1">{{ $t('Log level') }} <span class="bg-gray-200 text-gray-900 rounded px-1">{{ $t('Restart required') }}</span></div>
<div class="flex-1 mb-1">{{ t('Log level') }} <span class="bg-gray-200 text-gray-900 rounded px-1">{{ t('Restart required') }}</span></div>
<div class="mb-4 flex">
<ui-radio v-model="config.logLevel" value="warn" class="mr-4">Warn</ui-radio>
<ui-radio v-model="config.logLevel" value="debug" class="mr-4">Debug</ui-radio>
@@ -9,46 +9,50 @@
</div>
</div>
<div class="mb-2">
<div class="flex-1 mb-1">{{ $t('Hardware Acceleration') }} <span class="bg-gray-200 text-gray-900 rounded px-1">{{ $t('Restart required') }}</span></div>
<div class="flex-1 mb-1">{{ t('Hardware Acceleration') }} <span class="bg-gray-200 text-gray-900 rounded px-1">{{ t('Restart required') }}</span></div>
<div class="mb-4 flex">
<ui-radio v-model="config.hardwareAcceleration" :value="true" class="mr-4">{{ $t('Enabled') }}</ui-radio>
<ui-radio v-model="config.hardwareAcceleration" :value="false" class="mr-4">{{ $t('Disabled (render on CPU)') }}</ui-radio>
<ui-radio v-model="config.hardwareAcceleration" :value="true" class="mr-4">{{ t('Enabled') }}</ui-radio>
<ui-radio v-model="config.hardwareAcceleration" :value="false" class="mr-4">{{ t('Disabled (render on CPU)') }}</ui-radio>
</div>
</div>
<div class="mb-2">
<div class="flex-1 mb-1">{{ $t('Shortcut registration') }}</div>
<div class="flex-1 mb-1">{{ t('Shortcut registration') }}</div>
<div class="mb-4 flex">
<ui-radio v-model="config.useOsGlobalShortcut" :value="true" class="mr-4">{{ $t('OS global (blocking)') }}</ui-radio>
<ui-radio v-model="config.useOsGlobalShortcut" :value="false" class="mr-4">{{ $t('Hook (non-blocking)') }}</ui-radio>
<ui-radio v-model="config.useOsGlobalShortcut" :value="true" class="mr-4">{{ t('OS global (blocking)') }}</ui-radio>
<ui-radio v-model="config.useOsGlobalShortcut" :value="false" class="mr-4">{{ t('Hook (non-blocking)') }}</ui-radio>
</div>
</div>
<div class="mb-2">
<div class="flex-1 mb-1">{{ $t('PoE window title') }} <span class="bg-gray-200 text-gray-900 rounded px-1">{{ $t('Restart required') }}</span></div>
<div class="flex-1 mb-1">{{ t('PoE window title') }} <span class="bg-gray-200 text-gray-900 rounded px-1">{{ t('Restart required') }}</span></div>
<div class="mb-4">
<input v-model="config.windowTitle" class="rounded bg-gray-900 px-1 block w-full mb-1 font-fontin-regular" />
</div>
</div>
<div class="mb-2">
<div class="flex-1 mb-1">{{ $t('Restore clipboard') }}</div>
<div class="flex-1 mb-1">{{ t('Restore clipboard') }}</div>
<div class="mb-4 flex">
<ui-radio v-model="config.restoreClipboard" :value="true" class="mr-4">{{ $t('Yes') }}</ui-radio>
<ui-radio v-model="config.restoreClipboard" :value="false" class="mr-4">{{ $t('No') }}</ui-radio>
<ui-radio v-model="config.restoreClipboard" :value="true" class="mr-4">{{ t('Yes') }}</ui-radio>
<ui-radio v-model="config.restoreClipboard" :value="false" class="mr-4">{{ t('No') }}</ui-radio>
</div>
</div>
</div>
</template>
<script lang="ts">
import { computed } from 'vue'
import { defineComponent, computed } from 'vue'
import { useI18n } from 'vue-i18n'
import { Config } from '@/web/Config'
export default {
export default defineComponent({
setup () {
const { t } = useI18n()
return {
t,
config: computed(() => Config.store)
}
}
}
})
</script>
<i18n>
+21 -17
View File
@@ -1,70 +1,74 @@
<template>
<div class="max-w-md p-2">
<div class="mb-2">
<div class="flex-1 mb-1">{{ $t('Font size') }} <span class="bg-gray-200 text-gray-900 rounded px-1">{{ $t('Restart required') }}</span></div>
<div class="flex-1 mb-1">{{ t('Font size') }} <span class="bg-gray-200 text-gray-900 rounded px-1">{{ t('Restart required') }}</span></div>
<div class="mb-4 flex">
<input v-model.number="config.fontSize" class="rounded bg-gray-900 px-1 block w-16 mb-1 font-fontin-regular text-center" />
<span class="ml-1">px</span>
</div>
</div>
<div class="mb-2">
<div class="flex-1 mb-1">{{ $t('Clicking on background focuses game') }}</div>
<div class="flex-1 mb-1">{{ t('Clicking on background focuses game') }}</div>
<div class="mb-4 flex">
<ui-radio v-model="config.overlayBackgroundClose" :value="false" class="mr-4">{{ $t('No') }}</ui-radio>
<ui-radio v-model="config.overlayBackgroundClose" :value="true" class="mr-4">{{ $t('Yes') }}</ui-radio>
<ui-radio v-model="config.overlayBackgroundClose" :value="false" class="mr-4">{{ t('No') }}</ui-radio>
<ui-radio v-model="config.overlayBackgroundClose" :value="true" class="mr-4">{{ t('Yes') }}</ui-radio>
</div>
</div>
<div class="mb-2">
<div class="flex-1 mb-1">{{ $t('Background, when APT window is clickable') }}</div>
<div class="flex-1 mb-1">{{ t('Background, when APT window is clickable') }}</div>
<div class="mb-1 flex">
<input v-model="config.overlayBackground" class="rounded bg-gray-900 px-1 block w-48 mb-1 mr-4 font-fontin-regular text-center" />
<ui-radio v-model="config.overlayBackground" value="rgba(255, 255, 255, 0)">{{ $t('Transparent') }}</ui-radio>
<ui-radio v-model="config.overlayBackground" value="rgba(255, 255, 255, 0)">{{ t('Transparent') }}</ui-radio>
</div>
<div class="mb-4" v-if="config.overlayBackground !== 'rgba(255, 255, 255, 0)'">
<ui-radio v-model="config.overlayBackgroundExclusive" :value="true" class="mr-4">{{ $t('Show for Overlay and Price Check') }}</ui-radio><br>
<ui-radio v-model="config.overlayBackgroundExclusive" :value="false">{{ $t('Show only for Overlay') }}</ui-radio>
<ui-radio v-model="config.overlayBackgroundExclusive" :value="true" class="mr-4">{{ t('Show for Overlay and Price Check') }}</ui-radio><br>
<ui-radio v-model="config.overlayBackgroundExclusive" :value="false">{{ t('Show only for Overlay') }}</ui-radio>
</div>
</div>
<div class="mb-2">
<div class="flex-1 mb-1">{{ $t('PoE log file') }}</div>
<div class="flex-1 mb-1">{{ t('PoE log file') }}</div>
<div class="mb-4 flex">
<input v-model.trim="config.clientLog"
class="rounded-l bg-gray-900 px-1 block w-full font-sans" placeholder="???/Grinding Gear Games/Path of Exile/logs/Client.txt">
<input type="file" id="file" class="hidden" accept=".txt" @input="handleLogFile">
<label class="text-gray-400 bg-gray-900 px-2 rounded-r ml-px cursor-pointer" for="file">{{ $t('Browse') }}</label>
<label class="text-gray-400 bg-gray-900 px-2 rounded-r ml-px cursor-pointer" for="file">{{ t('Browse') }}</label>
</div>
</div>
<div class="mb-2">
<div class="flex-1 mb-1">{{ $t('Language') }} <span class="bg-gray-200 text-gray-900 rounded px-1">{{ $t('Restart required') }}</span></div>
<div class="flex-1 mb-1">{{ t('Language') }} <span class="bg-gray-200 text-gray-900 rounded px-1">{{ t('Restart required') }}</span></div>
<div class="mb-4 flex">
<ui-radio v-model="config.language" value="en" class="mr-4">English</ui-radio>
<ui-radio v-model="config.language" value="ru" class="mr-4">Русский</ui-radio>
</div>
</div>
<div class="mb-2">
<div class="flex-1 mb-1">{{ $t('Auto-download updates') }}</div>
<div class="flex-1 mb-1">{{ t('Auto-download updates') }}</div>
<div class="mb-4 flex">
<ui-radio v-model="config.disableUpdateDownload" :value="false" class="mr-4">{{ $t('Yes') }}</ui-radio>
<ui-radio v-model="config.disableUpdateDownload" :value="true" class="mr-4">{{ $t('No') }}</ui-radio>
<ui-radio v-model="config.disableUpdateDownload" :value="false" class="mr-4">{{ t('Yes') }}</ui-radio>
<ui-radio v-model="config.disableUpdateDownload" :value="true" class="mr-4">{{ t('No') }}</ui-radio>
</div>
</div>
</div>
</template>
<script lang="ts">
import { computed } from 'vue'
import { defineComponent, computed } from 'vue'
import { useI18n } from 'vue-i18n'
import { Config } from '@/web/Config'
export default {
export default defineComponent({
setup () {
const { t } = useI18n()
return {
t,
config: computed(() => Config.store),
handleLogFile (e: InputEvent) {
Config.store.clientLog = (e.target as HTMLInputElement).files![0].path
}
}
}
}
})
</script>
<i18n>
+17 -13
View File
@@ -1,12 +1,12 @@
<template>
<div class="max-w-md p-2">
<div class="bg-gray-700 rounded px-2 py-1 mb-2 leading-none">
<i class="fas fa-info-circle"></i> {{ $t('You can clear hotkey by pressing Backspace') }}</div>
<i class="fas fa-info-circle"></i> {{ t('You can clear hotkey by pressing Backspace') }}</div>
<div class="mb-8">
<div class="flex">
<div class="flex-1">{{ $t('Price check') }}</div>
<div class="flex-1">{{ t('Price check') }}</div>
<div class="flex">
<span class="text-gray-500 mr-2">{{ $t('Auto-hide Mode') }}</span>
<span class="text-gray-500 mr-2">{{ t('Auto-hide Mode') }}</span>
<button :class="{ border: config.priceCheckKeyHold === 'Ctrl', 'line-through': config.priceCheckKey === null }" @click="config.priceCheckKeyHold = 'Ctrl'; config.priceCheckKey = null" class="rounded px-1 bg-gray-900 leading-none mr-1">Ctrl</button>
<button :class="{ border: config.priceCheckKeyHold === 'Alt', 'line-through': config.priceCheckKey === null }" @click="config.priceCheckKeyHold = 'Alt'; config.priceCheckKey = null" class="rounded px-1 bg-gray-900 leading-none">Alt</button>
<span class="mx-4">+</span>
@@ -14,25 +14,25 @@
</div>
</div>
<div class="text-right mt-2">
<span class="text-gray-500 mr-2">{{ $t('Open without auto-hide') }}</span>
<span class="text-gray-500 mr-2">{{ t('Open without auto-hide') }}</span>
<hotkey-input v-model="config.priceCheckLocked" class="w-48" />
</div>
</div>
<div class="mb-4">
<div class="flex">
<div class="flex-1">{{ $t('Overlay') }} <span class="text-red-500 text-lg leading-none">*</span></div>
<div class="flex-1">{{ t('Overlay') }} <span class="text-red-500 text-lg leading-none">*</span></div>
<hotkey-input required v-model="config.overlayKey" class="w-48" />
</div>
</div>
<div class="mb-4">
<div class="flex">
<div class="flex-1">{{ $t('Open item on wiki') }}</div>
<div class="flex-1">{{ t('Open item on wiki') }}</div>
<hotkey-input v-model="config.wikiKey" class="w-48" />
</div>
</div>
<div class="mb-4">
<div class="flex">
<div class="flex-1">{{ $t('Map check') }}</div>
<div class="flex-1">{{ t('Map check') }}</div>
<hotkey-input v-model="config.mapCheckKey" class="w-48" />
</div>
</div>
@@ -44,16 +44,16 @@
</div>
<div class="mb-8">
<div class="flex">
<div class="flex-1">{{ $t('Delve grid') }}</div>
<div class="flex-1">{{ t('Delve grid') }}</div>
<hotkey-input v-model="config.delveGridKey" class="w-48" />
</div>
</div>
<div class="mb-8">
<div class="flex">
<div class="flex-1">{{ $t('Stash tab scrolling') }}</div>
<div class="flex-1">{{ t('Stash tab scrolling') }}</div>
<div class="flex">
<ui-radio v-model="config.stashScroll" :value="true" class="mr-4 font-fontin-regular">Ctrl + MouseWheel</ui-radio>
<ui-radio v-model="config.stashScroll" :value="false">{{ $t('Disabled') }}</ui-radio>
<ui-radio v-model="config.stashScroll" :value="false">{{ t('Disabled') }}</ui-radio>
</div>
</div>
</div>
@@ -61,18 +61,22 @@
</template>
<script lang="ts">
import { computed } from 'vue'
import { defineComponent, computed } from 'vue'
import { useI18n } from 'vue-i18n'
import { Config } from '@/web/Config'
import HotkeyInput from './HotkeyInput.vue'
export default {
export default defineComponent({
components: { HotkeyInput },
setup () {
const { t } = useI18n()
return {
t,
config: computed(() => Config.store)
}
}
}
})
</script>
<i18n>
+10 -6
View File
@@ -1,24 +1,24 @@
<template>
<div class="flex flex-col overflow-hidden h-full">
<div class="p-1 flex">
<input :placeholder="$t('Search') + '...'" v-model="search" class="bg-gray-900 rounded px-1">
<ui-toggle v-model="onlySelected" class="mx-2">{{ $t('Only selected') }}</ui-toggle>
<input :placeholder="t('Search') + '...'" v-model="search" class="bg-gray-900 rounded px-1">
<ui-toggle v-model="onlySelected" class="mx-2">{{ t('Only selected') }}</ui-toggle>
<ui-popover>
<template #target>
<div class="flex items-center justify-center">
<i class="fas fa-question-circle leading-none mr-1"></i>{{ $t('help') }}</div>
<i class="fas fa-question-circle leading-none mr-1"></i>{{ t('help') }}</div>
</template>
<template #content>
<div class="flex flex-col justify-center text-base"
v-html="$t('help-text')">
v-html="t('help-text')">
</div>
</template>
</ui-popover>
</div>
<div class="flex font-bold py-1 shadow">
<div class="flex-1 px-2">{{ $t('Stat (found: {0})', [filteredStats.length]) }}</div>
<div class="flex-1 px-2">{{ t('Stat (found: {0})', [filteredStats.length]) }}</div>
<div class="flex" style="padding-right: calc(0.875rem + 1.5rem);">
<div class="px-2">{{ $t('Invert') }}</div>
<div class="px-2">{{ t('Invert') }}</div>
<div class="w-12 bg-orange-600 rounded-l leading-none flex items-center justify-center">
<i class="fas fa-exclamation-triangle"></i></div>
<div class="w-12 bg-red-700 mx-px leading-none flex items-center justify-center">
@@ -44,6 +44,7 @@
<script lang="ts">
import { computed, defineComponent, ref } from 'vue'
import { useI18n } from 'vue-i18n'
import { Config } from '@/web/Config'
import { STATS } from '@/assets/data'
import MapsStatEntry from './MapsStatEntry.vue'
@@ -69,7 +70,10 @@ export default defineComponent({
return Config.store.widgets.find(widget => widget.wmType === 'map-check') as MapCheckWidget
})
const { t } = useI18n()
return {
t,
search,
onlySelected,
filteredStats: computed(() => {
+20 -16
View File
@@ -1,62 +1,66 @@
<template>
<div class="max-w-md p-2">
<div class="mb-2">
<div class="flex-1 mb-1">{{ $t('Account name') }}</div>
<div class="flex-1 mb-1">{{ t('Account name') }}</div>
<div class="mb-4">
<input v-model="config.accountName" class="rounded bg-gray-900 px-1 block w-full mb-1 font-fontin-regular" />
</div>
</div>
<div class="mb-2">
<div class="flex-1 mb-1">{{ $t('Show seller') }}</div>
<div class="flex-1 mb-1">{{ t('Show seller') }}</div>
<div class="mb-1 flex">
<ui-radio v-model="config.showSeller" :value="false" class="mr-4">{{ $t('No') }}</ui-radio>
<ui-radio v-model="config.showSeller" value="account" class="mr-4">{{ $t('Account name') }}</ui-radio>
<ui-radio v-model="config.showSeller" value="ign">{{ $t('Last character name') }}</ui-radio>
<ui-radio v-model="config.showSeller" :value="false" class="mr-4">{{ t('No') }}</ui-radio>
<ui-radio v-model="config.showSeller" value="account" class="mr-4">{{ t('Account name') }}</ui-radio>
<ui-radio v-model="config.showSeller" value="ign">{{ t('Last character name') }}</ui-radio>
</div>
<div class="mb-4 italic text-gray-500">{{ $t('Your items will be highlighted even if it is turned off') }}</div>
<div class="mb-4 italic text-gray-500">{{ t('Your items will be highlighted even if it is turned off') }}</div>
</div>
<div class="mb-2">
<div class="flex-1 mb-1">{{ $t('Fill stat values') }}</div>
<div class="flex-1 mb-1">{{ t('Fill stat values') }}</div>
<div class="mb-4 flex">
<div class="flex mr-6">
<span class="mr-1">+-</span>
<input v-model.number="searchStatRange" class="rounded bg-gray-900 px-1 block w-16 mb-1 font-fontin-regular text-center" />
<span class="ml-1">%</span>
</div>
<ui-radio v-model="searchStatRange" :value="0">{{ $t('Exact roll') }}</ui-radio>
<ui-radio v-model="searchStatRange" :value="0">{{ t('Exact roll') }}</ui-radio>
</div>
</div>
<div class="mb-2">
<div class="flex-1 mb-1">{{ $t('Minimum buyout price') }}</div>
<div class="flex-1 mb-1">{{ t('Minimum buyout price') }}</div>
<div class="mb-4 flex">
<div class="flex mr-6">
<input v-model.number="chaosPriceThreshold" class="rounded bg-gray-900 px-1 block w-16 mb-1 font-fontin-regular text-center" />
<span class="ml-2">{{ $t('Chaos Orbs') }}</span>
<span class="ml-2">{{ t('Chaos Orbs') }}</span>
</div>
</div>
</div>
<div class="mb-2">
<div class="flex-1 mb-1">{{ $t('Show memorized cursor position') }}</div>
<div class="flex-1 mb-1">{{ t('Show memorized cursor position') }}</div>
<div class="mb-4 flex">
<ui-radio v-model="config.priceCheckShowCursor" :value="true" class="mr-4">{{ $t('Yes') }}</ui-radio>
<ui-radio v-model="config.priceCheckShowCursor" :value="false">{{ $t('No') }}</ui-radio>
<ui-radio v-model="config.priceCheckShowCursor" :value="true" class="mr-4">{{ t('Yes') }}</ui-radio>
<ui-radio v-model="config.priceCheckShowCursor" :value="false">{{ t('No') }}</ui-radio>
</div>
</div>
</div>
</template>
<script lang="ts">
import { computed } from 'vue'
import { defineComponent, computed } from 'vue'
import { useI18n } from 'vue-i18n'
import { Config } from '@/web/Config'
import { PriceCheckWidget } from '../overlay/interfaces'
export default {
export default defineComponent({
setup () {
const configWidget = computed(() => {
return Config.store.widgets.find(w => w.wmType === 'price-check') as PriceCheckWidget
})
const { t } = useI18n()
return {
t,
config: computed(() => Config.store),
searchStatRange: computed<number>({
get () {
@@ -82,7 +86,7 @@ export default {
})
}
}
}
})
</script>
<i18n>
+252 -332
View File
File diff suppressed because it is too large Load Diff