@youtyan/code-viewer 0.1.14 → 0.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -0
- package/package.json +1 -1
- package/web/app.js +361 -104
- package/web/index.html +45 -8
- package/web/style.css +370 -69
- package/web-src/server/git.ts +67 -29
- package/web-src/server/preview.ts +109 -32
- package/web-src/server/search.ts +10 -7
- package/web-src/types.ts +10 -1
package/web/index.html
CHANGED
|
@@ -25,20 +25,21 @@
|
|
|
25
25
|
</a>
|
|
26
26
|
<nav class="app-menu" aria-label="Views">
|
|
27
27
|
<a class="app-menu-item active" data-route="repo" href="/">Repository</a>
|
|
28
|
-
<a class="app-menu-item
|
|
29
|
-
<a class="app-menu-item" data-route="help" href="/help">Help</a>
|
|
28
|
+
<a class="app-menu-item" data-route="diff" href="/todif?from=HEAD&to=worktree">Diff Viewer</a>
|
|
30
29
|
</nav>
|
|
31
30
|
<div class="global-actions">
|
|
31
|
+
<button id="viewer-settings" class="global-icon-action" title="viewer settings" aria-label="viewer settings"></button>
|
|
32
32
|
<button id="theme" title="toggle theme">🌗</button>
|
|
33
33
|
<span id="status" class="status"></span>
|
|
34
|
+
<a class="global-help-link" data-route="help" href="/help">Help</a>
|
|
34
35
|
</div>
|
|
35
36
|
</header>
|
|
36
37
|
<header id="topbar">
|
|
37
38
|
<div id="meta"></div>
|
|
38
39
|
<div class="ref-pickers">
|
|
39
|
-
<
|
|
40
|
+
<span data-ref-selector-mount data-ref-id="ref-from" data-placeholder="from..."></span>
|
|
40
41
|
<span class="ref-dots">…</span>
|
|
41
|
-
<
|
|
42
|
+
<span data-ref-selector-mount data-ref-id="ref-to" data-placeholder="to..."></span>
|
|
42
43
|
<button id="ref-reset" title="reset to HEAD .. worktree">×</button>
|
|
43
44
|
<button id="reload-prom" title="reload diff (R)">↻</button>
|
|
44
45
|
</div>
|
|
@@ -74,13 +75,11 @@
|
|
|
74
75
|
<div id="load-bar" aria-hidden="true"></div>
|
|
75
76
|
|
|
76
77
|
<aside id="sidebar">
|
|
77
|
-
<div id="repo-target-wrap" class="sb-repo-target" hidden>
|
|
78
|
-
<input id="repo-target" class="ref-input" type="text" placeholder="target…" title="repository target" autocomplete="off" readonly />
|
|
79
|
-
</div>
|
|
80
78
|
<div class="sb-head">
|
|
81
79
|
<span class="sb-title">Files</span>
|
|
82
80
|
<span id="totals"></span>
|
|
83
|
-
<
|
|
81
|
+
<span data-ref-selector-mount data-ref-id="repo-target" data-wrapper-id="repo-target-wrap" data-extra-class="ref-selector-in-grid" data-placeholder="target..." data-title="repository target" hidden></span>
|
|
82
|
+
<div class="sb-actions" role="group" aria-label="sidebar actions">
|
|
84
83
|
<button id="sb-expand-all" class="sb-icon-action sb-tree-action" title="expand all folders" aria-label="expand all folders"></button>
|
|
85
84
|
<button id="sb-collapse-all" class="sb-icon-action sb-tree-action" title="collapse all folders" aria-label="collapse all folders"></button>
|
|
86
85
|
</div>
|
|
@@ -95,6 +94,44 @@
|
|
|
95
94
|
<ul id="filelist"></ul>
|
|
96
95
|
<div id="sidebar-resizer" aria-hidden="true"></div>
|
|
97
96
|
</aside>
|
|
97
|
+
<button id="sidebar-toggle" title="hide sidebar" aria-label="hide sidebar">
|
|
98
|
+
<span class="sidebar-toggle-label">Files</span>
|
|
99
|
+
</button>
|
|
100
|
+
|
|
101
|
+
<div id="scope-settings-popover" hidden>
|
|
102
|
+
<div class="scope-settings-head">
|
|
103
|
+
<strong>Viewer Settings</strong>
|
|
104
|
+
<button id="scope-settings-close" type="button" aria-label="close viewer settings">×</button>
|
|
105
|
+
</div>
|
|
106
|
+
<div class="scope-settings-section">
|
|
107
|
+
<strong class="scope-settings-section-title">Display</strong>
|
|
108
|
+
<label for="sidebar-font-size">File list font size</label>
|
|
109
|
+
<select id="sidebar-font-size">
|
|
110
|
+
<option value="compact">Small</option>
|
|
111
|
+
<option value="regular">Regular</option>
|
|
112
|
+
<option value="large">Large</option>
|
|
113
|
+
<option value="xlarge">Extra Large</option>
|
|
114
|
+
</select>
|
|
115
|
+
<label for="code-font-size">Code font size</label>
|
|
116
|
+
<select id="code-font-size">
|
|
117
|
+
<option value="compact">Small</option>
|
|
118
|
+
<option value="regular">Regular</option>
|
|
119
|
+
<option value="large">Large</option>
|
|
120
|
+
<option value="xlarge">Extra Large</option>
|
|
121
|
+
</select>
|
|
122
|
+
<p id="display-settings-source">Applies to all projects in this browser.</p>
|
|
123
|
+
</div>
|
|
124
|
+
<div class="scope-settings-section">
|
|
125
|
+
<strong class="scope-settings-section-title">Excluded directories</strong>
|
|
126
|
+
<label for="scope-omit-dirs">Skip these directory names while browsing and searching</label>
|
|
127
|
+
<textarea id="scope-omit-dirs" rows="9" spellcheck="false"></textarea>
|
|
128
|
+
<p id="scope-omit-source"></p>
|
|
129
|
+
<div class="scope-settings-actions">
|
|
130
|
+
<button id="scope-omit-reset" type="button">Reset</button>
|
|
131
|
+
<button id="scope-omit-save" type="button">Save</button>
|
|
132
|
+
</div>
|
|
133
|
+
</div>
|
|
134
|
+
</div>
|
|
98
135
|
|
|
99
136
|
<main id="content">
|
|
100
137
|
<div id="empty" class="empty hidden">
|