cyberia 3.0.2 → 3.1.3
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/{.env.production → .env.example} +20 -2
- package/.github/workflows/engine-cyberia.cd.yml +41 -10
- package/.github/workflows/engine-cyberia.ci.yml +53 -14
- package/.github/workflows/ghpkg.ci.yml +1 -1
- package/.github/workflows/gitlab.ci.yml +1 -1
- package/.github/workflows/hardhat.ci.yml +82 -0
- package/.github/workflows/npmpkg.ci.yml +37 -8
- package/.github/workflows/publish.ci.yml +5 -5
- package/.github/workflows/publish.cyberia.ci.yml +5 -5
- package/.github/workflows/pwa-microservices-template-page.cd.yml +3 -3
- package/.github/workflows/pwa-microservices-template-test.ci.yml +1 -1
- package/.github/workflows/release.cd.yml +3 -2
- package/.vscode/extensions.json +9 -8
- package/.vscode/settings.json +3 -2
- package/CHANGELOG.md +533 -290
- package/CLI-HELP.md +79 -53
- package/WHITE-PAPER.md +1540 -0
- package/bin/build.js +16 -11
- package/bin/cyberia.js +959 -8
- package/bin/deploy.js +103 -270
- package/bin/file.js +2 -1
- package/bin/index.js +959 -8
- package/bin/vs.js +3 -3
- package/conf.js +277 -77
- package/deployment.yaml +218 -4
- package/hardhat/.env.example +31 -0
- package/hardhat/README.md +531 -0
- package/hardhat/WHITE-PAPER.md +1540 -0
- package/hardhat/contracts/ObjectLayerToken.sol +391 -0
- package/hardhat/deployments/.gitkeep +0 -0
- package/hardhat/deployments/hardhat-ObjectLayerToken.json +11 -0
- package/hardhat/hardhat.config.js +136 -0
- package/hardhat/ignition/modules/ObjectLayerToken.js +21 -0
- package/hardhat/networks/besu-object-layer.network.json +138 -0
- package/hardhat/package-lock.json +7628 -0
- package/hardhat/package.json +45 -0
- package/hardhat/scripts/deployObjectLayerToken.js +98 -0
- package/hardhat/test/ObjectLayerToken.js +590 -0
- package/jsdoc.dd-cyberia.json +59 -0
- package/jsdoc.json +20 -13
- package/manifests/cronjobs/dd-cron/dd-cron-backup.yaml +1 -1
- package/manifests/cronjobs/dd-cron/dd-cron-dns.yaml +1 -1
- package/manifests/deployment/dd-cyberia-development/deployment.yaml +490 -0
- package/manifests/deployment/dd-cyberia-development/proxy.yaml +261 -0
- package/manifests/deployment/dd-cyberia-development/pv-pvc.yaml +132 -0
- package/manifests/deployment/dd-default-development/deployment.yaml +2 -2
- package/manifests/deployment/dd-test-development/deployment.yaml +52 -52
- package/manifests/deployment/dd-test-development/proxy.yaml +4 -4
- package/manifests/pv-pvc-dd.yaml +1 -1
- package/package.json +60 -50
- package/proxy.yaml +128 -9
- package/pv-pvc.yaml +132 -0
- package/scripts/k3s-node-setup.sh +1 -1
- package/scripts/ports-ls.sh +2 -0
- package/src/api/atlas-sprite-sheet/atlas-sprite-sheet.controller.js +3 -1
- package/src/api/atlas-sprite-sheet/atlas-sprite-sheet.model.js +1 -2
- package/src/api/atlas-sprite-sheet/atlas-sprite-sheet.service.js +40 -7
- package/src/api/document/document.service.js +1 -1
- package/src/api/file/file.controller.js +3 -1
- package/src/api/file/file.service.js +28 -5
- package/src/api/ipfs/ipfs.service.js +2 -2
- package/src/api/object-layer/object-layer.controller.js +6 -2
- package/src/api/object-layer/object-layer.model.js +67 -21
- package/src/api/object-layer/object-layer.router.js +668 -42
- package/src/api/object-layer/object-layer.service.js +10 -16
- package/src/api/object-layer-render-frames/object-layer-render-frames.model.js +1 -2
- package/src/api/user/user.router.js +10 -5
- package/src/api/user/user.service.js +7 -7
- package/src/cli/baremetal.js +6 -10
- package/src/cli/cloud-init.js +0 -3
- package/src/cli/db.js +54 -71
- package/src/cli/deploy.js +64 -12
- package/src/cli/env.js +5 -5
- package/src/cli/fs.js +0 -2
- package/src/cli/image.js +0 -3
- package/src/cli/index.js +41 -13
- package/src/cli/monitor.js +5 -6
- package/src/cli/repository.js +329 -46
- package/src/cli/run.js +210 -122
- package/src/cli/secrets.js +1 -3
- package/src/cli/ssh.js +1 -1
- package/src/client/Itemledger.index.js +1 -959
- package/src/client/Underpost.index.js +36 -0
- package/src/client/components/core/AgGrid.js +20 -5
- package/src/client/components/core/Alert.js +2 -2
- package/src/client/components/core/Content.js +22 -3
- package/src/client/components/core/Docs.js +30 -6
- package/src/client/components/core/FileExplorer.js +71 -4
- package/src/client/components/core/Input.js +1 -1
- package/src/client/components/core/Modal.js +22 -6
- package/src/client/components/core/PublicProfile.js +3 -3
- package/src/client/components/core/RichText.js +1 -2
- package/src/client/components/core/Router.js +34 -1
- package/src/client/components/core/Worker.js +1 -1
- package/src/client/components/cryptokoyn/CssCryptokoyn.js +63 -1
- package/src/client/components/cyberia/ObjectLayerEngineModal.js +145 -119
- package/src/client/components/cyberia/ObjectLayerEngineViewer.js +64 -6
- package/src/client/components/cyberia-portal/CommonCyberiaPortal.js +1 -0
- package/src/client/components/cyberia-portal/CssCyberiaPortal.js +44 -2
- package/src/client/components/cyberia-portal/LogInCyberiaPortal.js +0 -1
- package/src/client/components/cyberia-portal/MenuCyberiaPortal.js +64 -2
- package/src/client/components/cyberia-portal/RoutesCyberiaPortal.js +1 -0
- package/src/client/components/itemledger/CssItemledger.js +62 -0
- package/src/client/components/underpost/CommonUnderpost.js +29 -0
- package/src/client/components/underpost/CssUnderpost.js +281 -0
- package/src/client/components/underpost/CyberpunkBloggerUnderpost.js +879 -0
- package/src/client/components/underpost/DocumentSearchProvider.js +448 -0
- package/src/client/components/underpost/ElementsUnderpost.js +38 -0
- package/src/client/components/underpost/LabGalleryUnderpost.js +82 -0
- package/src/client/components/underpost/LogInUnderpost.js +23 -0
- package/src/client/components/underpost/LogOutUnderpost.js +15 -0
- package/src/client/components/underpost/MenuUnderpost.js +691 -0
- package/src/client/components/underpost/RoutesUnderpost.js +47 -0
- package/src/client/components/underpost/SettingsUnderpost.js +16 -0
- package/src/client/components/underpost/SignUpUnderpost.js +9 -0
- package/src/client/components/underpost/SocketIoUnderpost.js +54 -0
- package/src/client/components/underpost/TranslateUnderpost.js +10 -0
- package/src/client/public/cryptokoyn/assets/logo/base-icon.png +0 -0
- package/src/client/public/cryptokoyn/browserconfig.xml +12 -0
- package/src/client/public/cryptokoyn/microdata.json +85 -0
- package/src/client/public/cryptokoyn/site.webmanifest +57 -0
- package/src/client/public/cryptokoyn/sitemap +3 -3
- package/src/client/public/default/sitemap +3 -3
- package/src/client/public/itemledger/browserconfig.xml +2 -2
- package/src/client/public/itemledger/manifest.webmanifest +4 -4
- package/src/client/public/itemledger/microdata.json +71 -0
- package/src/client/public/itemledger/sitemap +3 -3
- package/src/client/public/itemledger/yandex-browser-manifest.json +2 -2
- package/src/client/public/test/sitemap +3 -3
- package/src/client/services/object-layer/object-layer.management.js +23 -4
- package/src/client/ssr/body/404.js +15 -11
- package/src/client/ssr/body/500.js +15 -11
- package/src/client/ssr/body/SwaggerDarkMode.js +285 -0
- package/src/client/ssr/body/UnderpostDefaultSplashScreen.js +83 -0
- package/src/client/ssr/head/PwaItemledger.js +60 -0
- package/src/client/ssr/head/UnderpostScripts.js +6 -0
- package/src/client/ssr/offline/NoNetworkConnection.js +11 -10
- package/src/client/ssr/pages/Test.js +11 -10
- package/src/client.build.js +0 -3
- package/src/client.dev.js +0 -3
- package/src/db/DataBaseProvider.js +17 -2
- package/src/db/mariadb/MariaDB.js +14 -9
- package/src/db/mongo/MongooseDB.js +17 -1
- package/src/index.js +1 -1
- package/src/proxy.js +0 -3
- package/src/runtime/express/Express.js +15 -9
- package/src/runtime/lampp/Lampp.js +6 -13
- package/src/server/auth.js +12 -14
- package/src/server/backup.js +2 -3
- package/src/server/besu-genesis-generator.js +1630 -0
- package/src/server/client-build-docs.js +126 -17
- package/src/server/client-build-live.js +9 -18
- package/src/server/client-build.js +203 -75
- package/src/server/client-dev-server.js +14 -13
- package/src/server/conf.js +376 -164
- package/src/server/cron.js +2 -1
- package/src/server/dns.js +28 -12
- package/src/server/downloader.js +0 -2
- package/src/server/logger.js +27 -9
- package/src/server/object-layer.js +92 -16
- package/src/server/peer.js +0 -2
- package/src/server/process.js +1 -50
- package/src/server/proxy.js +4 -8
- package/src/server/runtime.js +5 -8
- package/src/server/semantic-layer-generator.js +1 -0
- package/src/server/ssr.js +0 -3
- package/src/server/start.js +19 -12
- package/src/server/tls.js +0 -2
- package/src/server.js +0 -4
- package/.env.development +0 -43
- package/.env.test +0 -43
- package/hardhat/contracts/CryptoKoyn.sol +0 -59
- package/hardhat/contracts/ItemLedger.sol +0 -73
- package/hardhat/contracts/Lock.sol +0 -34
- package/hardhat/hardhat.config.cjs +0 -45
- package/hardhat/ignition/modules/Lock.js +0 -18
- package/hardhat/networks/cryptokoyn-itemledger.network.json +0 -29
- package/hardhat/scripts/deployCryptokoyn.cjs +0 -25
- package/hardhat/scripts/deployItemledger.cjs +0 -25
- package/hardhat/test/Lock.js +0 -126
- package/hardhat/white-paper.md +0 -581
- package/white-paper.md +0 -581
|
@@ -0,0 +1,691 @@
|
|
|
1
|
+
import { Account } from '../core/Account.js';
|
|
2
|
+
import { BtnIcon } from '../core/BtnIcon.js';
|
|
3
|
+
import { getId, newInstance } from '../core/CommonJs.js';
|
|
4
|
+
import { Css, ThemeEvents, Themes, darkTheme } from '../core/Css.js';
|
|
5
|
+
import { EventsUI } from '../core/EventsUI.js';
|
|
6
|
+
import { LogIn } from '../core/LogIn.js';
|
|
7
|
+
import { LogOut } from '../core/LogOut.js';
|
|
8
|
+
import { buildBadgeToolTipMenuOption, Modal, renderMenuLabel, renderViewTitle } from '../core/Modal.js';
|
|
9
|
+
import { SignUp } from '../core/SignUp.js';
|
|
10
|
+
import { Translate } from '../core/Translate.js';
|
|
11
|
+
import { htmls, s } from '../core/VanillaJs.js';
|
|
12
|
+
import { extractUsernameFromPath, getProxyPath, getQueryParams } from '../core/Router.js';
|
|
13
|
+
import { ElementsUnderpost } from './ElementsUnderpost.js';
|
|
14
|
+
import Sortable from 'sortablejs';
|
|
15
|
+
import { RouterUnderpost, BannerAppTemplate } from './RoutesUnderpost.js';
|
|
16
|
+
import { LabGalleryUnderpost } from './LabGalleryUnderpost.js';
|
|
17
|
+
import { CyberpunkBloggerUnderpost } from './CyberpunkBloggerUnderpost.js';
|
|
18
|
+
import { Badge } from '../core/Badge.js';
|
|
19
|
+
import { SettingsUnderpost } from './SettingsUnderpost.js';
|
|
20
|
+
import { Recover } from '../core/Recover.js';
|
|
21
|
+
import { PanelForm } from '../core/PanelForm.js';
|
|
22
|
+
import { SearchBox } from '../core/SearchBox.js';
|
|
23
|
+
import { DocumentSearchProvider } from './DocumentSearchProvider.js';
|
|
24
|
+
import { PublicProfile } from '../core/PublicProfile.js';
|
|
25
|
+
import { Polyhedron } from '../core/Polyhedron.js';
|
|
26
|
+
import { FileExplorer } from '../core/FileExplorer.js';
|
|
27
|
+
import { Content } from '../core/Content.js';
|
|
28
|
+
|
|
29
|
+
const MenuUnderpost = {
|
|
30
|
+
Data: {},
|
|
31
|
+
Render: async function () {
|
|
32
|
+
const id = getId(this.Data, 'menu-');
|
|
33
|
+
this.Data[id] = {};
|
|
34
|
+
const RouterInstance = RouterUnderpost();
|
|
35
|
+
|
|
36
|
+
const { barConfig } = await Themes[Css.currentTheme]();
|
|
37
|
+
|
|
38
|
+
await Modal.Render({
|
|
39
|
+
id: 'modal-menu',
|
|
40
|
+
html: html`
|
|
41
|
+
<div class="fl menu-btn-container">
|
|
42
|
+
${await BtnIcon.Render({
|
|
43
|
+
class: 'in wfa main-btn-menu main-btn-contracultura-cyberpunk',
|
|
44
|
+
useMenuBtn: true,
|
|
45
|
+
label: renderMenuLabel({
|
|
46
|
+
icon: html`<img class="inl underpost-menu-icon" src="${getProxyPath()}assets/ui-icons/blogger.png" />`,
|
|
47
|
+
text: html`<span class="menu-label-text">${Translate.Render('contracultura-cyberpunk')}</span>`,
|
|
48
|
+
}),
|
|
49
|
+
// style: 'display: none',
|
|
50
|
+
attrs: `data-id="contracultura-cyberpunk"`,
|
|
51
|
+
tabHref: `${getProxyPath()}contracultura-cyberpunk`,
|
|
52
|
+
handleContainerClass: 'handle-btn-container',
|
|
53
|
+
tooltipHtml: await Badge.Render(buildBadgeToolTipMenuOption('blog')),
|
|
54
|
+
})}
|
|
55
|
+
${true
|
|
56
|
+
? ''
|
|
57
|
+
: await BtnIcon.Render({
|
|
58
|
+
class: 'in wfa main-btn-menu main-btn-lab-gallery hide',
|
|
59
|
+
useMenuBtn: true,
|
|
60
|
+
label: renderMenuLabel({
|
|
61
|
+
icon: html`<img
|
|
62
|
+
class="inl underpost-menu-icon"
|
|
63
|
+
src="${getProxyPath()}assets/ui-icons/gallery.png"
|
|
64
|
+
/>`,
|
|
65
|
+
text: html`<span class="menu-label-text">${Translate.Render('lab-gallery')}</span>`,
|
|
66
|
+
}),
|
|
67
|
+
// style: 'display: none',
|
|
68
|
+
attrs: `data-id="lab-gallery"`,
|
|
69
|
+
tabHref: `${getProxyPath()}lab-gallery`,
|
|
70
|
+
handleContainerClass: 'handle-btn-container',
|
|
71
|
+
tooltipHtml: await Badge.Render(buildBadgeToolTipMenuOption('blog')),
|
|
72
|
+
})}
|
|
73
|
+
${await BtnIcon.Render({
|
|
74
|
+
class: 'in wfa main-btn-menu main-btn-home main-btn-menu-active',
|
|
75
|
+
useMenuBtn: true,
|
|
76
|
+
label: renderMenuLabel({
|
|
77
|
+
icon: html`<img class="inl underpost-menu-icon" src="${getProxyPath()}assets/ui-icons/home.png" />`,
|
|
78
|
+
text: html`<span class="menu-label-text">${Translate.Render('home')}</span>`,
|
|
79
|
+
}),
|
|
80
|
+
// style: 'display: none',
|
|
81
|
+
attrs: `data-id="home"`,
|
|
82
|
+
tabHref: `${getProxyPath()}`,
|
|
83
|
+
handleContainerClass: 'handle-btn-container',
|
|
84
|
+
tooltipHtml: await Badge.Render(buildBadgeToolTipMenuOption('home')),
|
|
85
|
+
})}
|
|
86
|
+
${await BtnIcon.Render({
|
|
87
|
+
class: 'in wfa main-btn-menu main-btn-log-in',
|
|
88
|
+
useMenuBtn: true,
|
|
89
|
+
label: renderMenuLabel({
|
|
90
|
+
icon: html`<img class="inl underpost-menu-icon" src="${getProxyPath()}assets/ui-icons/log-in.png" />`,
|
|
91
|
+
text: html`<span class="menu-label-text">${Translate.Render('log-in')}</span>`,
|
|
92
|
+
}),
|
|
93
|
+
attrs: `data-id="log-in"`,
|
|
94
|
+
tabHref: `${getProxyPath()}log-in`,
|
|
95
|
+
handleContainerClass: 'handle-btn-container',
|
|
96
|
+
tooltipHtml: await Badge.Render(buildBadgeToolTipMenuOption('log-in')),
|
|
97
|
+
})}
|
|
98
|
+
${await BtnIcon.Render({
|
|
99
|
+
class: 'in wfa main-btn-menu main-btn-sign-up',
|
|
100
|
+
useMenuBtn: true,
|
|
101
|
+
label: renderMenuLabel({
|
|
102
|
+
icon: html`<img class="inl underpost-menu-icon" src="${getProxyPath()}assets/ui-icons/sign-up.png" />`,
|
|
103
|
+
text: html`<span class="menu-label-text">${Translate.Render('sign-up')}</span>`,
|
|
104
|
+
}),
|
|
105
|
+
attrs: `data-id="sign-up"`,
|
|
106
|
+
tabHref: `${getProxyPath()}sign-up`,
|
|
107
|
+
handleContainerClass: 'handle-btn-container',
|
|
108
|
+
tooltipHtml: await Badge.Render(buildBadgeToolTipMenuOption('sign-up')),
|
|
109
|
+
})}
|
|
110
|
+
${await BtnIcon.Render({
|
|
111
|
+
class: 'in wfa main-btn-menu main-btn-log-out',
|
|
112
|
+
useMenuBtn: true,
|
|
113
|
+
label: renderMenuLabel({
|
|
114
|
+
icon: html`<img class="inl underpost-menu-icon" src="${getProxyPath()}assets/ui-icons/log-out.png" />`,
|
|
115
|
+
text: html`<span class="menu-label-text">${Translate.Render('log-out')}</span>`,
|
|
116
|
+
}),
|
|
117
|
+
attrs: `data-id="log-out"`,
|
|
118
|
+
style: 'display: none',
|
|
119
|
+
tabHref: `${getProxyPath()}log-out`,
|
|
120
|
+
handleContainerClass: 'handle-btn-container',
|
|
121
|
+
tooltipHtml: await Badge.Render(buildBadgeToolTipMenuOption('log-out')),
|
|
122
|
+
})}
|
|
123
|
+
${await BtnIcon.Render({
|
|
124
|
+
class: 'in wfa main-btn-menu main-btn-account',
|
|
125
|
+
useMenuBtn: true,
|
|
126
|
+
label: renderMenuLabel({
|
|
127
|
+
icon: html`<img class="inl underpost-menu-icon" src="${getProxyPath()}assets/ui-icons/account.png" />`,
|
|
128
|
+
text: html`<span class="menu-label-text">${Translate.Render('account')}</span>`,
|
|
129
|
+
}),
|
|
130
|
+
style: 'display: none',
|
|
131
|
+
attrs: `data-id="account"`,
|
|
132
|
+
tabHref: `${getProxyPath()}account`,
|
|
133
|
+
handleContainerClass: 'handle-btn-container',
|
|
134
|
+
tooltipHtml: await Badge.Render(buildBadgeToolTipMenuOption('account')),
|
|
135
|
+
})}
|
|
136
|
+
${await BtnIcon.Render({
|
|
137
|
+
class: 'in wfa main-btn-menu main-btn-public-profile',
|
|
138
|
+
useMenuBtn: true,
|
|
139
|
+
label: renderMenuLabel({
|
|
140
|
+
icon: html`<img class="inl underpost-menu-icon" src="${getProxyPath()}assets/ui-icons/character.png" />`,
|
|
141
|
+
text: html`<span class="menu-label-text">${Translate.Render('public-profile')}</span>`,
|
|
142
|
+
}),
|
|
143
|
+
style: 'display: none',
|
|
144
|
+
attrs: `data-id="public-profile"`,
|
|
145
|
+
tabHref: `${getProxyPath()}u`,
|
|
146
|
+
handleContainerClass: 'handle-btn-container',
|
|
147
|
+
tooltipHtml: await Badge.Render(buildBadgeToolTipMenuOption('public-profile')),
|
|
148
|
+
})}
|
|
149
|
+
${await BtnIcon.Render({
|
|
150
|
+
class: 'in wfa main-btn-menu main-btn-content hide',
|
|
151
|
+
useMenuBtn: true,
|
|
152
|
+
label: renderMenuLabel({
|
|
153
|
+
icon: html`<img class="inl underpost-menu-icon" src="${getProxyPath()}assets/ui-icons/doc.png" />`,
|
|
154
|
+
text: html`<span class="menu-label-text">${Translate.Render('content')}</span>`,
|
|
155
|
+
}),
|
|
156
|
+
attrs: `data-id="content"`,
|
|
157
|
+
tabHref: `${getProxyPath()}content`,
|
|
158
|
+
handleContainerClass: 'handle-btn-container',
|
|
159
|
+
tooltipHtml: await Badge.Render(buildBadgeToolTipMenuOption('content')),
|
|
160
|
+
})}
|
|
161
|
+
${await BtnIcon.Render({
|
|
162
|
+
class: 'in wfa main-btn-menu main-btn-cloud hide',
|
|
163
|
+
useMenuBtn: true,
|
|
164
|
+
label: renderMenuLabel({
|
|
165
|
+
icon: html`<img class="inl underpost-menu-icon" src="${getProxyPath()}assets/ui-icons/cloud.png" />`,
|
|
166
|
+
text: html`<span class="menu-label-text">${Translate.Render('cloud')}</span>`,
|
|
167
|
+
}),
|
|
168
|
+
attrs: `data-id="cloud"`,
|
|
169
|
+
tabHref: `${getProxyPath()}cloud`,
|
|
170
|
+
handleContainerClass: 'handle-btn-container',
|
|
171
|
+
tooltipHtml: await Badge.Render(buildBadgeToolTipMenuOption('cloud')),
|
|
172
|
+
})}
|
|
173
|
+
${await BtnIcon.Render({
|
|
174
|
+
class: 'in wfa main-btn-menu main-btn-settings',
|
|
175
|
+
useMenuBtn: true,
|
|
176
|
+
label: renderMenuLabel({
|
|
177
|
+
icon: html`<img class="inl underpost-menu-icon" src="${getProxyPath()}assets/ui-icons/settings.png" />`,
|
|
178
|
+
text: html`<span class="menu-label-text">${Translate.Render('settings')}</span>`,
|
|
179
|
+
}),
|
|
180
|
+
attrs: `data-id="settings"`,
|
|
181
|
+
tabHref: `${getProxyPath()}settings`,
|
|
182
|
+
handleContainerClass: 'handle-btn-container',
|
|
183
|
+
tooltipHtml: await Badge.Render(buildBadgeToolTipMenuOption('settings')),
|
|
184
|
+
})}
|
|
185
|
+
${await BtnIcon.Render({
|
|
186
|
+
class: 'in wfa main-btn-menu main-btn-recover hide',
|
|
187
|
+
useMenuBtn: true,
|
|
188
|
+
label: renderMenuLabel({
|
|
189
|
+
icon: html`<img class="inl underpost-menu-icon" src="${getProxyPath()}assets/ui-icons/update.png" />`,
|
|
190
|
+
text: html`<span class="menu-label-text">${Translate.Render('recover')}</span>`,
|
|
191
|
+
}),
|
|
192
|
+
attrs: `data-id="recover"`,
|
|
193
|
+
tabHref: `${getProxyPath()}recover`,
|
|
194
|
+
handleContainerClass: 'handle-btn-container',
|
|
195
|
+
tooltipHtml: await Badge.Render(buildBadgeToolTipMenuOption('recover')),
|
|
196
|
+
})}
|
|
197
|
+
${await BtnIcon.Render({
|
|
198
|
+
class: 'in wfa main-btn-menu main-btn-polyhedron',
|
|
199
|
+
useMenuBtn: true,
|
|
200
|
+
label: renderMenuLabel({
|
|
201
|
+
icon: html`<img class="inl underpost-menu-icon" src="${getProxyPath()}assets/ui-icons/polyhedron.png" />`,
|
|
202
|
+
text: html`<span class="menu-label-text">Polyhedron</span>`,
|
|
203
|
+
}),
|
|
204
|
+
attrs: `data-id="polyhedron"`,
|
|
205
|
+
tabHref: `${getProxyPath()}polyhedron`,
|
|
206
|
+
handleContainerClass: 'handle-btn-container',
|
|
207
|
+
tooltipHtml: await Badge.Render(buildBadgeToolTipMenuOption('polyhedron')),
|
|
208
|
+
})}
|
|
209
|
+
${await BtnIcon.Render({
|
|
210
|
+
class: 'in wfa main-btn-menu main-btn-github',
|
|
211
|
+
useMenuBtn: true,
|
|
212
|
+
label: renderMenuLabel({
|
|
213
|
+
icon: html`<img class="inl underpost-menu-icon" src="${getProxyPath()}assets/ui-icons/github.png" />`,
|
|
214
|
+
text: html`<span class="menu-label-text">${Translate.Render('github')}</span>`,
|
|
215
|
+
}),
|
|
216
|
+
attrs: `data-id="github"`,
|
|
217
|
+
tabHref: `https://github.com/underpostnet/`,
|
|
218
|
+
handleContainerClass: 'handle-btn-container',
|
|
219
|
+
tooltipHtml: await Badge.Render(buildBadgeToolTipMenuOption('github')),
|
|
220
|
+
})}
|
|
221
|
+
</div>
|
|
222
|
+
`,
|
|
223
|
+
barConfig: newInstance(barConfig),
|
|
224
|
+
title: BannerAppTemplate,
|
|
225
|
+
// titleClass: 'hide',
|
|
226
|
+
titleRender: () => {
|
|
227
|
+
return '';
|
|
228
|
+
},
|
|
229
|
+
mode: 'slide-menu',
|
|
230
|
+
RouterInstance,
|
|
231
|
+
searchCustomImgClass: 'underpost-menu-icon',
|
|
232
|
+
htmlMainBody: async () => {
|
|
233
|
+
// Create PanelForm instance first to get update function
|
|
234
|
+
const panelFormInstance = await PanelForm.instance({
|
|
235
|
+
idPanel: 'underpost-panel',
|
|
236
|
+
defaultUrlImage: `${getProxyPath()}assets/splash/apple-touch-icon-precomposed.png`,
|
|
237
|
+
Elements: ElementsUnderpost,
|
|
238
|
+
route: 'home',
|
|
239
|
+
share: {
|
|
240
|
+
copyLink: true,
|
|
241
|
+
copySourceMd: true,
|
|
242
|
+
},
|
|
243
|
+
showCreatorProfile: true,
|
|
244
|
+
});
|
|
245
|
+
|
|
246
|
+
// Register document search provider with SPA navigation and panel context
|
|
247
|
+
SearchBox.registerProvider({
|
|
248
|
+
...DocumentSearchProvider,
|
|
249
|
+
search: async (query, context) => {
|
|
250
|
+
// Add idPanel to context to filter documents by panel tag
|
|
251
|
+
return DocumentSearchProvider.search(query, {
|
|
252
|
+
...context,
|
|
253
|
+
idPanel: 'underpost-panel', // Filter documents by panel tag
|
|
254
|
+
});
|
|
255
|
+
},
|
|
256
|
+
onClick: (result, context) => {
|
|
257
|
+
DocumentSearchProvider.onClick(result, {
|
|
258
|
+
...context,
|
|
259
|
+
RouterInstance,
|
|
260
|
+
currentRoute: 'home',
|
|
261
|
+
updatePanel: PanelForm.Data['underpost-panel'].updatePanel,
|
|
262
|
+
});
|
|
263
|
+
},
|
|
264
|
+
});
|
|
265
|
+
|
|
266
|
+
// Inject and update document search styles with theme support
|
|
267
|
+
const updateDocumentSearchStyles = () => {
|
|
268
|
+
const styleId = 'document-search-provider-styles';
|
|
269
|
+
let styleTag = s(`#${styleId}`);
|
|
270
|
+
|
|
271
|
+
if (!styleTag) {
|
|
272
|
+
styleTag = document.createElement('style');
|
|
273
|
+
styleTag.id = styleId;
|
|
274
|
+
document.head.appendChild(styleTag);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
styleTag.textContent = DocumentSearchProvider.getStyles();
|
|
278
|
+
};
|
|
279
|
+
|
|
280
|
+
// Update SearchBox base styles
|
|
281
|
+
const updateSearchBoxBaseStyles = () => {
|
|
282
|
+
const baseStyleId = 'search-box-base-styles';
|
|
283
|
+
let baseStyleTag = s(`#${baseStyleId}`);
|
|
284
|
+
|
|
285
|
+
if (!baseStyleTag) {
|
|
286
|
+
baseStyleTag = document.createElement('style');
|
|
287
|
+
baseStyleTag.id = baseStyleId;
|
|
288
|
+
document.head.appendChild(baseStyleTag);
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
baseStyleTag.textContent = SearchBox.getBaseStyles();
|
|
292
|
+
};
|
|
293
|
+
|
|
294
|
+
// Initial style injection
|
|
295
|
+
updateDocumentSearchStyles();
|
|
296
|
+
updateSearchBoxBaseStyles();
|
|
297
|
+
|
|
298
|
+
// Register theme change handlers for dynamic styling
|
|
299
|
+
ThemeEvents['documentSearchStyles'] = () => {
|
|
300
|
+
updateDocumentSearchStyles();
|
|
301
|
+
updateSearchBoxBaseStyles();
|
|
302
|
+
};
|
|
303
|
+
|
|
304
|
+
return panelFormInstance;
|
|
305
|
+
},
|
|
306
|
+
});
|
|
307
|
+
|
|
308
|
+
ThemeEvents['underpost-main-theme-event'] = () => {
|
|
309
|
+
const srcLogo = darkTheme
|
|
310
|
+
? `${getProxyPath()}assets/ui-icons/underpost.png`
|
|
311
|
+
: `${getProxyPath()}assets/ui-icons/underpost.png`;
|
|
312
|
+
|
|
313
|
+
if (s('.action-btn-app-icon-render'))
|
|
314
|
+
htmls('.action-btn-app-icon-render', html`<img class="inl top-bar-app-icon" src="${srcLogo}" />`);
|
|
315
|
+
|
|
316
|
+
if (s(`.style-ssr-background-image`)) {
|
|
317
|
+
if (darkTheme) {
|
|
318
|
+
htmls(
|
|
319
|
+
`.style-ssr-background-image`,
|
|
320
|
+
css`
|
|
321
|
+
.ssr-background-image {
|
|
322
|
+
background: #191919;
|
|
323
|
+
}
|
|
324
|
+
`,
|
|
325
|
+
);
|
|
326
|
+
} else {
|
|
327
|
+
htmls(
|
|
328
|
+
`.style-ssr-background-image`,
|
|
329
|
+
css`
|
|
330
|
+
.ssr-background-image {
|
|
331
|
+
background: #e8e8e8;
|
|
332
|
+
}
|
|
333
|
+
`,
|
|
334
|
+
);
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
};
|
|
338
|
+
setTimeout(ThemeEvents['underpost-main-theme-event']);
|
|
339
|
+
|
|
340
|
+
this.Data[id].sortable = new Sortable(s(`.menu-btn-container`), {
|
|
341
|
+
animation: 150,
|
|
342
|
+
group: `menu-sortable`,
|
|
343
|
+
forceFallback: true,
|
|
344
|
+
fallbackOnBody: true,
|
|
345
|
+
handle: '.handle-btn-container',
|
|
346
|
+
store: {
|
|
347
|
+
/**
|
|
348
|
+
* Get the order of elements. Called once during initialization.
|
|
349
|
+
* @param {Sortable} sortable
|
|
350
|
+
* @returns {Array}
|
|
351
|
+
*/
|
|
352
|
+
get: function (sortable) {
|
|
353
|
+
const order = localStorage.getItem(sortable.options.group.name);
|
|
354
|
+
return order ? order.split('|') : [];
|
|
355
|
+
},
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* Save the order of elements. Called onEnd (when the item is dropped).
|
|
359
|
+
* @param {Sortable} sortable
|
|
360
|
+
*/
|
|
361
|
+
set: function (sortable) {
|
|
362
|
+
const order = sortable.toArray();
|
|
363
|
+
localStorage.setItem(sortable.options.group.name, order.join('|'));
|
|
364
|
+
},
|
|
365
|
+
},
|
|
366
|
+
// chosenClass: 'css-class',
|
|
367
|
+
// ghostClass: 'css-class',
|
|
368
|
+
// Element dragging ended
|
|
369
|
+
onEnd: function (/**Event*/ evt) {
|
|
370
|
+
// console.log('Sortable onEnd', evt);
|
|
371
|
+
// console.log('evt.oldIndex', evt.oldIndex);
|
|
372
|
+
// console.log('evt.newIndex', evt.newIndex);
|
|
373
|
+
const slotId = Array.from(evt.item.classList).pop();
|
|
374
|
+
// console.log('slotId', slotId);
|
|
375
|
+
if (evt.oldIndex === evt.newIndex) s(`.${slotId}`).click();
|
|
376
|
+
|
|
377
|
+
// var itemEl = evt.item; // dragged HTMLElement
|
|
378
|
+
// evt.to; // target list
|
|
379
|
+
// evt.from; // previous list
|
|
380
|
+
// evt.oldIndex; // element's old index within old parent
|
|
381
|
+
// evt.newIndex; // element's new index within new parent
|
|
382
|
+
// evt.oldDraggableIndex; // element's old index within old parent, only counting draggable elements
|
|
383
|
+
// evt.newDraggableIndex; // element's new index within new parent, only counting draggable elements
|
|
384
|
+
// evt.clone; // the clone element
|
|
385
|
+
// evt.pullMode; // when item is in another sortable: `"clone"` if cloning, `true` if moving
|
|
386
|
+
},
|
|
387
|
+
});
|
|
388
|
+
|
|
389
|
+
EventsUI.onClick(`.main-btn-sign-up`, async () => {
|
|
390
|
+
const { barConfig } = await Themes[Css.currentTheme]();
|
|
391
|
+
await Modal.Render({
|
|
392
|
+
id: 'modal-sign-up',
|
|
393
|
+
route: 'sign-up',
|
|
394
|
+
barConfig,
|
|
395
|
+
title: renderViewTitle({
|
|
396
|
+
icon: html`<img class="inl underpost-menu-icon-modal" src="${getProxyPath()}assets/ui-icons/sign-up.png" />`,
|
|
397
|
+
text: `<span class='inl underpost-text-title-modal'>${Translate.Render('sign-up')}</span>`,
|
|
398
|
+
}),
|
|
399
|
+
html: async () => await SignUp.Render({ idModal: 'modal-sign-up' }),
|
|
400
|
+
handleType: 'bar',
|
|
401
|
+
maximize: true,
|
|
402
|
+
mode: 'view',
|
|
403
|
+
slideMenu: 'modal-menu',
|
|
404
|
+
RouterInstance,
|
|
405
|
+
});
|
|
406
|
+
});
|
|
407
|
+
|
|
408
|
+
EventsUI.onClick(`.main-btn-log-out`, async () => {
|
|
409
|
+
const { barConfig } = await Themes[Css.currentTheme]();
|
|
410
|
+
await Modal.Render({
|
|
411
|
+
id: 'modal-log-out',
|
|
412
|
+
route: 'log-out',
|
|
413
|
+
barConfig,
|
|
414
|
+
title: renderViewTitle({
|
|
415
|
+
icon: html`<img class="inl underpost-menu-icon-modal" src="${getProxyPath()}assets/ui-icons/log-out.png" />`,
|
|
416
|
+
text: `<span class='inl underpost-text-title-modal'>${Translate.Render('log-out')}</span>`,
|
|
417
|
+
}),
|
|
418
|
+
html: async () => await LogOut.Render(),
|
|
419
|
+
handleType: 'bar',
|
|
420
|
+
maximize: true,
|
|
421
|
+
mode: 'view',
|
|
422
|
+
slideMenu: 'modal-menu',
|
|
423
|
+
RouterInstance,
|
|
424
|
+
});
|
|
425
|
+
});
|
|
426
|
+
|
|
427
|
+
EventsUI.onClick(`.main-btn-log-in`, async () => {
|
|
428
|
+
const { barConfig } = await Themes[Css.currentTheme]();
|
|
429
|
+
await Modal.Render({
|
|
430
|
+
id: 'modal-log-in',
|
|
431
|
+
route: 'log-in',
|
|
432
|
+
barConfig,
|
|
433
|
+
title: renderViewTitle({
|
|
434
|
+
icon: html`<img class="inl underpost-menu-icon-modal" src="${getProxyPath()}assets/ui-icons/log-in.png" />`,
|
|
435
|
+
text: `<span class='inl underpost-text-title-modal'>${Translate.Render('log-in')}</span>`,
|
|
436
|
+
}),
|
|
437
|
+
html: async () => await LogIn.Render(),
|
|
438
|
+
handleType: 'bar',
|
|
439
|
+
maximize: true,
|
|
440
|
+
mode: 'view',
|
|
441
|
+
slideMenu: 'modal-menu',
|
|
442
|
+
RouterInstance,
|
|
443
|
+
});
|
|
444
|
+
});
|
|
445
|
+
|
|
446
|
+
EventsUI.onClick(`.main-btn-lab-gallery`, async () => {
|
|
447
|
+
const { barConfig } = await Themes[Css.currentTheme]();
|
|
448
|
+
await Modal.Render({
|
|
449
|
+
id: 'modal-lab-gallery',
|
|
450
|
+
route: 'lab-gallery',
|
|
451
|
+
barConfig,
|
|
452
|
+
title: renderViewTitle({
|
|
453
|
+
icon: html`<img class="inl underpost-menu-icon-modal" src="${getProxyPath()}assets/ui-icons/gallery.png" />`,
|
|
454
|
+
text: `<span class='inl underpost-text-title-modal'>${Translate.Render('lab-gallery')}</span>`,
|
|
455
|
+
}),
|
|
456
|
+
html: async () => await LabGalleryUnderpost.Render(),
|
|
457
|
+
handleType: 'bar',
|
|
458
|
+
maximize: true,
|
|
459
|
+
mode: 'view',
|
|
460
|
+
slideMenu: 'modal-menu',
|
|
461
|
+
RouterInstance,
|
|
462
|
+
});
|
|
463
|
+
});
|
|
464
|
+
|
|
465
|
+
EventsUI.onClick(`.main-btn-contracultura-cyberpunk`, async () => {
|
|
466
|
+
const { barConfig } = await Themes[Css.currentTheme]();
|
|
467
|
+
await Modal.Render({
|
|
468
|
+
id: 'modal-contracultura-cyberpunk',
|
|
469
|
+
route: 'contracultura-cyberpunk',
|
|
470
|
+
barConfig,
|
|
471
|
+
title: renderViewTitle({
|
|
472
|
+
icon: html`<img class="inl underpost-menu-icon-modal" src="${getProxyPath()}assets/ui-icons/blogger.png" />`,
|
|
473
|
+
text: `<span class='inl underpost-text-title-modal'>${Translate.Render('contracultura-cyberpunk')}</span>`,
|
|
474
|
+
}),
|
|
475
|
+
html: async () => await CyberpunkBloggerUnderpost.Render(),
|
|
476
|
+
handleType: 'bar',
|
|
477
|
+
maximize: true,
|
|
478
|
+
mode: 'view',
|
|
479
|
+
slideMenu: 'modal-menu',
|
|
480
|
+
RouterInstance,
|
|
481
|
+
});
|
|
482
|
+
});
|
|
483
|
+
|
|
484
|
+
EventsUI.onClick(`.main-btn-account`, async () => {
|
|
485
|
+
const { barConfig } = await Themes[Css.currentTheme]();
|
|
486
|
+
await Modal.Render({
|
|
487
|
+
id: 'modal-account',
|
|
488
|
+
route: 'account',
|
|
489
|
+
barConfig,
|
|
490
|
+
title: renderViewTitle({
|
|
491
|
+
icon: html`<img class="inl underpost-menu-icon-modal" src="${getProxyPath()}assets/ui-icons/account.png" />`,
|
|
492
|
+
text: `<span class='inl underpost-text-title-modal'>${Translate.Render('account')}</span>`,
|
|
493
|
+
}),
|
|
494
|
+
html: async () =>
|
|
495
|
+
await Account.Render({
|
|
496
|
+
idModal: 'modal-account',
|
|
497
|
+
user: ElementsUnderpost.Data.user.main.model.user,
|
|
498
|
+
disabled: [],
|
|
499
|
+
}),
|
|
500
|
+
handleType: 'bar',
|
|
501
|
+
maximize: true,
|
|
502
|
+
mode: 'view',
|
|
503
|
+
slideMenu: 'modal-menu',
|
|
504
|
+
RouterInstance,
|
|
505
|
+
});
|
|
506
|
+
});
|
|
507
|
+
|
|
508
|
+
PublicProfile.Router();
|
|
509
|
+
|
|
510
|
+
EventsUI.onClick(`.main-btn-public-profile`, async () => {
|
|
511
|
+
const { barConfig } = await Themes[Css.currentTheme]();
|
|
512
|
+
const idModal = 'modal-public-profile';
|
|
513
|
+
const loggedInUser = ElementsUnderpost.Data.user.main.model.user;
|
|
514
|
+
|
|
515
|
+
// Determine the target username: prefer URL path/query over logged-in user
|
|
516
|
+
const usernameFromPath = extractUsernameFromPath();
|
|
517
|
+
const queryParams = getQueryParams();
|
|
518
|
+
const targetUsername = usernameFromPath || queryParams.cid || loggedInUser.username || null;
|
|
519
|
+
|
|
520
|
+
// Create user object with the target username for rendering
|
|
521
|
+
const targetUser = targetUsername ? { username: targetUsername } : loggedInUser;
|
|
522
|
+
|
|
523
|
+
// Check if modal already exists
|
|
524
|
+
const existingModal = s(`.${idModal}`);
|
|
525
|
+
if (existingModal) {
|
|
526
|
+
if (targetUsername) {
|
|
527
|
+
await PublicProfile.Update({
|
|
528
|
+
idModal: 'modal-public-profile',
|
|
529
|
+
user: { username: targetUsername },
|
|
530
|
+
});
|
|
531
|
+
return;
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
await Modal.Render({
|
|
536
|
+
id: idModal,
|
|
537
|
+
route: 'u',
|
|
538
|
+
barConfig,
|
|
539
|
+
title: '',
|
|
540
|
+
// renderViewTitle({
|
|
541
|
+
// icon: html`<i class="fas fa-user-circle"></i>`,
|
|
542
|
+
// text: Translate.Render('public-profile'),
|
|
543
|
+
// }),
|
|
544
|
+
html: async () =>
|
|
545
|
+
await PublicProfile.Render({
|
|
546
|
+
idModal,
|
|
547
|
+
user: targetUser,
|
|
548
|
+
}),
|
|
549
|
+
handleType: 'bar',
|
|
550
|
+
maximize: true,
|
|
551
|
+
mode: 'view',
|
|
552
|
+
slideMenu: 'modal-menu',
|
|
553
|
+
RouterInstance,
|
|
554
|
+
observer: true,
|
|
555
|
+
});
|
|
556
|
+
});
|
|
557
|
+
|
|
558
|
+
EventsUI.onClick(`.main-btn-settings`, async () => {
|
|
559
|
+
const { barConfig } = await Themes[Css.currentTheme]();
|
|
560
|
+
await Modal.Render({
|
|
561
|
+
id: 'modal-settings',
|
|
562
|
+
route: 'settings',
|
|
563
|
+
barConfig,
|
|
564
|
+
title: renderViewTitle({
|
|
565
|
+
icon: html`<img class="inl underpost-menu-icon-modal" src="${getProxyPath()}assets/ui-icons/settings.png" />`,
|
|
566
|
+
text: `<span class='inl underpost-text-title-modal'>${Translate.Render('settings')}</span>`,
|
|
567
|
+
}),
|
|
568
|
+
html: async () => await SettingsUnderpost.Render({ idModal: 'modal-settings' }),
|
|
569
|
+
handleType: 'bar',
|
|
570
|
+
maximize: true,
|
|
571
|
+
mode: 'view',
|
|
572
|
+
slideMenu: 'modal-menu',
|
|
573
|
+
RouterInstance,
|
|
574
|
+
});
|
|
575
|
+
});
|
|
576
|
+
|
|
577
|
+
EventsUI.onClick(`.main-btn-content`, async () => {
|
|
578
|
+
let subModalId = '';
|
|
579
|
+
const path =
|
|
580
|
+
location.pathname[location.pathname.length - 1] === '/' ? location.pathname.slice(0, -1) : location.pathname;
|
|
581
|
+
|
|
582
|
+
if (path.split('/').pop() === 'content' && getQueryParams().cid) {
|
|
583
|
+
subModalId = `-${getQueryParams().cid}`;
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
const { barConfig } = await Themes[Css.currentTheme]();
|
|
587
|
+
await Modal.Render({
|
|
588
|
+
id: `modal-content${subModalId}`,
|
|
589
|
+
route: 'content',
|
|
590
|
+
barConfig,
|
|
591
|
+
title: renderViewTitle({
|
|
592
|
+
icon: html`<img class="inl underpost-menu-icon-modal" src="${getProxyPath()}assets/ui-icons/doc.png" />`,
|
|
593
|
+
text: `<span class='inl underpost-text-title-modal'>${Translate.Render('content')}</span>`,
|
|
594
|
+
}),
|
|
595
|
+
html: async () =>
|
|
596
|
+
await Content.Render({
|
|
597
|
+
idModal: `modal-content${subModalId}`,
|
|
598
|
+
titleIcon: html`<img
|
|
599
|
+
class="inl underpost-menu-icon-modal"
|
|
600
|
+
src="${getProxyPath()}assets/ui-icons/doc.png"
|
|
601
|
+
/>`,
|
|
602
|
+
}),
|
|
603
|
+
query: true,
|
|
604
|
+
observer: true,
|
|
605
|
+
handleType: 'bar',
|
|
606
|
+
maximize: true,
|
|
607
|
+
mode: 'view',
|
|
608
|
+
slideMenu: 'modal-menu',
|
|
609
|
+
RouterInstance,
|
|
610
|
+
});
|
|
611
|
+
});
|
|
612
|
+
|
|
613
|
+
EventsUI.onClick(`.main-btn-cloud`, async () => {
|
|
614
|
+
const { barConfig } = await Themes[Css.currentTheme]();
|
|
615
|
+
await Modal.Render({
|
|
616
|
+
id: 'modal-cloud',
|
|
617
|
+
route: 'cloud',
|
|
618
|
+
barConfig,
|
|
619
|
+
title: renderViewTitle({
|
|
620
|
+
icon: html`<img class="inl underpost-menu-icon-modal" src="${getProxyPath()}assets/ui-icons/cloud.png" />`,
|
|
621
|
+
text: `<span class='inl underpost-text-title-modal'>${Translate.Render('cloud')}</span>`,
|
|
622
|
+
}),
|
|
623
|
+
html: async () => await FileExplorer.Render({ idModal: 'modal-cloud' }),
|
|
624
|
+
handleType: 'bar',
|
|
625
|
+
maximize: true,
|
|
626
|
+
mode: 'view',
|
|
627
|
+
slideMenu: 'modal-menu',
|
|
628
|
+
RouterInstance,
|
|
629
|
+
});
|
|
630
|
+
});
|
|
631
|
+
|
|
632
|
+
EventsUI.onClick(`.main-btn-recover`, async () => {
|
|
633
|
+
const { barConfig } = await Themes[Css.currentTheme]();
|
|
634
|
+
await Modal.Render({
|
|
635
|
+
id: 'modal-recover',
|
|
636
|
+
route: 'recover',
|
|
637
|
+
barConfig,
|
|
638
|
+
title: renderViewTitle({
|
|
639
|
+
icon: html`<img class="inl underpost-menu-icon-modal" src="${getProxyPath()}assets/ui-icons/update.png" />`,
|
|
640
|
+
text: `<span class='inl underpost-text-title-modal'>${Translate.Render('recover')}</span>`,
|
|
641
|
+
}),
|
|
642
|
+
html: async () =>
|
|
643
|
+
await Recover.Render({ idModal: 'modal-recover', user: ElementsUnderpost.Data.user.main.model.user }),
|
|
644
|
+
handleType: 'bar',
|
|
645
|
+
maximize: true,
|
|
646
|
+
mode: 'view',
|
|
647
|
+
slideMenu: 'modal-menu',
|
|
648
|
+
RouterInstance,
|
|
649
|
+
});
|
|
650
|
+
});
|
|
651
|
+
|
|
652
|
+
EventsUI.onClick(`.main-btn-polyhedron`, async () => {
|
|
653
|
+
const { barConfig } = await Themes[Css.currentTheme]();
|
|
654
|
+
await Modal.Render({
|
|
655
|
+
id: 'modal-polyhedron',
|
|
656
|
+
route: 'polyhedron',
|
|
657
|
+
barConfig,
|
|
658
|
+
title: renderViewTitle({
|
|
659
|
+
icon: html`<img
|
|
660
|
+
class="inl underpost-menu-icon-modal"
|
|
661
|
+
src="${getProxyPath()}assets/ui-icons/polyhedron.png"
|
|
662
|
+
/>`,
|
|
663
|
+
text: `<span class='inl underpost-text-title-modal'>Polyhedron</span>`,
|
|
664
|
+
}),
|
|
665
|
+
html: async () =>
|
|
666
|
+
await Polyhedron.Render({
|
|
667
|
+
idModal: 'modal-polyhedron',
|
|
668
|
+
style: {
|
|
669
|
+
scene: { background: '#111' },
|
|
670
|
+
face: {
|
|
671
|
+
background: 'rgba(255,255,255,.08)',
|
|
672
|
+
border: '1px solid rgba(255,255,255,.18)',
|
|
673
|
+
color: '#fff',
|
|
674
|
+
},
|
|
675
|
+
},
|
|
676
|
+
}),
|
|
677
|
+
handleType: 'bar',
|
|
678
|
+
maximize: true,
|
|
679
|
+
mode: 'view',
|
|
680
|
+
slideMenu: 'modal-menu',
|
|
681
|
+
RouterInstance,
|
|
682
|
+
});
|
|
683
|
+
});
|
|
684
|
+
|
|
685
|
+
EventsUI.onClick(`.main-btn-github`, async () => {
|
|
686
|
+
location.href = `https://github.com/underpostnet/pwa-microservices-template/`;
|
|
687
|
+
});
|
|
688
|
+
},
|
|
689
|
+
};
|
|
690
|
+
|
|
691
|
+
export { MenuUnderpost };
|