Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
727826f1b1 |
@@ -33,6 +33,7 @@
|
||||
"copy": "Copy",
|
||||
"copied": "Copied",
|
||||
"delete": "Delete",
|
||||
"signOut": "Sign out",
|
||||
"welcomeScreen": {
|
||||
"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.",
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
"copy": "复制",
|
||||
"copied": "已复制",
|
||||
"delete": "删除",
|
||||
"signOut": "退出登录",
|
||||
"welcomeScreen": {
|
||||
"introduction1": "是一个非官方的ChatGPT客户端,但使用OpenAI的官方API",
|
||||
"introduction2": "在使用本客户端之前,您需要一个OpenAI API密钥。",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script setup>
|
||||
import {useDisplay} from "vuetify";
|
||||
|
||||
const { $i18n } = useNuxtApp()
|
||||
const { $i18n, $auth } = useNuxtApp()
|
||||
const runtimeConfig = useRuntimeConfig()
|
||||
const colorMode = useColorMode()
|
||||
const drawer = ref(null)
|
||||
@@ -88,6 +88,15 @@ const drawerPermanent = computed(() => {
|
||||
return mdAndUp.value
|
||||
})
|
||||
|
||||
const signOut = async () => {
|
||||
const { data, error } = await useFetch('/api/account/logout/', {
|
||||
method: 'POST'
|
||||
})
|
||||
if (!error.value) {
|
||||
await $auth.logout()
|
||||
}
|
||||
}
|
||||
|
||||
onNuxtReady(async () => {
|
||||
loadConversations()
|
||||
})
|
||||
@@ -261,6 +270,14 @@ onNuxtReady(async () => {
|
||||
:title="$t('feedback')"
|
||||
@click="feedback"
|
||||
></v-list-item>
|
||||
|
||||
<v-list-item
|
||||
rounded="xl"
|
||||
prepend-icon="logout"
|
||||
:title="$t('signOut')"
|
||||
@click="signOut"
|
||||
></v-list-item>
|
||||
|
||||
</v-list>
|
||||
</div>
|
||||
</template>
|
||||
@@ -281,24 +298,6 @@ onNuxtReady(async () => {
|
||||
@click="createNewConversion()"
|
||||
></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-main>
|
||||
|
||||
Reference in New Issue
Block a user