From 5f9ad63fc056b4511f02760924e25b5277aa3bb7 Mon Sep 17 00:00:00 2001 From: Marcus Perryman Date: Wed, 20 Nov 2024 09:50:37 +0000 Subject: [PATCH] merge changes for Google drive, Blender and Unigram (#159) * Update Unigram and Telegram icons and arm native information * Get biscuit from JWT * Update Google Drive and blender with release info (#158) --------- Co-authored-by: Philip Colmer --- auth.config.ts | 19 +++++++++++++++++-- public/icons/GoogleDrive.svg | 8 ++++++++ src/content/applications/Blender.md | 10 +++++----- src/content/applications/GoogleDrive.md | 7 +++---- 4 files changed, 33 insertions(+), 11 deletions(-) create mode 100644 public/icons/GoogleDrive.svg diff --git a/auth.config.ts b/auth.config.ts index 199d37f6..e53d7413 100644 --- a/auth.config.ts +++ b/auth.config.ts @@ -24,6 +24,20 @@ function getPublicKeys() { }); } +async function getBiscuitFromJWT(accessToken: string) { + const res = await fetch(`${AUTH_API_URL}/session`, { + headers: { + Authorization: `Bearer ${accessToken}` + } + }); + const resJson = await res.json(); + if (!res.ok || !resJson) { + console.log(resJson); + throw new Error("failed to fetch biscuit from session"); + } + return resJson.biscuit.token; +} + async function afterToken(accessToken: string) { // fetch biscuit public keys const res = await getPublicKeys(); @@ -107,11 +121,12 @@ export default defineConfig({ // this is only run after sign in if (account) { try { + let biscuit = await getBiscuitFromJWT(account.access_token!); const { profile, public_keys } = await afterToken( - account.access_token! + biscuit ); return { - access_token: account.access_token, + access_token: biscuit, // refresh_token: account.refresh_token, expires_at: account.expires_at, public_keys, diff --git a/public/icons/GoogleDrive.svg b/public/icons/GoogleDrive.svg new file mode 100644 index 00000000..a8cefd5b --- /dev/null +++ b/public/icons/GoogleDrive.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/src/content/applications/Blender.md b/src/content/applications/Blender.md index a8658087..6625e59e 100644 --- a/src/content/applications/Blender.md +++ b/src/content/applications/Blender.md @@ -1,12 +1,12 @@ --- name: "Blender" categories: ['creative'] -compatibility: emulation +compatibility: native display_result: "Compatible" featured: true -version_from: "4.0.2.0" -link: https://apps.microsoft.com/detail/9pp3c07gtvrh +version_from: "4.3" +link: https://blender.org/download icon: blender.svg --- - -Daily builds of Alpha 4.3.0 available from https://builder.blender.org/download/daily/ +Store doesnt have Arm build yet. +https://apps.microsoft.com/detail/9pp3c07gtvrh diff --git a/src/content/applications/GoogleDrive.md b/src/content/applications/GoogleDrive.md index ee34f26e..b22f34eb 100644 --- a/src/content/applications/GoogleDrive.md +++ b/src/content/applications/GoogleDrive.md @@ -2,8 +2,7 @@ name: "Google Drive" categories: ['prod'] compatibility: native -display_result: "Vendor Announced - Launching Soon" -link: https://www.google.com/drive/download/ +display_result: "Compatible" +link: https://dl.google.com/drive-file-stream/arm64beta/GoogleDriveBetaSetup.exe +icon: GoogleDrive.svg --- -Windows architecture is not supported error is observed during installation. -The web browser interface offers some of the functionality to access cloud file storage. \ No newline at end of file