Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0be93d088b | ||
|
|
832e7265c9 | ||
|
|
d1e295165a | ||
|
|
969521ac3f | ||
|
|
908764873f | ||
|
|
043d28539e |
@@ -1,5 +1,23 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [0.6.9](https://github.com/ginnoir/famapp/compare/v0.6.8...v0.6.9) (2026-07-18)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
- build share urls from auth_url instead of localhost ([832e726](https://github.com/ginnoir/famapp/commit/832e7265c9354edf86f28f72f129ee34da8c3d04))
|
||||||
|
|
||||||
|
## [0.6.8](https://github.com/ginnoir/famapp/compare/v0.6.7...v0.6.8) (2026-07-18)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
- restore share and note scrolling on ios pwa ([969521a](https://github.com/ginnoir/famapp/commit/969521ac3f527a939988053b453881ed3560eb61))
|
||||||
|
|
||||||
|
## [0.6.7](https://github.com/ginnoir/famapp/compare/v0.6.6...v0.6.7) (2026-07-13)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
- **garden:** add ikea cabinet and acrylic case container types ([043d285](https://github.com/ginnoir/famapp/commit/043d28539ec08dd46a097970b4e876bfb1ba7aa1))
|
||||||
|
|
||||||
## [0.6.6](https://github.com/ginnoir/famapp/compare/v0.6.5...v0.6.6) (2026-07-13)
|
## [0.6.6](https://github.com/ginnoir/famapp/compare/v0.6.5...v0.6.6) (2026-07-13)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|||||||
@@ -16,7 +16,9 @@ ENV CI=true
|
|||||||
ENV NEXT_TELEMETRY_DISABLED=1
|
ENV NEXT_TELEMETRY_DISABLED=1
|
||||||
ENV DATABASE_URL=postgres://build:build@localhost:5432/build
|
ENV DATABASE_URL=postgres://build:build@localhost:5432/build
|
||||||
ENV AUTH_SECRET=build-time-placeholder
|
ENV AUTH_SECRET=build-time-placeholder
|
||||||
|
# Build-only placeholder. Runtime public URL is AUTH_URL from stack.env — never prefer this.
|
||||||
ENV NEXT_PUBLIC_APP_URL=http://localhost:3000
|
ENV NEXT_PUBLIC_APP_URL=http://localhost:3000
|
||||||
|
ENV AUTH_URL=http://localhost:3000
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN pnpm install --offline --frozen-lockfile
|
RUN pnpm install --offline --frozen-lockfile
|
||||||
RUN --mount=type=cache,id=famapp-nextjs,target=/app/.next/cache \
|
RUN --mount=type=cache,id=famapp-nextjs,target=/app/.next/cache \
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "famapp",
|
"name": "famapp",
|
||||||
"version": "0.6.6",
|
"version": "0.6.9",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"packageManager": "pnpm@10.33.3",
|
"packageManager": "pnpm@10.33.3",
|
||||||
|
|||||||
+13
-2
@@ -725,9 +725,19 @@
|
|||||||
|
|
||||||
.scroll-area {
|
.scroll-area {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
overflow: auto;
|
overflow-x: hidden;
|
||||||
|
overflow-y: auto;
|
||||||
padding: 20px 24px 60px;
|
padding: 20px 24px 60px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Bare routes (/s/*, /login, signed-out) — same scrollport as .scroll-area
|
||||||
|
without app chrome padding. Needed because html/body are overflow:hidden. */
|
||||||
|
.bare-scroll {
|
||||||
|
height: 100%;
|
||||||
|
height: 100dvh;
|
||||||
|
overflow-x: hidden;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
:where(html[data-nav="bottom"]) .scroll-area,
|
:where(html[data-nav="bottom"]) .scroll-area,
|
||||||
:where(html[data-nav="fab"]) .scroll-area {
|
:where(html[data-nav="fab"]) .scroll-area {
|
||||||
padding: 12px 14px 74px;
|
padding: 12px 14px 74px;
|
||||||
@@ -1617,7 +1627,8 @@ select {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Momentum scrolling + prevent page bounce fighting in-app scroll */
|
/* Momentum scrolling + prevent page bounce fighting in-app scroll */
|
||||||
.scroll-area {
|
.scroll-area,
|
||||||
|
.bare-scroll {
|
||||||
-webkit-overflow-scrolling: touch;
|
-webkit-overflow-scrolling: touch;
|
||||||
overscroll-behavior-y: contain;
|
overscroll-behavior-y: contain;
|
||||||
}
|
}
|
||||||
|
|||||||
+14
-1
@@ -1,4 +1,5 @@
|
|||||||
import type { Metadata, Viewport } from "next";
|
import type { Metadata, Viewport } from "next";
|
||||||
|
import { headers } from "next/headers";
|
||||||
import "./globals.css";
|
import "./globals.css";
|
||||||
import { Inter, Source_Serif_4, Newsreader, Fraunces, JetBrains_Mono } from "next/font/google";
|
import { Inter, Source_Serif_4, Newsreader, Fraunces, JetBrains_Mono } from "next/font/google";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
@@ -71,9 +72,13 @@ export const metadata: Metadata = {
|
|||||||
|
|
||||||
// Pre-paint: read user's theme prefs from localStorage and apply data-* + .dark.
|
// Pre-paint: read user's theme prefs from localStorage and apply data-* + .dark.
|
||||||
// Falls back to clay/serif-sans/regular/sidebar/system if nothing is stored.
|
// Falls back to clay/serif-sans/regular/sidebar/system if nothing is stored.
|
||||||
|
// Public share pages always use ink so guests get a neutral, consistent look.
|
||||||
const prePaintScript = `(function(){
|
const prePaintScript = `(function(){
|
||||||
try {
|
try {
|
||||||
var palette = localStorage.getItem('themePalette') || localStorage.getItem('theme') || 'clay';
|
var isShare = location.pathname.indexOf('/s/') === 0;
|
||||||
|
var palette = isShare
|
||||||
|
? 'ink'
|
||||||
|
: (localStorage.getItem('themePalette') || localStorage.getItem('theme') || 'clay');
|
||||||
var mode = localStorage.getItem('themeMode') || 'system';
|
var mode = localStorage.getItem('themeMode') || 'system';
|
||||||
var fontPair = localStorage.getItem('themeFontPair') || 'serif-sans';
|
var fontPair = localStorage.getItem('themeFontPair') || 'serif-sans';
|
||||||
var density = localStorage.getItem('themeDensity') || 'regular';
|
var density = localStorage.getItem('themeDensity') || 'regular';
|
||||||
@@ -106,6 +111,10 @@ export default async function RootLayout({ children }: { children: React.ReactNo
|
|||||||
let assistantName = DEFAULT_ASSISTANT_NAME;
|
let assistantName = DEFAULT_ASSISTANT_NAME;
|
||||||
let assistantModel: string | null = null;
|
let assistantModel: string | null = null;
|
||||||
|
|
||||||
|
const headersList = await headers();
|
||||||
|
const pathname = headersList.get("x-pathname") ?? "";
|
||||||
|
const isSharePage = pathname === "/s" || pathname.startsWith("/s/");
|
||||||
|
|
||||||
const session = await auth();
|
const session = await auth();
|
||||||
if (session?.user?.id) {
|
if (session?.user?.id) {
|
||||||
signedIn = true;
|
signedIn = true;
|
||||||
@@ -146,6 +155,10 @@ export default async function RootLayout({ children }: { children: React.ReactNo
|
|||||||
.orderBy(asc(dashboards.position), asc(dashboards.createdAt));
|
.orderBy(asc(dashboards.position), asc(dashboards.createdAt));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isSharePage) {
|
||||||
|
palette = "ink";
|
||||||
|
}
|
||||||
|
|
||||||
// Server-side initial dark guess: only for `dark` mode (system mode is corrected
|
// Server-side initial dark guess: only for `dark` mode (system mode is corrected
|
||||||
// before paint by the inline script). Avoids a flash on signed-in users.
|
// before paint by the inline script). Avoids a flash on signed-in users.
|
||||||
const isDark = mode === "dark";
|
const isDark = mode === "dark";
|
||||||
|
|||||||
@@ -24,7 +24,8 @@ export async function AppShell({ signedIn, navStyle, children }: Props) {
|
|||||||
|
|
||||||
if (bare || !signedIn) {
|
if (bare || !signedIn) {
|
||||||
// No shell — share viewer and signed-out pages render bare.
|
// No shell — share viewer and signed-out pages render bare.
|
||||||
return <>{children}</>;
|
// html/body are overflow:hidden for the app grid; bare pages need their own scroller.
|
||||||
|
return <div className="bare-scroll">{children}</div>;
|
||||||
}
|
}
|
||||||
|
|
||||||
const useTopVariant = navStyle === "top-nav";
|
const useTopVariant = navStyle === "top-nav";
|
||||||
|
|||||||
@@ -64,6 +64,9 @@
|
|||||||
margin: 0.8em 0;
|
margin: 0.8em 0;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
|
overflow-y: hidden;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
|
overscroll-behavior-x: contain;
|
||||||
padding: 0.75rem 0.9rem;
|
padding: 0.75rem 0.9rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -91,7 +94,12 @@
|
|||||||
display: block;
|
display: block;
|
||||||
margin: 0.8em 0;
|
margin: 0.8em 0;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
|
/* overflow-x alone computes overflow-y to auto, which traps vertical
|
||||||
|
touch scrolling on iOS when a wide table fills the viewport. */
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
|
overflow-y: hidden;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
|
overscroll-behavior-x: contain;
|
||||||
width: max-content;
|
width: max-content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
/** Public origin for absolute links. AUTH_URL wins — Docker build sets NEXT_PUBLIC to localhost. */
|
||||||
|
export function getAppPublicUrl(): string {
|
||||||
|
const raw =
|
||||||
|
process.env.AUTH_URL?.trim() ||
|
||||||
|
process.env.NEXT_PUBLIC_APP_URL?.trim() ||
|
||||||
|
"http://localhost:3000";
|
||||||
|
return raw.replace(/\/$/, "");
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
import { createHash, randomBytes } from "crypto";
|
import { createHash, randomBytes } from "crypto";
|
||||||
import { and, eq, isNull } from "drizzle-orm";
|
import { and, eq, isNull } from "drizzle-orm";
|
||||||
import type { ApiAuthContext } from "@/lib/api-auth";
|
import type { ApiAuthContext } from "@/lib/api-auth";
|
||||||
|
import { getAppPublicUrl } from "@/lib/app-url";
|
||||||
import { db } from "@/lib/db";
|
import { db } from "@/lib/db";
|
||||||
import { getEntityType, getRegistry } from "./registry";
|
import { getEntityType, getRegistry } from "./registry";
|
||||||
import { shareLinks } from "./schema";
|
import { shareLinks } from "./schema";
|
||||||
@@ -27,9 +28,7 @@ function hashToken(raw: string): string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function buildUrl(token: string): string {
|
function buildUrl(token: string): string {
|
||||||
const base =
|
return `${getAppPublicUrl()}/s/${token}`;
|
||||||
process.env["NEXT_PUBLIC_APP_URL"] ?? process.env["AUTH_URL"] ?? "http://localhost:3000";
|
|
||||||
return `${base}/s/${token}`;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function listShareableEntityTypes() {
|
export function listShareableEntityTypes() {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
import { createHash, randomBytes } from "crypto";
|
import { createHash, randomBytes } from "crypto";
|
||||||
import { and, eq, isNull } from "drizzle-orm";
|
import { and, eq, isNull } from "drizzle-orm";
|
||||||
|
import { getAppPublicUrl } from "@/lib/app-url";
|
||||||
import { db } from "@/lib/db";
|
import { db } from "@/lib/db";
|
||||||
import { getCurrentSession } from "@/lib/session";
|
import { getCurrentSession } from "@/lib/session";
|
||||||
import { getEntityType } from "./registry";
|
import { getEntityType } from "./registry";
|
||||||
@@ -21,9 +22,7 @@ function hashToken(raw: string): string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function buildUrl(token: string): string {
|
function buildUrl(token: string): string {
|
||||||
const base =
|
return `${getAppPublicUrl()}/s/${token}`;
|
||||||
process.env["NEXT_PUBLIC_APP_URL"] ?? process.env["AUTH_URL"] ?? "http://localhost:3000";
|
|
||||||
return `${base}/s/${token}`;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function createShareLink(
|
export async function createShareLink(
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ const CONTAINER_TYPES = [
|
|||||||
{ value: "raised-bed", label: "Raised bed" },
|
{ value: "raised-bed", label: "Raised bed" },
|
||||||
{ value: "window-box", label: "Window box" },
|
{ value: "window-box", label: "Window box" },
|
||||||
{ value: "single-pot", label: "Single pot" },
|
{ value: "single-pot", label: "Single pot" },
|
||||||
|
{ value: "ikea-cabinet", label: "Ikea Cabinet" },
|
||||||
|
{ value: "acrylic-case", label: "Acrylic Case" },
|
||||||
{ value: "outdoor", label: "Outdoor" },
|
{ value: "outdoor", label: "Outdoor" },
|
||||||
{ value: "other", label: "Other" },
|
{ value: "other", label: "Other" },
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user