underpost 2.7.6 → 2.7.8
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/.github/workflows/ghpkg.yml +75 -0
- package/.github/workflows/publish.yml +33 -1
- package/.github/workflows/pwa-microservices-template.test.yml +30 -0
- package/CHANGELOG.md +16 -32
- package/bin/deploy.js +15 -8
- package/bin/index.js +1 -1
- package/docker-compose.yml +1 -1
- package/package.json +1 -1
- package/src/client/components/core/Css.js +5 -223
- package/src/client/components/core/Docs.js +1 -1
- package/src/client/components/core/LoadingAnimation.js +6 -7
- package/src/client/components/core/Translate.js +11 -2
- package/src/client/components/core/VanillaJs.js +3 -0
- package/src/client/components/core/Worker.js +14 -4
- package/src/client/services/default/default.management.js +118 -120
- package/src/client/ssr/Render.js +224 -3
- package/src/client/ssr/common/Alert.js +75 -0
- package/src/client/ssr/common/SsrCore.js +91 -0
- package/src/client/ssr/common/Translate.js +26 -0
- package/src/client/ssr/common/Worker.js +28 -0
- package/src/client/ssr/{body-components → components/body}/CacheControl.js +1 -1
- package/src/client/ssr/{body-components → components/body}/DefaultSplashScreen.js +15 -4
- package/src/client/ssr/offline/default.index.js +31 -0
- package/src/client/ssr/pages/404.js +12 -0
- package/src/client/ssr/pages/500.js +12 -0
- package/src/client/sw/default.sw.js +11 -9
- package/src/cron.js +7 -2
- package/src/db/mongo/MongooseDB.js +0 -12
- package/src/mailer/EmailRender.js +1 -1
- package/src/server/backup.js +29 -22
- package/src/server/client-build-live.js +28 -2
- package/src/server/client-build.js +146 -24
- package/src/server/client-formatted.js +11 -1
- package/src/server/client-icons.js +1 -1
- package/src/server/conf.js +11 -17
- package/src/server/cron.js +35 -0
- package/src/server/dns.js +3 -12
- package/src/server/runtime.js +24 -7
- package/.github/workflows/test.yml +0 -80
- package/src/client/ssr/head-components/Microdata.js +0 -11
- package/src/client/ssr/head-components/Production.js +0 -1
- package/src/client/ssr/head-components/Seo.js +0 -14
- /package/src/client/ssr/{email-components → components/email}/DefaultRecoverEmail.js +0 -0
- /package/src/client/ssr/{email-components → components/email}/DefaultVerifyEmail.js +0 -0
- /package/src/client/ssr/{head-components → components/head}/Css.js +0 -0
- /package/src/client/ssr/{head-components → components/head}/DefaultScripts.js +0 -0
- /package/src/client/ssr/{head-components → components/head}/PwaDefault.js +0 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
name: Update github repo package
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches: ['master']
|
|
5
|
+
pull_request:
|
|
6
|
+
branches: ['master']
|
|
7
|
+
permissions:
|
|
8
|
+
contents: write
|
|
9
|
+
packages: write
|
|
10
|
+
id-token: write
|
|
11
|
+
jobs:
|
|
12
|
+
test:
|
|
13
|
+
if: github.repository == 'underpostnet/pwa-microservices-template'
|
|
14
|
+
name: Update github repo package Jobs
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
permissions:
|
|
17
|
+
contents: write
|
|
18
|
+
packages: write
|
|
19
|
+
id-token: write
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v3
|
|
22
|
+
- uses: actions/setup-node@v4
|
|
23
|
+
with:
|
|
24
|
+
node-version: '22.x'
|
|
25
|
+
|
|
26
|
+
# - name: Get npm root
|
|
27
|
+
# run: sudo npm root -g
|
|
28
|
+
|
|
29
|
+
# - run: npm ci
|
|
30
|
+
|
|
31
|
+
# - name: Install underpost cli
|
|
32
|
+
# run: sudo npm install -g underpost
|
|
33
|
+
|
|
34
|
+
# usage: git remote set-url [--push] <name> <newurl> [<oldurl>]
|
|
35
|
+
# or: git remote set-url --add <name> <newurl>
|
|
36
|
+
# or: git remote set-url --delete <name> <url>
|
|
37
|
+
# --[no-]push manipulate push URLs
|
|
38
|
+
# --[no-]add add URL
|
|
39
|
+
# --[no-]delete delete URLs
|
|
40
|
+
|
|
41
|
+
- name: Install dependencies and set repo configuration
|
|
42
|
+
run: |
|
|
43
|
+
npm install
|
|
44
|
+
node ./bin/deploy rename-package @underpostnet/underpost
|
|
45
|
+
node ./bin/deploy set-repo underpostnet/pwa-microservices-template-ghpkg
|
|
46
|
+
|
|
47
|
+
- name: Clone github package repository
|
|
48
|
+
run: |
|
|
49
|
+
git clone https://github.com/underpostnet/pwa-microservices-template-ghpkg.git
|
|
50
|
+
rm -rf ./.git
|
|
51
|
+
cp -a ./pwa-microservices-template-ghpkg/.git ./.git
|
|
52
|
+
rm -rf ./pwa-microservices-template-ghpkg
|
|
53
|
+
|
|
54
|
+
- name: Set git credentials
|
|
55
|
+
run: |
|
|
56
|
+
git config --global credential.helper ""
|
|
57
|
+
git config credential.helper ""
|
|
58
|
+
git config --global user.name 'underpostnet'
|
|
59
|
+
git config --global user.email 'fcoverdugoa@underpost.net'
|
|
60
|
+
git config --global credential.interactive always
|
|
61
|
+
git config user.name 'underpostnet'
|
|
62
|
+
git config user.email 'fcoverdugoa@underpost.net'
|
|
63
|
+
git config credential.interactive always
|
|
64
|
+
|
|
65
|
+
- name: Push to github package repository
|
|
66
|
+
run: |
|
|
67
|
+
pwd
|
|
68
|
+
git status
|
|
69
|
+
git remote set-url origin git@github.com:underpostnet/pwa-microservices-template-ghpkg.git
|
|
70
|
+
git add .
|
|
71
|
+
git commit -m "Update github repo package"
|
|
72
|
+
git push https://${{ secrets.GIT_AUTH_TOKEN }}@github.com/underpostnet/pwa-microservices-template-ghpkg.git
|
|
73
|
+
|
|
74
|
+
# git push -u origin https://${{ secrets.GIT_AUTH_TOKEN }}@github.com/underpostnet/pwa-microservices-template-ghpkg.git
|
|
75
|
+
# git push -u origin master
|
|
@@ -34,6 +34,39 @@ jobs:
|
|
|
34
34
|
name: Publish to npm
|
|
35
35
|
run: npm publish --provenance --access public
|
|
36
36
|
|
|
37
|
+
- name: Clone github package repository
|
|
38
|
+
run: |
|
|
39
|
+
git clone https://github.com/underpostnet/pwa-microservices-template-ghpkg.git
|
|
40
|
+
rm -rf ./.git
|
|
41
|
+
cp -a ./pwa-microservices-template-ghpkg/.git ./.git
|
|
42
|
+
rm -rf ./pwa-microservices-template-ghpkg
|
|
43
|
+
node ./bin/deploy rename-package @underpostnet/underpost
|
|
44
|
+
node ./bin/deploy set-repo underpostnet/pwa-microservices-template-ghpkg
|
|
45
|
+
|
|
46
|
+
- name: Set git credentials
|
|
47
|
+
run: |
|
|
48
|
+
git config --global credential.helper ""
|
|
49
|
+
git config credential.helper ""
|
|
50
|
+
git config --global user.name 'underpostnet'
|
|
51
|
+
git config --global user.email 'fcoverdugoa@underpost.net'
|
|
52
|
+
git config --global credential.interactive always
|
|
53
|
+
git config user.name 'underpostnet'
|
|
54
|
+
git config user.email 'fcoverdugoa@underpost.net'
|
|
55
|
+
git config credential.interactive always
|
|
56
|
+
|
|
57
|
+
# Publish to npm git hub package
|
|
58
|
+
- uses: actions/setup-node@v4
|
|
59
|
+
with:
|
|
60
|
+
node-version: '22.x'
|
|
61
|
+
registry-url: 'https://registry.npmjs.org'
|
|
62
|
+
# Defaults to the user or organization that owns the workflow file
|
|
63
|
+
scope: '@underpostnet'
|
|
64
|
+
- env:
|
|
65
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
66
|
+
name: Publish to npm
|
|
67
|
+
run: |
|
|
68
|
+
npm publish --provenance --access public
|
|
69
|
+
|
|
37
70
|
# Publish to GitHub Packages
|
|
38
71
|
- name: Setup node to publish to GitHub Packages
|
|
39
72
|
uses: actions/setup-node@v4
|
|
@@ -44,7 +77,6 @@ jobs:
|
|
|
44
77
|
scope: '@underpostnet'
|
|
45
78
|
|
|
46
79
|
- run: |
|
|
47
|
-
node ./bin/deploy rename-package @underpostnet/underpost
|
|
48
80
|
npm config set //npm.pkg.github.com/:_authToken=${{ secrets.GIT_AUTH_TOKEN }}
|
|
49
81
|
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GIT_AUTH_TOKEN }}" > ~/.npmrc
|
|
50
82
|
echo "@underposnet:registry=https://npm.pkg.github.com" >> ~/.npmrc
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
name: Test
|
|
2
|
+
on: [push]
|
|
3
|
+
jobs:
|
|
4
|
+
test:
|
|
5
|
+
if: (github.repository == 'underpostnet/pwa-microservices-template') || (github.repository == 'underpostnet/pwa-microservices-template-ghpkg')
|
|
6
|
+
name: Node ${{ matrix.node }} on ${{ matrix.os }}
|
|
7
|
+
runs-on: ${{ matrix.os }}
|
|
8
|
+
strategy:
|
|
9
|
+
matrix:
|
|
10
|
+
node-version: [21.x]
|
|
11
|
+
os: [ubuntu-latest]
|
|
12
|
+
# os: [ubuntu-latest, windows-latest]
|
|
13
|
+
|
|
14
|
+
steps:
|
|
15
|
+
- name: Clone repository
|
|
16
|
+
uses: actions/checkout@v3
|
|
17
|
+
|
|
18
|
+
- name: Set Node.js version
|
|
19
|
+
uses: actions/setup-node@v3
|
|
20
|
+
with:
|
|
21
|
+
node-version: ${{ matrix.node }}
|
|
22
|
+
|
|
23
|
+
- name: Get npm root
|
|
24
|
+
run: sudo npm root -g
|
|
25
|
+
|
|
26
|
+
- name: Install underpost cli
|
|
27
|
+
run: sudo npm install -g underpost
|
|
28
|
+
|
|
29
|
+
- name: Run test
|
|
30
|
+
run: sudo underpost test
|
package/CHANGELOG.md
CHANGED
|
@@ -4,50 +4,34 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
4
4
|
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
6
6
|
|
|
7
|
-
#### [v2.7.2](https://github.com/underpostnet/
|
|
7
|
+
#### [v2.7.2](https://github.com/underpostnet/pwa-microservices-template/compare/v2.7.1...v2.7.2)
|
|
8
8
|
|
|
9
9
|
> 8 October 2024
|
|
10
10
|
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
11
|
+
- update src v2.7.2 [`12f3b14`](https://github.com/underpostnet/pwa-microservices-template/commit/12f3b14af0170f3a9e1ae1d341a586a2852f6056)
|
|
12
|
+
- add npm publish workflow [`843623a`](https://github.com/underpostnet/pwa-microservices-template/commit/843623a582bb00bf16ef167b420f325540fc5327)
|
|
13
|
+
- publish yml update [`dc5593b`](https://github.com/underpostnet/pwa-microservices-template/commit/dc5593bb4f480d24b81cf24045c24626542bfee9)
|
|
14
14
|
|
|
15
|
-
#### [v2.7.1](https://github.com/underpostnet/
|
|
15
|
+
#### [v2.7.1](https://github.com/underpostnet/pwa-microservices-template/compare/v2.6.3...v2.7.1)
|
|
16
16
|
|
|
17
17
|
> 19 September 2024
|
|
18
18
|
|
|
19
|
-
-
|
|
20
|
-
- update [`
|
|
21
|
-
-
|
|
19
|
+
- add backup, dns and prompt-optimizer base [`507669e`](https://github.com/underpostnet/pwa-microservices-template/commit/507669e2f1c9b4145643cbac583762eb91b1d18d)
|
|
20
|
+
- update version 2.6.8 [`3d765bf`](https://github.com/underpostnet/pwa-microservices-template/commit/3d765bfa6f06866ce46260d2e4af4432c91f072f)
|
|
21
|
+
- update version batch 2.6.4 [`fd4fed5`](https://github.com/underpostnet/pwa-microservices-template/commit/fd4fed55f2bbac1a9d4760e804ed6b7f4cde1272)
|
|
22
22
|
|
|
23
|
-
#### [v2.6.3](https://github.com/underpostnet/
|
|
23
|
+
#### [v2.6.3](https://github.com/underpostnet/pwa-microservices-template/compare/v2.6.2...v2.6.3)
|
|
24
24
|
|
|
25
25
|
> 14 September 2024
|
|
26
26
|
|
|
27
|
-
- update version 2.6.3 [`
|
|
28
|
-
- update
|
|
29
|
-
- update [`
|
|
27
|
+
- update version 2.6.3 [`c8f6f8e`](https://github.com/underpostnet/pwa-microservices-template/commit/c8f6f8ec31470eff977163c5b31be37a05ff96ba)
|
|
28
|
+
- update [`7214fbb`](https://github.com/underpostnet/pwa-microservices-template/commit/7214fbb608f7f59c6bf8e189093fd9c7e9a5a80a)
|
|
29
|
+
- update [`b99c869`](https://github.com/underpostnet/pwa-microservices-template/commit/b99c8697e96a5141b15f0d28386ba29871746825)
|
|
30
30
|
|
|
31
|
-
####
|
|
31
|
+
#### v2.6.2
|
|
32
32
|
|
|
33
33
|
> 13 September 2024
|
|
34
34
|
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
-
- update [`
|
|
38
|
-
|
|
39
|
-
#### [v2.5.1](https://github.com/underpostnet/engine/compare/v2.0.0...v2.5.1)
|
|
40
|
-
|
|
41
|
-
> 27 August 2024
|
|
42
|
-
|
|
43
|
-
- css refactor [`49b1904`](https://github.com/underpostnet/engine/commit/49b1904e83162f9066fbf843ced37d4e87db5581)
|
|
44
|
-
- refactor [`dad4f95`](https://github.com/underpostnet/engine/commit/dad4f9567629b737254702ce8be6b243e68fb01e)
|
|
45
|
-
- add sitemap builder [`53d05a6`](https://github.com/underpostnet/engine/commit/53d05a62d03ea327df3d37181a4b5c272d417289)
|
|
46
|
-
|
|
47
|
-
#### v2.0.0
|
|
48
|
-
|
|
49
|
-
> 30 March 2024
|
|
50
|
-
|
|
51
|
-
- seed-city assets [`6d9decb`](https://github.com/underpostnet/engine/commit/6d9decbae96b828aa001777f96dd75aab3fc71d1)
|
|
52
|
-
- update [`1069fc5`](https://github.com/underpostnet/engine/commit/1069fc5268aa5ef7c101695393de59edfc14daf8)
|
|
53
|
-
- update [`41ae7d4`](https://github.com/underpostnet/engine/commit/41ae7d4c969cce0608171c820e05ebab42610a7f)
|
|
35
|
+
- add Base project [`4124a60`](https://github.com/underpostnet/pwa-microservices-template/commit/4124a601a8226587bb09db942a8e33b1486828ea)
|
|
36
|
+
- set 0.0.1 env template version [`e38a062`](https://github.com/underpostnet/pwa-microservices-template/commit/e38a06281599a2138d3564ae4ed70f61dad55f88)
|
|
37
|
+
- update dependabot security [`b6f221a`](https://github.com/underpostnet/pwa-microservices-template/commit/b6f221aecae1e00723c15f726ac1bff60199b10b)
|
package/bin/deploy.js
CHANGED
|
@@ -20,7 +20,6 @@ import {
|
|
|
20
20
|
cloneSrcComponents,
|
|
21
21
|
getDeployGroupId,
|
|
22
22
|
deployRun,
|
|
23
|
-
updateSrc,
|
|
24
23
|
getDataDeploy,
|
|
25
24
|
buildReplicaId,
|
|
26
25
|
Cmd,
|
|
@@ -150,7 +149,6 @@ try {
|
|
|
150
149
|
deployGroupId,
|
|
151
150
|
});
|
|
152
151
|
if (fs.existsSync(`./tmp/await-deploy`)) fs.remove(`./tmp/await-deploy`);
|
|
153
|
-
updateSrc();
|
|
154
152
|
await deployRun(dataDeploy);
|
|
155
153
|
} else {
|
|
156
154
|
loadConf(process.argv[3]);
|
|
@@ -295,7 +293,6 @@ try {
|
|
|
295
293
|
case 'run-macro':
|
|
296
294
|
{
|
|
297
295
|
if (fs.existsSync(`./tmp/await-deploy`)) fs.remove(`./tmp/await-deploy`);
|
|
298
|
-
updateSrc();
|
|
299
296
|
const dataDeploy = getDataDeploy({ deployGroupId: process.argv[3], buildSingleReplica: true });
|
|
300
297
|
await deployRun(dataDeploy, true);
|
|
301
298
|
}
|
|
@@ -304,7 +301,6 @@ try {
|
|
|
304
301
|
case 'run-macro-build':
|
|
305
302
|
{
|
|
306
303
|
if (fs.existsSync(`./tmp/await-deploy`)) fs.remove(`./tmp/await-deploy`);
|
|
307
|
-
updateSrc();
|
|
308
304
|
const dataDeploy = getDataDeploy({ deployGroupId: process.argv[3], buildSingleReplica: true });
|
|
309
305
|
for (const deploy of dataDeploy) {
|
|
310
306
|
shellExec(Cmd.conf(deploy.deployId));
|
|
@@ -506,6 +502,17 @@ try {
|
|
|
506
502
|
break;
|
|
507
503
|
}
|
|
508
504
|
|
|
505
|
+
case 'set-repo': {
|
|
506
|
+
const originPackage = JSON.parse(fs.readFileSync(`./package.json`, 'utf8'));
|
|
507
|
+
originPackage.repository = {
|
|
508
|
+
type: 'git',
|
|
509
|
+
url: `git+https://github.com/${process.argv[3]}.git`,
|
|
510
|
+
};
|
|
511
|
+
fs.writeFileSync(`./package.json`, JSON.stringify(originPackage, null, 4), 'utf8');
|
|
512
|
+
|
|
513
|
+
break;
|
|
514
|
+
}
|
|
515
|
+
|
|
509
516
|
case 'update-version':
|
|
510
517
|
{
|
|
511
518
|
const newVersion = process.argv[3];
|
|
@@ -557,9 +564,9 @@ try {
|
|
|
557
564
|
);
|
|
558
565
|
|
|
559
566
|
fs.writeFileSync(
|
|
560
|
-
`./src/client/ssr/
|
|
567
|
+
`./src/client/ssr/components/body/CacheControl.js`,
|
|
561
568
|
fs
|
|
562
|
-
.readFileSync(`./src/client/ssr/
|
|
569
|
+
.readFileSync(`./src/client/ssr/components/body/CacheControl.js`, 'utf8')
|
|
563
570
|
.replaceAll(`v${version}`, `v${newVersion}`),
|
|
564
571
|
'utf8',
|
|
565
572
|
);
|
|
@@ -570,8 +577,8 @@ try {
|
|
|
570
577
|
'utf8',
|
|
571
578
|
);
|
|
572
579
|
|
|
573
|
-
|
|
574
|
-
|
|
580
|
+
shellExec(`node bin/deploy update-package`);
|
|
581
|
+
shellExec(`auto-changelog`);
|
|
575
582
|
}
|
|
576
583
|
break;
|
|
577
584
|
|
package/bin/index.js
CHANGED
package/docker-compose.yml
CHANGED
package/package.json
CHANGED
|
@@ -31,228 +31,6 @@ const Css = {
|
|
|
31
31
|
Init: async function (options) {
|
|
32
32
|
if (!options) options = ThemesScope[0];
|
|
33
33
|
const { theme } = options;
|
|
34
|
-
append(
|
|
35
|
-
'body',
|
|
36
|
-
html`
|
|
37
|
-
<style>
|
|
38
|
-
html {
|
|
39
|
-
scroll-behavior: smooth;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
body {
|
|
43
|
-
/* overscroll-behavior: contain; */
|
|
44
|
-
/* box-sizing: border-box; */
|
|
45
|
-
padding: 0px;
|
|
46
|
-
margin: 0px;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.fl {
|
|
50
|
-
position: relative;
|
|
51
|
-
display: flow-root;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.abs,
|
|
55
|
-
.in {
|
|
56
|
-
display: block;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.fll {
|
|
60
|
-
float: left;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.flr {
|
|
64
|
-
float: right;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.abs {
|
|
68
|
-
position: absolute;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.in,
|
|
72
|
-
.inl {
|
|
73
|
-
position: relative;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.inl {
|
|
77
|
-
display: inline-table;
|
|
78
|
-
display: -webkit-inline-table;
|
|
79
|
-
display: -moz-inline-table;
|
|
80
|
-
display: -ms-inline-table;
|
|
81
|
-
display: -o-inline-table;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.fix {
|
|
85
|
-
position: fixed;
|
|
86
|
-
display: block;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.stq {
|
|
90
|
-
position: sticky;
|
|
91
|
-
/* require defined at least top, bottom, left o right */
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.wfa {
|
|
95
|
-
width: available;
|
|
96
|
-
width: -webkit-available;
|
|
97
|
-
width: -moz-available;
|
|
98
|
-
width: -ms-available;
|
|
99
|
-
width: -o-available;
|
|
100
|
-
|
|
101
|
-
width: fill-available;
|
|
102
|
-
width: -webkit-fill-available;
|
|
103
|
-
width: -moz-fill-available;
|
|
104
|
-
width: -ms-fill-available;
|
|
105
|
-
width: -o-fill-available;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.wft {
|
|
109
|
-
width: fit-content;
|
|
110
|
-
width: -webkit-fit-content;
|
|
111
|
-
width: -moz-fit-content;
|
|
112
|
-
width: -ms-fit-content;
|
|
113
|
-
width: -o-fit-content;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.wfm {
|
|
117
|
-
width: max-content;
|
|
118
|
-
width: -webkit-max-content;
|
|
119
|
-
width: -moz-max-content;
|
|
120
|
-
width: -ms-max-content;
|
|
121
|
-
width: -o-max-content;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
.negative-color {
|
|
125
|
-
filter: invert(1);
|
|
126
|
-
-webkit-filter: invert(1);
|
|
127
|
-
-moz-filter: invert(1);
|
|
128
|
-
-ms-filter: invert(1);
|
|
129
|
-
-o-filter: invert(1);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.no-drag {
|
|
133
|
-
user-drag: none;
|
|
134
|
-
-webkit-user-drag: none;
|
|
135
|
-
-moz-user-drag: none;
|
|
136
|
-
-ms-user-drag: none;
|
|
137
|
-
-o-user-drag: none;
|
|
138
|
-
user-select: none;
|
|
139
|
-
-webkit-user-select: none;
|
|
140
|
-
-moz-user-select: none;
|
|
141
|
-
-ms-user-select: none;
|
|
142
|
-
-o-user-select: none;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.center {
|
|
146
|
-
transform: translate(-50%, -50%);
|
|
147
|
-
top: 50%;
|
|
148
|
-
left: 50%;
|
|
149
|
-
width: 100%;
|
|
150
|
-
text-align: center;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
input {
|
|
154
|
-
outline: none !important;
|
|
155
|
-
border: none;
|
|
156
|
-
padding-block: 0;
|
|
157
|
-
padding-inline: 0;
|
|
158
|
-
}
|
|
159
|
-
input::file-selector-button {
|
|
160
|
-
outline: none !important;
|
|
161
|
-
border: none;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
.hide {
|
|
165
|
-
display: none !important;
|
|
166
|
-
}
|
|
167
|
-
/*
|
|
168
|
-
|
|
169
|
-
placeholder
|
|
170
|
-
|
|
171
|
-
*/
|
|
172
|
-
|
|
173
|
-
::placeholder {
|
|
174
|
-
color: black;
|
|
175
|
-
opacity: 1;
|
|
176
|
-
/* Firefox */
|
|
177
|
-
background: none;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
:-ms-input-placeholder {
|
|
181
|
-
/* Internet Explorer 10-11 */
|
|
182
|
-
color: black;
|
|
183
|
-
background: none;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
::-ms-input-placeholder {
|
|
187
|
-
/* Microsoft Edge */
|
|
188
|
-
color: black;
|
|
189
|
-
background: none;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
/*
|
|
193
|
-
|
|
194
|
-
selection
|
|
195
|
-
|
|
196
|
-
*/
|
|
197
|
-
|
|
198
|
-
::-moz-selection {
|
|
199
|
-
/* Code for Firefox */
|
|
200
|
-
color: black;
|
|
201
|
-
background: rgb(208, 208, 208);
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
::selection {
|
|
205
|
-
color: black;
|
|
206
|
-
background: rgb(208, 208, 208);
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
.lowercase {
|
|
210
|
-
text-transform: lowercase;
|
|
211
|
-
}
|
|
212
|
-
.uppercase {
|
|
213
|
-
text-transform: uppercase;
|
|
214
|
-
}
|
|
215
|
-
.capitalize {
|
|
216
|
-
text-transform: capitalize;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
.bold {
|
|
220
|
-
font-weight: bold;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
.m {
|
|
224
|
-
font-family: monospace;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
.gray {
|
|
228
|
-
filter: grayscale(1);
|
|
229
|
-
}
|
|
230
|
-
</style>
|
|
231
|
-
<div class="session">
|
|
232
|
-
<style>
|
|
233
|
-
.session-in-log-out {
|
|
234
|
-
display: block;
|
|
235
|
-
}
|
|
236
|
-
.session-inl-log-out {
|
|
237
|
-
display: inline-table;
|
|
238
|
-
}
|
|
239
|
-
.session-fl-log-out {
|
|
240
|
-
display: flow-root;
|
|
241
|
-
}
|
|
242
|
-
.session-in-log-in {
|
|
243
|
-
display: none;
|
|
244
|
-
}
|
|
245
|
-
.session-inl-log-in {
|
|
246
|
-
display: none;
|
|
247
|
-
}
|
|
248
|
-
.session-fl-log-in {
|
|
249
|
-
display: none;
|
|
250
|
-
}
|
|
251
|
-
</style>
|
|
252
|
-
</div>
|
|
253
|
-
<div class="theme"></div>
|
|
254
|
-
`,
|
|
255
|
-
);
|
|
256
34
|
return await Themes[theme](options);
|
|
257
35
|
},
|
|
258
36
|
RenderSetting: async function () {
|
|
@@ -607,7 +385,11 @@ const typeWriter = async function ({ id, html, seconds, endHideBlink, container
|
|
|
607
385
|
return new Promise((resolve) => {
|
|
608
386
|
// https://developer.mozilla.org/en-US/docs/Web/CSS/animation-timing-function
|
|
609
387
|
// https://www.w3schools.com/cssref/css3_pr_animation-fill-mode.php
|
|
610
|
-
const typingAnimationTransitionStyle = [
|
|
388
|
+
const typingAnimationTransitionStyle = [
|
|
389
|
+
`1s linear`,
|
|
390
|
+
`${seconds}s steps(${html.split(' ').length * 6}, end)`,
|
|
391
|
+
`1s forwards`,
|
|
392
|
+
];
|
|
611
393
|
const render = html`
|
|
612
394
|
<style class="style-${id}">
|
|
613
395
|
.tw-${id}-typed-out {
|
|
@@ -136,13 +136,14 @@ const LoadingAnimation = {
|
|
|
136
136
|
htmls('.ssr-loading-bar', html`<div class="ssr-loading-bar-block ssr-blink-bar"></div>`);
|
|
137
137
|
},
|
|
138
138
|
},
|
|
139
|
-
removeSplashScreen: function () {
|
|
139
|
+
removeSplashScreen: function (backgroundContainer) {
|
|
140
140
|
if (s(`.clean-cache-container`)) s(`.clean-cache-container`).style.display = 'none';
|
|
141
|
-
if (
|
|
141
|
+
if (!backgroundContainer) backgroundContainer = '.ssr-background';
|
|
142
|
+
if (s(backgroundContainer))
|
|
142
143
|
setTimeout(() => {
|
|
143
|
-
s(
|
|
144
|
+
s(backgroundContainer).style.opacity = 0;
|
|
144
145
|
setTimeout(async () => {
|
|
145
|
-
s(
|
|
146
|
+
s(backgroundContainer).style.display = 'none';
|
|
146
147
|
}, 300);
|
|
147
148
|
});
|
|
148
149
|
},
|
|
@@ -168,9 +169,7 @@ const LoadingAnimation = {
|
|
|
168
169
|
if (nameSrcLoad)
|
|
169
170
|
htmls(
|
|
170
171
|
`.ssr-loading-info`,
|
|
171
|
-
html`<span style="color: white">
|
|
172
|
-
<br />
|
|
173
|
-
...${nameSrcLoad.slice(-30).replaceAll('file', 'storage')}`,
|
|
172
|
+
html`<span style="color: white">Loading </span> ...${nameSrcLoad.slice(-30).replaceAll('file', 'storage')}`,
|
|
174
173
|
);
|
|
175
174
|
}
|
|
176
175
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { newInstance, getId, cap, capFirst } from './CommonJs.js';
|
|
2
2
|
import { DropDown } from './DropDown.js';
|
|
3
3
|
import { loggerFactory } from './Logger.js';
|
|
4
|
-
import { s, htmls } from './VanillaJs.js';
|
|
4
|
+
import { s, htmls, getLang } from './VanillaJs.js';
|
|
5
5
|
|
|
6
6
|
const logger = loggerFactory(import.meta);
|
|
7
7
|
|
|
@@ -66,7 +66,11 @@ const Translate = {
|
|
|
66
66
|
|
|
67
67
|
const TranslateCore = {
|
|
68
68
|
Init: async function () {
|
|
69
|
-
|
|
69
|
+
s('html').lang = localStorage.getItem('lang')
|
|
70
|
+
? localStorage.getItem('lang')
|
|
71
|
+
: getLang() && getLang().match('es')
|
|
72
|
+
? 'es'
|
|
73
|
+
: 'en';
|
|
70
74
|
Translate.Data = {
|
|
71
75
|
...Translate.Data,
|
|
72
76
|
isEmpty: {
|
|
@@ -431,6 +435,11 @@ const TranslateCore = {
|
|
|
431
435
|
en: 'Are you sure you want to delete all data?',
|
|
432
436
|
es: 'Estas seguro de eliminar todos los datos?',
|
|
433
437
|
};
|
|
438
|
+
Translate.Data['charge-complete'] = {
|
|
439
|
+
en: 'Charge complete',
|
|
440
|
+
es: 'Carga completada',
|
|
441
|
+
};
|
|
442
|
+
Translate.Data['play'] = { es: 'Jugar', en: 'Play' };
|
|
434
443
|
},
|
|
435
444
|
};
|
|
436
445
|
|
|
@@ -428,6 +428,8 @@ const isDevInstance = () => location.origin.match('localhost') && location.port;
|
|
|
428
428
|
|
|
429
429
|
const getDataFromInputFile = async (file) => Array.from(new Uint8Array(await file.arrayBuffer()));
|
|
430
430
|
|
|
431
|
+
const getLang = () => navigator.language || navigator.userLanguage;
|
|
432
|
+
|
|
431
433
|
export {
|
|
432
434
|
s,
|
|
433
435
|
htmls,
|
|
@@ -457,4 +459,5 @@ export {
|
|
|
457
459
|
isActiveElement,
|
|
458
460
|
isDevInstance,
|
|
459
461
|
getDataFromInputFile,
|
|
462
|
+
getLang,
|
|
460
463
|
};
|