Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d08806f0c9 | ||
|
|
85ac73efcc | ||
|
|
7cc5a6b347 | ||
|
|
983e4d436d | ||
|
|
727826f1b1 |
@@ -108,6 +108,7 @@ services:
|
|||||||
- DJANGO_SUPERUSER_USERNAME=admin # default superuser name
|
- DJANGO_SUPERUSER_USERNAME=admin # default superuser name
|
||||||
- DJANGO_SUPERUSER_PASSWORD=password # default superuser password
|
- DJANGO_SUPERUSER_PASSWORD=password # default superuser password
|
||||||
- DJANGO_SUPERUSER_EMAIL=admin@example.com # default superuser email
|
- DJANGO_SUPERUSER_EMAIL=admin@example.com # default superuser email
|
||||||
|
- ACCOUNT_EMAIL_VERIFICATION=none # Determines the e-mail verification method during signup – choose one of "none", "optional", or "mandatory". Default is "optional". If you don't need to verify the email, you can set it to "none".
|
||||||
# If you want to use the email verification function, you need to configure the following parameters
|
# If you want to use the email verification function, you need to configure the following parameters
|
||||||
# - EMAIL_HOST=SMTP server address
|
# - EMAIL_HOST=SMTP server address
|
||||||
# - EMAIL_PORT=SMTP server port
|
# - EMAIL_PORT=SMTP server port
|
||||||
|
|||||||
@@ -15,26 +15,23 @@
|
|||||||
</template>
|
</template>
|
||||||
<v-card>
|
<v-card>
|
||||||
<v-toolbar
|
<v-toolbar
|
||||||
dark
|
|
||||||
color="primary"
|
|
||||||
>
|
>
|
||||||
<v-btn
|
<v-btn
|
||||||
icon
|
icon
|
||||||
dark
|
|
||||||
@click="dialog = false"
|
@click="dialog = false"
|
||||||
>
|
>
|
||||||
<v-icon>close</v-icon>
|
<v-icon icon="close"></v-icon>
|
||||||
</v-btn>
|
</v-btn>
|
||||||
<v-toolbar-title>{{ $t('language') }}</v-toolbar-title>
|
<v-toolbar-title>{{ $t('language') }}</v-toolbar-title>
|
||||||
<v-spacer></v-spacer>
|
<v-spacer></v-spacer>
|
||||||
<!-- <v-toolbar-items>-->
|
<v-toolbar-items>
|
||||||
<!-- <v-btn-->
|
<v-btn
|
||||||
<!-- variant="text"-->
|
variant="text"
|
||||||
<!-- @click="dialog = false"-->
|
@click="dialog = false"
|
||||||
<!-- >-->
|
>
|
||||||
<!-- Save-->
|
Save
|
||||||
<!-- </v-btn>-->
|
</v-btn>
|
||||||
<!-- </v-toolbar-items>-->
|
</v-toolbar-items>
|
||||||
</v-toolbar>
|
</v-toolbar>
|
||||||
<v-list
|
<v-list
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -65,6 +65,6 @@ sudo curl -L "https://raw.githubusercontent.com/WongSaang/chatgpt-ui/main/docker
|
|||||||
|
|
||||||
echo "Starting services..."
|
echo "Starting services..."
|
||||||
|
|
||||||
sudo APP_DOMAIN="${APP_DOMAIN}:${SERVER_PORT}" CLIENT_PORT=${CLIENT_PORT} SERVER_PORT=${SERVER_PORT} WSGI_PORT=${WSGI_PORT} docker-compose up --pull -d
|
sudo APP_DOMAIN="${APP_DOMAIN}:${SERVER_PORT}" CLIENT_PORT=${CLIENT_PORT} SERVER_PORT=${SERVER_PORT} WSGI_PORT=${WSGI_PORT} docker-compose up --pull always -d
|
||||||
|
|
||||||
echo "Done"
|
echo "Done"
|
||||||
@@ -106,6 +106,7 @@ services:
|
|||||||
- DJANGO_SUPERUSER_USERNAME=admin # 默认超级用户
|
- DJANGO_SUPERUSER_USERNAME=admin # 默认超级用户
|
||||||
- DJANGO_SUPERUSER_PASSWORD=password # 默认超级用户的密码
|
- DJANGO_SUPERUSER_PASSWORD=password # 默认超级用户的密码
|
||||||
- DJANGO_SUPERUSER_EMAIL=admin@example.com # 默认超级用户邮箱
|
- DJANGO_SUPERUSER_EMAIL=admin@example.com # 默认超级用户邮箱
|
||||||
|
- ACCOUNT_EMAIL_VERIFICATION=none # 邮箱验证方式,可选值: none, optional, mandatory. 默认为 optional。如果你不需要验证用户的邮箱,可以设置为 none。
|
||||||
# 如果您想使用电子邮件验证功能,需要配置以下参数:
|
# 如果您想使用电子邮件验证功能,需要配置以下参数:
|
||||||
# - EMAIL_HOST=SMTP server address
|
# - EMAIL_HOST=SMTP server address
|
||||||
# - EMAIL_PORT=SMTP server port
|
# - EMAIL_PORT=SMTP server port
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
"copy": "Copy",
|
"copy": "Copy",
|
||||||
"copied": "Copied",
|
"copied": "Copied",
|
||||||
"delete": "Delete",
|
"delete": "Delete",
|
||||||
|
"signOut": "Sign out",
|
||||||
"welcomeScreen": {
|
"welcomeScreen": {
|
||||||
"introduction1": "is an unofficial client for ChatGPT, but uses the official OpenAI API.",
|
"introduction1": "is an unofficial client for ChatGPT, but uses the official OpenAI API.",
|
||||||
"introduction2": "You will need an OpenAI API Key before you can use this client.",
|
"introduction2": "You will need an OpenAI API Key before you can use this client.",
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
"copy": "复制",
|
"copy": "复制",
|
||||||
"copied": "已复制",
|
"copied": "已复制",
|
||||||
"delete": "删除",
|
"delete": "删除",
|
||||||
|
"signOut": "退出登录",
|
||||||
"welcomeScreen": {
|
"welcomeScreen": {
|
||||||
"introduction1": "是一个非官方的ChatGPT客户端,但使用OpenAI的官方API",
|
"introduction1": "是一个非官方的ChatGPT客户端,但使用OpenAI的官方API",
|
||||||
"introduction2": "在使用本客户端之前,您需要一个OpenAI API密钥。",
|
"introduction2": "在使用本客户端之前,您需要一个OpenAI API密钥。",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import {useDisplay} from "vuetify";
|
import {useDisplay} from "vuetify";
|
||||||
|
|
||||||
const { $i18n } = useNuxtApp()
|
const { $i18n, $auth } = useNuxtApp()
|
||||||
const runtimeConfig = useRuntimeConfig()
|
const runtimeConfig = useRuntimeConfig()
|
||||||
const colorMode = useColorMode()
|
const colorMode = useColorMode()
|
||||||
const drawer = ref(null)
|
const drawer = ref(null)
|
||||||
@@ -88,6 +88,15 @@ const drawerPermanent = computed(() => {
|
|||||||
return mdAndUp.value
|
return mdAndUp.value
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const signOut = async () => {
|
||||||
|
const { data, error } = await useFetch('/api/account/logout/', {
|
||||||
|
method: 'POST'
|
||||||
|
})
|
||||||
|
if (!error.value) {
|
||||||
|
await $auth.logout()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onNuxtReady(async () => {
|
onNuxtReady(async () => {
|
||||||
loadConversations()
|
loadConversations()
|
||||||
})
|
})
|
||||||
@@ -261,6 +270,14 @@ onNuxtReady(async () => {
|
|||||||
:title="$t('feedback')"
|
:title="$t('feedback')"
|
||||||
@click="feedback"
|
@click="feedback"
|
||||||
></v-list-item>
|
></v-list-item>
|
||||||
|
|
||||||
|
<v-list-item
|
||||||
|
rounded="xl"
|
||||||
|
prepend-icon="logout"
|
||||||
|
:title="$t('signOut')"
|
||||||
|
@click="signOut"
|
||||||
|
></v-list-item>
|
||||||
|
|
||||||
</v-list>
|
</v-list>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -281,24 +298,6 @@ onNuxtReady(async () => {
|
|||||||
@click="createNewConversion()"
|
@click="createNewConversion()"
|
||||||
></v-btn>
|
></v-btn>
|
||||||
|
|
||||||
<!-- <v-menu-->
|
|
||||||
<!-- >-->
|
|
||||||
<!-- <template v-slot:activator="{ props }">-->
|
|
||||||
<!-- <v-btn-->
|
|
||||||
<!-- v-bind="props"-->
|
|
||||||
<!-- icon="help_outline"-->
|
|
||||||
<!-- title="Feedback"-->
|
|
||||||
<!-- ></v-btn>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- <v-list-->
|
|
||||||
<!-- >-->
|
|
||||||
<!-- <v-list-item-->
|
|
||||||
<!-- @click="feedback"-->
|
|
||||||
<!-- >-->
|
|
||||||
<!-- <v-list-item-title>{{ $t('feedback') }}</v-list-item-title>-->
|
|
||||||
<!-- </v-list-item>-->
|
|
||||||
<!-- </v-list>-->
|
|
||||||
<!-- </v-menu>-->
|
|
||||||
</v-app-bar>
|
</v-app-bar>
|
||||||
|
|
||||||
<v-main>
|
<v-main>
|
||||||
|
|||||||
@@ -45,24 +45,32 @@ onNuxtReady(() => {
|
|||||||
elevation="0"
|
elevation="0"
|
||||||
>
|
>
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<h2 class="text-h4">Verify your email</h2>
|
<div v-if="route.query.email_verification_required && route.query.email_verification_required === 'none'">
|
||||||
<p class="text-body-2 mt-5">
|
<h2 class="text-h4">Your registration is successful</h2>
|
||||||
We've sent a verification email to <strong>{{ $auth.user.email }}</strong>. <br>
|
<p class="mt-5">
|
||||||
Please check your inbox and click the link to verify your email address.
|
You can now <NuxtLink to="/account/signin">login</NuxtLink> to your account.
|
||||||
</p>
|
</p>
|
||||||
<p v-if="errorMsg"
|
</div>
|
||||||
class="text-red"
|
<div v-else>
|
||||||
>{{ errorMsg }}</p>
|
<h2 class="text-h4">Verify your email</h2>
|
||||||
<v-btn
|
<p class="mt-5">
|
||||||
variant="text"
|
We've sent a verification email to <strong>{{ $auth.user.email }}</strong>. <br>
|
||||||
class="mt-5"
|
Please check your inbox and click the link to verify your email address.
|
||||||
color="primary"
|
</p>
|
||||||
:loading="sending"
|
<p v-if="errorMsg"
|
||||||
@click="resendEmail"
|
class="text-red"
|
||||||
:disabled="resent"
|
>{{ errorMsg }}</p>
|
||||||
>
|
<v-btn
|
||||||
{{ resent ? 'Resent' : 'Resend email'}}
|
variant="text"
|
||||||
</v-btn>
|
class="mt-5"
|
||||||
|
color="primary"
|
||||||
|
:loading="sending"
|
||||||
|
@click="resendEmail"
|
||||||
|
:disabled="resent"
|
||||||
|
>
|
||||||
|
{{ resent ? 'Resent' : 'Resend email'}}
|
||||||
|
</v-btn>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ const submit = async () => {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$auth.setUser(data.value.user)
|
$auth.setUser(data.value.user)
|
||||||
navigateTo('/account/onboarding')
|
navigateTo('/account/onboarding?email_verification_required='+data.value.email_verification_required)
|
||||||
}
|
}
|
||||||
|
|
||||||
submitting.value = false
|
submitting.value = false
|
||||||
|
|||||||
Reference in New Issue
Block a user