Use cookies for client requests (#377)

* Use cookie for frontend request

* Remove api helper to use SDK

* Added error handling to status box

* Remove additional places that check for session.user

* Refactor sending password

* prettier clean up

* remove deadcode

* Move all authentication requests to the client

* refactor upload panel to only fetch assets after the upload panel disappear

* Added keydown to remove focus on title change on album viewer
This commit is contained in:
Alex 2022-07-26 12:28:07 -05:00 committed by GitHub
parent 2ebb755f00
commit 83cbf51704
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
54 changed files with 4954 additions and 4540 deletions

View file

@ -36,6 +36,7 @@
let backUrl = '/albums';
let currentAlbumName = '';
let currentUser: UserResponseDto;
let titleInput: HTMLInputElement;
$: isOwned = currentUser?.id == album.ownerId;
@ -298,6 +299,12 @@
<section class="m-auto my-[160px] w-[60%]">
<input
on:keydown={(e) => {
if (e.key == 'Enter') {
isEditingTitle = false;
titleInput.blur();
}
}}
on:focus={() => (isEditingTitle = true)}
on:blur={() => (isEditingTitle = false)}
class={`transition-all text-6xl text-immich-primary w-[99%] border-b-2 border-transparent outline-none ${
@ -306,6 +313,7 @@
type="text"
bind:value={album.albumName}
disabled={!isOwned}
bind:this={titleInput}
/>
{#if album.assets.length > 0}