mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
feat: allow accounts with a quota of 0 GiB (#17413)
* Allow 0GiB quotas in user create/edit form, remove unused translations * Make requireQuota check for null or 0 * Add unlimited quota change to the docs * Fix user dto formatting * Fix formating edit-user-form * Regenerate open-api files * Revert unnecessary i18n file changes * Re-add newline en.json * Resolve linting issues * Fix formatting edit-user-form * Re-add manifest
This commit is contained in:
parent
30d33f968f
commit
99cddf1fd6
11 changed files with 24 additions and 19 deletions
|
|
@ -28,7 +28,7 @@
|
|||
onEditSuccess,
|
||||
}: Props = $props();
|
||||
|
||||
let quotaSize = $state(user.quotaSizeInBytes ? convertFromBytes(user.quotaSizeInBytes, ByteUnit.GiB) : null);
|
||||
let quotaSize = $state(user.quotaSizeInBytes === null ? null : convertFromBytes(user.quotaSizeInBytes, ByteUnit.GiB));
|
||||
|
||||
const previousQutoa = user.quotaSizeInBytes;
|
||||
|
||||
|
|
@ -48,7 +48,7 @@
|
|||
email,
|
||||
name,
|
||||
storageLabel: storageLabel || '',
|
||||
quotaSizeInBytes: quotaSize ? convertToBytes(Number(quotaSize), ByteUnit.GiB) : null,
|
||||
quotaSizeInBytes: quotaSize === null ? null : convertToBytes(Number(quotaSize), ByteUnit.GiB),
|
||||
},
|
||||
});
|
||||
|
||||
|
|
@ -126,8 +126,15 @@
|
|||
<p class="text-red-400 text-sm">{$t('errors.quota_higher_than_disk_size')}</p>
|
||||
{/if}</label
|
||||
>
|
||||
<input class="immich-form-input" id="quotaSize" name="quotaSize" type="number" min="0" bind:value={quotaSize} />
|
||||
<p>{$t('admin.note_unlimited_quota')}</p>
|
||||
<input
|
||||
class="immich-form-input"
|
||||
id="quotaSize"
|
||||
name="quotaSize"
|
||||
placeholder={$t('unlimited')}
|
||||
type="number"
|
||||
min="0"
|
||||
bind:value={quotaSize}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="my-4 flex flex-col gap-2">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue