diff --git a/modules/rphotos/components/folk-photo-gallery.ts b/modules/rphotos/components/folk-photo-gallery.ts
index b9a1ff8..c20c501 100644
--- a/modules/rphotos/components/folk-photo-gallery.ts
+++ b/modules/rphotos/components/folk-photo-gallery.ts
@@ -113,12 +113,12 @@ class FolkPhotoGallery extends HTMLElement {
private getApiBase(): string {
const path = window.location.pathname;
- const match = path.match(/^\/([^/]+)\/photos/);
- return match ? `/${match[1]}/photos` : "";
+ const match = path.match(/^\/([^/]+)\/rphotos/);
+ return match ? `/${match[1]}/rphotos` : "";
}
private getImmichUrl(): string {
- return `https://${this.space}.rphotos.online`;
+ return `/${this.space}/rphotos/album`;
}
private async loadGallery() {
@@ -357,7 +357,7 @@ class FolkPhotoGallery extends HTMLElement {
Photos
@@ -368,7 +368,7 @@ class FolkPhotoGallery extends HTMLElement {
📸
No photos yet
Upload photos through Immich to see them here. Shared albums will appear automatically.
-
+
Open Immich to Upload
@@ -419,7 +419,7 @@ class FolkPhotoGallery extends HTMLElement {
${this.esc(album.albumName)}
diff --git a/modules/rphotos/mod.ts b/modules/rphotos/mod.ts
index 23e320d..22c8ea4 100644
--- a/modules/rphotos/mod.ts
+++ b/modules/rphotos/mod.ts
@@ -7,7 +7,7 @@
*/
import { Hono } from "hono";
-import { renderShell } from "../../server/shell";
+import { renderShell, renderExternalAppShell } from "../../server/shell";
import { getModuleInfoList } from "../../shared/module";
import type { RSpaceModule } from "../../shared/module";
import { renderLanding } from "./landing";
@@ -16,6 +16,7 @@ const routes = new Hono();
const IMMICH_BASE = process.env.RPHOTOS_IMMICH_URL || "http://localhost:2284";
const IMMICH_API_KEY = process.env.RPHOTOS_API_KEY || "";
+const IMMICH_PUBLIC_URL = process.env.RPHOTOS_IMMICH_PUBLIC_URL || "https://demo.rphotos.online";
// ── Proxy: list shared albums ──
routes.get("/api/albums", async (c) => {
@@ -106,6 +107,20 @@ routes.get("/api/assets/:id/original", async (c) => {
}
});
+// ── Embedded Immich UI ──
+routes.get("/album", (c) => {
+ const spaceSlug = c.req.param("space") || "demo";
+ return c.html(renderExternalAppShell({
+ title: `${spaceSlug} — Immich | rSpace`,
+ moduleId: "rphotos",
+ spaceSlug,
+ modules: getModuleInfoList(),
+ appUrl: IMMICH_PUBLIC_URL,
+ appName: "Immich",
+ theme: "dark",
+ }));
+});
+
// ── Page route ──
routes.get("/", (c) => {
const spaceSlug = c.req.param("space") || "demo";
@@ -129,6 +144,7 @@ export const photosModule: RSpaceModule = {
routes,
landingPage: renderLanding,
standaloneDomain: "rphotos.online",
+ externalApp: { url: IMMICH_PUBLIC_URL, name: "Immich" },
feeds: [
{
id: "rphotos",