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
54 changed files with 4954 additions and 4540 deletions

View File

@@ -11,8 +11,8 @@ type GithubRelease = {
export const checkAppVersion = async (): Promise<CheckAppVersionReponse> => {
const res = await fetch('https://api.github.com/repos/alextran1502/immich/releases/latest', {
headers: {
Accept: 'application/vnd.github.v3+json',
},
Accept: 'application/vnd.github.v3+json'
}
});
if (res.status == 200) {
@@ -23,7 +23,7 @@ export const checkAppVersion = async (): Promise<CheckAppVersionReponse> => {
return {
shouldShowAnnouncement: true,
remoteVersion: latestRelease.tag_name,
localVersion: 'empty',
localVersion: 'empty'
};
}
@@ -31,20 +31,20 @@ export const checkAppVersion = async (): Promise<CheckAppVersionReponse> => {
return {
shouldShowAnnouncement: true,
remoteVersion: latestRelease.tag_name,
localVersion: appVersion,
localVersion: appVersion
};
}
return {
shouldShowAnnouncement: false,
remoteVersion: latestRelease.tag_name,
localVersion: appVersion,
localVersion: appVersion
};
} else {
return {
shouldShowAnnouncement: false,
remoteVersion: '0',
localVersion: '0',
localVersion: '0'
};
}
};