From 7a8c8c0816c1e14ec22c5a34ccfa44601f1bb0e0 Mon Sep 17 00:00:00 2001 From: kipsang Date: Fri, 9 Jan 2026 15:40:36 +0300 Subject: [PATCH 1/3] feat: add Olitt app URL configuration and update references in the frontend --- .env.example | 3 ++ .../workflows/build-and-push-dockerhub.yml | 3 +- apps/frontend/src/app/(app)/auth/layout.tsx | 34 +++++++++--------- .../src/app/(app)/auth/login/page.tsx | 22 ++++++++++-- apps/frontend/src/app/(app)/layout.tsx | 1 + apps/frontend/src/app/(extension)/layout.tsx | 1 + .../components/layout/settings.component.tsx | 8 ----- .../components/new-layout/billing.after.tsx | 4 --- .../src/components/new-layout/logo.tsx | 36 ++++++------------- .../src/helpers/variable.context.tsx | 2 ++ 10 files changed, 56 insertions(+), 58 deletions(-) diff --git a/.env.example b/.env.example index 61c43fc946..f03b955460 100644 --- a/.env.example +++ b/.env.example @@ -93,6 +93,9 @@ STRIPE_SIGNING_KEY_CONNECT="" # Developer Settings NX_ADD_PLUGINS=false IS_GENERAL="true" # required for now + +# Parent app URL (used by the UI "Back to Olitt" button) +NEXT_PUBLIC_OLITT_APP_URL="" NEXT_PUBLIC_POSTIZ_OAUTH_DISPLAY_NAME="Authentik" NEXT_PUBLIC_POSTIZ_OAUTH_LOGO_URL="https://raw.githubusercontent.com/walkxcode/dashboard-icons/master/png/authentik.png" POSTIZ_GENERIC_OAUTH="false" diff --git a/.github/workflows/build-and-push-dockerhub.yml b/.github/workflows/build-and-push-dockerhub.yml index fb2df49d05..a823e5aceb 100644 --- a/.github/workflows/build-and-push-dockerhub.yml +++ b/.github/workflows/build-and-push-dockerhub.yml @@ -63,12 +63,11 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_PASSWORD }} - - name: Build and push multi-arch image + - name: Build and push image uses: docker/build-push-action@v4 with: context: . file: Dockerfile.dev - platforms: linux/amd64,linux/arm64 push: true cache-from: type=gha cache-to: type=gha,mode=max diff --git a/apps/frontend/src/app/(app)/auth/layout.tsx b/apps/frontend/src/app/(app)/auth/layout.tsx index 729e7aa60b..5143b24a9c 100644 --- a/apps/frontend/src/app/(app)/auth/layout.tsx +++ b/apps/frontend/src/app/(app)/auth/layout.tsx @@ -14,25 +14,27 @@ export default async function AuthLayout({ }) { const t = await getT(); + const olittAppUrl = process.env.NEXT_PUBLIC_OLITT_APP_URL || '/'; + + return ( -
+
{/**/} -
-
- -
{children}
-
-
-
-
- Over 18,000+{' '} - Entrepreneurs use -
- Postiz To Grow Their Social Presence -
- -
+
+

Continue in Olitt

+

+ Please return to Olitt to start your login again. +

