chore: 更新风格设计,修改图标
This commit is contained in:
parent
b007499c7d
commit
8af4fb1c27
|
|
@ -3,7 +3,7 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>GLM Chat</title>
|
<title>AI Chat</title>
|
||||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,10 @@
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
|
||||||
<circle cx="16" cy="16" r="14" fill="#4f46e5"/>
|
<defs>
|
||||||
<text x="16" y="21" text-anchor="middle" fill="white" font-size="14" font-weight="bold" font-family="Arial">G</text>
|
<linearGradient id="bg" x1="0%" y1="0%" x2="100%" y2="100%">
|
||||||
|
<stop offset="0%" stop-color="#2563eb"/>
|
||||||
|
<stop offset="100%" stop-color="#60a5fa"/>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<rect width="64" height="64" rx="14" fill="url(#bg)"/>
|
||||||
|
<text x="32" y="40" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,sans-serif" font-size="18" font-weight="800" fill="#fff" letter-spacing="-0.5">claw</text>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 237 B After Width: | Height: | Size: 507 B |
|
|
@ -1,8 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="chat-view">
|
<div class="chat-view">
|
||||||
<div v-if="!conversation" class="welcome">
|
<div v-if="!conversation" class="welcome">
|
||||||
<div class="welcome-icon">G</div>
|
<div class="welcome-icon"><svg viewBox="0 0 64 64" width="36" height="36"><rect width="64" height="64" rx="14" fill="url(#favBg)"/><defs><linearGradient id="favBg" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" stop-color="#2563eb"/><stop offset="100%" stop-color="#60a5fa"/></linearGradient></defs><text x="32" y="40" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,sans-serif" font-size="18" font-weight="800" fill="#fff" letter-spacing="-0.5">claw</text></svg></div>
|
||||||
<h1>GLM Chat</h1>
|
<h1>Chat</h1>
|
||||||
<p>选择一个对话开始,或创建新对话</p>
|
<p>选择一个对话开始,或创建新对话</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -44,7 +44,7 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div v-if="streaming" class="message-bubble assistant">
|
<div v-if="streaming" class="message-bubble assistant">
|
||||||
<div class="avatar">G</div>
|
<div class="avatar">claw</div>
|
||||||
<div class="message-body">
|
<div class="message-body">
|
||||||
<div v-if="streamingThinking" class="thinking-content streaming-thinking">
|
<div v-if="streamingThinking" class="thinking-content streaming-thinking">
|
||||||
{{ streamingThinking }}
|
{{ streamingThinking }}
|
||||||
|
|
@ -157,14 +157,12 @@ defineExpose({ scrollToBottom })
|
||||||
width: 64px;
|
width: 64px;
|
||||||
height: 64px;
|
height: 64px;
|
||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
background: linear-gradient(135deg, #2563eb, #3b82f6);
|
background: none;
|
||||||
color: white;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
font-size: 28px;
|
|
||||||
font-weight: 700;
|
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.welcome h1 {
|
.welcome h1 {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="message-bubble" :class="[role]">
|
<div class="message-bubble" :class="[role]">
|
||||||
<div class="avatar">{{ role === 'user' ? 'U' : 'G' }}</div>
|
<div v-if="role === 'user'" class="avatar">user</div>
|
||||||
|
<div v-else class="avatar">claw</div>
|
||||||
<div class="message-body">
|
<div class="message-body">
|
||||||
<div v-if="thinkingContent" class="thinking-block">
|
<div v-if="thinkingContent" class="thinking-block">
|
||||||
<button class="thinking-toggle" @click="showThinking = !showThinking">
|
<button class="thinking-toggle" @click="showThinking = !showThinking">
|
||||||
|
|
@ -97,19 +98,25 @@ function copyContent() {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
font-size: 13px;
|
font-size: 11px;
|
||||||
font-weight: 600;
|
font-weight: 700;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.user .avatar {
|
.user .avatar {
|
||||||
background: linear-gradient(135deg, #2563eb, #3b82f6);
|
background: linear-gradient(135deg, #2563eb, #3b82f6);
|
||||||
color: white;
|
color: white;
|
||||||
|
font-size: 9px;
|
||||||
|
font-weight: 700;
|
||||||
|
letter-spacing: -0.3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.assistant .avatar {
|
.assistant .avatar {
|
||||||
background: linear-gradient(135deg, #3b82f6, #60a5fa);
|
background: linear-gradient(135deg, #3b82f6, #60a5fa);
|
||||||
color: white;
|
color: white;
|
||||||
|
font-size: 8px;
|
||||||
|
font-weight: 700;
|
||||||
|
letter-spacing: -0.3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.message-body {
|
.message-body {
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-hint">基于 GLM 大语言模型,回复内容仅供参考</div>
|
<div class="input-hint">AI 助手回复内容仅供参考</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,9 +22,6 @@
|
||||||
<label>模型</label>
|
<label>模型</label>
|
||||||
<select v-model="form.model">
|
<select v-model="form.model">
|
||||||
<option value="glm-5">GLM-5</option>
|
<option value="glm-5">GLM-5</option>
|
||||||
<option value="glm-4-plus">GLM-4 Plus</option>
|
|
||||||
<option value="glm-4-flash">GLM-4 Flash</option>
|
|
||||||
<option value="glm-4-long">GLM-4 Long</option>
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -118,7 +115,7 @@ const form = reactive({
|
||||||
watch(() => props.visible, (val) => {
|
watch(() => props.visible, (val) => {
|
||||||
if (val && props.conversation) {
|
if (val && props.conversation) {
|
||||||
form.title = props.conversation.title || ''
|
form.title = props.conversation.title || ''
|
||||||
form.model = props.conversation.model || 'glm-5'
|
form.model = props.conversation.model || 'default'
|
||||||
form.system_prompt = props.conversation.system_prompt || ''
|
form.system_prompt = props.conversation.system_prompt || ''
|
||||||
form.temperature = props.conversation.temperature ?? 1.0
|
form.temperature = props.conversation.temperature ?? 1.0
|
||||||
form.max_tokens = props.conversation.max_tokens ?? 65536
|
form.max_tokens = props.conversation.max_tokens ?? 65536
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue