π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Scaffold
Manav Rathiefa82b7fb7c0
diff --git a/web/apps/locker/.env b/web/apps/locker/.envnew file mode 100644index 0000000000..3f3b1cc9ae--- /dev/null+++ b/web/apps/locker/.env@@ -0,0 +1 @@+NEXT_TELEMETRY_DISABLED = 1diff --git a/web/apps/locker/eslint.config.mjs b/web/apps/locker/eslint.config.mjsnew file mode 100644index 0000000000..641d994d1e--- /dev/null+++ b/web/apps/locker/eslint.config.mjs@@ -0,0 +1 @@+export { default } from "ente-build-config/eslintrc-next-app.mjs";diff --git a/web/apps/locker/next.config.js b/web/apps/locker/next.config.jsnew file mode 100644index 0000000000..5a52794ab2--- /dev/null+++ b/web/apps/locker/next.config.js@@ -0,0 +1 @@+module.exports = require("ente-base/next.config.base.js");diff --git a/web/apps/locker/package.json b/web/apps/locker/package.jsonnew file mode 100644index 0000000000..63a5218abb--- /dev/null+++ b/web/apps/locker/package.json@@ -0,0 +1,11 @@+{+ "name": "locker",+ "version": "0.0.0",+ "private": true,+ "dependencies": {+ "ente-base": "*"+ },+ "devDependencies": {+ "ente-build-config": "*"+ }+}diff --git a/web/apps/locker/public/images/favicon.png b/web/apps/locker/public/images/favicon.pngnew file mode 100644index 0000000000..fcb8d1054bBinary files /dev/null and b/web/apps/locker/public/images/favicon.png differdiff --git a/web/apps/locker/src/pages/_app.tsx b/web/apps/locker/src/pages/_app.tsxnew file mode 100644index 0000000000..ca94c06676--- /dev/null+++ b/web/apps/locker/src/pages/_app.tsx@@ -0,0 +1,24 @@+import "@fontsource-variable/inter";+import { CssBaseline, ThemeProvider } from "@mui/material";+import { staticAppTitle } from "ente-base/app";+import { CustomHead } from "ente-base/components/Head";+import { useSetupLogs } from "ente-base/components/utils/hooks-app";+import { lockerTheme } from "ente-base/components/utils/theme";+import type { AppProps } from "next/app";+import React from "react";++const App: React.FC<AppProps> = ({ Component, pageProps }) => {+ useSetupLogs({ disableDiskLogs: true });++ // We don't provide BaseContext. Nothing in the cast app needs it yet.++ return (+ <ThemeProvider theme={lockerTheme}>+ <CustomHead title={staticAppTitle} />+ <CssBaseline enableColorScheme />+ <Component {...pageProps} />+ </ThemeProvider>+ );+};++export default App;diff --git a/web/apps/locker/src/pages/index.tsx b/web/apps/locker/src/pages/index.tsxnew file mode 100644index 0000000000..348024e30f--- /dev/null+++ b/web/apps/locker/src/pages/index.tsx@@ -0,0 +1,14 @@+import { Stack, Typography } from "@mui/material";+import { EnteLogo } from "ente-base/components/EnteLogo";+import React from "react";++const Page: React.FC = () => {+ return (+ <Stack sx={{ justifyContent: "center", gap: 2 }}>+ <EnteLogo height={45} />+ <Typography variant="h2">Coming soon</Typography>+ </Stack>+ );+};++export default Page;diff --git a/web/apps/locker/tsconfig.json b/web/apps/locker/tsconfig.jsonnew file mode 100644index 0000000000..cd371d81f7--- /dev/null+++ b/web/apps/locker/tsconfig.json@@ -0,0 +1,13 @@+{+ "extends": "ente-build-config/tsconfig-next.json",+ "compilerOptions": {+ /* Set the base directory from which to resolve bare module names. */+ "baseUrl": "./src"+ },+ "include": [+ "src",+ "next-env.d.ts",+ "../../packages/base/global-electron.d.ts",+ "../../packages/base/components/utils/mui-theme.d.ts"+ ]+}diff --git a/web/package.json b/web/package.jsonindex bce3a8e7e9..54d327a93f 100644--- a/web/package.json+++ b/web/package.json@@ -11,6 +11,7 @@"build:accounts": "yarn workspace accounts next build","build:auth": "yarn workspace auth next build","build:cast": "yarn workspace cast next build",+ "build:locker": "yarn workspace locker next build","build:payments": "yarn workspace payments build","build:photos": "yarn workspace photos next build","dev": "yarn dev:photos",@@ -18,6 +19,7 @@"dev:albums": "yarn workspace photos next dev -p 3002","dev:auth": "yarn workspace auth next dev -p 3003","dev:cast": "yarn workspace cast next dev -p 3004",+ "dev:locker": "yarn workspace locker next dev -p 3005","dev:payments": "yarn workspace payments dev","dev:photos": "yarn workspace photos next dev -p 3000","lint": "concurrently --names 'prettier,eslint,tsc' \"yarn prettier --check --log-level warn .\" \"yarn workspaces run eslint\" \"yarn workspaces run tsc\"",diff --git a/web/packages/accounts/services/redirect.ts b/web/packages/accounts/services/redirect.tsindex 19791d2894..1277963018 100644--- a/web/packages/accounts/services/redirect.ts+++ b/web/packages/accounts/services/redirect.ts@@ -9,6 +9,7 @@ export const appHomeRoute: string = {accounts: "/passkeys",auth: "/auth",cast: "/" /* The cast app doesn't use this, this is an arbitrary value. */,+ locker: "/" /* The locker app also doesn't use this. */,photos: "/gallery",}[appName];diff --git a/web/packages/base/app.ts b/web/packages/base/app.tsindex e330e41a83..014ec98a76 100644--- a/web/packages/base/app.ts+++ b/web/packages/base/app.ts@@ -1,4 +1,10 @@-export const appNames = ["accounts", "auth", "cast", "photos"] as const;+export const appNames = [+ "accounts",+ "auth",+ "cast",+ "locker",+ "photos",+] as const;/*** Arbitrary names that we used as keys for indexing various constants@@ -56,6 +62,7 @@ export const staticAppTitle = {accounts: "Ente Accounts",auth: "Ente Auth",cast: "Ente Photos",+ locker: "Ente Locker",photos: "Ente Photos",}[appName];@@ -77,6 +84,7 @@ export const clientPackageName = (() => {accounts: "io.ente.accounts.web",auth: "io.ente.auth.web",cast: "io.ente.cast.web",+ locker: "io.ente.locker.web",photos: "io.ente.photos.web",}[appName];})();diff --git a/web/packages/base/components/utils/theme.ts b/web/packages/base/components/utils/theme.tsindex 2c1ea3aa14..0c79a7414e 100644--- a/web/packages/base/components/utils/theme.ts+++ b/web/packages/base/components/utils/theme.ts@@ -125,7 +125,12 @@ const getColors = (appName: AppName) => ({},},...{- accent: appName == "auth" ? _colors.accentAuth : _colors.accentPhotos,+ accent:+ appName == "auth"+ ? _colors.accentAuth+ : appName == "locker"+ ? _colors.accentLocker+ : _colors.accentPhotos,},});@@ -139,6 +144,7 @@ const getColors = (appName: AppName) => ({const _colors = {accentPhotos: { dark: "#00b33c", main: "#1db954", light: "#01de4d" },accentAuth: { dark: "#8e0fcb", main: "#9610d6", light: "#8e2de2" },+ accentLocker: { dark: "#615bff", main: "#5ba8ff", light: "#5bf9ff" },fixed: {white: "#fff",black: "#000",@@ -764,3 +770,8 @@ export const authTheme = getTheme("auth");* This is the same as the dark theme for the photos app.*/export const castTheme = getTheme("cast");++/**+ * The MUI {@link Theme} to use for the locker app.+ */+export const lockerTheme = getTheme("locker");