-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathpanel.html
162 lines (162 loc) · 3.92 KB
/
panel.html
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta name="color-scheme" content="dark light" />
<style>
:root {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
color-scheme: dark light;
--background-color: #eee;
--secondary-text-color-color: #333;
}
@media (prefers-color-scheme: dark) {
:root {
--background-color: #202124;
--secondary-text-color-color: #d4d4d4;
}
}
main {
background-image: linear-gradient(
to bottom,
Canvas,
Canvas 50%,
var(--background-color) 50%,
var(--background-color)
) !important;
background-size: 100% 2.5rem;
overflow-x: clip;
}
main:has(.spinner) {
background-image: none;
}
details {
margin-left: 2rem;
}
summary {
list-style: none;
cursor: pointer;
}
dialog {
max-width: 65ch;
}
dialog::backdrop {
backdrop-filter: blur(5px);
}
code {
font-family: ui-monospace, monospace;
color: red;
}
details.root > summary::before {
content: "🏠 ";
}
details:not(.root):not([open]) > summary::before {
content: "📁 ";
margin-inline-end: 0.25rem;
}
details:not(.root)[open] > summary::before {
content: "📂 ";
margin-inline-end: 0.25rem;
}
.directory {
margin-inline-start: calc(-100vw - 2rem);
}
.directory-name,
.file-name {
max-width: calc(100% - 8 * 0.5rem);
overflow-x: auto;
scrollbar-width: none;
}
.file {
margin-inline-start: -100vw;
}
.directory,
.file {
height: 1.25rem;
cursor: pointer;
display: flex;
align-items: center;
padding-left: 100vw;
}
.directory:hover,
.file:hover {
background-color: Canvas;
}
.size,
.delete,
.edit {
margin-inline-start: 0.25rem;
}
.size {
cursor: default;
color: var(--secondary-text-color-color);
}
.edit-file {
width: 100%;
height: 100%;
}
.confirm-dialog form::before {
content: "🛎️ Question:";
}
.error-dialog form::before {
content: "❌ Error:";
}
.edit-dialog form::before {
content: "✏️ Edit:";
}
.spinner {
animation: spin 4s linear infinite;
display: inline-block;
}
.text-button {
appearance: none;
border: none;
background: none;
color: inherit;
cursor: pointer;
}
@keyframes spin {
100% {
transform: rotate(360deg);
}
}
</style>
</head>
<body>
<main>
<span class="spinner">⏳</span> Analyzing Origin Private File System
</main>
<dialog class="confirm-dialog">
<form method="dialog">
<p>Do you really want to delete the <span></span> <code></code>?</p>
<div>
<button type="cancel" value="cancel">Cancel</button>
<button type="submit" class="confirm-button" value="delete">
Confirm
</button>
</div>
</form>
</dialog>
<dialog class="error-dialog">
<form method="dialog">
<p></p>
<div>
<button type="submit" class="confirm-button" value="ok">OK</button>
</div>
</form>
</dialog>
<dialog class="edit-dialog">
<form method="dialog">
<textarea rows="10" cols="30" class="edit-file"></textarea>
<div>
<button type="submit" class="cancel-button" value="cancel">
Cancel
</button>
<button type="submit" class="confirm-button" value="save">
Save
</button>
</div>
</form>
</dialog>
</body>
</html>