-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoptions.html
More file actions
142 lines (130 loc) · 6.9 KB
/
Copy pathoptions.html
File metadata and controls
142 lines (130 loc) · 6.9 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<!doctype html>
<html lang="zh-Hant">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title data-i18n="options.title">ClipNote 設定</title>
<link rel="stylesheet" href="options.css">
</head>
<body>
<main class="settings-shell">
<header>
<p class="eyebrow">ClipNote</p>
<h1 data-i18n="options.title">ClipNote 設定</h1>
</header>
<form id="settings-form" class="settings-form">
<section class="settings-section">
<h2 data-i18n="options.aiSection">AI 推薦</h2>
<label class="toggle-row" for="ai-suggestions-enabled">
<input id="ai-suggestions-enabled" type="checkbox">
<span class="switch-control" aria-hidden="true">
<span class="switch-thumb"></span>
</span>
<span data-i18n="options.enableAi">啟用 Chrome Built-in AI 標籤推薦</span>
</label>
<p class="privacy-note">
<span data-i18n="options.aiNote">關閉時不會啟動 Chrome AI 模型,也不會下載模型;標籤視窗不顯示推薦區塊。</span>
</p>
<div class="section-heading">
<h3 data-i18n="options.aiPrompt">AI Prompt</h3>
<button id="reset-ai-prompt" class="secondary" type="button" data-i18n="options.resetPrompt">重設 Prompt</button>
</div>
<label for="ai-system-prompt">
<span data-i18n="options.systemPrompt">AI 系統 Prompt</span>
<textarea id="ai-system-prompt" rows="5"></textarea>
</label>
<label for="ai-user-prompt-template">
<span data-i18n="options.userPrompt">AI 請求 Prompt 模板</span>
<textarea id="ai-user-prompt-template" rows="6"></textarea>
</label>
<p class="privacy-note">
<span data-i18n="options.promptNote">模板可使用 {{existingTags}}、{{title}}、{{text}}。輸出仍需符合 {"existing":["tag"],"new":["tag"]}。</span>
</p>
</section>
<section class="settings-section">
<h2 data-i18n="options.languageSection">語言</h2>
<label for="language">
<span data-i18n="options.languageLabel">介面語言</span>
<select id="language">
<option value="zh-Hant" data-i18n="options.langZh">繁體中文</option>
<option value="en" data-i18n="options.langEn">English</option>
</select>
</label>
<p class="privacy-note">
<span data-i18n="options.languageNote">語言設定會套用到 popup、Options、標籤視窗與右鍵選單。</span>
</p>
</section>
<section class="settings-section">
<div class="section-heading">
<h2 data-i18n="options.shortcutsSection">快捷鍵</h2>
<button id="open-shortcuts" class="secondary" type="button" data-i18n="options.openShortcuts">開啟快捷鍵設定</button>
</div>
<p class="privacy-note">
<span data-i18n="options.shortcutsNote">Chrome 不允許擴充功能直接改寫快捷鍵;請在 Chrome 的快捷鍵設定頁手動調整。</span>
</p>
<div class="shortcut-list" aria-label="目前建議快捷鍵" data-i18n-aria-label="options.currentShortcuts">
<div class="shortcut-row">
<span data-i18n="options.openClipNote">開啟 ClipNote</span>
<kbd>Alt</kbd><kbd>Shift</kbd><kbd>C</kbd>
<span class="shortcut-note" data-i18n="options.macOpenShortcut">macOS 預設為 Control Shift C</span>
</div>
<div class="shortcut-row">
<span data-i18n="options.saveSelection">儲存目前選取文字</span>
<kbd>Alt</kbd><kbd>Shift</kbd><kbd>S</kbd>
<span class="shortcut-note" data-i18n="options.macSaveShortcut">macOS 預設為 Control Shift S</span>
</div>
</div>
</section>
<section class="settings-section">
<h2 data-i18n="options.notionSection">Notion 同步</h2>
<label for="token">
<span data-i18n="options.tokenLabel">Internal Integration Token</span>
<input id="token" type="password" autocomplete="off" placeholder="secret_...">
</label>
<p class="privacy-note">
<span data-i18n="options.tokenNote">Token 會儲存在本機 Chrome storage,請使用只授權目標頁面或表格的 Notion integration。</span>
</p>
<label for="target-type">
<span data-i18n="options.targetType">同步目標</span>
<select id="target-type">
<option value="page" data-i18n="options.targetPage">父頁子頁</option>
<option value="database" data-i18n="options.targetDatabase">Database 表格</option>
<option value="data_source" data-i18n="options.targetDataSource">Data source 表格</option>
</select>
</label>
<label for="parent-page-id">
<span data-i18n="options.parentPageId">Parent Page ID</span>
<input id="parent-page-id" type="text" autocomplete="off" placeholder="Notion 頁面網址或 ID" data-i18n-placeholder="options.parentPagePlaceholder">
</label>
<label for="data-source-id">
<span data-i18n="options.dataSourceId">Data Source ID</span>
<input id="data-source-id" type="text" autocomplete="off" placeholder="Notion data source 網址或 ID" data-i18n-placeholder="options.dataSourcePlaceholder">
</label>
<label for="database-id">
<span data-i18n="options.databaseId">Database ID</span>
<input id="database-id" type="text" autocomplete="off" placeholder="Notion database 網址或 ID" data-i18n-placeholder="options.databasePlaceholder">
</label>
</section>
<section class="settings-section">
<div class="section-heading">
<h2 data-i18n="options.tagRouting">依 Tag 分流</h2>
<button id="add-tag-route" class="secondary" type="button" data-i18n="options.addRoute">新增規則</button>
</div>
<p class="privacy-note">
<span data-i18n="options.routeNote">符合規則的筆記會同步到指定目標;沒有符合 tag 時使用上方預設同步目標。</span>
</p>
<div id="tag-routes" class="route-list"></div>
</section>
<div class="actions">
<button id="toggle-token" class="secondary" type="button" data-i18n="options.show">顯示</button>
<button id="test-notion" class="secondary" type="button" data-i18n="options.testNotion">測試連線</button>
<button class="primary" type="submit" data-i18n="options.saveSettings">儲存</button>
</div>
<p id="message" class="message" role="status"></p>
</form>
</main>
<script src="storage.js"></script>
<script src="i18n.js"></script>
<script src="options.js"></script>
</body>
</html>