Skip to content

Commit

Permalink
chore: hide invalid actions
Browse files Browse the repository at this point in the history
  • Loading branch information
whatwewant committed Nov 30, 2023
1 parent 68d999e commit 664ad72
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 25 deletions.
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{
"name": "chatgpt-web",
"version": "2.11.3",
"private": false,
"description": "ChatGPT Web",
"author": "ChenZhaoYu <[email protected]>",
"keywords": [
"chatgpt-web",
"chatgpt",
"chatbot",
"vue"
],
"author": "ChenZhaoYu <[email protected]>",
"scripts": {
"dev": "vite",
"build": "run-p type-check build-only",
Expand All @@ -21,11 +22,6 @@
"common:cleanup": "rimraf node_modules && rimraf pnpm-lock.yaml",
"common:prepare": "husky install"
},
"lint-staged": {
"*.{ts,tsx,vue}": [
"pnpm lint:fix"
]
},
"dependencies": {
"@traptitech/markdown-it-katex": "^3.6.0",
"@vueuse/core": "^9.13.0",
Expand Down Expand Up @@ -68,5 +64,9 @@
"vite-plugin-pwa": "^0.14.4",
"vue-tsc": "^1.2.0"
},
"private": false
}
"lint-staged": {
"*.{ts,tsx,vue}": [
"pnpm lint:fix"
]
}
}
25 changes: 13 additions & 12 deletions src/views/chat/components/Header/index.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script lang="ts" setup>
import { computed, nextTick } from 'vue'
import { HoverButton, SvgIcon } from '@/components/common'
// import { HoverButton, SvgIcon } from '@/components/common'
import { SvgIcon } from '@/components/common'
import { useAppStore, useChatStore } from '@/store'
interface Props {
Expand Down Expand Up @@ -32,20 +33,20 @@ function onScrollToTop() {
nextTick(() => scrollRef.scrollTop = 0)
}
function handleExport() {
emit('export')
}
// function handleExport() {
// emit('export')
// }
function handleClear() {
emit('handleClear')
}
// function handleClear() {
// emit('handleClear')
// }
</script>

<template>
<header
class="sticky top-0 left-0 right-0 z-30 border-b dark:border-neutral-800 bg-white/80 dark:bg-black/20 backdrop-blur"
>
<div class="relative flex items-center justify-between min-w-0 overflow-hidden h-14">
<div class="relative flex items-center justify-between min-w-0 overflow-hidden h-14" style="padding-right: 24px;">
<div class="flex items-center">
<button
class="flex items-center justify-center w-11 h-11"
Expand All @@ -56,23 +57,23 @@ function handleClear() {
</button>
</div>
<h1
class="flex-1 px-4 pr-6 overflow-hidden cursor-pointer select-none text-ellipsis whitespace-nowrap"
class="flex-1 px-4 pr-6 overflow-hidden cursor-pointer select-none text-ellipsis whitespace-nowrap text-center"
@dblclick="onScrollToTop"
>
{{ currentChatHistory?.title ?? '' }}
</h1>
<div class="flex items-center space-x-2">
<!-- <div class="flex items-center space-x-2">
<HoverButton @click="handleExport">
<span class="text-xl text-[#4f555e] dark:text-white">
<SvgIcon icon="ri:download-2-line" />
</span>
</span>a1
</HoverButton>
<HoverButton @click="handleClear">
<span class="text-xl text-[#4f555e] dark:text-white">
<SvgIcon icon="ri:delete-bin-line" />
</span>
</HoverButton>
</div>
</div> -->
</div>
</header>
</template>
12 changes: 7 additions & 5 deletions src/views/chat/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import { useScroll } from './hooks/useScroll'
import { useChat } from './hooks/useChat'
import { useUsingContext } from './hooks/useUsingContext'
import HeaderComponent from './components/Header/index.vue'
import { HoverButton, SvgIcon } from '@/components/common'
// import { HoverButton, SvgIcon } from '@/components/common'
import { SvgIcon } from '@/components/common'
import { useBasicLayout } from '@/hooks/useBasicLayout'
import { useChatStore, usePromptStore } from '@/store'
import { fetchChatAPIProcess } from '@/api'
Expand All @@ -29,7 +30,8 @@ const chatStore = useChatStore()
const { isMobile } = useBasicLayout()
const { addChat, updateChat, updateChatSome, getChatByUuidAndIndex } = useChat()
const { scrollRef, scrollToBottom, scrollToBottomIfAtBottom } = useScroll()
const { usingContext, toggleUsingContext } = useUsingContext()
// const { usingContext, toggleUsingContext } = useUsingContext()
const { usingContext } = useUsingContext()
const { uuid } = route.params as { uuid: string }
Expand Down Expand Up @@ -511,9 +513,9 @@ onUnmounted(() => {
</div>
</main>
<footer :class="footerClass">
<div class="w-full max-w-screen-xl m-auto">
<div class="w-full m-auto">
<div class="flex items-center justify-between space-x-2">
<HoverButton v-if="!isMobile" @click="handleClear">
<!-- <HoverButton v-if="!isMobile" @click="handleClear">
<span class="text-xl text-[#4f555e] dark:text-white">
<SvgIcon icon="ri:delete-bin-line" />
</span>
Expand All @@ -527,7 +529,7 @@ onUnmounted(() => {
<span class="text-xl" :class="{ 'text-[#4b9e5f]': usingContext, 'text-[#a8071a]': !usingContext }">
<SvgIcon icon="ri:chat-history-line" />
</span>
</HoverButton>
</HoverButton> -->
<NAutoComplete v-model:value="prompt" :options="searchOptions" :render-label="renderOption">
<template #default="{ handleInput, handleBlur, handleFocus }">
<NInput
Expand Down

0 comments on commit 664ad72

Please sign in to comment.