express-sweet-generator 1.0.8 → 1.0.10
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/CHANGELOG.md +59 -1
- package/package.json +1 -1
- package/templates/cjs/config/authentication.js +12 -1
- package/templates/cjs/views/edit-personal.hbs +3 -3
- package/templates/cjs/views/layout/default.hbs +16 -16
- package/templates/cjs/views/login.hbs +2 -2
- package/templates/cjs/views/personal.hbs +3 -3
- package/templates/cjs/views/users.hbs +2 -2
- package/templates/esm/config/authentication.js +12 -1
- package/templates/esm/views/edit-personal.hbs +3 -3
- package/templates/esm/views/layout/default.hbs +16 -16
- package/templates/esm/views/login.hbs +2 -2
- package/templates/esm/views/personal.hbs +3 -3
- package/templates/esm/views/users.hbs +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,62 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
|
3
3
|
|
|
4
|
+
## [1.0.10] - 2023/7/11
|
|
5
|
+
### Changed
|
|
6
|
+
- The URL to redirect to when login fails (failure_redirect) option in the authentication configuration (config/authentication.js) can now be defined with a function.
|
|
7
|
+
|
|
8
|
+
config/authentication.js:
|
|
9
|
+
```js
|
|
10
|
+
// Set the URL to redirect to in case of login failure as a string.
|
|
11
|
+
failure_redirect: '/login',
|
|
12
|
+
|
|
13
|
+
// Dynamically set the url to redirect to on login failure.
|
|
14
|
+
failure_redirect: (req, res) => {
|
|
15
|
+
// If the role stored in the cookie is admin, redirect to the admin login screen.
|
|
16
|
+
return req.cookies.role === 'admin' ? '/adminlogin' : 'login';
|
|
17
|
+
},
|
|
18
|
+
```
|
|
19
|
+
- The arguments of the failureRedirect method of the authentication service class (services/Authentication) have changed.
|
|
20
|
+
The argument to the Authentication.failureRedirect method used to be just express.Response, but now it requires express.Request and express.Response.
|
|
21
|
+
|
|
22
|
+
Example of login routes:
|
|
23
|
+
```js
|
|
24
|
+
import {Router} from 'express';
|
|
25
|
+
import * as sweet from 'express-sweet';
|
|
26
|
+
const router = Router();
|
|
27
|
+
const Authentication = sweet.services.Authentication;
|
|
28
|
+
|
|
29
|
+
router.post('/login', async (req, res, next) => {
|
|
30
|
+
const isAuth = await Authentication.authenticate(req, res, next);
|
|
31
|
+
if (isAuth)
|
|
32
|
+
Authentication.successRedirect(res);
|
|
33
|
+
else
|
|
34
|
+
Authentication.failureRedirect(req, res);
|
|
35
|
+
});
|
|
36
|
+
export default router;
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## [1.0.9] - 2023/6/29
|
|
40
|
+
### Changed
|
|
41
|
+
- Changed helper function names in the view (Handlebars) from SnakeCase to CamelCase.
|
|
42
|
+
|After|Before|Description|
|
|
43
|
+
|--|--|--|
|
|
44
|
+
|notEmpty|not_empty|Check that it is not empty.|
|
|
45
|
+
|formatDate|format_date|Use moment to format the date.|
|
|
46
|
+
|cacheBusting|cache_busting|Returns the Assets path containing the file update time parameter.|
|
|
47
|
+
|jsonStringify|json_stringify|Stringify an object using JSON.stringify.|
|
|
48
|
+
|jsonParse|json_parse|Parses the given string using JSON.parse.|
|
|
49
|
+
|formatBytes|format_bytes|Convert bytes to just the right units(KB, MB, GB, TB, PB, EB, ZB, YB).|
|
|
50
|
+
|
|
51
|
+
### Added
|
|
52
|
+
- Added view helper to convert numeric values to strings with language-sensitive representations.
|
|
53
|
+
```html
|
|
54
|
+
{{number2locale 123456.789}} => 123,456.789
|
|
55
|
+
|
|
56
|
+
{{!-- German uses comma as decimal separator and period for thousands. --}}
|
|
57
|
+
{{number2locale 123456.789 'de-DE'}} => 123.456,789
|
|
58
|
+
```
|
|
59
|
+
|
|
4
60
|
## [1.0.8] - 2023/6/12
|
|
5
61
|
### Changed
|
|
6
62
|
- In the latest express-sweet v1.0.27, an express.Request object has been added to the arguments of the beforeRender function in the view configuration (config/view.js).
|
|
@@ -139,4 +195,6 @@ All notable changes to this project will be documented in this file.
|
|
|
139
195
|
[1.0.5]: https://github.com/takuya-motoshima/express-sweet-generator/compare/v1.0.4...v1.0.5
|
|
140
196
|
[1.0.6]: https://github.com/takuya-motoshima/express-sweet-generator/compare/v1.0.5...v1.0.6
|
|
141
197
|
[1.0.7]: https://github.com/takuya-motoshima/express-sweet-generator/compare/v1.0.6...v1.0.7
|
|
142
|
-
[1.0.8]: https://github.com/takuya-motoshima/express-sweet-generator/compare/v1.0.7...v1.0.8
|
|
198
|
+
[1.0.8]: https://github.com/takuya-motoshima/express-sweet-generator/compare/v1.0.7...v1.0.8
|
|
199
|
+
[1.0.9]: https://github.com/takuya-motoshima/express-sweet-generator/compare/v1.0.8...v1.0.9
|
|
200
|
+
[1.0.10]: https://github.com/takuya-motoshima/express-sweet-generator/compare/v1.0.9...v1.0.10
|
package/package.json
CHANGED
|
@@ -45,7 +45,18 @@ module.exports = {
|
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
47
|
* URL to redirect after log off, defaults to `/login`.
|
|
48
|
-
*
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* // Set the URL to redirect to in case of login failure as a string.
|
|
51
|
+
* failure_redirect: '/login',
|
|
52
|
+
*
|
|
53
|
+
* // Dynamically set the url to redirect to on login failure.
|
|
54
|
+
* failure_redirect: (req, res) => {
|
|
55
|
+
* // If the role stored in the cookie is admin, redirect to the admin login screen.
|
|
56
|
+
* return req.cookies.role === 'admin' ? '/adminlogin' : 'login';
|
|
57
|
+
* },
|
|
58
|
+
*
|
|
59
|
+
* @type {string|((req: express.Request, res: express.Response) => string)}
|
|
49
60
|
*/
|
|
50
61
|
failure_redirect: '/login',
|
|
51
62
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{{!< default}}
|
|
2
2
|
{{#contentFor 'title'}}Edit personal settings{{/contentFor}}
|
|
3
|
-
{{#contentFor 'style'}}<link rel="stylesheet" type="text/css" href="{{
|
|
4
|
-
{{#contentFor 'script'}}<script src="{{
|
|
3
|
+
{{#contentFor 'style'}}<link rel="stylesheet" type="text/css" href="{{cacheBusting '/build/editPersonal.css' ''}}">{{/contentFor}}
|
|
4
|
+
{{#contentFor 'script'}}<script src="{{cacheBusting '/build/editPersonal.js' ''}}"></script>{{/contentFor}}
|
|
5
5
|
<input data-ref="user.iconPath" type="hidden" value="{{user.icon}}">
|
|
6
|
-
<input data-ref="user.modified" type="hidden" value="{{
|
|
6
|
+
<input data-ref="user.modified" type="hidden" value="{{formatDate 'x' user.modified}}">
|
|
7
7
|
|
|
8
8
|
<!--begin::Basic info-->
|
|
9
9
|
<div class="card mb-5 mb-xl-10">
|
|
@@ -10,20 +10,20 @@
|
|
|
10
10
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Inter:300,400,500,600,700" />
|
|
11
11
|
<!--end::Fonts-->
|
|
12
12
|
<!--begin::Vendor Stylesheets(used by this page)-->
|
|
13
|
-
<link href="
|
|
13
|
+
<link href="/build/theme/plugins/custom/datatables/datatables.bundle.css" rel="stylesheet" type="text/css" />
|
|
14
14
|
<!--end::Vendor Stylesheets-->
|
|
15
15
|
<!--begin::Global Stylesheets Bundle(used by all pages)-->
|
|
16
|
-
<link href="
|
|
17
|
-
<link href="
|
|
16
|
+
<link href="/build/theme/plugins/global/plugins.bundle.css" rel="stylesheet" type="text/css" />
|
|
17
|
+
<link href="/build/theme/css/style.bundle.css" rel="stylesheet" type="text/css" />
|
|
18
18
|
<!--end::Global Stylesheets Bundle-->
|
|
19
19
|
<!--begin::Custom Stylesheets(used by this application)-->
|
|
20
|
-
<link rel="stylesheet" href="{{
|
|
20
|
+
<link rel="stylesheet" href="{{cacheBusting '/build/docs.css' ''}}" type="text/css" >
|
|
21
21
|
{{{block "style"}}}
|
|
22
22
|
<!--end::Custom Stylesheets-->
|
|
23
23
|
</head>
|
|
24
24
|
<!--end::Head-->
|
|
25
25
|
<!--begin::Body-->
|
|
26
|
-
{{#if (and (
|
|
26
|
+
{{#if (and (notEmpty session) (empty (block "forced_menuless_layout")))}}
|
|
27
27
|
<body id="kt_app_body" data-kt-app-layout="dark-sidebar" data-kt-app-header-fixed="true" data-kt-app-sidebar-enabled="true" data-kt-app-sidebar-fixed="true" data-kt-app-sidebar-hoverable="true" data-kt-app-sidebar-push-header="true" data-kt-app-sidebar-push-toolbar="true" data-kt-app-sidebar-push-footer="true" data-kt-app-toolbar-enabled="true" class="app-default">
|
|
28
28
|
<!--begin::App-->
|
|
29
29
|
<div class="d-flex flex-column flex-root app-root" id="kt_app_root">
|
|
@@ -64,8 +64,8 @@
|
|
|
64
64
|
<!--begin::User menu-->
|
|
65
65
|
<div class="app-navbar-item ms-1 ms-lg-3" id="kt_header_user_menu_toggle">
|
|
66
66
|
<!--begin::Menu wrapper-->
|
|
67
|
-
<div class="cursor-pointer symbol symbol-35px symbol-md-40px" data-kt-menu-trigger="click" data-kt-menu-attach="parent" data-kt-menu-placement="bottom-end">
|
|
68
|
-
<img src="{{session.icon}}?{{
|
|
67
|
+
<div class="cursor-pointer symbol symbol-35px symbol-md-40px bg-dark" data-kt-menu-trigger="click" data-kt-menu-attach="parent" data-kt-menu-placement="bottom-end">
|
|
68
|
+
<img src="{{session.icon}}?{{formatDate 'x' ''}}" alt="user" />
|
|
69
69
|
{{!-- <img src="/build/theme/media/avatars/blank.png" alt="user" /> --}}
|
|
70
70
|
</div>
|
|
71
71
|
<!--begin::User account menu-->
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
<div class="menu-content d-flex align-items-center px-3">
|
|
76
76
|
<!--begin::Avatar-->
|
|
77
77
|
<div class="symbol symbol-50px me-5">
|
|
78
|
-
<img alt="Logo" src="{{session.icon}}?{{
|
|
78
|
+
<img alt="Logo" src="{{session.icon}}?{{formatDate 'x' ''}}" />
|
|
79
79
|
{{!-- <img alt="Logo" src="/build/theme/media/avatars/blank.png" /> --}}
|
|
80
80
|
</div>
|
|
81
81
|
<!--end::Avatar-->
|
|
@@ -277,15 +277,15 @@
|
|
|
277
277
|
<!--end::Scrolltop-->
|
|
278
278
|
<!--begin::Javascript-->
|
|
279
279
|
<!--begin::Global Javascript Bundle(used by all pages)-->
|
|
280
|
-
<script src="
|
|
281
|
-
<script src="
|
|
280
|
+
<script src="/build/theme/plugins/global/plugins.bundle.js"></script>
|
|
281
|
+
<script src="/build/theme/js/scripts.bundle.js"></script>
|
|
282
282
|
<!--end::Global Javascript Bundle-->
|
|
283
283
|
<!--begin::Vendors Javascript(used by this page)-->
|
|
284
|
-
<script src="
|
|
284
|
+
<script src="/build/theme/plugins/custom/datatables/datatables.bundle.js"></script>
|
|
285
285
|
<!--end::Vendors Javascript-->
|
|
286
286
|
<!--begin::Custom Javascript(used by this application)-->
|
|
287
287
|
<script>
|
|
288
|
-
globalThis.$$session = {{{
|
|
288
|
+
globalThis.$$session = {{{jsonStringify session}}};
|
|
289
289
|
</script>
|
|
290
290
|
{{{block "script"}}}
|
|
291
291
|
<!--end::Custom Stylesheets-->
|
|
@@ -297,10 +297,10 @@
|
|
|
297
297
|
{{{body}}}
|
|
298
298
|
<!--begin::Javascript-->
|
|
299
299
|
<!--begin::Global Javascript Bundle(used by all pages)-->
|
|
300
|
-
<script src="
|
|
301
|
-
<script src="
|
|
302
|
-
<!-- <script src="
|
|
303
|
-
<!-- <script src="
|
|
300
|
+
<script src="/build/theme/plugins/global/plugins.bundle.js"></script>
|
|
301
|
+
<script src="/build/theme/js/scripts.bundle.js"></script>
|
|
302
|
+
<!-- <script src="/build/theme/js/widgets.bundle.js"></script> -->
|
|
303
|
+
<!-- <script src="/build/theme/js/custom/widgets.js"></script> -->
|
|
304
304
|
<!--end::Global Javascript Bundle-->
|
|
305
305
|
<!--begin::Custom Javascript(used by this application)-->
|
|
306
306
|
{{{block "script"}}}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{{!< default}}
|
|
2
2
|
{{#contentFor 'title'}}Sign In{{/contentFor}}
|
|
3
|
-
{{#contentFor 'style'}}<link rel="stylesheet" type="text/css" href="{{
|
|
4
|
-
{{#contentFor 'script'}}<script src="{{
|
|
3
|
+
{{#contentFor 'style'}}<link rel="stylesheet" type="text/css" href="{{cacheBusting '/build/login.css' ''}}">{{/contentFor}}
|
|
4
|
+
{{#contentFor 'script'}}<script src="{{cacheBusting '/build/login.js' ''}}"></script>{{/contentFor}}
|
|
5
5
|
<!--begin::Root-->
|
|
6
6
|
<div class="d-flex flex-column flex-root" id="kt_app_root">
|
|
7
7
|
<!--begin::Page-->
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
<!--begin::Col-->
|
|
20
20
|
<div class="col-lg-8">
|
|
21
21
|
<div class="symbol symbol-125px symbol-fixed">
|
|
22
|
-
<img src="{{user.icon}}?{{
|
|
22
|
+
<img src="{{user.icon}}?{{formatDate 'x' user.modified}}" alt="image">
|
|
23
23
|
</div>
|
|
24
24
|
</div>
|
|
25
25
|
<!--end::Col-->
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
<!--end::Label-->
|
|
57
57
|
<!--begin::Col-->
|
|
58
58
|
<div class="col-lg-8">
|
|
59
|
-
<span class="fw-bolder fs-6 text-gray-800">{{
|
|
59
|
+
<span class="fw-bolder fs-6 text-gray-800">{{formatDate 'Y/M/D HH:mm:ss' user.created}}</span>
|
|
60
60
|
</div>
|
|
61
61
|
<!--end::Col-->
|
|
62
62
|
</div>
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
<!--end::Label-->
|
|
69
69
|
<!--begin::Col-->
|
|
70
70
|
<div class="col-lg-8">
|
|
71
|
-
<span class="fw-bolder fs-6 text-gray-800">{{
|
|
71
|
+
<span class="fw-bolder fs-6 text-gray-800">{{formatDate 'Y/M/D HH:mm:ss' user.modified}}</span>
|
|
72
72
|
</div>
|
|
73
73
|
<!--end::Col-->
|
|
74
74
|
</div>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{{!< default}}
|
|
2
2
|
{{#contentFor 'title'}}List of users{{/contentFor}}
|
|
3
|
-
{{#contentFor 'style'}}<link rel="stylesheet" type="text/css" href="{{
|
|
4
|
-
{{#contentFor 'script'}}<script src="{{
|
|
3
|
+
{{#contentFor 'style'}}<link rel="stylesheet" type="text/css" href="{{cacheBusting '/build/users.css' ''}}">{{/contentFor}}
|
|
4
|
+
{{#contentFor 'script'}}<script src="{{cacheBusting '/build/users.js' ''}}"></script>{{/contentFor}}
|
|
5
5
|
{{#contentFor 'actions'}}
|
|
6
6
|
<button data-on-create-user class="btn btn-sm fw-bolder btn-primary" type="button">Create a user</button>
|
|
7
7
|
{{/contentFor}}
|
|
@@ -45,7 +45,18 @@ export default {
|
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
47
|
* URL to redirect after log off, defaults to `/login`.
|
|
48
|
-
*
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* // Set the URL to redirect to in case of login failure as a string.
|
|
51
|
+
* failure_redirect: '/login',
|
|
52
|
+
*
|
|
53
|
+
* // Dynamically set the url to redirect to on login failure.
|
|
54
|
+
* failure_redirect: (req, res) => {
|
|
55
|
+
* // If the role stored in the cookie is admin, redirect to the admin login screen.
|
|
56
|
+
* return req.cookies.role === 'admin' ? '/adminlogin' : 'login';
|
|
57
|
+
* },
|
|
58
|
+
*
|
|
59
|
+
* @type {string|((req: express.Request, res: express.Response) => string)}
|
|
49
60
|
*/
|
|
50
61
|
failure_redirect: '/login',
|
|
51
62
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{{!< default}}
|
|
2
2
|
{{#contentFor 'title'}}Edit personal settings{{/contentFor}}
|
|
3
|
-
{{#contentFor 'style'}}<link rel="stylesheet" type="text/css" href="{{
|
|
4
|
-
{{#contentFor 'script'}}<script src="{{
|
|
3
|
+
{{#contentFor 'style'}}<link rel="stylesheet" type="text/css" href="{{cacheBusting '/build/editPersonal.css' ''}}">{{/contentFor}}
|
|
4
|
+
{{#contentFor 'script'}}<script src="{{cacheBusting '/build/editPersonal.js' ''}}"></script>{{/contentFor}}
|
|
5
5
|
<input data-ref="user.iconPath" type="hidden" value="{{user.icon}}">
|
|
6
|
-
<input data-ref="user.modified" type="hidden" value="{{
|
|
6
|
+
<input data-ref="user.modified" type="hidden" value="{{formatDate 'x' user.modified}}">
|
|
7
7
|
|
|
8
8
|
<!--begin::Basic info-->
|
|
9
9
|
<div class="card mb-5 mb-xl-10">
|
|
@@ -10,20 +10,20 @@
|
|
|
10
10
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Inter:300,400,500,600,700" />
|
|
11
11
|
<!--end::Fonts-->
|
|
12
12
|
<!--begin::Vendor Stylesheets(used by this page)-->
|
|
13
|
-
<link href="
|
|
13
|
+
<link href="/build/theme/plugins/custom/datatables/datatables.bundle.css" rel="stylesheet" type="text/css" />
|
|
14
14
|
<!--end::Vendor Stylesheets-->
|
|
15
15
|
<!--begin::Global Stylesheets Bundle(used by all pages)-->
|
|
16
|
-
<link href="
|
|
17
|
-
<link href="
|
|
16
|
+
<link href="/build/theme/plugins/global/plugins.bundle.css" rel="stylesheet" type="text/css" />
|
|
17
|
+
<link href="/build/theme/css/style.bundle.css" rel="stylesheet" type="text/css" />
|
|
18
18
|
<!--end::Global Stylesheets Bundle-->
|
|
19
19
|
<!--begin::Custom Stylesheets(used by this application)-->
|
|
20
|
-
<link rel="stylesheet" href="{{
|
|
20
|
+
<link rel="stylesheet" href="{{cacheBusting '/build/docs.css' ''}}" type="text/css" >
|
|
21
21
|
{{{block "style"}}}
|
|
22
22
|
<!--end::Custom Stylesheets-->
|
|
23
23
|
</head>
|
|
24
24
|
<!--end::Head-->
|
|
25
25
|
<!--begin::Body-->
|
|
26
|
-
{{#if (and (
|
|
26
|
+
{{#if (and (notEmpty session) (empty (block "forced_menuless_layout")))}}
|
|
27
27
|
<body id="kt_app_body" data-kt-app-layout="dark-sidebar" data-kt-app-header-fixed="true" data-kt-app-sidebar-enabled="true" data-kt-app-sidebar-fixed="true" data-kt-app-sidebar-hoverable="true" data-kt-app-sidebar-push-header="true" data-kt-app-sidebar-push-toolbar="true" data-kt-app-sidebar-push-footer="true" data-kt-app-toolbar-enabled="true" class="app-default">
|
|
28
28
|
<!--begin::App-->
|
|
29
29
|
<div class="d-flex flex-column flex-root app-root" id="kt_app_root">
|
|
@@ -64,8 +64,8 @@
|
|
|
64
64
|
<!--begin::User menu-->
|
|
65
65
|
<div class="app-navbar-item ms-1 ms-lg-3" id="kt_header_user_menu_toggle">
|
|
66
66
|
<!--begin::Menu wrapper-->
|
|
67
|
-
<div class="cursor-pointer symbol symbol-35px symbol-md-40px" data-kt-menu-trigger="click" data-kt-menu-attach="parent" data-kt-menu-placement="bottom-end">
|
|
68
|
-
<img src="{{session.icon}}?{{
|
|
67
|
+
<div class="cursor-pointer symbol symbol-35px symbol-md-40px bg-dark" data-kt-menu-trigger="click" data-kt-menu-attach="parent" data-kt-menu-placement="bottom-end">
|
|
68
|
+
<img src="{{session.icon}}?{{formatDate 'x' ''}}" alt="user" />
|
|
69
69
|
{{!-- <img src="/build/theme/media/avatars/blank.png" alt="user" /> --}}
|
|
70
70
|
</div>
|
|
71
71
|
<!--begin::User account menu-->
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
<div class="menu-content d-flex align-items-center px-3">
|
|
76
76
|
<!--begin::Avatar-->
|
|
77
77
|
<div class="symbol symbol-50px me-5">
|
|
78
|
-
<img alt="Logo" src="{{session.icon}}?{{
|
|
78
|
+
<img alt="Logo" src="{{session.icon}}?{{formatDate 'x' ''}}" />
|
|
79
79
|
{{!-- <img alt="Logo" src="/build/theme/media/avatars/blank.png" /> --}}
|
|
80
80
|
</div>
|
|
81
81
|
<!--end::Avatar-->
|
|
@@ -277,15 +277,15 @@
|
|
|
277
277
|
<!--end::Scrolltop-->
|
|
278
278
|
<!--begin::Javascript-->
|
|
279
279
|
<!--begin::Global Javascript Bundle(used by all pages)-->
|
|
280
|
-
<script src="
|
|
281
|
-
<script src="
|
|
280
|
+
<script src="/build/theme/plugins/global/plugins.bundle.js"></script>
|
|
281
|
+
<script src="/build/theme/js/scripts.bundle.js"></script>
|
|
282
282
|
<!--end::Global Javascript Bundle-->
|
|
283
283
|
<!--begin::Vendors Javascript(used by this page)-->
|
|
284
|
-
<script src="
|
|
284
|
+
<script src="/build/theme/plugins/custom/datatables/datatables.bundle.js"></script>
|
|
285
285
|
<!--end::Vendors Javascript-->
|
|
286
286
|
<!--begin::Custom Javascript(used by this application)-->
|
|
287
287
|
<script>
|
|
288
|
-
globalThis.$$session = {{{
|
|
288
|
+
globalThis.$$session = {{{jsonStringify session}}};
|
|
289
289
|
</script>
|
|
290
290
|
{{{block "script"}}}
|
|
291
291
|
<!--end::Custom Stylesheets-->
|
|
@@ -297,10 +297,10 @@
|
|
|
297
297
|
{{{body}}}
|
|
298
298
|
<!--begin::Javascript-->
|
|
299
299
|
<!--begin::Global Javascript Bundle(used by all pages)-->
|
|
300
|
-
<script src="
|
|
301
|
-
<script src="
|
|
302
|
-
<!-- <script src="
|
|
303
|
-
<!-- <script src="
|
|
300
|
+
<script src="/build/theme/plugins/global/plugins.bundle.js"></script>
|
|
301
|
+
<script src="/build/theme/js/scripts.bundle.js"></script>
|
|
302
|
+
<!-- <script src="/build/theme/js/widgets.bundle.js"></script> -->
|
|
303
|
+
<!-- <script src="/build/theme/js/custom/widgets.js"></script> -->
|
|
304
304
|
<!--end::Global Javascript Bundle-->
|
|
305
305
|
<!--begin::Custom Javascript(used by this application)-->
|
|
306
306
|
{{{block "script"}}}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{{!< default}}
|
|
2
2
|
{{#contentFor 'title'}}Sign In{{/contentFor}}
|
|
3
|
-
{{#contentFor 'style'}}<link rel="stylesheet" type="text/css" href="{{
|
|
4
|
-
{{#contentFor 'script'}}<script src="{{
|
|
3
|
+
{{#contentFor 'style'}}<link rel="stylesheet" type="text/css" href="{{cacheBusting '/build/login.css' ''}}">{{/contentFor}}
|
|
4
|
+
{{#contentFor 'script'}}<script src="{{cacheBusting '/build/login.js' ''}}"></script>{{/contentFor}}
|
|
5
5
|
<!--begin::Root-->
|
|
6
6
|
<div class="d-flex flex-column flex-root" id="kt_app_root">
|
|
7
7
|
<!--begin::Page-->
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
<!--begin::Col-->
|
|
20
20
|
<div class="col-lg-8">
|
|
21
21
|
<div class="symbol symbol-125px symbol-fixed">
|
|
22
|
-
<img src="{{user.icon}}?{{
|
|
22
|
+
<img src="{{user.icon}}?{{formatDate 'x' user.modified}}" alt="image">
|
|
23
23
|
</div>
|
|
24
24
|
</div>
|
|
25
25
|
<!--end::Col-->
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
<!--end::Label-->
|
|
57
57
|
<!--begin::Col-->
|
|
58
58
|
<div class="col-lg-8">
|
|
59
|
-
<span class="fw-bolder fs-6 text-gray-800">{{
|
|
59
|
+
<span class="fw-bolder fs-6 text-gray-800">{{formatDate 'Y/M/D HH:mm:ss' user.created}}</span>
|
|
60
60
|
</div>
|
|
61
61
|
<!--end::Col-->
|
|
62
62
|
</div>
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
<!--end::Label-->
|
|
69
69
|
<!--begin::Col-->
|
|
70
70
|
<div class="col-lg-8">
|
|
71
|
-
<span class="fw-bolder fs-6 text-gray-800">{{
|
|
71
|
+
<span class="fw-bolder fs-6 text-gray-800">{{formatDate 'Y/M/D HH:mm:ss' user.modified}}</span>
|
|
72
72
|
</div>
|
|
73
73
|
<!--end::Col-->
|
|
74
74
|
</div>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{{!< default}}
|
|
2
2
|
{{#contentFor 'title'}}List of users{{/contentFor}}
|
|
3
|
-
{{#contentFor 'style'}}<link rel="stylesheet" type="text/css" href="{{
|
|
4
|
-
{{#contentFor 'script'}}<script src="{{
|
|
3
|
+
{{#contentFor 'style'}}<link rel="stylesheet" type="text/css" href="{{cacheBusting '/build/users.css' ''}}">{{/contentFor}}
|
|
4
|
+
{{#contentFor 'script'}}<script src="{{cacheBusting '/build/users.js' ''}}"></script>{{/contentFor}}
|
|
5
5
|
{{#contentFor 'actions'}}
|
|
6
6
|
<button data-on-create-user class="btn btn-sm fw-bolder btn-primary" type="button">Create a user</button>
|
|
7
7
|
{{/contentFor}}
|