@@ -3,12 +3,12 @@
|
|||||||
<template #trigger><slot /></template>
|
<template #trigger><slot /></template>
|
||||||
<template #title>{{ $t('admin.config.suggest') }}</template>
|
<template #title>{{ $t('admin.config.suggest') }}</template>
|
||||||
<template #description>
|
<template #description>
|
||||||
<p v-if="!values">
|
<div class="flex flex-col items-start gap-2">
|
||||||
|
<p>{{ $t('admin.config.suggestDesc') }}</p>
|
||||||
|
<p v-if="!data">
|
||||||
{{ $t('general.loading') }}
|
{{ $t('general.loading') }}
|
||||||
</p>
|
</p>
|
||||||
<div v-else class="flex flex-col items-start gap-2">
|
<BaseSelect v-else v-model="selected" :options="data" />
|
||||||
<p>{{ $t('admin.config.suggestDesc') }}</p>
|
|
||||||
<BaseSelect v-model="selected" :options="values" />
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #actions>
|
<template #actions>
|
||||||
@@ -31,10 +31,9 @@ const props = defineProps<{
|
|||||||
url: '/api/admin/ip-info' | '/api/setup/4';
|
url: '/api/admin/ip-info' | '/api/setup/4';
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const { data } = await useFetch(props.url, {
|
const { data } = useFetch(props.url, {
|
||||||
method: 'get',
|
method: 'get',
|
||||||
});
|
});
|
||||||
|
|
||||||
const selected = ref<string>();
|
const selected = ref<string>();
|
||||||
const values = toRef(data.value);
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
class="w-full"
|
class="w-full"
|
||||||
:placeholder="placeholder"
|
:placeholder="placeholder"
|
||||||
/>
|
/>
|
||||||
|
<ClientOnly>
|
||||||
<AdminSuggestDialog :url="url" @change="data = $event">
|
<AdminSuggestDialog :url="url" @change="data = $event">
|
||||||
<BaseButton as="span">
|
<BaseButton as="span">
|
||||||
<div class="flex items-center gap-3">
|
<div class="flex items-center gap-3">
|
||||||
@@ -24,6 +25,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</BaseButton>
|
</BaseButton>
|
||||||
</AdminSuggestDialog>
|
</AdminSuggestDialog>
|
||||||
|
</ClientOnly>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -18,18 +18,18 @@
|
|||||||
/>
|
/>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
<FormGroup>
|
<FormGroup>
|
||||||
<FormHeading :description="$t('admin.config.allowedIpsDesc')">{{
|
<FormHeading :description="$t('admin.config.allowedIpsDesc')">
|
||||||
$t('general.allowedIps')
|
{{ $t('general.allowedIps') }}
|
||||||
}}</FormHeading>
|
</FormHeading>
|
||||||
<FormArrayField
|
<FormArrayField
|
||||||
v-model="data.defaultAllowedIps"
|
v-model="data.defaultAllowedIps"
|
||||||
name="defaultAllowedIps"
|
name="defaultAllowedIps"
|
||||||
/>
|
/>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
<FormGroup>
|
<FormGroup>
|
||||||
<FormHeading :description="$t('admin.config.dnsDesc')">{{
|
<FormHeading :description="$t('admin.config.dnsDesc')">
|
||||||
$t('general.dns')
|
{{ $t('general.dns') }}
|
||||||
}}</FormHeading>
|
</FormHeading>
|
||||||
<FormArrayField v-model="data.defaultDns" name="defaultDns" />
|
<FormArrayField v-model="data.defaultDns" name="defaultDns" />
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
<FormGroup>
|
<FormGroup>
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
"yes": "Yes",
|
"yes": "Yes",
|
||||||
"no": "No",
|
"no": "No",
|
||||||
"confirmPassword": "Confirm Password",
|
"confirmPassword": "Confirm Password",
|
||||||
"loading": "Loading"
|
"loading": "Loading..."
|
||||||
},
|
},
|
||||||
"setup": {
|
"setup": {
|
||||||
"welcome": "Welcome to your first setup of wg-easy",
|
"welcome": "Welcome to your first setup of wg-easy",
|
||||||
|
|||||||
Reference in New Issue
Block a user