fix(界面): 能点的文字平时就是绿色,不用再把鼠标移上去才看得出能点
Deploy / deploy (push) Canceled after 0s

首页「全部」、提交详情的用户名和题名、题目页「点开看全部」「有 N 道差一点」、
班级对抗的班级名、知识点、后台标题等 30 多处原来和正文同色,鼠标移上去才变色,
手机上根本没有「移上去」。现在一律主题绿,移上去加下划线;没设颜色的文字按钮补上
type="primary"。排名名字列、整行可点的列表、后台 quaternary 次要按钮不动。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
xuyueandClaude Opus 5.5 committed 2026-10-23 10:39:49 +08:00
1 parent b3dca1a271
commit b0700d0bd9
32 files changed
+141 -53

No files matched your search

+1 -1
View File
@@ -284,7 +284,7 @@ h2 {
display: inline-block;
margin-bottom: 12px;
font-size: var(--oj-fs-sec);
color: v-bind("theme.textColor3");
color: v-bind("theme.primaryColor");
cursor: pointer;
}
+2 -2
View File
@@ -513,13 +513,13 @@ const tab = ref<"weekly" | "dist">("weekly")
max-width: 100%;
font-size: var(--oj-fs-sec);
font-weight: 600;
color: v-bind("theme.textColor1");
color: v-bind("theme.primaryColor");
text-decoration: none;
}
.title a:hover,
.m-title a:hover {
color: v-bind("theme.primaryColor");
text-decoration: underline;
}
.ell {
+2 -2
View File
@@ -289,13 +289,13 @@ const medal = (index: number) => palette.value.medal[index]
.name a {
font-size: var(--oj-fs-sec);
font-weight: 600;
color: v-bind("theme.textColor1");
color: v-bind("theme.primaryColor");
text-decoration: none;
min-width: 0;
}
.name a:hover {
color: v-bind("theme.primaryColor");
text-decoration: underline;
}
.id {
+3 -3
View File
@@ -467,7 +467,7 @@ function lastText(student: ClassBoardStudent) {
<span v-if="board.assignedAt" class="assigned">
{{ parseTime(board.assignedAt, "HH:mm") }} {{ board.assignedBy }} 布置
</span>
<n-button text class="edit" @click="editing = true">
<n-button text type="primary" class="edit" @click="editing = true">
<template #icon><Icon icon="ph:pencil-simple" /></template>
{{ board.source === "teacher" ? "改" : "布置" }}
</n-button>
@@ -998,12 +998,12 @@ function lastText(student: ClassBoardStudent) {
.panel-title {
font-size: 16px;
font-weight: 600;
color: inherit;
color: v-bind("theme.primaryColor");
text-decoration: none;
}
.panel-title:hover {
color: v-bind("theme.primaryColor");
text-decoration: underline;
}
.groups {
+5 -1
View File
@@ -495,7 +495,11 @@ const columns = computed(() => {
.ph b {
font-size: var(--oj-fs-sec);
color: v-bind("theme.textColor2");
color: v-bind("theme.primaryColor");
}
.ph:hover b {
text-decoration: underline;
}
.ph span {
+19 -1
View File
@@ -134,7 +134,7 @@ const shortcuts = computed(() =>
<div class="card-head">
<h3>公告</h3>
<span class="spacer"></span>
<router-link to="/announcement" class="muted">全部</router-link>
<router-link to="/announcement" class="more">全部</router-link>
</div>
<router-link
v-for="item in announcements"
@@ -236,6 +236,16 @@ const shortcuts = computed(() =>
flex: 1 1 auto;
}
.more {
font-size: 14px;
color: v-bind("theme.primaryColor");
text-decoration: none;
}
.more:hover {
text-decoration: underline;
}
.minis {
display: flex;
flex-wrap: wrap;
@@ -252,6 +262,14 @@ const shortcuts = computed(() =>
text-decoration: none;
}
.mini b.num {
color: v-bind("theme.primaryColor");
}
.mini:hover b.num {
text-decoration: underline;
}
.mini i {
display: block;
height: 5px;
+2 -2
View File
@@ -703,7 +703,7 @@ a.row:hover {
.more,
.plain-link {
color: inherit;
color: #18a058;
text-decoration: none;
}
@@ -713,6 +713,6 @@ a.row:hover {
.more:hover,
.plain-link:hover {
color: #18a058;
text-decoration: underline;
}
</style>
@@ -297,7 +297,7 @@ function goCode() {
<n-button text type="primary" size="small" @click="versionZoom = true">
放大看
</n-button>
<n-button text size="small" @click="versionOpen = !versionOpen">
<n-button text type="primary" size="small" @click="versionOpen = !versionOpen">
{{ versionOpen ? "收起" : "展开" }}
</n-button>
</div>
@@ -272,7 +272,7 @@ const astRequirements = computed(() => Object.entries(problem.value?.astRequirem
<n-button text type="primary" size="small" @click="myFlowchartZoom = true">
放大看
</n-button>
<n-button text size="small" @click="myFlowchartOpen = !myFlowchartOpen">
<n-button text type="primary" size="small" @click="myFlowchartOpen = !myFlowchartOpen">
{{ myFlowchartOpen ? "收起" : "展开" }}
</n-button>
</div>
@@ -325,7 +325,7 @@ watch(query, () => {
放回编辑器
</n-button>
<n-button size="small" @click="copy(row.id)">复制</n-button>
<n-button size="small" text class="more" @click="openDetail(row.id)">
<n-button size="small" text type="primary" class="more" @click="openDetail(row.id)">
完整详情 ›
</n-button>
</div>
@@ -499,12 +499,12 @@ watch(query, () => {
border: 0;
background: transparent;
font: inherit;
color: v-bind("theme.textColor3");
color: v-bind("theme.primaryColor");
cursor: pointer;
}
.code-more:hover {
color: v-bind("theme.primaryColor");
text-decoration: underline;
}
.detail-actions {
@@ -169,11 +169,11 @@ const fresh = computed(() => props.progress.solved === 0)
.next b {
font-weight: 600;
color: v-bind("theme.textColor1");
color: v-bind("theme.primaryColor");
}
.next:hover b {
color: v-bind("theme.primaryColor");
text-decoration: underline;
}
.almost {
@@ -181,7 +181,7 @@ const fresh = computed(() => props.progress.solved === 0)
padding: 0;
background: transparent;
font: inherit;
color: v-bind("theme.textColor3");
color: v-bind("theme.primaryColor");
display: inline-flex;
align-items: center;
gap: 3px;
@@ -189,7 +189,7 @@ const fresh = computed(() => props.progress.solved === 0)
}
.almost:hover {
color: v-bind("theme.primaryColor");
text-decoration: underline;
}
.start {
@@ -10,6 +10,7 @@ const cache = new Map<string, Promise<ProblemRow[]>>()
<script setup lang="ts">
import { storeToRefs } from "pinia"
import { useThemeVars } from "naive-ui"
import { getSimilarProblems } from "oj/api"
import { useProblemStore } from "oj/store/problem"
@@ -19,6 +20,8 @@ import { useProblemStore } from "oj/store/problem"
*/
const props = defineProps<{ title: string }>()
const theme = useThemeVars()
const { problem } = storeToRefs(useProblemStore())
const list = ref<ProblemRow[]>([])
@@ -90,6 +93,7 @@ function difficultyType(difficulty: string) {
}
.name {
color: v-bind("theme.primaryColor");
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
+6 -1
View File
@@ -152,7 +152,7 @@ const purple = { color: "#5b3fa8", background: "rgba(122, 95, 208, 0.12)" }
<span v-if="progress?.isCompleted" class="done-mark" aria-hidden="true">✓</span>
<div class="head">
<div class="row">
<router-link :to="{ name: 'problemsets' }" class="muted back">‹ 题单</router-link>
<router-link :to="{ name: 'problemsets' }" class="back">‹ 题单</router-link>
<h2 class="ell">{{ set.title }}</h2>
<span v-if="set.assigning" class="pill assign"
>布置到 {{ parseTime(set.assignedUntil!, "M月D日") }}</span
@@ -367,9 +367,14 @@ const purple = { color: "#5b3fa8", background: "rgba(122, 95, 208, 0.12)" }
.back {
flex-shrink: 0;
font-size: var(--oj-fs-sec);
color: v-bind("theme.primaryColor");
text-decoration: none;
}
.back:hover {
text-decoration: underline;
}
.count {
font-size: 28px;
font-weight: 700;
@@ -151,14 +151,13 @@ function shortLabel(className: string) {
border: 0;
background: none;
font: inherit;
color: inherit;
color: v-bind("theme.primaryColor");
text-align: left;
white-space: nowrap;
cursor: pointer;
}
.name:hover {
color: v-bind("theme.primaryColor");
text-decoration: underline;
}
+2 -2
View File
@@ -175,7 +175,7 @@ function threatNote(me: RankRow, behind: RankRow) {
</div>
<div v-if="minis.length" class="minis">
<button v-for="mini in minis" :key="mini.label" class="mini" @click="mini.go">
<span class="mini-label">{{ mini.label }}</span>
<span class="mini-label">{{ mini.label }} ›</span>
<b v-if="mini.rank && mini.cap && mini.rank > mini.cap">{{ mini.cap }} 名以外</b>
<b v-else-if="mini.rank"
>第 {{ mini.rank }}<small v-if="mini.total"> / {{ mini.total }}</small></b
@@ -412,7 +412,7 @@ function threatNote(me: RankRow, behind: RankRow) {
padding-top: 10px;
border-top: 1px solid rgba(24, 160, 88, 0.3);
font-size: var(--oj-fs-sec);
color: #2f6fd0;
color: v-bind("theme.primaryColor");
text-decoration: none;
}
@@ -303,10 +303,12 @@ function percent(value: number, total: number) {
border-radius: 8px;
}
/* 横幅本身就是绿的,字再绿也看不出能点,靠下划线 */
.live-link {
color: inherit;
font-weight: 600;
text-decoration: none;
text-decoration: underline;
text-underline-offset: 3px;
display: inline-flex;
align-items: center;
gap: 4px;
@@ -522,12 +524,12 @@ function percent(value: number, total: number) {
}
.hard-title a {
color: v-bind("theme.textColor1");
color: v-bind("theme.primaryColor");
text-decoration: none;
}
.hard-title a:hover {
color: v-bind("theme.primaryColor");
text-decoration: underline;
}
.mini {
@@ -65,10 +65,14 @@ watch(
display: inline-flex;
align-items: center;
gap: 3px;
color: v-bind("theme.textColor3");
color: v-bind("theme.primaryColor");
text-decoration: none;
}
.raw-toggle:hover {
text-decoration: underline;
}
.raw {
margin: 0;
max-height: 140px;
@@ -446,6 +446,14 @@ const canRetry = computed(
text-decoration: none;
}
.user-link :deep(.name) {
color: v-bind("theme.primaryColor");
}
.user-link:hover :deep(.name) {
text-decoration: underline;
}
.render-error {
display: flex;
flex-direction: column;
@@ -477,12 +485,16 @@ const canRetry = computed(
}
.problem {
color: v-bind("theme.textColor1");
color: v-bind("theme.primaryColor");
text-decoration: none;
overflow: hidden;
text-overflow: ellipsis;
}
.problem:hover {
text-decoration: underline;
}
/* 只留漏斗图标(右栏六百来宽,带字的话名字、题目和按钮排不进一行),字在 title 里 */
.filter-pill {
flex: none;
@@ -460,10 +460,14 @@ function openStandalone() {
text-decoration: none;
}
.user-link:hover :deep(.name) {
.user-link :deep(.name) {
color: v-bind("theme.primaryColor");
}
.user-link:hover :deep(.name) {
text-decoration: underline;
}
.who {
display: flex;
align-items: center;
@@ -476,7 +480,7 @@ function openStandalone() {
}
.problem {
color: v-bind("theme.textColor1");
color: v-bind("theme.primaryColor");
text-decoration: none;
overflow: hidden;
text-overflow: ellipsis;
@@ -484,7 +488,7 @@ function openStandalone() {
}
.problem:hover {
color: v-bind("theme.primaryColor");
text-decoration: underline;
}
.problem-id {
@@ -431,10 +431,14 @@ function handleMore(key: string) {
text-decoration: none;
}
.user-link:hover :deep(.name) {
.user-link :deep(.name) {
color: v-bind("theme.primaryColor");
}
.user-link:hover :deep(.name) {
text-decoration: underline;
}
.cls {
height: 22px;
padding: 0 8px;
@@ -455,12 +459,12 @@ function handleMore(key: string) {
overflow: hidden;
text-overflow: ellipsis;
font-weight: 600;
color: v-bind("theme.textColor1");
color: v-bind("theme.primaryColor");
text-decoration: none;
}
.problem:hover {
color: v-bind("theme.primaryColor");
text-decoration: underline;
}
.problem-id {
@@ -106,6 +106,10 @@ h3 small {
text-decoration: none;
}
.row:hover .name {
text-decoration: underline;
}
.head {
display: flex;
align-items: center;
@@ -114,6 +118,7 @@ h3 small {
.name {
width: 72px;
color: v-bind("theme.primaryColor");
font-size: var(--oj-fs-sec);
font-weight: 500;
white-space: nowrap;