Files
MailUI4Agents/server/internal/static/static/placeholder.html

71 lines
2.3 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!doctype html>
<!--
前端未构建时的占位页。
为什么文件名不是 index.html:那正是 Vite 构建产物的名字。用 index.html 当占位,
每次构建后真实产物都会盖掉它并被 git 视为改动;提交进去的 index.html 引用着
被忽略的 assets/,新克隆打开就是白屏而不是这张提示页。
改叫 placeholder.html:构建不会产生这个名字,因此永不被覆盖。
static.go 在 index.html 缺失时回退到它。
它同时让 go:embed 有文件可嵌 —— 否则新克隆连 go build 都过不去。
-->
<html lang="zh-CN">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>AgentMail — 前端未构建</title>
<style>
body {
margin: 0;
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background: #f1f5f9;
color: #334155;
font: 14px/1.7 system-ui, -apple-system, "Segoe UI", sans-serif;
}
main { max-width: 34rem; padding: 2rem; }
h1 { font-size: 1rem; margin: 0 0 0.75rem; }
code {
background: #e2e8f0;
padding: 0.1rem 0.35rem;
border-radius: 3px;
font-size: 0.85em;
}
pre {
background: #fff;
border: 1px solid #e2e8f0;
border-radius: 6px;
padding: 0.75rem 1rem;
overflow-x: auto;
font-size: 0.85em;
}
p { margin: 0 0 0.75rem; }
.dim { color: #64748b; font-size: 0.9em; }
</style>
</head>
<body>
<main>
<h1>AgentMail 前端未构建</h1>
<p>
当前二进制里没有前端产物。后端 API 仍然可用(<code>/api/v1</code>、
<code>/health</code>)。
</p>
<p>构建并嵌入前端:</p>
<pre>sudo ./deploy/install.sh</pre>
<p>或者手工:</p>
<pre>cd client/electron &amp;&amp; npm ci &amp;&amp; npm run build
cd ../..
rm -rf server/internal/static/static/assets
cp -r client/electron/dist/. server/internal/static/static/
cd server &amp;&amp; go build ./cmd/server</pre>
<p class="dim">
构建产物不进版本库;这个占位文件的存在只是为了让
<code>go:embed</code> 在新克隆里能编译通过。
</p>
</main>
</body>
</html>