-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpopup.html
More file actions
73 lines (65 loc) · 2.29 KB
/
popup.html
File metadata and controls
73 lines (65 loc) · 2.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>OpenPM</title>
<link rel="stylesheet" href="popup.css" />
</head>
<body>
<main class="container">
<h1>OpenPM</h1>
<section class="card">
<h2>需求来源</h2>
<div class="radio-group">
<label><input type="radio" name="source" value="input" checked /> 用户输入</label>
<label><input type="radio" name="source" value="page" /> 当前页面</label>
<label><input type="radio" name="source" value="selection" /> 选中文本</label>
</div>
</section>
<section class="card">
<h2>需求输入</h2>
<textarea id="requirementInput" rows="6" placeholder="请输入需求,例如:做一个物流运输平台,司机接单、实时定位、运输监控"></textarea>
</section>
<section class="card">
<h2>AI 配置</h2>
<div class="grid">
<label>
服务商
<select id="provider">
<option value="openai">OpenAI</option>
<option value="glm">GLM</option>
</select>
</label>
<label>
模型
<input id="model" type="text" placeholder="gpt-4o-mini / glm-4-plus" />
</label>
<label class="full">
API Key
<input id="apiKey" type="password" placeholder="sk-..." />
</label>
</div>
</section>
<div class="actions">
<button id="generateBtn" class="primary">生成需求文档</button>
</div>
<section class="card">
<div class="section-header">
<h2>生成结果</h2>
<label class="inline">
<input id="editToggle" type="checkbox" /> 编辑模式
</label>
</div>
<textarea id="markdownEditor" rows="12" class="hidden"></textarea>
<div id="markdownPreview" class="preview"></div>
</section>
<div class="actions">
<button id="copyBtn">复制 Markdown</button>
<button id="downloadBtn">下载 prd.md</button>
</div>
<p id="status" class="status"></p>
</main>
<script src="popup.js" type="module"></script>
</body>
</html>