Compare commits
2 Commits
ip-managem
...
master
Author | SHA1 | Date | |
---|---|---|---|
b4d6d2ec0f | |||
3cd64c3527 |
1213
package-lock.json
generated
1213
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
40
package.json
40
package.json
@ -12,44 +12,44 @@
|
|||||||
"format": "prettier --write ."
|
"format": "prettier --write ."
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@sveltejs/kit": "^2.17.2",
|
"@sveltejs/kit": "^2.19.0",
|
||||||
"@sveltejs/vite-plugin-svelte": "^5.0.3",
|
"@sveltejs/vite-plugin-svelte": "^5.0.3",
|
||||||
"@types/bcryptjs": "^2.4.6",
|
"@types/bcryptjs": "^2.4.6",
|
||||||
"@types/eslint": "^9.6.1",
|
"@types/eslint": "^9.6.1",
|
||||||
"@types/mime-types": "^2.1.4",
|
"@types/mime-types": "^2.1.4",
|
||||||
"@types/node": "^22.13.5",
|
"@types/node": "^22.13.10",
|
||||||
"@types/nodemailer": "^6.4.17",
|
"@types/nodemailer": "^6.4.17",
|
||||||
"@types/qrcode": "^1.5.5",
|
"@types/qrcode": "^1.5.5",
|
||||||
"@types/uuid": "^10.0.0",
|
"@types/uuid": "^10.0.0",
|
||||||
"@typescript-eslint/eslint-plugin": "^8.24.1",
|
"@typescript-eslint/eslint-plugin": "^8.26.0",
|
||||||
"@typescript-eslint/parser": "^8.24.1",
|
"@typescript-eslint/parser": "^8.26.0",
|
||||||
"drizzle-kit": "^0.30.4",
|
"drizzle-kit": "^0.30.5",
|
||||||
"eslint": "^9.21.0",
|
"eslint": "^9.22.0",
|
||||||
"eslint-config-prettier": "^10.0.1",
|
"eslint-config-prettier": "^10.1.1",
|
||||||
"eslint-plugin-svelte": "^2.46.1",
|
"eslint-plugin-svelte": "^3.0.3",
|
||||||
"prettier": "^3.5.2",
|
"prettier": "^3.5.3",
|
||||||
"prettier-plugin-svelte": "^3.3.3",
|
"prettier-plugin-svelte": "^3.3.3",
|
||||||
"svelte": "^5.20.2",
|
"svelte": "^5.22.6",
|
||||||
"svelte-check": "^4.1.4",
|
"svelte-check": "^4.1.5",
|
||||||
"tslib": "^2.8.1",
|
"tslib": "^2.8.1",
|
||||||
"typescript": "^5.7.3",
|
"typescript": "^5.8.2",
|
||||||
"vite": "^6.1.1"
|
"vite": "^6.2.1"
|
||||||
},
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@keyv/valkey": "^1.0.3",
|
"@keyv/valkey": "^1.0.3",
|
||||||
"@sveltejs/adapter-node": "^5.2.12",
|
"@sveltejs/adapter-node": "^5.2.12",
|
||||||
"bcryptjs": "^3.0.2",
|
"bcryptjs": "^3.0.2",
|
||||||
"cache-manager": "^6.4.0",
|
"cache-manager": "^6.4.1",
|
||||||
"cacheable": "^1.8.8",
|
"cacheable": "^1.8.9",
|
||||||
"chalk": "^5.4.1",
|
"chalk": "^5.4.1",
|
||||||
"cropperjs": "^1.6.2",
|
"cropperjs": "^1.6.2",
|
||||||
"dotenv": "^16.4.7",
|
"dotenv": "^16.4.7",
|
||||||
"drizzle-orm": "^0.39.3",
|
"drizzle-orm": "^0.40.0",
|
||||||
"image-size": "^1.2.0",
|
"image-size": "^2.0.0",
|
||||||
"jose": "^6.0.4",
|
"jose": "^6.0.8",
|
||||||
"mime-types": "^2.1.35",
|
"mime-types": "^2.1.35",
|
||||||
"mysql2": "^3.12.0",
|
"mysql2": "^3.13.0",
|
||||||
"nodemailer": "^6.10.0",
|
"nodemailer": "^6.10.0",
|
||||||
"otplib": "^12.0.1",
|
"otplib": "^12.0.1",
|
||||||
"qrcode": "^1.5.4",
|
"qrcode": "^1.5.4",
|
||||||
@ -57,6 +57,6 @@
|
|||||||
"sveltekit-i18n": "^2.4.2",
|
"sveltekit-i18n": "^2.4.2",
|
||||||
"sveltekit-rate-limiter": "^0.6.1",
|
"sveltekit-rate-limiter": "^0.6.1",
|
||||||
"uuid": "^11.1.0",
|
"uuid": "^11.1.0",
|
||||||
"vite-plugin-mkcert": "^1.17.6"
|
"vite-plugin-mkcert": "^1.17.7"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,20 +1,21 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
import { get } from 'svelte/store';
|
||||||
|
import { t } from '$lib/i18n';
|
||||||
|
import type { ActionData, PageData } from './$types';
|
||||||
|
import AdminPrivilegesSelect from '$lib/components/admin/AdminPrivilegesSelect.svelte';
|
||||||
|
import { env } from '$env/dynamic/public';
|
||||||
|
import { onNavigate } from '$app/navigation';
|
||||||
|
import { popupFormErrors } from '$lib/form-errors';
|
||||||
|
import { displayMessage, clearMessages } from '$lib/stores/messages.store';
|
||||||
|
import { hasPrivileges } from '$lib/utils';
|
||||||
import SplitView from '$lib/components/container/SplitView.svelte';
|
import SplitView from '$lib/components/container/SplitView.svelte';
|
||||||
import FormWrapper from '$lib/components/form/FormWrapper.svelte';
|
import FormWrapper from '$lib/components/form/FormWrapper.svelte';
|
||||||
import FormSection from '$lib/components/form/FormSection.svelte';
|
import FormSection from '$lib/components/form/FormSection.svelte';
|
||||||
import FormControl from '$lib/components/form/FormControl.svelte';
|
import FormControl from '$lib/components/form/FormControl.svelte';
|
||||||
import ColumnView from '$lib/components/container/ColumnView.svelte';
|
import ColumnView from '$lib/components/container/ColumnView.svelte';
|
||||||
import AvatarCard from '$lib/components/avatar/AvatarCard.svelte';
|
import AvatarCard from '$lib/components/avatar/AvatarCard.svelte';
|
||||||
import Button from '$lib/components/Button.svelte';
|
|
||||||
import { t } from '$lib/i18n';
|
|
||||||
import type { ActionData, PageData } from './$types';
|
|
||||||
import AdminPrivilegesSelect from '$lib/components/admin/AdminPrivilegesSelect.svelte';
|
|
||||||
import { env } from '$env/dynamic/public';
|
|
||||||
import ActionButton from '$lib/components/ActionButton.svelte';
|
import ActionButton from '$lib/components/ActionButton.svelte';
|
||||||
import { onNavigate } from '$app/navigation';
|
import Button from '$lib/components/Button.svelte';
|
||||||
import { popupFormErrors } from '$lib/form-errors';
|
|
||||||
import { displayMessage, clearMessages } from '$lib/stores/messages.store';
|
|
||||||
import { get } from 'svelte/store';
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
data: PageData;
|
data: PageData;
|
||||||
@ -23,6 +24,8 @@
|
|||||||
|
|
||||||
let { data, form }: Props = $props();
|
let { data, form }: Props = $props();
|
||||||
|
|
||||||
|
const hasAuditPrivilege = hasPrivileges(data.user.privileges, ['admin:audit']);
|
||||||
|
|
||||||
$effect(() => popupFormErrors(form, 'admin.users.errors'));
|
$effect(() => popupFormErrors(form, 'admin.users.errors'));
|
||||||
$effect(() => {
|
$effect(() => {
|
||||||
if (form?.errors && !form.errors.length) {
|
if (form?.errors && !form.errors.length) {
|
||||||
@ -97,16 +100,33 @@
|
|||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<h3>{$t('admin.users.actions')}</h3>
|
<h3>{$t('admin.users.actions')}</h3>
|
||||||
{#if data.details.activated}
|
<ul>
|
||||||
<ActionButton action="?/email&type=password">{$t('admin.users.passwordEmail')}</ActionButton>
|
{#if hasAuditPrivilege}
|
||||||
{:else}
|
<li>
|
||||||
<ActionButton action="?/email&type=activate">{$t('admin.users.activationEmail')}</ActionButton
|
<a href="/ssoadmin/audit?user={data.details.uuid}">{$t('admin.audit.title')}</a>
|
||||||
>
|
</li>
|
||||||
<form action="?/deleteInfo" method="POST">
|
{/if}
|
||||||
<Button type="submit" variant="link">{$t('admin.users.deleteInfo')}</Button>
|
|
||||||
- <span>{$t('admin.users.deleteInfoHint')}</span>
|
{#if data.details.activated}
|
||||||
</form>
|
<li>
|
||||||
{/if}
|
<ActionButton action="?/email&type=password"
|
||||||
|
>{$t('admin.users.passwordEmail')}</ActionButton
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
{:else}
|
||||||
|
<li>
|
||||||
|
<ActionButton action="?/email&type=activate"
|
||||||
|
>{$t('admin.users.activationEmail')}</ActionButton
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<form action="?/deleteInfo" method="POST">
|
||||||
|
<Button type="submit" variant="link">{$t('admin.users.deleteInfo')}</Button>
|
||||||
|
- <span>{$t('admin.users.deleteInfoHint')}</span>
|
||||||
|
</form>
|
||||||
|
</li>
|
||||||
|
{/if}
|
||||||
|
</ul>
|
||||||
</ColumnView>
|
</ColumnView>
|
||||||
</SplitView>
|
</SplitView>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user