mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-30 01:27:26 +08:00
1 parent
cd5ea45a89
commit
fc01fbdc17
3 files changed
+34
-21
No files matched your search
@@ -401,7 +401,7 @@
|
||||
</dialog>
|
||||
<dialog id="settingsPanel" class="form-dialog settings-dialog" aria-labelledby="settingsTitle">
|
||||
<form id="settingsForm">
|
||||
<h2 id="settingsTitle" class="form-title">文档设置</h2>
|
||||
<h2 id="settingsTitle" class="form-title">文档配置</h2>
|
||||
<label class="form-row"><span>类型</span><select id="settingsKind"><option value="bookmarks">书签</option><option value="actions">动作</option><option value="templates">模板</option><option value="layers">图层</option><option value="extensions">扩展</option><option value="ColorSpace" hidden>色彩</option><option value="DrawParam" hidden>样式</option></select></label>
|
||||
<div id="settingsContext"></div>
|
||||
<div id="settingsContent"></div>
|
||||
@@ -707,7 +707,7 @@
|
||||
<div class="panel-title compact">文档</div>
|
||||
<div class="panel-actions">
|
||||
<button id="resourceManageButton" class="small-button" type="button" title="资源管理" aria-label="资源管理" aria-haspopup="dialog" aria-controls="resourcePanel" disabled>资源</button>
|
||||
<button id="settingsButton" class="small-button" type="button" title="文档设置" aria-label="文档设置" aria-haspopup="dialog" aria-controls="settingsPanel" disabled>设置</button>
|
||||
<button id="settingsButton" class="small-button" type="button" title="文档配置" aria-label="文档配置" aria-haspopup="dialog" aria-controls="settingsPanel" disabled>配置</button>
|
||||
<button id="versionManageButton" class="small-button" type="button" title="版本管理" aria-label="版本管理" aria-haspopup="dialog" aria-controls="versionPanel" hidden>版本</button>
|
||||
<button id="documentManageButton" class="small-button" type="button" title="文档管理" aria-label="文档管理" aria-haspopup="dialog" aria-controls="documentPanel" hidden>管理</button>
|
||||
</div>
|
||||
|
||||
+27
-14
@@ -1880,25 +1880,28 @@ body[data-hide-meta] .meta-panel {
|
||||
}
|
||||
|
||||
.annotation-summary-list {
|
||||
display: grid;
|
||||
gap: 10px;
|
||||
min-height: 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.annotation-summary {
|
||||
min-width: 0;
|
||||
padding: 10px 0;
|
||||
padding: 8px 4px;
|
||||
border-bottom: 1px solid var(--line);
|
||||
}
|
||||
|
||||
.annotation-summary-target {
|
||||
display: grid;
|
||||
gap: 6px;
|
||||
gap: 3px;
|
||||
width: 100%;
|
||||
padding: 0 0 8px;
|
||||
height: auto;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
color: inherit;
|
||||
font: inherit;
|
||||
font-size: 13px;
|
||||
line-height: 1.5;
|
||||
text-align: left;
|
||||
cursor: pointer;
|
||||
}
|
||||
@@ -1909,17 +1912,18 @@ body[data-hide-meta] .meta-panel {
|
||||
}
|
||||
|
||||
.annotation-summary-target span:first-child {
|
||||
color: var(--muted);
|
||||
color: var(--text-muted);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.annotation-summary-target + .info-line {
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
.annotation-summary .small-button {
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
#annotationsPanel .search-form {
|
||||
grid-template-columns: minmax(0, 1fr) 72px;
|
||||
}
|
||||
|
||||
#annotationsPanel select {
|
||||
min-width: 0;
|
||||
border: 1px solid var(--line);
|
||||
@@ -1928,7 +1932,12 @@ body[data-hide-meta] .meta-panel {
|
||||
}
|
||||
|
||||
#annotationsStatus {
|
||||
margin: 8px 0;
|
||||
flex-shrink: 0;
|
||||
margin: 8px 0 0;
|
||||
}
|
||||
|
||||
#annotationsStatus:empty {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.navigation-tabs button {
|
||||
@@ -1954,18 +1963,22 @@ body[data-hide-meta] .meta-panel {
|
||||
}
|
||||
|
||||
.navigation-content:has(#searchPanel:not([hidden])),
|
||||
#searchPanel:not([hidden]) {
|
||||
.navigation-content:has(#annotationsPanel:not([hidden])),
|
||||
#searchPanel:not([hidden]),
|
||||
#annotationsPanel:not([hidden]) {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#searchPanel {
|
||||
#searchPanel,
|
||||
#annotationsPanel {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
#searchPanel :focus-visible {
|
||||
#searchPanel :focus-visible,
|
||||
#annotationsPanel :focus-visible {
|
||||
outline-offset: -2px;
|
||||
}
|
||||
|
||||
|
||||
@@ -5268,7 +5268,7 @@ function renderDocumentSettings() {
|
||||
settingsElements.Content.replaceChildren();
|
||||
settingsElements.Actions.replaceChildren();
|
||||
const kind = settingsElements.Kind.value;
|
||||
settingsElements.Title.textContent = {ColorSpace: "色彩设置", DrawParam: "样式设置"}[kind] || "文档设置";
|
||||
settingsElements.Title.textContent = {ColorSpace: "色彩设置", DrawParam: "样式设置"}[kind] || "文档配置";
|
||||
if (kind === "actions") renderActionSettings();
|
||||
else if (kind === "bookmarks") renderBookmarkSettings();
|
||||
else if (kind === "extensions") renderExtensionSettings();
|
||||
@@ -5309,7 +5309,7 @@ function renderActionSettings() {
|
||||
if (settings.scope === "object") settingsSelect(context, "图元", "Object", (settings.data.objects || []).map(item => [item.id, `${item.id} · ${item.text || ({TextObject: "文字", PathObject: "图形", ImageObject: "图片"}[item.type] || "组合")}`]), settings.object, value => { settings.object = value; settings.selected = -1; loadDocumentSettings(); });
|
||||
if (settings.scope === "outline") settingsSelect(context, "目录", "Outline", outlineSettingsChoices(), JSON.stringify(settings.path), value => { settings.path = JSON.parse(value); settings.selected = -1; loadDocumentSettings(); });
|
||||
if (settings.selected >= settings.actions.length) settings.selected = -1;
|
||||
settingsSelect(context, "动作", "Entry", [[-1, "新增动作"], ...settings.actions.map((item, index) => [index, `${index + 1} · ${actionSettingsLabel(item)}`])], settings.selected, value => { settings.selected = Number(value); renderDocumentSettings(); });
|
||||
settingsSelect(context, "动作", "Entry", [[-1, "新增"], ...settings.actions.map((item, index) => [index, `${index + 1} · ${actionSettingsLabel(item)}`])], settings.selected, value => { settings.selected = Number(value); renderDocumentSettings(); });
|
||||
const action = settings.actions[settings.selected] || {};
|
||||
const type = action.Goto ? action.Goto.Bookmark ? "Bookmark" : "Goto" : ["URI", "GotoA", "Sound", "Movie"].find(key => action[key]) || "Goto";
|
||||
settingsSelect(content, "类型", "ActionType", [["Goto", "页面"], ["Bookmark", "书签"], ["URI", "网址"], ["GotoA", "附件"], ["Sound", "音频"], ["Movie", "视频"]], type, value => renderActionFields(value, action));
|
||||
@@ -5536,7 +5536,7 @@ function renderLayerSettings() {
|
||||
if (!state.editing && settings.selected < 0 && entries.length) settings.selected = 0;
|
||||
const types = {Background: "背景", Body: "正文", Foreground: "前景"};
|
||||
const options = entries.map((entry, index) => [index, `${entry.ID} · ${types[entry.Type] || entry.Type} · ${entry.ObjectCount}个图元`]);
|
||||
if (state.editing) options.unshift([-1, "新增图层"]);
|
||||
if (state.editing) options.unshift([-1, "新增"]);
|
||||
settingsSelect(settingsElements.Context, "图层", "Entry", options, settings.selected, value => { settings.selected = Number(value); renderDocumentSettings(); });
|
||||
const entry = entries[settings.selected];
|
||||
if (!entry && !state.editing) { settingsElements.Status.textContent = "暂无图层"; return; }
|
||||
@@ -5568,7 +5568,7 @@ function renderTemplateSettings() {
|
||||
if (settings.selected >= entries.length) settings.selected = -1;
|
||||
if (!state.editing && settings.selected < 0 && entries.length) settings.selected = 0;
|
||||
const options = entries.map((entry, index) => [index, `${entry.Name || entry.ID}${bindings.some(binding => referenceIDKey(binding.TemplateID) === referenceIDKey(entry.ID)) ? " · 已绑定" : ""}`]);
|
||||
if (state.editing) options.unshift([-1, "新增模板"]);
|
||||
if (state.editing) options.unshift([-1, "新增"]);
|
||||
settingsSelect(settingsElements.Context, "模板", "Entry", options, settings.selected, value => { settings.selected = Number(value); renderDocumentSettings(); });
|
||||
const entry = entries[settings.selected];
|
||||
if (!entry && !state.editing) { settingsElements.Status.textContent = "暂无模板"; return; }
|
||||
@@ -5607,7 +5607,7 @@ function renderBookmarkSettings() {
|
||||
if (settings.selected >= entries.length) settings.selected = -1;
|
||||
if (!state.editing && settings.selected < 0 && entries.length) settings.selected = 0;
|
||||
const options = entries.map((entry, index) => [index, entry.Name]);
|
||||
if (state.editing) options.unshift([-1, "新增书签"]);
|
||||
if (state.editing) options.unshift([-1, "新增"]);
|
||||
settingsSelect(settingsElements.Context, "书签", "Entry", options, settings.selected, value => { settings.selected = Number(value); renderDocumentSettings(); });
|
||||
const entry = entries[settings.selected];
|
||||
if (!entry && !state.editing) { settingsElements.Status.textContent = "暂无书签"; return; }
|
||||
|
||||
Reference in new issue
Block a user