+ +
); } diff --git a/apps/frontend/src/app/(app)/auth/login/page.tsx b/apps/frontend/src/app/(app)/auth/login/page.tsx index 2a29d096fb..672f6b079d 100644 --- a/apps/frontend/src/app/(app)/auth/login/page.tsx +++ b/apps/frontend/src/app/(app)/auth/login/page.tsx @@ -1,11 +1,27 @@ export const dynamic = 'force-dynamic'; -import { Login } from '@gitroom/frontend/components/auth/login'; import { Metadata } from 'next'; import { isGeneralServerSide } from '@gitroom/helpers/utils/is.general.server.side'; export const metadata: Metadata = { - title: `${isGeneralServerSide() ? 'Postiz' : 'Gitroom'} Login`, + title: `${isGeneralServerSide() ? 'Olitt' : 'Gitroom'} Login`, description: '', }; export default async function Auth() { - return ; + const olittAppUrl = process.env.NEXT_PUBLIC_OLITT_APP_URL || '/'; + + return ( +
+

Continue in Olitt

+

+ Please return to Olitt to start your login again. +

+
+ + Back to Olitt + +
+
+ ); } diff --git a/apps/frontend/src/app/(app)/layout.tsx b/apps/frontend/src/app/(app)/layout.tsx index 4a60fc05dd..88ba611114 100644 --- a/apps/frontend/src/app/(app)/layout.tsx +++ b/apps/frontend/src/app/(app)/layout.tsx @@ -56,6 +56,7 @@ export default async function AppLayout({ children }: { children: ReactNode }) { billingEnabled={!!process.env.STRIPE_PUBLISHABLE_KEY} discordUrl={process.env.NEXT_PUBLIC_DISCORD_SUPPORT!} frontEndUrl={process.env.FRONTEND_URL!} + olittAppUrl={process.env.NEXT_PUBLIC_OLITT_APP_URL || 'https://app.olitt.com/app/websites'} isGeneral={!!process.env.IS_GENERAL} genericOauth={!!process.env.POSTIZ_GENERIC_OAUTH} oauthLogoUrl={process.env.NEXT_PUBLIC_POSTIZ_OAUTH_LOGO_URL!} diff --git a/apps/frontend/src/app/(extension)/layout.tsx b/apps/frontend/src/app/(extension)/layout.tsx index 4a02c5ea25..acda7e4e5a 100644 --- a/apps/frontend/src/app/(extension)/layout.tsx +++ b/apps/frontend/src/app/(extension)/layout.tsx @@ -36,6 +36,7 @@ export default async function AppLayout({ children }: { children: ReactNode }) { billingEnabled={!!process.env.STRIPE_PUBLISHABLE_KEY} discordUrl={process.env.NEXT_PUBLIC_DISCORD_SUPPORT!} frontEndUrl={process.env.FRONTEND_URL!} + olittAppUrl={process.env.NEXT_PUBLIC_OLITT_APP_URL || ''} isGeneral={!!process.env.IS_GENERAL} genericOauth={!!process.env.POSTIZ_GENERIC_OAUTH} oauthLogoUrl={process.env.NEXT_PUBLIC_POSTIZ_OAUTH_LOGO_URL!} diff --git a/apps/frontend/src/components/layout/settings.component.tsx b/apps/frontend/src/components/layout/settings.component.tsx index 90c16e4ebd..8c546412ab 100644 --- a/apps/frontend/src/components/layout/settings.component.tsx +++ b/apps/frontend/src/components/layout/settings.component.tsx @@ -19,7 +19,6 @@ import { useSWRConfig } from 'swr'; import clsx from 'clsx'; import { TeamsComponent } from '@gitroom/frontend/components/settings/teams.component'; import { useUser } from '@gitroom/frontend/components/layout/user.context'; -import { LogoutComponent } from '@gitroom/frontend/components/layout/logout.component'; import { useSearchParams } from 'next/navigation'; import { useVariables } from '@gitroom/react/helpers/variable.context'; import { PublicComponent } from '@gitroom/frontend/components/public-api/public.component'; @@ -139,13 +138,6 @@ export const SettingsPopup: FC<{
))} -
- {showLogout && ( -
- -
- )} -
diff --git a/apps/frontend/src/components/new-layout/billing.after.tsx b/apps/frontend/src/components/new-layout/billing.after.tsx index 4562852710..bbf774cd67 100644 --- a/apps/frontend/src/components/new-layout/billing.after.tsx +++ b/apps/frontend/src/components/new-layout/billing.after.tsx @@ -3,7 +3,6 @@ import { useUser } from '@gitroom/frontend/components/layout/user.context'; import { useVariables } from '@gitroom/react/helpers/variable.context'; import { useT } from '@gitroom/react/translation/get.transation.service.client'; import { Logo } from '@gitroom/frontend/components/new-layout/logo'; -import { LogoutComponent } from '@gitroom/frontend/components/layout/logout.component'; import React from 'react'; import { OrganizationSelector } from '@gitroom/frontend/components/layout/organization.selector'; @@ -96,9 +95,6 @@ export const BillingAfter = () => { )}
-
- -
); }; diff --git a/apps/frontend/src/components/new-layout/logo.tsx b/apps/frontend/src/components/new-layout/logo.tsx index 3c9113ca16..5c4df6a234 100644 --- a/apps/frontend/src/components/new-layout/logo.tsx +++ b/apps/frontend/src/components/new-layout/logo.tsx @@ -1,32 +1,18 @@ 'use client'; +import { useVariables } from '@gitroom/react/helpers/variable.context'; + export const Logo = () => { + const { olittAppUrl } = useVariables(); + + if (!olittAppUrl) return null; + return ( - - - - - - + Back to Olitt + ); }; diff --git a/libraries/react-shared-libraries/src/helpers/variable.context.tsx b/libraries/react-shared-libraries/src/helpers/variable.context.tsx index 1b81f7c2bc..4642fa9635 100644 --- a/libraries/react-shared-libraries/src/helpers/variable.context.tsx +++ b/libraries/react-shared-libraries/src/helpers/variable.context.tsx @@ -8,6 +8,7 @@ interface VariableContextInterface { genericOauth: boolean; oauthLogoUrl: string; oauthDisplayName: string; + olittAppUrl: string; frontEndUrl: string; plontoKey: string; storageProvider: 'local' | 'cloudflare'; @@ -33,6 +34,7 @@ const VariableContext = createContext({ genericOauth: false, oauthLogoUrl: '', oauthDisplayName: '', + olittAppUrl: '', frontEndUrl: '', storageProvider: 'local', plontoKey: '', From 9e169823f5053a131531bc3f8955791e917ea1d8 Mon Sep 17 00:00:00 2001 From: kipsang Date: Sat, 10 Jan 2026 08:45:46 +0300 Subject: [PATCH 2/3] fix: remove unnecessary comments --- apps/frontend/src/app/(app)/auth/layout.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/frontend/src/app/(app)/auth/layout.tsx b/apps/frontend/src/app/(app)/auth/layout.tsx index 5143b24a9c..5c71909318 100644 --- a/apps/frontend/src/app/(app)/auth/layout.tsx +++ b/apps/frontend/src/app/(app)/auth/layout.tsx @@ -19,7 +19,6 @@ export default async function AuthLayout({ return (
- {/**/}

Continue in Olitt

@@ -29,7 +28,7 @@ export default async function AuthLayout({
Back to Olitt From ad1437cc2568155ffaa83fb0a0e6cc92fde6ea13 Mon Sep 17 00:00:00 2001 From: kipsang Date: Sat, 10 Jan 2026 10:00:08 +0300 Subject: [PATCH 3/3] feat: add gap between logo elements in the navigation --- apps/frontend/src/components/new-layout/logo.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/frontend/src/components/new-layout/logo.tsx b/apps/frontend/src/components/new-layout/logo.tsx index 5c4df6a234..3e3c64d943 100644 --- a/apps/frontend/src/components/new-layout/logo.tsx +++ b/apps/frontend/src/components/new-layout/logo.tsx @@ -10,8 +10,9 @@ export const Logo = () => { return ( + Back to Olitt );