mirror of
https://github.com/JefferyHcool/BiliNote.git
synced 2026-06-20 23:14:26 +08:00
ui(extension): 侧边栏布局收紧,给笔记内容更多呼吸空间
之前侧边栏堆了:96×56 大封面 + 标题 + URL 链接 + 8 段进度条 + 'Markdown/思维导图/AI 问答' tab + MarkdownView 自带的复制/下载条 + 内容标题 …… 在窄侧栏里太挤,主内容被压到下半屏。 重做: - 顶栏极简化:左边 'BiliNote',右边「历史 N」按钮 + 「设置」按钮 - 历史任务从底部 details 改成顶栏触发的下拉面板,用了再展开 - 标题区压成一行:12×7 小封面 + 单行标题(hover 显示完整 URL,点击跳原片)+ 行尾状态徽章 · 进行中:蓝色阶段名 + 脉冲动画 · 完成:绿色 ✓ · 失败:红色徽章 + tooltip 显示原因 - 进度条只在 isRunning 时渲染;完成后整段消失 - 视图 tab 与「复制 / 下载」按钮合并到同一行(仅 markdown 视图显示) - MarkdownView 加 hideActions prop,去掉它自带的按钮区,避免重复;同时去掉 max-h-[400px],撑满父容器 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -3,7 +3,7 @@ import { computed } from 'vue'
|
||||
import MarkdownIt from 'markdown-it'
|
||||
import { absolutizeMarkdownImages } from '~/logic/api'
|
||||
|
||||
const props = defineProps<{ markdown: string, title?: string }>()
|
||||
const props = defineProps<{ markdown: string, title?: string, hideActions?: boolean }>()
|
||||
|
||||
const md = new MarkdownIt({ html: false, linkify: true, breaks: true })
|
||||
|
||||
@@ -25,12 +25,12 @@ function download() {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex flex-col gap-2">
|
||||
<div class="flex gap-2 justify-end">
|
||||
<div class="flex flex-col gap-2 h-full">
|
||||
<div v-if="!hideActions" class="flex gap-2 justify-end shrink-0">
|
||||
<button class="btn-secondary" @click="copy">复制 Markdown</button>
|
||||
<button class="btn-secondary" @click="download">下载 .md</button>
|
||||
</div>
|
||||
<div class="prose prose-sm max-w-none border rounded p-3 bg-gray-50 max-h-[400px] overflow-auto" v-html="html" />
|
||||
<div class="prose prose-sm max-w-none px-3 py-2 flex-1 min-h-0 overflow-auto" v-html="html" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user