Repository navigation
Expand file tree
/
Copy pathworkbench.html
More file actions
154 lines (149 loc) · 6.03 KB
/
Copy pathworkbench.html
File metadata and controls
154 lines (149 loc) · 6.03 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
<!doctype html>
<html
lang="ru"
class="max-h-screen h-full">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
<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/' }, admin: { base: '/distr-admin/' } },
};
</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">
<!-- The admin menu over the navigation port (src/navigation.ts), as on
every page of this site: no rows in the markup, they are the host's. -->
<aside class="admin-navigation h-full">
<sf-admin-menu class="h-full" aria-label="Разделы админки" data-sf-skeleton="menu"></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. Its width is the
drawer's ladder step 2 plus the column of sections (DEV decision
msg-9c73f1dd; no exact panel-width, off the drawer's ladder). -->
<sf-view-properties
id="record"
panel
panel-size="2"
collection="admin.solutions"
collection-label="Решения"
collection-icon="inventory_2"
aria-label="Карточка решения"></sf-view-properties>
<script
type="module"
src="/src/workbench.ts"></script>
</body>
</html>