From 7e9c1460004982cfe1afba6cc73bdea63c044104 Mon Sep 17 00:00:00 2001 From: Daniel Metcalfe Date: Tue, 18 Jun 2024 08:04:49 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Add=20Android=20app?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/src/main/assets/capacitor.config.json | 4 +- app/{home => [...all]}/page.tsx | 4 + capacitor.config.ts | 4 +- components/AppShell.tsx | 7 +- components/pages/Constellation.tsx | 9 + components/pages/Home.tsx | 13 +- ios/App/App/capacitor.config.json | 4 +- package.json | 160 +++++++++--------- 8 files changed, 111 insertions(+), 94 deletions(-) rename app/{home => [...all]}/page.tsx (65%) create mode 100644 components/pages/Constellation.tsx diff --git a/android/app/src/main/assets/capacitor.config.json b/android/app/src/main/assets/capacitor.config.json index f9ec752..74f3d9a 100644 --- a/android/app/src/main/assets/capacitor.config.json +++ b/android/app/src/main/assets/capacitor.config.json @@ -2,11 +2,11 @@ "appId": "app.starfocus", "appName": "Starfocus", "bundledWebRuntime": false, - "webDir": "out", + "cordova": {}, "plugins": { "SplashScreen": { "launchShowDuration": 0 } }, - "cordova": {} + "webDir": "out" } diff --git a/app/home/page.tsx b/app/[...all]/page.tsx similarity index 65% rename from app/home/page.tsx rename to app/[...all]/page.tsx index 7876f89..005977f 100644 --- a/app/home/page.tsx +++ b/app/[...all]/page.tsx @@ -5,6 +5,10 @@ const App = dynamic(() => import('../../components/AppShell'), { ssr: false, }) +export async function generateStaticParams() { + return [{ all: ['home'] }, { all: ['constellation'] }, { all: ['settings'] }] +} + export default function Page() { return } diff --git a/capacitor.config.ts b/capacitor.config.ts index 55fbfb8..69193cf 100644 --- a/capacitor.config.ts +++ b/capacitor.config.ts @@ -4,13 +4,13 @@ const config: CapacitorConfig = { appId: 'app.starfocus', appName: 'Starfocus', bundledWebRuntime: false, - webDir: 'out', + cordova: {}, plugins: { SplashScreen: { launchShowDuration: 0, }, }, - cordova: {}, + webDir: 'out', } export default config diff --git a/components/AppShell.tsx b/components/AppShell.tsx index 15a9a08..f8b46b6 100644 --- a/components/AppShell.tsx +++ b/components/AppShell.tsx @@ -4,6 +4,7 @@ import { StatusBar, Style } from '@capacitor/status-bar' import { IonReactRouter } from '@ionic/react-router' import { Route } from 'react-router-dom' import Home from './pages/Home' +import Constellation from './pages/Constellation' setupIonicReact({}) @@ -23,7 +24,11 @@ const AppShell = () => { } + /> + } /> diff --git a/components/pages/Constellation.tsx b/components/pages/Constellation.tsx new file mode 100644 index 0000000..7d74f30 --- /dev/null +++ b/components/pages/Constellation.tsx @@ -0,0 +1,9 @@ +import { IonPage } from '@ionic/react' + +export default function Constellation() { + return ( + +

Constellation

+
+ ) +} diff --git a/components/pages/Home.tsx b/components/pages/Home.tsx index 2ff8755..86b3212 100644 --- a/components/pages/Home.tsx +++ b/components/pages/Home.tsx @@ -47,6 +47,7 @@ import { import { OverlayEventDetail } from '@ionic/react/dist/types/components/react-component-lib/interfaces' import { Todo, db } from '../db' import { useLiveQuery } from 'dexie-react-hooks' +import { Link } from 'react-router-dom' const Home = () => { // const data = [ @@ -180,16 +181,13 @@ const Home = () => { <> - + Today & upcoming - + @@ -284,7 +282,7 @@ export const MiscMenu = () => { > - Menu Content + Misc @@ -303,10 +301,11 @@ export const FilterMenu = () => { > - Menu Content + Views + Constellation

Filters coming soon...

diff --git a/ios/App/App/capacitor.config.json b/ios/App/App/capacitor.config.json index 669d1fb..bfc84ed 100644 --- a/ios/App/App/capacitor.config.json +++ b/ios/App/App/capacitor.config.json @@ -2,13 +2,13 @@ "appId": "app.starfocus", "appName": "Starfocus", "bundledWebRuntime": false, - "webDir": "out", + "cordova": {}, "plugins": { "SplashScreen": { "launchShowDuration": 0 } }, - "cordova": {}, + "webDir": "out", "packageClassList": [ "AppPlugin", "HapticsPlugin", diff --git a/package.json b/package.json index 04fd291..6337249 100644 --- a/package.json +++ b/package.json @@ -1,81 +1,81 @@ { - "name": "starfocus", - "version": "0.0.1", - "description": "Todo app for the future", - "author": "", - "license": "BUSL-1.1", - "bugs": { - "url": "https://github.com/astrochoric/starfocus/issues" - }, - "homepage": "https://starfocus.app", - "keywords": [ - "todo", - "space", - "productivity", - "goals", - "future" - ], - "scripts": { - "android:dev": "next build && cap sync && cap run android", - "build": "convex codegen --typecheck=disable && next build", - "convex:dev": "convex dev --typecheck=disable", - "convex:deploy": "convex deploy --typecheck=disable", - "next:dev": "next dev -p 6603", - "lint": "next lint", - "prepare": "husky install", - "prettier:fix": "prettier --write components/ interfaces/ pages/ public/ styles/ utils/", - "start": "next start", - "type-check": "tsc" - }, - "dependencies": { - "@capacitor/android": "^6.0.0", - "@capacitor/app": "^6.0.0", - "@capacitor/core": "^6.0.0", - "@capacitor/haptics": "^6.0.0", - "@capacitor/ios": "^6.0.0", - "@capacitor/keyboard": "^6.0.0", - "@capacitor/status-bar": "^6.0.0", - "@ionic/react": "7.7.4", - "@ionic/react-router": "7.7.4", - "classnames": "2.5.1", - "convex": "^1.11.3", - "debounce": "^1.2.1", - "dexie": "^4.0.4", - "dexie-react-hooks": "^1.1.7", - "next": "14.2.3", - "next-plausible": "^3.12.0", - "plausible-tracker": "^0.3.8", - "pouchdb-browser": "^8.0.1", - "react": "18.2.0", - "react-dom": "18.2.0", - "react-router": "5.3.4", - "react-router-dom": "5.3.4", - "react-virtuoso": "4.7.1" - }, - "devDependencies": { - "@capacitor/cli": "^6.0.0", - "@types/jest": "29.5.12", - "@types/node": "20.11.25", - "@types/react": "18.2.64", - "@types/react-dom": "18.2.21", - "@types/react-router": "5.1.20", - "@types/react-router-dom": "5.3.3", - "@typescript-eslint/parser": "^7.8.0", - "autoprefixer": "10.4.18", - "eslint": "8.57.0", - "eslint-config-next": "14.2.3", - "gitmoji-cli": "^7.1.0", - "husky": "^8.0.0", - "ionicons": "7.2.2", - "postcss": "8.4.35", - "prettier": "3.2.5", - "prettier-plugin-tailwindcss": "^0.1.13", - "pullstate": "1.25", - "reselect": "5.1.0", - "tailwindcss": "3.4.1", - "typescript": "5.4.5" - }, - "engines": { - "node": "20.x" - } -} \ No newline at end of file + "name": "starfocus", + "version": "0.0.1", + "description": "Todo app for the future", + "author": "", + "license": "BUSL-1.1", + "bugs": { + "url": "https://github.com/astrochoric/starfocus/issues" + }, + "homepage": "https://starfocus.app", + "keywords": [ + "todo", + "space", + "productivity", + "goals", + "future" + ], + "scripts": { + "android:dev": "next build && cap sync && mv out/home.html out/index.html && cap run android", + "build": "convex codegen --typecheck=disable && next build", + "convex:dev": "convex dev --typecheck=disable", + "convex:deploy": "convex deploy --typecheck=disable", + "next:dev": "next dev -p 6603", + "lint": "next lint", + "prepare": "husky install", + "prettier:fix": "prettier --write components/ interfaces/ pages/ public/ styles/ utils/", + "start": "next start", + "type-check": "tsc" + }, + "dependencies": { + "@capacitor/android": "^6.0.0", + "@capacitor/app": "^6.0.0", + "@capacitor/core": "^6.0.0", + "@capacitor/haptics": "^6.0.0", + "@capacitor/ios": "^6.0.0", + "@capacitor/keyboard": "^6.0.0", + "@capacitor/status-bar": "^6.0.0", + "@ionic/react": "7.7.4", + "@ionic/react-router": "7.7.4", + "classnames": "2.5.1", + "convex": "^1.11.3", + "debounce": "^1.2.1", + "dexie": "^4.0.4", + "dexie-react-hooks": "^1.1.7", + "next": "14.2.3", + "next-plausible": "^3.12.0", + "plausible-tracker": "^0.3.8", + "pouchdb-browser": "^8.0.1", + "react": "18.2.0", + "react-dom": "18.2.0", + "react-router": "5.3.4", + "react-router-dom": "5.3.4", + "react-virtuoso": "4.7.1" + }, + "devDependencies": { + "@capacitor/cli": "^6.0.0", + "@types/jest": "29.5.12", + "@types/node": "20.11.25", + "@types/react": "18.2.64", + "@types/react-dom": "18.2.21", + "@types/react-router": "5.1.20", + "@types/react-router-dom": "5.3.3", + "@typescript-eslint/parser": "^7.8.0", + "autoprefixer": "10.4.18", + "eslint": "8.57.0", + "eslint-config-next": "14.2.3", + "gitmoji-cli": "^7.1.0", + "husky": "^8.0.0", + "ionicons": "7.2.2", + "postcss": "8.4.35", + "prettier": "3.2.5", + "prettier-plugin-tailwindcss": "^0.1.13", + "pullstate": "1.25", + "reselect": "5.1.0", + "tailwindcss": "3.4.1", + "typescript": "5.4.5" + }, + "engines": { + "node": "20.x" + } +}