mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
feat(server, web): quotas (#4471)
* feat: quotas * chore: open api * chore: update status box and upload error message --------- Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
This commit is contained in:
parent
f4edb6c4bd
commit
deb1f970a8
63 changed files with 646 additions and 118 deletions
|
|
@ -4,6 +4,7 @@
|
|||
import ImmichLogo from '../shared-components/immich-logo.svelte';
|
||||
import { notificationController, NotificationType } from '../shared-components/notification/notification';
|
||||
import Button from '../elements/buttons/button.svelte';
|
||||
import { convertToBytes } from '$lib/utils/byte-converter';
|
||||
|
||||
let error: string;
|
||||
let success: string;
|
||||
|
|
@ -42,6 +43,7 @@
|
|||
const email = form.get('email');
|
||||
const password = form.get('password');
|
||||
const name = form.get('name');
|
||||
const quotaSize = form.get('quotaSize');
|
||||
|
||||
try {
|
||||
const { status } = await api.userApi.createUser({
|
||||
|
|
@ -49,6 +51,7 @@
|
|||
email: String(email),
|
||||
password: String(password),
|
||||
name: String(name),
|
||||
quotaSizeInBytes: quotaSize ? convertToBytes(Number(quotaSize), 'GiB') : null,
|
||||
},
|
||||
});
|
||||
|
||||
|
|
@ -117,6 +120,11 @@
|
|||
<input class="immich-form-input" id="name" name="name" type="text" required />
|
||||
</div>
|
||||
|
||||
<div class="m-4 flex flex-col gap-2">
|
||||
<label class="immich-form-label" for="quotaSize">Quota Size (GB)</label>
|
||||
<input class="immich-form-input" id="quotaSize" name="quotaSize" type="number" min="0" />
|
||||
</div>
|
||||
|
||||
{#if error}
|
||||
<p class="ml-4 text-sm text-red-400">{error}</p>
|
||||
{/if}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue