diff mrjunejune/src/public/editor.js @ 204:e5aed6c36672

[Notes] Added icons and updated styling a bit. Probalby usable now.
author MrJuneJune <me@mrjunejune.com>
date Sun, 15 Feb 2026 11:02:13 -0800
parents b9b184b3303c
children
line wrap: on
line diff
--- a/mrjunejune/src/public/editor.js	Sun Feb 15 09:13:09 2026 -0800
+++ b/mrjunejune/src/public/editor.js	Sun Feb 15 11:02:13 2026 -0800
@@ -14,6 +14,10 @@
   return true;
 }
 
+function goHome() {
+  window.location.href = '/notes';
+}
+
 function logout() {
   localStorage.removeItem('notes-auth-token');
   window.location.href = '/notes/login';
@@ -118,9 +122,8 @@
   if (file.type.startsWith('image/')) {
     return await pollForProcessedImage(data.media_id, token);
   } else {
-    // For non-images, construct the public URL
-    const publicUrl = data.upload_url.split('?')[0]; // Remove query params
-    return { url: publicUrl };
+    // For non-images, use the public URL from the server
+    return { url: data.public_url };
   }
 }