@@ -16,14 +49,16 @@ import IconInfo from '~icons/ri/information-line'
v-for="t in toasts"
:key="t.id"
:class="['tst', t.kind === 'error' && 'is-error']"
- @click="dismiss(t.id)"
+ :title="t.kind === 'error' ? '点击复制错误信息' : undefined"
+ @click="onClick(t)"
>
{{ t.message }}
- {{ t.hint }}
+ 已复制到剪贴板
+ {{ t.hint }}
diff --git a/web/nav.ts b/web/nav.ts
index f582488..d21fd6d 100644
--- a/web/nav.ts
+++ b/web/nav.ts
@@ -7,7 +7,7 @@ import IconRoute from '~icons/ri/route-line'
import IconDashboard from '~icons/ri/dashboard-line'
import IconConfig from '~icons/ri/file-list-3-line'
import IconRules from '~icons/ri/filter-3-line'
-import IconRequests from '~icons/ri/pulse-line'
+import IconLogs from '~icons/ri/terminal-line'
import IconConnections from '~icons/ri/links-line'
import IconSettings from '~icons/ri/settings-3-line'
import type { Component } from 'vue'
@@ -23,7 +23,7 @@ export const NAV: NavItem[] = [
{ key: 'router', label: '路由', icon: IconRoute },
{ key: 'config', label: '配置', icon: IconConfig },
{ key: 'rules', label: '规则', icon: IconRules },
- { key: 'requests', label: '请求', icon: IconRequests },
+ { key: 'requests', label: '日志', icon: IconLogs },
{ key: 'connections', label: '连接', icon: IconConnections },
{ key: 'settings', label: '设置', icon: IconSettings },
]
diff --git a/web/styles/tokens.css b/web/styles/tokens.css
index c84d125..f45916e 100644
--- a/web/styles/tokens.css
+++ b/web/styles/tokens.css
@@ -182,6 +182,12 @@ html {
scrollbar-gutter: stable;
}
+/* 模态框开着时锁住背后的页面滚动。:modal 只匹配 showModal() 打开的 dialog;
+ 滚动条的位置由上面的 scrollbar-gutter 常驻留出,锁定解锁都不会横向跳动 */
+html:has(:modal) {
+ overflow: hidden;
+}
+
body {
margin: 0;
background: var(--c-bg);