fix: 用户名通知润色+去修改按钮直接弹改名框
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 4s
PR Preview / test (pull_request) Successful in 5s
PR Preview / deploy-preview (pull_request) Successful in 15s
Test / e2e-test (push) Failing after 51s

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-12 22:30:48 +00:00
parent fdc7b20929
commit 9dbec0b9ee
2 changed files with 13 additions and 2 deletions

View File

@@ -41,6 +41,8 @@
<div v-if="!n.is_read" class="notif-actions">
<!-- 搜索未收录通知已添加按钮 -->
<button v-if="isSearchMissing(n)" class="notif-action-btn notif-btn-added" @click="markAdded(n)">已添加</button>
<!-- 用户名更新通知去修改按钮 -->
<button v-else-if="isUsernameNotice(n)" class="notif-action-btn notif-btn-plan" @click="goRename(n)">去修改</button>
<!-- 方案请求通知去定制按钮 -->
<button v-else-if="isPlanRequest(n)" class="notif-action-btn notif-btn-plan" @click="goPlanDesign(n)">去定制</button>
<!-- 审核类通知去审核按钮 -->
@@ -155,6 +157,15 @@ async function changeUsername() {
}
}
function isUsernameNotice(n) {
return n.title && n.title.includes('用户名更新')
}
function goRename(n) {
markOneRead(n)
changeUsername()
}
function isPlanRequest(n) {
return n.title && (n.title.includes('方案请求') || n.title.includes('方案需求'))
}