diff --git a/.gitmodules b/.gitmodules
index fad4963..50f3283 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -7,3 +7,6 @@
[submodule "third_party/zPDF_package"]
path = third_party/zPDF_package
url = https://git.zikai.wang/zikai/zPDF_package.git
+[submodule "third_party/zWhiteBoard"]
+ path = third_party/zWhiteBoard
+ url = https://git.zikai.wang/zikai/zWhiteBoard.git
diff --git a/src/config/app.config.js b/src/config/app.config.js
index 6ab7d7f..c70f0a0 100644
--- a/src/config/app.config.js
+++ b/src/config/app.config.js
@@ -19,9 +19,7 @@ export const appConfig = {
baseUrl: BASE_URL,
// 存活探针路径;周期探测,挂掉则隐藏页签并卸载组件
healthPath: '/api/health',
- // 记事本页面路径生成器
- pagePath: (boardId) => `/api/wb-page/${encodeURIComponent(boardId)}`,
- // 默认打开的记事本 id
+ // 默认打开的记事本 id(Whiteboard.vue 的 resolveBoardId 回退用)
defaultBoardId: 'share',
// 探测超时(毫秒)
healthTimeoutMs: 4000
diff --git a/src/i18n/locales/en.js b/src/i18n/locales/en.js
index 446faae..3cda9c1 100644
--- a/src/i18n/locales/en.js
+++ b/src/i18n/locales/en.js
@@ -17,7 +17,6 @@ export default {
pdf: 'PDF Converter'
},
whiteboard: {
- openExternal: 'Open in new tab',
boardId: 'Board ID',
switch: 'Switch'
}
diff --git a/src/i18n/locales/zh-CN.js b/src/i18n/locales/zh-CN.js
index f73359b..a4edb7f 100644
--- a/src/i18n/locales/zh-CN.js
+++ b/src/i18n/locales/zh-CN.js
@@ -16,7 +16,6 @@ export default {
pdf: 'PDF 转换'
},
whiteboard: {
- openExternal: '在新标签页打开',
boardId: '白板 ID',
switch: '切换'
}
diff --git a/src/modules/whiteboard/Whiteboard.vue b/src/modules/whiteboard/Whiteboard.vue
index b796abf..ef8c635 100644
--- a/src/modules/whiteboard/Whiteboard.vue
+++ b/src/modules/whiteboard/Whiteboard.vue
@@ -1,13 +1,22 @@
@@ -104,28 +83,8 @@ function openExternal() {
-
-
-
{{ t('common.serviceUnavailable') }}
-
-
-
-
-
-
-
-
{{ t('common.loading') }}
-
-
-
+
+
@@ -167,78 +126,24 @@ function openExternal() {
.wb-switch__go:hover {
background: var(--accent-hover);
}
-.wb-frame {
+/* 让子应用填满外壳容器,保留其内部布局自洽;记事本以编辑为主,给足高度 */
+.whiteboard__frame {
position: relative;
border-radius: var(--radius);
overflow: hidden;
box-shadow: var(--shadow);
border: 1px solid var(--border);
- width: 100%;
- /* 记事本以编辑为主,给足高度 */
- height: 70vh;
- min-height: 480px;
background: var(--surface);
+ height: 78vh;
+ min-height: 520px;
}
-.wb-frame__iframe {
- width: 100%;
- height: 100%;
- display: block;
- border: 0;
-}
-.wb-frame__skeleton {
- position: absolute;
- inset: 0;
- z-index: 1;
- display: flex;
- align-items: center;
- justify-content: center;
- background: var(--surface);
-}
-.wb-frame__skeleton-text {
- color: var(--text-tertiary);
- font-size: 0.95rem;
-}
-.wb-fallback {
- text-align: center;
- padding: var(--space-2xl) var(--space-lg);
- border: 1px dashed var(--border-strong);
- border-radius: var(--radius);
- background: var(--surface);
-}
-.wb-fallback__text {
- color: var(--text-secondary);
- margin-bottom: var(--space-md);
-}
-.wb-fallback__open {
- display: inline-flex;
- align-items: center;
- padding: 8px 18px;
- font-size: 0.9rem;
- font-weight: 500;
- color: #fff;
- background: var(--accent);
- border-radius: var(--radius-sm);
- transition: background var(--transition);
-}
-.wb-fallback__open:hover {
- background: var(--accent-hover);
-}
-.fade-enter-active,
-.fade-leave-active {
- transition: opacity 0.4s ease;
-}
-.fade-enter-from,
-.fade-leave-to {
- opacity: 0;
-}
-
@media (max-width: 768px) {
.wb-switch__input {
width: 120px;
}
- .wb-frame {
- height: 65vh;
- min-height: 360px;
+ .whiteboard__frame {
+ height: 72vh;
+ min-height: 400px;
}
}
diff --git a/src/modules/whiteboard/index.js b/src/modules/whiteboard/index.js
index 2243fb5..26d241f 100644
--- a/src/modules/whiteboard/index.js
+++ b/src/modules/whiteboard/index.js
@@ -1,6 +1,9 @@
// 模块元数据 -- 共享记事本(白板)页签
-// requiresAlive 指向存活探针 URL:启动时探测,服务不可达则隐藏该页签。
-// 删除本目录即可移除此页签,其余模块不受影响。
+// 构建期组件集成:mainPage 侧包装器 Whiteboard.vue import 子模块 zWhiteBoard 的 App.vue,
+// 套 PageShell 统一容器与标题。zWhiteBoard 作为 git submodule 独立维护,
+// 其 UI/交互经同源 fetch/WS 调用 zTools2 的 /api/wb/* 与 /api/ws/wb/*(前后端分离)。
+// requiresAlive 指向存活探针 URL:启动时探测,zTools2 不可达则隐藏该页签。
+// 升级:cd third_party/zWhiteBoard && git pull,回 mainPage 根 git add 该子模块并重新 build。
import { healthUrl } from '../../config/app.config.js'
export default {
diff --git a/third_party/zWhiteBoard b/third_party/zWhiteBoard
new file mode 160000
index 0000000..d7d7450
--- /dev/null
+++ b/third_party/zWhiteBoard
@@ -0,0 +1 @@
+Subproject commit d7d74502960ba22cbbc46bb2c43fa681b313bc7e