Skip to content

Commit 8a29c27

Browse files
committed
Sync from GUI.for.SingBox
1 parent 11dd953 commit 8a29c27

File tree

5 files changed

+17
-8
lines changed

5 files changed

+17
-8
lines changed

frontend/src/components/InterfaceSelect/index.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,5 @@ GetInterfaces().then((res) => {
3333
</script>
3434

3535
<template>
36-
<Select v-model="model" @change="onChange" :options="options" :border="border" />
36+
<Select v-model="model" v-bind="$attrs" @change="onChange" :options="options" :border="border" />
3737
</template>
38-
39-
<style lang="less" scoped></style>

frontend/src/components/Picker/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ const handleSelectAll = () => {
8888
class="item"
8989
>
9090
<div class="label">
91-
<div>{{ o.label }}</div>
91+
<div>{{ t(o.label) }}</div>
9292
<Icon
9393
v-show="isSelected(o.value)"
9494
:size="32"

frontend/src/components/Select/index.vue

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ interface Props {
77
size?: 'default' | 'small'
88
placeholder?: string
99
autoSize?: boolean
10+
clearable?: boolean
1011
}
1112
1213
const model = defineModel<string>({ default: '' })
@@ -16,11 +17,16 @@ withDefaults(defineProps<Props>(), {
1617
border: true,
1718
size: 'default',
1819
autoSize: false,
20+
clearable: false,
1921
})
2022
2123
const emits = defineEmits(['change'])
2224
2325
const { t } = useI18n()
26+
27+
const handleClear = () => {
28+
model.value = ''
29+
}
2430
</script>
2531

2632
<template>
@@ -31,13 +37,20 @@ const { t } = useI18n()
3137
{{ t(o.label) }}
3238
</option>
3339
</select>
40+
<Button
41+
v-show="clearable && model"
42+
@click="handleClear"
43+
icon="close"
44+
type="text"
45+
size="small"
46+
/>
3447
</div>
3548
</template>
3649

3750
<style lang="less" scoped>
3851
.select {
52+
display: inline-flex;
3953
min-width: 120px;
40-
display: inline-block;
4154
border-radius: 4px;
4255
font-size: 12px;
4356
background: var(--select-bg);

frontend/src/lang/locale/en.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ export default {
249249
always: 'Always',
250250
strict: 'Strict',
251251
off: 'Off',
252-
notFound: 'Kernel Not Found',
252+
notFound: 'Core Not Found',
253253
requestFailed: 'Request Failed',
254254
local: 'Local',
255255
remote: 'Remote',

frontend/src/views/KernelView/index.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,3 @@ import SwitchBranch from './components/SwitchBranch.vue'
1111
<SwitchBranch />
1212
</div>
1313
</template>
14-
15-
<style lang="less" scoped></style>

0 commit comments

Comments
 (0)