adminforth 1.1.74 → 1.1.76
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/auth.ts +14 -0
- package/dataConnectors/postgres.ts +1 -1
- package/dist/auth.js +7 -0
- package/dist/index.js +117 -65
- package/dist/modules/codeInjector.js +29 -15
- package/dist/modules/utils.js +1 -1
- package/dist/plugins/AuditLogPlugin/index.js +2 -17
- package/dist/plugins/S3UploadPlugin/custom/s3uploader.vue +120 -0
- package/dist/plugins/S3UploadPlugin/index.js +103 -0
- package/dist/plugins/S3UploadPlugin/package-lock.json +431 -0
- package/dist/plugins/S3UploadPlugin/package.json +16 -0
- package/dist/plugins/TwoFactorsAuthPlugin/custom/TwoFactorsConfirmation.vue +152 -0
- package/dist/plugins/TwoFactorsAuthPlugin/custom/TwoFactorsOtp.vue +0 -0
- package/dist/plugins/TwoFactorsAuthPlugin/custom/TwoFactorsSetup.vue +188 -0
- package/dist/plugins/TwoFactorsAuthPlugin/index.js +150 -0
- package/dist/plugins/TwoFactorsAuthPlugin/node_modules/.package-lock.json +61 -0
- package/dist/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/LICENSE +21 -0
- package/dist/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/README.md +15 -0
- package/dist/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/package.json +217 -0
- package/dist/plugins/TwoFactorsAuthPlugin/node_modules/@types/notp/LICENSE +21 -0
- package/dist/plugins/TwoFactorsAuthPlugin/node_modules/@types/notp/README.md +15 -0
- package/dist/plugins/TwoFactorsAuthPlugin/node_modules/@types/notp/package.json +21 -0
- package/dist/plugins/TwoFactorsAuthPlugin/node_modules/node-2fa/LICENSE +201 -0
- package/dist/plugins/TwoFactorsAuthPlugin/node_modules/node-2fa/README.md +68 -0
- package/dist/plugins/TwoFactorsAuthPlugin/node_modules/node-2fa/dist/index.js +51 -0
- package/dist/plugins/TwoFactorsAuthPlugin/node_modules/node-2fa/dist/interfaces.js +2 -0
- package/dist/plugins/TwoFactorsAuthPlugin/node_modules/node-2fa/package.json +58 -0
- package/dist/plugins/TwoFactorsAuthPlugin/node_modules/notp/.travis.yml +6 -0
- package/dist/plugins/TwoFactorsAuthPlugin/node_modules/notp/LICENSE +22 -0
- package/dist/plugins/TwoFactorsAuthPlugin/node_modules/notp/Readme.md +135 -0
- package/dist/plugins/TwoFactorsAuthPlugin/node_modules/notp/examples/TOTP-verify.js +33 -0
- package/dist/plugins/TwoFactorsAuthPlugin/node_modules/notp/examples/TOTP.js +15 -0
- package/dist/plugins/TwoFactorsAuthPlugin/node_modules/notp/index.js +221 -0
- package/dist/plugins/TwoFactorsAuthPlugin/node_modules/notp/package.json +22 -0
- package/dist/plugins/TwoFactorsAuthPlugin/node_modules/notp/test/mocha.opts +1 -0
- package/dist/plugins/TwoFactorsAuthPlugin/node_modules/notp/test/notp.js +217 -0
- package/dist/plugins/TwoFactorsAuthPlugin/node_modules/thirty-two/LICENSE.txt +19 -0
- package/dist/plugins/TwoFactorsAuthPlugin/node_modules/thirty-two/Makefile +24 -0
- package/dist/plugins/TwoFactorsAuthPlugin/node_modules/thirty-two/README.md +15 -0
- package/dist/plugins/TwoFactorsAuthPlugin/node_modules/thirty-two/index.js +23 -0
- package/dist/plugins/TwoFactorsAuthPlugin/node_modules/thirty-two/lib/thirty-two/index.js +26 -0
- package/dist/plugins/TwoFactorsAuthPlugin/node_modules/thirty-two/lib/thirty-two/thirty-two.js +128 -0
- package/dist/plugins/TwoFactorsAuthPlugin/node_modules/thirty-two/package.json +15 -0
- package/dist/plugins/TwoFactorsAuthPlugin/node_modules/thirty-two/spec/thirty-two_spec.js +63 -0
- package/dist/plugins/TwoFactorsAuthPlugin/node_modules/tslib/CopyrightNotice.txt +15 -0
- package/dist/plugins/TwoFactorsAuthPlugin/node_modules/tslib/LICENSE.txt +12 -0
- package/dist/plugins/TwoFactorsAuthPlugin/node_modules/tslib/README.md +164 -0
- package/dist/plugins/TwoFactorsAuthPlugin/node_modules/tslib/SECURITY.md +41 -0
- package/dist/plugins/TwoFactorsAuthPlugin/node_modules/tslib/modules/index.js +68 -0
- package/dist/plugins/TwoFactorsAuthPlugin/node_modules/tslib/modules/package.json +3 -0
- package/dist/plugins/TwoFactorsAuthPlugin/node_modules/tslib/package.json +47 -0
- package/dist/plugins/TwoFactorsAuthPlugin/node_modules/tslib/tslib.es6.html +1 -0
- package/dist/plugins/TwoFactorsAuthPlugin/node_modules/tslib/tslib.es6.js +374 -0
- package/dist/plugins/TwoFactorsAuthPlugin/node_modules/tslib/tslib.es6.mjs +373 -0
- package/dist/plugins/TwoFactorsAuthPlugin/node_modules/tslib/tslib.html +1 -0
- package/dist/plugins/TwoFactorsAuthPlugin/node_modules/tslib/tslib.js +424 -0
- package/dist/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/README.md +6 -0
- package/dist/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/package.json +55 -0
- package/dist/plugins/TwoFactorsAuthPlugin/package-lock.json +69 -0
- package/dist/plugins/TwoFactorsAuthPlugin/package.json +15 -0
- package/dist/plugins/TwoFactorsAuthPlugin/types.js +1 -0
- package/dist/spa/index.html +1 -1
- package/dist/spa/package-lock.json +111 -0
- package/dist/spa/package.json +1 -0
- package/dist/spa/spa/src/App.vue +154 -121
- package/dist/spa/spa/src/components/ResourceForm.vue +91 -91
- package/dist/spa/spa/src/router/index.ts +0 -1
- package/dist/spa/spa/src/utils.ts +1 -1
- package/dist/spa/spa/src/views/CreateView.vue +0 -1
- package/dist/spa/spa/src/views/LoginView.vue +4 -1
- package/dist/spa/src/App.vue +178 -133
- package/dist/spa/src/components/MenuLink.vue +3 -3
- package/dist/spa/src/components/ResourceForm.vue +96 -96
- package/dist/spa/src/components/ResourceListTable.vue +69 -84
- package/dist/spa/src/components/SkeleteLoader.vue +23 -0
- package/dist/spa/src/components/ValueRenderer.vue +2 -3
- package/dist/spa/src/composables/useStores.ts +24 -11
- package/dist/spa/src/main.ts +1 -1
- package/dist/spa/src/router/index.ts +0 -1
- package/dist/spa/src/utils.ts +1 -1
- package/dist/spa/src/views/CreateView.vue +1 -9
- package/dist/spa/src/views/EditView.vue +1 -9
- package/dist/spa/src/views/ListView.vue +12 -3
- package/dist/spa/src/views/LoginView.vue +6 -1
- package/dist/spa/src/views/ResourceParent.vue +1 -2
- package/dist/spa/src/views/ShowView.vue +6 -14
- package/dist/spa/tailwind.config.js +3 -1
- package/index.ts +94 -35
- package/modules/codeInjector.ts +38 -27
- package/modules/utils.ts +1 -1
- package/package.json +1 -1
- package/plugins/AuditLogPlugin/index.ts +4 -20
- package/plugins/S3UploadPlugin/custom/s3uploader.vue +120 -0
- package/plugins/S3UploadPlugin/index.ts +112 -0
- package/plugins/S3UploadPlugin/package-lock.json +431 -0
- package/plugins/S3UploadPlugin/package.json +16 -0
- package/plugins/S3UploadPlugin/types.ts +76 -0
- package/plugins/TwoFactorsAuthPlugin/custom/TwoFactorsConfirmation.vue +152 -0
- package/plugins/TwoFactorsAuthPlugin/custom/TwoFactorsOtp.vue +0 -0
- package/plugins/TwoFactorsAuthPlugin/custom/TwoFactorsSetup.vue +188 -0
- package/plugins/TwoFactorsAuthPlugin/index.ts +150 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/.package-lock.json +61 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/LICENSE +21 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/README.md +15 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/assert/strict.d.ts +8 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/assert.d.ts +1040 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/async_hooks.d.ts +541 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/buffer.d.ts +2363 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/child_process.d.ts +1544 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/cluster.d.ts +578 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/console.d.ts +452 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/constants.d.ts +19 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/crypto.d.ts +4523 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/dgram.d.ts +596 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/diagnostics_channel.d.ts +554 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/dns/promises.d.ts +476 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/dns.d.ts +864 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/dom-events.d.ts +124 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/domain.d.ts +170 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/events.d.ts +931 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/fs/promises.d.ts +1245 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/fs.d.ts +4317 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/globals.d.ts +412 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/globals.global.d.ts +1 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/http.d.ts +1908 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/http2.d.ts +2418 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/https.d.ts +550 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/index.d.ts +89 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/inspector.d.ts +2746 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/module.d.ts +315 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/net.d.ts +999 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/os.d.ts +495 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/package.json +217 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/path.d.ts +191 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/perf_hooks.d.ts +905 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/process.d.ts +1754 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/punycode.d.ts +117 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/querystring.d.ts +153 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/readline/promises.d.ts +150 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/readline.d.ts +540 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/repl.d.ts +430 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/sea.d.ts +153 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/stream/consumers.d.ts +12 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/stream/promises.d.ts +83 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/stream/web.d.ts +367 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/stream.d.ts +1707 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/string_decoder.d.ts +67 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/test.d.ts +1718 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/timers/promises.d.ts +97 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/timers.d.ts +240 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/tls.d.ts +1217 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/trace_events.d.ts +197 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/tty.d.ts +208 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/url.d.ts +952 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/util.d.ts +2292 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/v8.d.ts +808 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/vm.d.ts +924 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/wasi.d.ts +181 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/worker_threads.d.ts +694 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/zlib.d.ts +530 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/notp/LICENSE +21 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/notp/README.md +15 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/notp/index.d.ts +127 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/@types/notp/package.json +21 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/node-2fa/LICENSE +201 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/node-2fa/README.md +68 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/node-2fa/dist/index.d.ts +11 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/node-2fa/dist/index.js +51 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/node-2fa/dist/interfaces.d.ts +4 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/node-2fa/dist/interfaces.js +2 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/node-2fa/package.json +58 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/notp/.travis.yml +6 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/notp/LICENSE +22 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/notp/Readme.md +135 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/notp/examples/TOTP-verify.js +33 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/notp/examples/TOTP.js +15 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/notp/index.js +221 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/notp/package.json +22 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/notp/test/mocha.opts +1 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/notp/test/notp.js +217 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/thirty-two/LICENSE.txt +19 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/thirty-two/Makefile +24 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/thirty-two/README.md +15 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/thirty-two/index.js +23 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/thirty-two/lib/thirty-two/index.js +26 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/thirty-two/lib/thirty-two/thirty-two.js +128 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/thirty-two/package.json +15 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/thirty-two/spec/thirty-two_spec.js +63 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/tslib/CopyrightNotice.txt +15 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/tslib/LICENSE.txt +12 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/tslib/README.md +164 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/tslib/SECURITY.md +41 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/tslib/modules/index.d.ts +37 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/tslib/modules/index.js +68 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/tslib/modules/package.json +3 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/tslib/package.json +47 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/tslib/tslib.d.ts +453 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/tslib/tslib.es6.html +1 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/tslib/tslib.es6.js +374 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/tslib/tslib.es6.mjs +373 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/tslib/tslib.html +1 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/tslib/tslib.js +424 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/README.md +6 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/agent.d.ts +31 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/api.d.ts +43 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/balanced-pool.d.ts +18 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/cache.d.ts +36 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/client.d.ts +97 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/connector.d.ts +34 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/content-type.d.ts +21 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/cookies.d.ts +28 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/diagnostics-channel.d.ts +67 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/dispatcher.d.ts +241 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/errors.d.ts +128 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/fetch.d.ts +209 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/file.d.ts +39 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/filereader.d.ts +54 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/formdata.d.ts +108 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/global-dispatcher.d.ts +9 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/global-origin.d.ts +7 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/handlers.d.ts +9 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/header.d.ts +4 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/index.d.ts +63 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/interceptors.d.ts +5 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/mock-agent.d.ts +50 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/mock-client.d.ts +25 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/mock-errors.d.ts +12 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/mock-interceptor.d.ts +93 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/mock-pool.d.ts +25 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/package.json +55 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/patch.d.ts +71 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/pool-stats.d.ts +19 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/pool.d.ts +28 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/proxy-agent.d.ts +30 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/readable.d.ts +61 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/webidl.d.ts +220 -0
- package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/websocket.d.ts +131 -0
- package/plugins/TwoFactorsAuthPlugin/package-lock.json +69 -0
- package/plugins/TwoFactorsAuthPlugin/package.json +15 -0
- package/plugins/TwoFactorsAuthPlugin/types.ts +10 -0
- package/servers/express.ts +1 -0
- package/spa/src/App.vue +154 -121
- package/spa/src/components/ResourceForm.vue +91 -91
- package/spa/src/router/index.ts +0 -1
- package/spa/src/utils.ts +1 -1
- package/spa/src/views/CreateView.vue +0 -1
- package/spa/src/views/LoginView.vue +4 -1
- package/types/AdminForthConfig.ts +24 -3
- package/dist/plugins/AuditLog/index.js +0 -13
- /package/dist/plugins/{AuditLog → S3UploadPlugin}/types.js +0 -0
|
@@ -20,17 +20,6 @@
|
|
|
20
20
|
<tr v-for="column, i in editableColumns" :key="column.name"
|
|
21
21
|
class="bg-ligftForm dark:bg-gray-800 border-b dark:border-gray-700"
|
|
22
22
|
>
|
|
23
|
-
<!-- if column is in customComponentsPerColumn, use this component. If not, use this code -->
|
|
24
|
-
<template v-if="column?.components?.[props.source]?.file">
|
|
25
|
-
<component
|
|
26
|
-
:is="getCustomComponent(column.components[props.source])"
|
|
27
|
-
:column="column"
|
|
28
|
-
:value="currentValues[column.name]"
|
|
29
|
-
@update:value="setCurrentValue(column.name, $event)"
|
|
30
|
-
:meta="column.components[props.source].meta"
|
|
31
|
-
/>
|
|
32
|
-
</template>
|
|
33
|
-
<template v-else>
|
|
34
23
|
<td class="px-6 py-4 whitespace-nowrap "> <!--align-top-->
|
|
35
24
|
{{ column.label }}
|
|
36
25
|
<span :data-tooltip-target="`tooltip-show-${i}`" class="relative inline-block">
|
|
@@ -45,88 +34,99 @@
|
|
|
45
34
|
</div>
|
|
46
35
|
</td>
|
|
47
36
|
<td class="px-6 py-4 whitespace-nowrap whitespace-pre-wrap relative">
|
|
48
|
-
<Dropdown
|
|
49
|
-
single
|
|
50
|
-
v-if="column.foreignResource"
|
|
51
|
-
:options="columnOptions[column.name] || []"
|
|
52
|
-
:placeholder = "columnOptions[column.name]?.length ?'Select...': 'There are no options available'"
|
|
53
|
-
:modelValue="currentValues[column.name]"
|
|
54
|
-
@update:modelValue="setCurrentValue(column.name, $event)"
|
|
55
|
-
></Dropdown>
|
|
56
|
-
<Dropdown
|
|
57
|
-
single
|
|
58
|
-
v-else-if="column.enum"
|
|
59
|
-
:options="column.enum"
|
|
60
|
-
:modelValue="currentValues[column.name]"
|
|
61
|
-
@update:modelValue="setCurrentValue(column.name, $event)"
|
|
62
|
-
/>
|
|
63
|
-
<Dropdown
|
|
64
|
-
single
|
|
65
|
-
v-else-if="column.type === 'boolean'"
|
|
66
|
-
:options="[{ label: 'Yes', value: true }, { label: 'No', value: false }, { label: 'Unset', value: null }]"
|
|
67
|
-
:modelValue="currentValues[column.name]"
|
|
68
|
-
@update:modelValue="setCurrentValue(column.name, $event)"
|
|
69
|
-
/>
|
|
70
|
-
<input
|
|
71
|
-
v-else-if="['integer'].includes(column.type)"
|
|
72
|
-
type="number"
|
|
73
|
-
step="1"
|
|
74
|
-
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-40 p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
|
|
75
|
-
placeholder="0"
|
|
76
|
-
:value="currentValues[column.name]"
|
|
77
|
-
@input="setCurrentValue(column.name, $event.target.value)"
|
|
78
|
-
>
|
|
79
|
-
<CustomDatePicker
|
|
80
|
-
v-else-if="['datetime'].includes(column.type)"
|
|
81
|
-
:column="column"
|
|
82
|
-
:valueStart="currentValues[column.name]"
|
|
83
|
-
auto-hide
|
|
84
|
-
@update:valueStart="setCurrentValue(column.name, $event)"
|
|
85
|
-
/>
|
|
86
|
-
<input
|
|
87
|
-
v-else-if="['decimal', 'float'].includes(column.type)"
|
|
88
|
-
type="number"
|
|
89
|
-
step="0.1"
|
|
90
|
-
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-40 p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
|
|
91
|
-
placeholder="0.0"
|
|
92
|
-
:value="currentValues[column.name]"
|
|
93
|
-
@input="setCurrentValue(column.name, $event.target.value)"
|
|
94
|
-
/>
|
|
95
|
-
<textarea
|
|
96
|
-
v-else-if="['text'].includes(column.type)"
|
|
97
|
-
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
|
|
98
|
-
placeholder="Text"
|
|
99
|
-
:value="currentValues[column.name]"
|
|
100
|
-
@input="setCurrentValue(column.name, $event.target.value)"
|
|
101
|
-
>
|
|
102
|
-
</textarea>
|
|
103
|
-
<input
|
|
104
|
-
v-else
|
|
105
|
-
:type="!column.masked || unmasked[column.name] ? 'text' : 'password'"
|
|
106
|
-
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
|
|
107
|
-
placeholder="Text"
|
|
108
|
-
:value="currentValues[column.name]"
|
|
109
|
-
@input="setCurrentValue(column.name, $event.target.value)"
|
|
110
|
-
autocomplete="false"
|
|
111
|
-
data-lpignore="true"
|
|
112
|
-
readonly
|
|
113
|
-
onfocus="this.removeAttribute('readonly');"
|
|
114
|
-
>
|
|
115
37
|
|
|
116
|
-
<
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
</
|
|
125
|
-
<
|
|
38
|
+
<template v-if="column?.components?.[props.source]?.file">
|
|
39
|
+
<component
|
|
40
|
+
:is="getCustomComponent(column.components[props.source])"
|
|
41
|
+
:column="column"
|
|
42
|
+
:value="currentValues[column.name]"
|
|
43
|
+
@update:value="setCurrentValue(column.name, $event)"
|
|
44
|
+
:meta="column.components[props.source].meta"
|
|
45
|
+
/>
|
|
46
|
+
</template>
|
|
47
|
+
<template v-else>
|
|
48
|
+
<Dropdown
|
|
49
|
+
single
|
|
50
|
+
v-if="column.foreignResource"
|
|
51
|
+
:options="columnOptions[column.name] || []"
|
|
52
|
+
:placeholder = "columnOptions[column.name]?.length ?'Select...': 'There are no options available'"
|
|
53
|
+
:modelValue="currentValues[column.name]"
|
|
54
|
+
@update:modelValue="setCurrentValue(column.name, $event)"
|
|
55
|
+
></Dropdown>
|
|
56
|
+
<Dropdown
|
|
57
|
+
single
|
|
58
|
+
v-else-if="column.enum"
|
|
59
|
+
:options="column.enum"
|
|
60
|
+
:modelValue="currentValues[column.name]"
|
|
61
|
+
@update:modelValue="setCurrentValue(column.name, $event)"
|
|
62
|
+
/>
|
|
63
|
+
<Dropdown
|
|
64
|
+
single
|
|
65
|
+
v-else-if="column.type === 'boolean'"
|
|
66
|
+
:options="[{ label: 'Yes', value: true }, { label: 'No', value: false }, { label: 'Unset', value: null }]"
|
|
67
|
+
:modelValue="currentValues[column.name]"
|
|
68
|
+
@update:modelValue="setCurrentValue(column.name, $event)"
|
|
69
|
+
/>
|
|
70
|
+
<input
|
|
71
|
+
v-else-if="['integer'].includes(column.type)"
|
|
72
|
+
type="number"
|
|
73
|
+
step="1"
|
|
74
|
+
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-40 p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
|
|
75
|
+
placeholder="0"
|
|
76
|
+
:value="currentValues[column.name]"
|
|
77
|
+
@input="setCurrentValue(column.name, $event.target.value)"
|
|
78
|
+
>
|
|
79
|
+
<CustomDatePicker
|
|
80
|
+
v-else-if="['datetime'].includes(column.type)"
|
|
81
|
+
:column="column"
|
|
82
|
+
:valueStart="currentValues[column.name]"
|
|
83
|
+
auto-hide
|
|
84
|
+
@update:valueStart="setCurrentValue(column.name, $event)"
|
|
85
|
+
/>
|
|
86
|
+
<input
|
|
87
|
+
v-else-if="['decimal', 'float'].includes(column.type)"
|
|
88
|
+
type="number"
|
|
89
|
+
step="0.1"
|
|
90
|
+
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-40 p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
|
|
91
|
+
placeholder="0.0"
|
|
92
|
+
:value="currentValues[column.name]"
|
|
93
|
+
@input="setCurrentValue(column.name, $event.target.value)"
|
|
94
|
+
/>
|
|
95
|
+
<textarea
|
|
96
|
+
v-else-if="['text'].includes(column.type)"
|
|
97
|
+
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
|
|
98
|
+
placeholder="Text"
|
|
99
|
+
:value="currentValues[column.name]"
|
|
100
|
+
@input="setCurrentValue(column.name, $event.target.value)"
|
|
101
|
+
>
|
|
102
|
+
</textarea>
|
|
103
|
+
<input
|
|
104
|
+
v-else
|
|
105
|
+
:type="!column.masked || unmasked[column.name] ? 'text' : 'password'"
|
|
106
|
+
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
|
|
107
|
+
placeholder="Text"
|
|
108
|
+
:value="currentValues[column.name]"
|
|
109
|
+
@input="setCurrentValue(column.name, $event.target.value)"
|
|
110
|
+
autocomplete="false"
|
|
111
|
+
data-lpignore="true"
|
|
112
|
+
readonly
|
|
113
|
+
onfocus="this.removeAttribute('readonly');"
|
|
114
|
+
>
|
|
126
115
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
116
|
+
<button
|
|
117
|
+
v-if="column.masked"
|
|
118
|
+
type="button"
|
|
119
|
+
@click="unmasked[column.name] = !unmasked[column.name]"
|
|
120
|
+
class="h-6 absolute inset-y-2 top-6 right-6 flex items-center pr-2 z-index-100 focus:outline-none"
|
|
121
|
+
>
|
|
122
|
+
<IconEyeSolid class="w-6 h-6 text-gray-400" v-if="!unmasked[column.name]" />
|
|
123
|
+
<IconEyeSlashSolid class="w-6 h-6 text-gray-400" v-else />
|
|
124
|
+
</button>
|
|
125
|
+
<div v-if="columnError(column) && validating" class="mt-1 text-xs text-red-500 dark:text-red-400">{{ columnError(column) }}</div>
|
|
126
|
+
|
|
127
|
+
<div v-if="column.editingNote && column.editingNote[mode]" class="mt-1 text-xs text-gray-400 dark:text-gray-500">{{ column.editingNote[mode] }}</div>
|
|
128
|
+
</template>
|
|
129
|
+
</td>
|
|
130
130
|
</tr>
|
|
131
131
|
|
|
132
132
|
</tbody>
|
package/spa/src/router/index.ts
CHANGED
|
@@ -12,7 +12,6 @@ const router = createRouter({
|
|
|
12
12
|
component: () => import('@/views/LoginView.vue'),
|
|
13
13
|
meta: { title: 'login' },
|
|
14
14
|
beforeEnter: async (to, from, next) => {
|
|
15
|
-
const userStore = useUserStore()
|
|
16
15
|
if(localStorage.getItem('isAuthorized') === 'true'){
|
|
17
16
|
next({name: 'home'})
|
|
18
17
|
} else {
|
package/spa/src/utils.ts
CHANGED
|
@@ -16,7 +16,7 @@ export async function callApi({path, method, body=undefined} ) {
|
|
|
16
16
|
};
|
|
17
17
|
const fullPath = `${import.meta.env.VITE_ADMINFORTH_PUBLIC_PATH || ''}${path}`;
|
|
18
18
|
const r = await fetch(fullPath, options);
|
|
19
|
-
if (r.status == 401) {
|
|
19
|
+
if (r.status == 401 ) {
|
|
20
20
|
useUserStore().unauthorize();
|
|
21
21
|
router.push({ name: 'login' });
|
|
22
22
|
return null;
|
|
@@ -118,7 +118,10 @@ async function login() {
|
|
|
118
118
|
inProgress.value = false;
|
|
119
119
|
if (resp.error) {
|
|
120
120
|
error.value = resp.error;
|
|
121
|
-
} else {
|
|
121
|
+
} else if (resp.redirectTo) {
|
|
122
|
+
router.push(resp.redirectTo);
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
122
125
|
error.value = null;
|
|
123
126
|
user.authorize()
|
|
124
127
|
router.push('/');
|
|
@@ -206,7 +206,6 @@ export interface AdminForthClass {
|
|
|
206
206
|
|
|
207
207
|
auth: {
|
|
208
208
|
verify(jwt : string, mustHaveType: string): Promise<any>;
|
|
209
|
-
|
|
210
209
|
issueJWT(payload: Object, type: string): string;
|
|
211
210
|
}
|
|
212
211
|
|
|
@@ -607,11 +606,17 @@ export type BeforeSaveFunction = (params:{resource: AdminForthResource, adminUse
|
|
|
607
606
|
*/
|
|
608
607
|
export type AfterSaveFunction = (params: {resource: AdminForthResource, adminUser: AdminUser, record: any}) => Promise<{ok: boolean, error?: string}>;
|
|
609
608
|
|
|
609
|
+
/**
|
|
610
|
+
* Allow to get user data before login confirmation, will triger when user try to login.
|
|
611
|
+
*/
|
|
612
|
+
export type BeforeLoginConfirmationFunction = (params?: { userRecord: AdminUser }) => Promise<{ok:boolean, error?:string, body:{setCookie?:[], redirectTo?: 'string', allowedLogin?: boolean }}>;
|
|
610
613
|
|
|
611
614
|
/**
|
|
612
615
|
* Resource describes one table or collection in database.
|
|
613
616
|
* AdminForth generates set of pages for 'list', 'show', 'edit', 'create', 'filter' operations for each resource.
|
|
614
617
|
*/
|
|
618
|
+
|
|
619
|
+
|
|
615
620
|
export type AdminForthResource = {
|
|
616
621
|
/**
|
|
617
622
|
* Unique identifier of resource. By default it equals to table name in database.
|
|
@@ -846,6 +851,13 @@ export type AdminForthConfig = {
|
|
|
846
851
|
*/
|
|
847
852
|
loginBackgroundImage?: string,
|
|
848
853
|
|
|
854
|
+
/**
|
|
855
|
+
* Function or functions which will be called before user try to login.
|
|
856
|
+
* Each function will resive User object as an argument
|
|
857
|
+
*/
|
|
858
|
+
|
|
859
|
+
beforeLoginConfirmation?: BeforeLoginConfirmationFunction | Array<BeforeLoginConfirmationFunction>,
|
|
860
|
+
|
|
849
861
|
/**
|
|
850
862
|
* Optionally if your users table has a field(column) with full name, you can set it here.
|
|
851
863
|
* This field will be used to display user name in the top right corner of the admin panel.
|
|
@@ -985,7 +997,15 @@ export type AdminForthConfig = {
|
|
|
985
997
|
* Object to redefine default styles for AdminForth components. Use this file as reference for all possible adjustments https://github.com/devforth/adminforth/blob/main/adminforth/modules/styles.ts
|
|
986
998
|
*/
|
|
987
999
|
styles?: Object,
|
|
988
|
-
|
|
1000
|
+
/**
|
|
1001
|
+
* Description of custom pages which will let register custom pages for custom routes in AdminForth.
|
|
1002
|
+
*/
|
|
1003
|
+
|
|
1004
|
+
customPages?: Array<{
|
|
1005
|
+
path: string,
|
|
1006
|
+
component: AdminForthComponentDeclaration,
|
|
1007
|
+
}>,
|
|
1008
|
+
}
|
|
989
1009
|
|
|
990
1010
|
/**
|
|
991
1011
|
* If you want to Serve AdminForth from a subdirectory, e.g. on example.com/backoffice, you can specify it like:
|
|
@@ -1235,4 +1255,5 @@ export type AdminForthForeignResource = {
|
|
|
1235
1255
|
afterDatasourceResponse?: AfterDataSourceResponseFunction | Array<AfterDataSourceResponseFunction>,
|
|
1236
1256
|
},
|
|
1237
1257
|
},
|
|
1238
|
-
}
|
|
1258
|
+
}
|
|
1259
|
+
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import AdminForthPlugin from "../base.js";
|
|
2
|
-
class AuditLogPlugin extends AdminForthPlugin {
|
|
3
|
-
constructor(options) {
|
|
4
|
-
super(options, import.meta.url);
|
|
5
|
-
this.options = options;
|
|
6
|
-
}
|
|
7
|
-
modifyResourceConfig(adminforth, resourceConfig) {
|
|
8
|
-
super.modifyResourceConfig(adminforth, resourceConfig);
|
|
9
|
-
this.adminforth = adminforth;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
AuditLogPlugin.defaultError = 'Sorry, you do not have access to this resource.';
|
|
13
|
-
export default AuditLogPlugin;
|
|
File without changes
|