mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
[WEB] View large images on web (#189)
* Added selection icon to thumbnail * Added micro-interaction and video file indication * Added page to add page * Added image viewer * navigate assets * Added separate component for viewing the video file * Added FFmpeg modules * Added correct content-type header for serving image file * Added loading spinner
This commit is contained in:
parent
337db1c508
commit
c28251b8b4
15 changed files with 527 additions and 225 deletions
|
|
@ -11,29 +11,35 @@ export const handle: Handle = async ({ event, resolve, }) => {
|
|||
return await resolve(event)
|
||||
}
|
||||
|
||||
const { email, isAdmin, firstName, lastName, id, accessToken } = JSON.parse(cookies.session);
|
||||
try {
|
||||
const { email, isAdmin, firstName, lastName, id, accessToken } = JSON.parse(cookies.session);
|
||||
|
||||
const res = await fetch(`${serverEndpoint}/auth/validateToken`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Authorization': `Bearer ${accessToken}`
|
||||
const res = await fetch(`${serverEndpoint}/auth/validateToken`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Authorization': `Bearer ${accessToken}`
|
||||
}
|
||||
})
|
||||
|
||||
if (res.status === 201) {
|
||||
event.locals.user = {
|
||||
id,
|
||||
accessToken,
|
||||
firstName,
|
||||
lastName,
|
||||
isAdmin,
|
||||
email
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
if (res.status === 201) {
|
||||
event.locals.user = {
|
||||
id,
|
||||
accessToken,
|
||||
firstName,
|
||||
lastName,
|
||||
isAdmin,
|
||||
email
|
||||
};
|
||||
const response = await resolve(event);
|
||||
|
||||
return response;
|
||||
} catch (error) {
|
||||
console.log('Error parsing session', error);
|
||||
return await resolve(event);
|
||||
}
|
||||
|
||||
const response = await resolve(event);
|
||||
|
||||
return response;
|
||||
};
|
||||
|
||||
export const getSession: GetSession = async ({ locals }) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue