Repository navigation
Expand file tree
/
Copy pathworkbench.html
More file actions
285 lines (280 loc) · 9.56 KB
/
Copy pathworkbench.html
File metadata and controls
285 lines (280 loc) · 9.56 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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
<!doctype html>
<html
lang="ru"
class="max-h-screen h-full">
<head>
<meta charset="UTF-8" />
<link
rel="preconnect"
href="https://cdn.jsdelivr.net"
crossorigin />
<link
rel="preconnect"
href="https://icons.simai.io"
crossorigin />
<link
rel="preload"
href="/distr/core/css/core.css"
as="style"
onload="
this.onload = null;
this.rel = 'stylesheet';
" />
<link
rel="preload"
href="/src/style.css"
as="style"
onload="
this.onload = null;
this.rel = 'stylesheet';
" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0" />
<title>SIMAI ADMIN — рабочее место записи</title>
<script>
// The theme and the language, before anything renders. A component
// resolves its text from the nearest [lang] when it draws and nothing
// observes it afterwards, so setting the language later would leave every
// drawn label in the old one. Inline and first for the same reason the
// theme is: no flash, and no second answer.
(function () {
var chosen = {};
try { chosen = JSON.parse(localStorage.getItem('simai.admin.appearance') || '{}'); } catch (error) { chosen = {}; }
var lang = chosen.lang === 'en' ? 'en' : 'ru';
document.documentElement.lang = lang;
var theme = chosen.theme || 'system';
var dark = theme === 'dark'
|| (theme === 'system' && window.matchMedia('(prefers-color-scheme: dark)').matches);
document.documentElement.classList.toggle('theme-dark', dark);
document.documentElement.classList.toggle('theme-light', !dark);
})();
</script>
<script>
window.SF_BOOT_CONFIG = {
icons: {
accumulate: true,
},
};
window.sfPath = '/distr/';
window.sfSmartPath = '/distr/';
</script>
<script>
// The four components this reference is built on -- sf-view-table,
// sf-view, sf-view-properties and sf-admin-menu -- are SIMAI Pro's, the
// component package pro, and reach the page through the Loader:
// it fetches <base>/rule.js before its first scan and loads them from
// that base. Their rules are gone from the free core, so a page that does
// not declare this renders nothing. The base is a placeholder here and the
// build stamps the package's id into it, so a new package build lands on a
// path no cache can answer with the previous build's bytes.
window.SF_BOOT_CONFIG = {
...window.SF_BOOT_CONFIG,
packages: { pro: { base: '/distr-pro/' } },
};
</script>
<script
src="/distr/core/js/core.js"
data-sf-script="/distr/core/js/core.js"></script>
<noscript>
<link
rel="stylesheet"
href="/distr/core/css/core.css" />
<link
rel="stylesheet"
href="/src/style.css" />
</noscript>
</head>
<body class="flex h-full">
<aside style="max-width: 320px">
<sf-admin-menu
searchable
settings
logo="/public/logo.svg"
collapsible
aria-label="Admin navigation">
<sf-admin-menu-item
left-icon="home"
href="/"
active
>Дашборд
<sf-admin-menu-item
left-icon="location_on"
badge="99+"
href="/"
>Заказы</sf-admin-menu-item
>
<sf-admin-menu-item
left-icon="mail"
badge="52"
href="/"
>Чаты</sf-admin-menu-item
>
<sf-admin-menu-item
left-icon="light_mode"
href="/"
>Отчеты</sf-admin-menu-item
>
<sf-admin-menu-item left-icon="key">
Фреймворки
<sf-admin-menu-item href="/sf5">SF5</sf-admin-menu-item>
<sf-admin-menu-item href="/modules">Модули</sf-admin-menu-item>
</sf-admin-menu-item>
</sf-admin-menu-item>
<sf-admin-menu-item
left-icon="location_on"
badge="99+"
href="/"
>Заказы</sf-admin-menu-item
>
<sf-admin-menu-item
left-icon="mail"
badge="52"
href="/"
>Чаты</sf-admin-menu-item
>
<sf-admin-menu-item
left-icon="light_mode"
href="/"
>Отчеты</sf-admin-menu-item
>
<sf-admin-menu-item
left-icon="imagesmode"
href="/"
>Купоны</sf-admin-menu-item
>
<sf-admin-menu-item type="divider"></sf-admin-menu-item>
<sf-admin-menu-item left-icon="key">
Фреймворки
<sf-admin-menu-item href="/sf5">SF5</sf-admin-menu-item>
<sf-admin-menu-item href="/modules">Модули</sf-admin-menu-item>
<sf-admin-menu-item href="/placeholder"
>Тестовый пункт для провекри плейсхолдера</sf-admin-menu-item
>
</sf-admin-menu-item>
<sf-admin-menu-item
left-icon="link"
href="/"
>Вендоры</sf-admin-menu-item
>
<sf-admin-menu-item
left-icon="/public/logo.svg"
href="/placeholder"
>Кастомная иконка</sf-admin-menu-item
>
<sf-admin-menu-item
left-icon="person"
href="/"
>Модуль биллинга</sf-admin-menu-item
>
<sf-admin-menu-item
left-icon="photo_camera"
href="/"
>Модуль обновления</sf-admin-menu-item
>
<sf-admin-menu-item
left-icon="stethoscope"
href="/"
>Модуль регистраций</sf-admin-menu-item
>
<sf-admin-menu-item
left-icon="health_and_safety"
href="/"
>Главный модуль</sf-admin-menu-item
>
<sf-admin-menu-item
left-icon="home"
href="/"
>Очень очень длинное название пункта меню для
теста</sf-admin-menu-item
>
<sf-admin-menu-item
left-icon="home"
href="/"
>Дашборд</sf-admin-menu-item
>
<sf-admin-menu-item
left-icon="home"
href="/"
>Дашборд</sf-admin-menu-item
>
<sf-admin-menu-item
left-icon="home"
href="/"
>Дашборд</sf-admin-menu-item
>
<sf-admin-menu-item
left-icon="home"
href="/"
>Дашборд</sf-admin-menu-item
>
<sf-admin-menu-item
left-icon="home"
href="/"
>Дашборд</sf-admin-menu-item
>
<sf-admin-menu-item
left-icon="home"
href="/"
>Дашборд</sf-admin-menu-item
>
<sf-admin-menu-item
left-icon="home"
href="/"
>Дашборд</sf-admin-menu-item
>
</sf-admin-menu>
</aside>
<main class="flex flex-col flex-1 min-w-0 min-h-0">
<!-- The page frame: a bar that names where you are, then the content
column. Larena renders the same two things server-side; what matters
here is that the column holds the composites rather than the parts
they are made of. -->
<header class="flex items-cross-center gap-2 p-x-4 p-y-2 border-b-px border-outline-variant">
<sf-breadcrumbs aria-label="Где вы находитесь">
<a href="/">Админка</a>
<a href="/workbench.html">Решения</a>
</sf-breadcrumbs>
<span class="grow"></span>
<sf-avatar size="1" text="SI"></sf-avatar>
</header>
<section class="flex flex-col gap-2 p-4 flex-1 min-w-0 min-h-0">
<h1 class="text-title-2 m-0">Решения</h1>
<p class="color-on-surface-variant m-0">
Список и карточка записи — те же два композита, которыми Larena
собирает <code>/admin/cms</code>: список отвечает через порт данных,
карточка через свой собственный.
</p>
<!-- The list. Not a bare sf-view-table: a data view that owns the query, the
toolbar, the page row and the row actions, and slots a table in --
which is how Larena composes it and how a consumer must. -->
<!-- The table keeps its own toolbar, and an empty slotted one keeps the
data view's raw fallback out. See index.html. -->
<sf-view
id="solutions"
aria-label="Решения">
<span slot="toolbar"></span>
<sf-view-table
slot="content"
id="solutions-table"
table-settings-key="admin.solutions"
aria-label="Решения"></sf-view-table>
<sf-pagination slot="pagination"></sf-pagination>
</sf-view>
</section>
</main>
<!-- The record panel. It is portalled out of here when it opens, so where
the element stands matters only for who owns it. -->
<sf-view-properties
id="record"
panel
panel-width="40rem"
collection="admin.solutions"
collection-label="Решения"
collection-icon="inventory_2"
aria-label="Карточка решения"></sf-view-properties>
<script
type="module"
src="/src/workbench.ts"></script>
</body>
</html>