fix(一言): 句子下面多挂了个「· 游戏」「· 动画」的分类,看着啰嗦——不显示分类;本机不用再配 env 就能读到一言数据集
Deploy / deploy (push) Canceled after 0s
Deploy / deploy (push) Canceled after 0s
- 出处只写「—— 谁《出处》」。接口里的分类还在,只用来判断出处要不要加书名号 - HITOKOTO_DIRECTORY 默认值改成仓库旁边的 ../sentences-bundle,.env.example 里那几行撤掉。 线上不受影响:镜像里 Dockerfile 写死了 /data/hitokoto Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c7a8e05385
commit
adea781b8e
5 files changed
+10
-25
No files matched your search
@@ -5,7 +5,8 @@ import { useThemeVars } from "naive-ui"
|
||||
import { getHitokoto } from "../api"
|
||||
|
||||
/**
|
||||
* 一言(设计稿「一言重设计」A 版):大引号 + 一行句子 + 「—— 谁《出处》· 分类」+ 一个看得见的「换一句」。
|
||||
* 一言(设计稿「一言重设计」A 版):大引号 + 一行句子 + 「—— 谁《出处》」+ 一个看得见的「换一句」。
|
||||
* 分类(动画、诗词……)不显示;接口里的 type 只用来判断出处要不要加书名号。
|
||||
* 原来只能点句子换,没人知道;出处被截成「来自 Structure and Interpretatio…」。
|
||||
* 长句(数据集 p90 44 字、最长 255 字)一行放不下,点句子弹出全文。
|
||||
* 留着它是给学生一点「无聊的乐趣」,别去掉、别挪到看不见的地方。
|
||||
@@ -56,22 +57,12 @@ const popVars = computed(() => ({
|
||||
<template #trigger>
|
||||
<div class="body" title="点一下看全文">
|
||||
<span class="sentence">{{ quote.hitokoto }}</span>
|
||||
<span class="source">
|
||||
<template v-if="source">—— {{ source }}</template>
|
||||
<template v-if="quote.type">
|
||||
<template v-if="source"> · </template><span class="type">{{ quote.type }}</span>
|
||||
</template>
|
||||
</span>
|
||||
<span v-if="source" class="source">—— {{ source }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<div class="full" :style="popVars">
|
||||
<div class="full-text">{{ quote.hitokoto }}</div>
|
||||
<div class="full-source">
|
||||
<template v-if="source">—— {{ source }}</template>
|
||||
<template v-if="quote.type"
|
||||
><template v-if="source"> · </template>{{ quote.type }}</template
|
||||
>
|
||||
</div>
|
||||
<div v-if="source" class="full-source">—— {{ source }}</div>
|
||||
</div>
|
||||
</n-popover>
|
||||
<button
|
||||
@@ -130,10 +121,6 @@ const popVars = computed(() => ({
|
||||
color: v-bind("theme.textColor3");
|
||||
}
|
||||
|
||||
.type {
|
||||
color: v-bind("theme.primaryColor");
|
||||
}
|
||||
|
||||
.refresh {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
|
||||
Reference in new issue
Block a user