forked from tomayac/opfs-explorer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
panel.html
129 lines (129 loc) · 3.1 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
<!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: "🏠 (Root)";
}
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);
}
.file {
margin-inline-start: -100vw;
}
.directory,
.file {
height: 1.25rem;
cursor: pointer;
display: flex;
align-items: center;
width: 100vw;
padding-left: 100vw;
}
.directory:hover,
.file:hover {
background-color: Canvas;
}
.size,
.delete {
margin-inline-start: 0.25rem;
}
.size {
cursor: default;
color: var(--secondary-text-color-color);
}
.confirm-dialog form::before {
content: "🛎️ Question:";
}
.error-dialog form::before {
content: "❌ Error:";
}
.spinner {
animation: spin 4s linear infinite;
display: inline-block;
}
@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>
</body>
</html>