Feat: Initial Setup through env vars (#1736)
* initial support for initial setup * improve setup * improve mobile view * move base admin route * admin panel mobile view * set initial host and port * add docs * properly setup everything, use for dev env * change userconfig and interface port on setup, note users afterwards
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<div>
|
||||
<p class="px-8 pt-8 text-center text-2xl">
|
||||
<div class="flex flex-col items-center">
|
||||
<p class="px-8 text-center text-2xl">
|
||||
{{ $t('setup.welcomeDesc') }}
|
||||
</p>
|
||||
<NuxtLink to="/setup/2">
|
||||
<NuxtLink to="/setup/2" class="mt-8">
|
||||
<BaseButton as="span">{{ $t('general.continue') }}</BaseButton>
|
||||
</NuxtLink>
|
||||
</div>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<div>
|
||||
<p class="p-8 text-center text-lg">
|
||||
<p class="text-center text-lg">
|
||||
{{ $t('setup.createAdminDesc') }}
|
||||
</p>
|
||||
<div class="flex flex-col gap-3">
|
||||
<div class="mt-8 flex flex-col gap-3">
|
||||
<div class="flex flex-col">
|
||||
<FormNullTextField
|
||||
id="username"
|
||||
@@ -28,7 +28,7 @@
|
||||
:label="$t('general.confirmPassword')"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<div class="mt-4 flex justify-center">
|
||||
<BaseButton @click="submit">{{ $t('setup.createAccount') }}</BaseButton>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,14 +1,18 @@
|
||||
<template>
|
||||
<div>
|
||||
<p class="p-8 text-center text-lg">
|
||||
<p class="text-center text-lg">
|
||||
{{ $t('setup.existingSetup') }}
|
||||
</p>
|
||||
<div class="mb-8 flex justify-center">
|
||||
<NuxtLink to="/setup/4">
|
||||
<BaseButton as="span">{{ $t('general.no') }}</BaseButton>
|
||||
<div class="mt-4 flex justify-center gap-3">
|
||||
<NuxtLink to="/setup/4" class="w-20">
|
||||
<BaseButton as="span" class="w-full justify-center">
|
||||
{{ $t('general.no') }}
|
||||
</BaseButton>
|
||||
</NuxtLink>
|
||||
<NuxtLink to="/setup/migrate">
|
||||
<BaseButton as="span">{{ $t('general.yes') }}</BaseButton>
|
||||
<NuxtLink to="/setup/migrate" class="w-20">
|
||||
<BaseButton as="span" class="w-full justify-center">
|
||||
{{ $t('general.yes') }}
|
||||
</BaseButton>
|
||||
</NuxtLink>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,21 +1,27 @@
|
||||
<template>
|
||||
<div>
|
||||
<p class="p-8 text-center text-lg">
|
||||
<p class="text-center text-lg">
|
||||
{{ $t('setup.setupConfigDesc') }}
|
||||
</p>
|
||||
<div class="flex flex-col gap-3">
|
||||
<div class="mt-8 flex flex-col gap-3">
|
||||
<div class="flex flex-col">
|
||||
<FormNullTextField
|
||||
id="host"
|
||||
v-model="host"
|
||||
:label="$t('general.host')"
|
||||
placeholder="vpn.example.com"
|
||||
:description="$t('setup.hostDesc')"
|
||||
/>
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<FormNumberField id="port" v-model="port" :label="$t('general.port')" />
|
||||
<FormNumberField
|
||||
id="port"
|
||||
v-model="port"
|
||||
:label="$t('general.port')"
|
||||
:description="$t('setup.portDesc')"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<div class="mt-4 flex justify-center">
|
||||
<BaseButton @click="submit">{{ $t('general.continue') }}</BaseButton>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
<template>
|
||||
<div>
|
||||
<p class="p-8 text-center text-lg">
|
||||
<div class="flex flex-col items-center">
|
||||
<p class="text-center text-lg">
|
||||
{{ $t('setup.setupMigrationDesc') }}
|
||||
</p>
|
||||
<div>
|
||||
<div class="mt-8 flex gap-3">
|
||||
<Label for="migration">{{ $t('setup.migration') }}</Label>
|
||||
<input id="migration" type="file" @change="onChangeFile" />
|
||||
</div>
|
||||
<BaseButton @click="submit">{{ $t('setup.upload') }}</BaseButton>
|
||||
<div class="mt-4">
|
||||
<BaseButton @click="submit">{{ $t('setup.upload') }}</BaseButton>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="flex flex-col items-center">
|
||||
<p>{{ $t('setup.successful') }}</p>
|
||||
<NuxtLink to="/login">
|
||||
<NuxtLink to="/login" class="mt-4">
|
||||
<BaseButton as="span">{{ $t('login.signIn') }}</BaseButton>
|
||||
</NuxtLink>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user