From 146c1b53c630075c89e9f4ecebe46b7399422e9e Mon Sep 17 00:00:00 2001 From: Max Halford Date: Tue, 2 Jun 2026 21:42:29 +0200 Subject: [PATCH] hide premium-tier UI behind VITE_SHOW_PREMIUM flag MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Public-launch v1: lead with the open-source SQL canvas, defer Pro plan, Desktop download, MCP, and sign-in/account to later phases. One master flag controls all of it. Defaults to off; set to true to surface the premium UI again. Underlying logic (isPro checks, autofix, WS sync) is untouched — just unreachable without sign-in. When off: - LandingPage: hides Pro section, Desktop section, Pro/Desktop FAQs, and Pro/MCP mentions in JSON-LD + meta description - MenuBar: hides "Connect via MCP...", Share menu item, Pro badge, sign-in dropdown, user/account dropdown - SettingsPanel: hides Hex remover section - SqlBox: hides the wand (cast-a-spell) button - Router: /account and /oauth/consent redirect to /app (/auth/callback stays open — BigQuery OAuth reuses it) Co-Authored-By: Claude Opus 4.7 (1M context) --- frontend/.env.example | 4 ++ frontend/src/boxes/sql/SqlBox.vue | 3 + frontend/src/components/MenuBar.vue | 38 +++++++---- frontend/src/components/SettingsPanel.vue | 4 +- frontend/src/constants/features.ts | 5 ++ frontend/src/main.ts | 11 ++++ frontend/src/views/LandingPage.vue | 78 ++++++++++++----------- 7 files changed, 92 insertions(+), 51 deletions(-) create mode 100644 frontend/src/constants/features.ts diff --git a/frontend/.env.example b/frontend/.env.example index 571707f..3b13da0 100644 --- a/frontend/.env.example +++ b/frontend/.env.example @@ -2,3 +2,7 @@ VITE_GOOGLE_CLIENT_ID=your-client-id-here.apps.googleusercontent.com VITE_GITHUB_CLIENT_ID= VITE_BACKEND_URL=http://localhost:8000 + +# Toggle premium-tier UI (Pro plan, Desktop download, MCP, sign-in/account). +# Defaults to off (public launch); set to true to surface these features. +VITE_SHOW_PREMIUM=false diff --git a/frontend/src/boxes/sql/SqlBox.vue b/frontend/src/boxes/sql/SqlBox.vue index b26b853..04fe6cc 100644 --- a/frontend/src/boxes/sql/SqlBox.vue +++ b/frontend/src/boxes/sql/SqlBox.vue @@ -22,6 +22,7 @@ import { DATABASE_INFO } from '../../types/database' import { hasCTEs } from '../../utils/cteParser' import { useSqlGlotStore } from '../../stores/sqlglot' import { useUserStore } from '../../stores/user' +import { SHOW_PREMIUM } from '../../constants/features' const duckdbStore = useDuckDBStore() const canvasStore = useCanvasStore() @@ -29,6 +30,7 @@ const sqlglotStore = useSqlGlotStore() const queryHistoryStore = useQueryHistoryStore() const settingsStore = useSettingsStore() const userStore = useUserStore() +const showPremium = SHOW_PREMIUM // Inject box executor registry for recursive dependency execution const registerBoxExecutor = inject<((boxId: number, runFn: () => Promise) => void) | null>('registerBoxExecutor', null) @@ -509,6 +511,7 @@ defineExpose({ - - +