修改手机端样式,增加返回按钮
This commit is contained in:
1 parent
9c0934b397
commit
658ab92706
2 files changed
+28
-14
No files matched your search
@@ -152,6 +152,15 @@
|
||||
caret-color: #0891b2;
|
||||
}
|
||||
|
||||
.chat-composer-textarea:focus,
|
||||
.chat-composer-textarea:focus-visible {
|
||||
outline: none !important;
|
||||
box-shadow: none !important;
|
||||
border: 0 !important;
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
}
|
||||
|
||||
.chat-composer-textarea::selection {
|
||||
background-color: rgba(14, 165, 233, 0.2);
|
||||
}
|
||||
|
||||
@@ -539,7 +539,7 @@ const submitFeedback = async () => {
|
||||
<span class="text-sm font-semibold uppercase tracking-[0.14em] text-slate-500 dark:text-slate-300">{{ $t('chat.history') }}</span>
|
||||
<ThemeToggleButton />
|
||||
</div>
|
||||
<button @click="startNewChat(); isSidebarOpen = false;" class="mt-3 inline-flex w-[92%] max-w-[320px] self-center items-center justify-center gap-2 rounded-xl bg-gradient-to-r from-cyan-600 to-blue-600 px-5 py-2.5 text-sm font-semibold text-white shadow-md shadow-cyan-500/25 transition-all hover:from-cyan-500 hover:to-blue-500 hover:shadow-lg hover:shadow-cyan-500/30 md:mt-4 md:w-[88%] md:max-w-none md:py-3">
|
||||
<button @click="startNewChat(); isSidebarOpen = false;" class="mt-3 inline-flex w-[92%] max-w-[320px] self-center items-center justify-center gap-2 rounded-xl bg-gradient-to-r from-cyan-500 to-blue-500 px-5 py-2.5 text-sm font-semibold text-white shadow-sm shadow-cyan-500/20 transition-all hover:from-cyan-400 hover:to-blue-400 hover:shadow-md hover:shadow-cyan-500/25 md:mt-4 md:w-[88%] md:max-w-none md:py-3">
|
||||
<Plus class="h-4 w-4" /> {{ $t('chat.newChat') }}
|
||||
</button>
|
||||
</div>
|
||||
@@ -575,20 +575,25 @@ const submitFeedback = async () => {
|
||||
</aside>
|
||||
|
||||
<div class="relative z-10 flex h-full w-full flex-1 flex-col overflow-hidden">
|
||||
<header class="sticky top-0 z-30 flex shrink-0 items-center justify-between border-b border-slate-200/70 bg-white/70 px-4 py-3 backdrop-blur-xl dark:border-slate-700/70 dark:bg-slate-950/65 md:px-6">
|
||||
<div class="flex items-center gap-3">
|
||||
<button @click="isSidebarOpen = !isSidebarOpen" class="rounded-lg p-2 transition-colors hover:bg-slate-100 dark:hover:bg-slate-800 md:hidden">
|
||||
<Menu class="h-5 w-5 text-slate-600 dark:text-slate-300" />
|
||||
</button>
|
||||
<header class="sticky top-0 z-30 flex shrink-0 items-center justify-between border-b border-slate-200/70 bg-white/70 pl-1 pr-2 py-3 backdrop-blur-xl dark:border-slate-700/70 dark:bg-slate-950/65 md:px-6">
|
||||
<div class="flex min-w-0 items-center gap-1">
|
||||
<div class="mr-1 flex items-center gap-0 md:mr-0">
|
||||
<button @click="router.push('/workspace')" class="rounded-lg p-1.5 transition-colors hover:bg-slate-100 dark:hover:bg-slate-800 md:hidden">
|
||||
<ArrowLeft class="h-5 w-5 text-slate-600 dark:text-slate-300" />
|
||||
</button>
|
||||
<button @click="isSidebarOpen = !isSidebarOpen" class="rounded-lg p-1.5 transition-colors hover:bg-slate-100 dark:hover:bg-slate-800 md:hidden">
|
||||
<Menu class="h-5 w-5 text-slate-600 dark:text-slate-300" />
|
||||
</button>
|
||||
</div>
|
||||
<button @click="router.push('/workspace')" class="hidden rounded-lg p-2 transition-colors hover:bg-slate-100 dark:hover:bg-slate-800 md:inline-flex">
|
||||
<ArrowLeft class="h-5 w-5 text-slate-600 dark:text-slate-300" />
|
||||
</button>
|
||||
<div>
|
||||
<div class="min-w-0">
|
||||
<p class="font-semibold tracking-tight text-slate-900 dark:text-slate-100">{{ currentAgent?.name || $t('chat.defaultTitle') }}</p>
|
||||
<p class="text-xs text-slate-500 dark:text-slate-400">{{ $t('chat.assistantLabel') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-center gap-2">
|
||||
<div class="ml-3 flex shrink-0 items-center gap-2">
|
||||
<button @click="startNewChat" class="inline-flex items-center gap-1 rounded-xl border border-slate-200 bg-white/80 px-2 py-1.5 text-[11px] font-semibold text-slate-600 transition-colors hover:border-cyan-300 hover:text-cyan-700 dark:border-slate-700 dark:bg-slate-900/70 dark:text-slate-200 dark:hover:border-cyan-500/40 dark:hover:text-cyan-200 md:px-3 md:py-2 md:text-xs">
|
||||
<Plus class="h-4 w-4" />
|
||||
{{ $t('chat.newChat') }}
|
||||
@@ -613,7 +618,7 @@ const submitFeedback = async () => {
|
||||
<template v-else>
|
||||
<main
|
||||
class="flex-1 p-3 md:p-8"
|
||||
:class="messages.length === 0 ? 'overflow-hidden md:overflow-y-auto' : 'space-y-4 overflow-y-auto scrollbar-thin md:space-y-8'"
|
||||
:class="messages.length === 0 ? 'overflow-hidden md:overflow-y-auto' : 'space-y-2 overflow-y-auto scrollbar-thin md:space-y-6'"
|
||||
>
|
||||
<div v-if="messages.length === 0" class="flex h-full flex-col items-center justify-center py-2 text-slate-400 md:pb-16">
|
||||
<h2 class="mb-2 text-center text-lg font-semibold tracking-tight text-slate-700 dark:text-slate-200 md:text-3xl md:font-bold md:text-slate-900 md:dark:text-slate-100">{{ $t('chat.welcome.title') }}</h2>
|
||||
@@ -645,11 +650,11 @@ const submitFeedback = async () => {
|
||||
class="flex flex-col"
|
||||
:class="msg.role === 'user' ? 'max-w-[88%] md:max-w-[74%]' : 'w-full'"
|
||||
>
|
||||
<div
|
||||
class="rounded-2xl px-6 py-4 text-[15px] leading-relaxed shadow-md"
|
||||
<div
|
||||
class="text-[15px] leading-relaxed shadow-md"
|
||||
:class="msg.role === 'user'
|
||||
? 'rounded-tr-md border border-cyan-400/20 bg-gradient-to-br from-cyan-600 via-blue-600 to-indigo-600 text-white shadow-cyan-500/35'
|
||||
: 'rounded-tl-md border border-slate-200 bg-white/95 text-slate-800 shadow-slate-300/30 dark:border-slate-700 dark:bg-slate-900/85 dark:text-slate-100'"
|
||||
? 'rounded-xl rounded-tr-md bg-gradient-to-r from-cyan-500 to-blue-500 px-5 py-2.5 text-white shadow-sm shadow-cyan-500/20'
|
||||
: 'rounded-2xl rounded-tl-md border border-slate-200 bg-white/95 px-6 py-4 text-slate-800 shadow-slate-300/30 dark:border-slate-700 dark:bg-slate-900/85 dark:text-slate-100'"
|
||||
>
|
||||
<div
|
||||
v-if="msg.role === 'user'"
|
||||
@@ -820,7 +825,7 @@ const submitFeedback = async () => {
|
||||
|
||||
<footer class="safe-bottom sticky bottom-0 z-20 border-t border-slate-200/80 bg-white/70 p-3 backdrop-blur-xl dark:border-slate-700/70 dark:bg-slate-950/65 md:p-6">
|
||||
<div class="relative mx-auto max-w-5xl">
|
||||
<div class="chat-composer-shell relative overflow-hidden rounded-2xl border border-slate-200 bg-white/95 shadow-xl shadow-slate-300/25 transition-all duration-300 focus-within:border-cyan-500 focus-within:ring-2 focus-within:ring-cyan-500/25 dark:border-slate-700 dark:bg-slate-900/88 dark:shadow-none">
|
||||
<div class="chat-composer-shell relative overflow-hidden rounded-2xl border border-slate-200 bg-white/95 shadow-xl shadow-slate-300/25 transition-all duration-300 focus-within:border-cyan-500 dark:border-slate-700 dark:bg-slate-900/88 dark:shadow-none">
|
||||
<textarea
|
||||
v-model="input"
|
||||
@keydown.enter.prevent="handleSend"
|
||||
|
||||
Reference in new issue
Block a user