Explorar o código

fix: dialog overflow when creating a user (#3422)

martin %!s(int64=2) %!d(string=hai) anos
pai
achega
1c5926553a

+ 3 - 2
web/src/lib/components/forms/create-user-form.svelte

@@ -78,7 +78,7 @@
 </script>
 </script>
 
 
 <div
 <div
-  class="w-[500px] max-w-[95vw] rounded-3xl border bg-immich-bg p-4 py-8 shadow-sm dark:border-immich-dark-gray dark:bg-immich-dark-gray dark:text-immich-dark-fg"
+  class="max-h-screen w-[500px] max-w-[95vw] overflow-y-scroll rounded-3xl border bg-immich-bg p-4 py-8 shadow-sm dark:border-immich-dark-gray dark:bg-immich-dark-gray dark:text-immich-dark-fg"
 >
 >
   <div class="flex flex-col place-content-center place-items-center gap-4 px-4">
   <div class="flex flex-col place-content-center place-items-center gap-4 px-4">
     <ImmichLogo class="text-center" height="100" width="100" />
     <ImmichLogo class="text-center" height="100" width="100" />
@@ -128,7 +128,8 @@
     {#if success}
     {#if success}
       <p class="ml-4 text-sm text-immich-primary">{success}</p>
       <p class="ml-4 text-sm text-immich-primary">{success}</p>
     {/if}
     {/if}
-    <div class="flex w-full p-4">
+    <div class="flex w-full gap-4 p-4">
+      <Button color="gray" fullwidth on:click={() => dispatch('cancel')}>Cancel</Button>
       <Button type="submit" disabled={isCreatingUser} fullwidth>Create</Button>
       <Button type="submit" disabled={isCreatingUser} fullwidth>Create</Button>
     </div>
     </div>
   </form>
   </form>

+ 1 - 1
web/src/routes/admin/user-management/+page.svelte

@@ -110,7 +110,7 @@
 <section>
 <section>
   {#if shouldShowCreateUserForm}
   {#if shouldShowCreateUserForm}
     <FullScreenModal on:clickOutside={() => (shouldShowCreateUserForm = false)}>
     <FullScreenModal on:clickOutside={() => (shouldShowCreateUserForm = false)}>
-      <CreateUserForm on:user-created={onUserCreated} />
+      <CreateUserForm on:user-created={onUserCreated} on:cancel={() => (shouldShowCreateUserForm = false)} />
     </FullScreenModal>
     </FullScreenModal>
   {/if}
   {/if}