diff --git a/README.md b/README.md index f382eee..bae5d52 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # webnative-app-template -A web app template for Webnative. +A web app template for Webnative. ## Setup @@ -29,6 +29,7 @@ npm run build ``` The build outputs the static site to the `build` directory. + ## Publish The built site publishes with the [Fission CLI](https://guide.fission.codes/developers/cli) and the [Fission GH publish action](https://github.com/fission-suite/publish-action). Publishing from the command line is configured in [fission.yaml](fission.yaml), and the GitHub publish action is configured in [publish.yml](.github/workflows/publish.yml). @@ -48,6 +49,12 @@ To set up the GitHub publish action: 1. Export your machine key with `base64 ~/.config/fission/key/machine_id.ed25519` 2. Add your machine key as a GH Repository secret named `FISSION_MACHINE_KEY` -2. Update the `publish.yml` with the name of your registered app +3. Update the `publish.yml` with the name of your registered app See the [Fission Guide](https://guide.fission.codes/developers/installation) and the publish action README for more details. + +## Customize + +- `app.html` - the SEO meta tags will need to be changed. +- `lib/appName.ts` - choose a better application name +- To customize the application's Tailwind theme, change `tailwind.config.ts` - link to DaisyUI customization page. diff --git a/src/components/auth/Connect.svelte b/src/components/auth/Connect.svelte index bb36092..b217229 100644 --- a/src/components/auth/Connect.svelte +++ b/src/components/auth/Connect.svelte @@ -2,6 +2,7 @@ import { goto } from '$app/navigation' import { onDestroy, onMount } from 'svelte' + import { appName } from '$lib/appName' import { sessionStore } from '../../stores' import type { Session } from '$lib/session' @@ -24,7 +25,7 @@
-

Connect to AppName

+

Connect to {appName}

Create a new account diff --git a/src/components/auth/Register.svelte b/src/components/auth/Register.svelte index 78f98af..4976da4 100644 --- a/src/components/auth/Register.svelte +++ b/src/components/auth/Register.svelte @@ -2,6 +2,7 @@ import { goto } from '$app/navigation' import { onDestroy, onMount } from 'svelte' + import { appName } from '$lib/appName' import { bootstrapFilesystem, isUsernameValid, @@ -142,8 +143,7 @@ diff --git a/src/lib/appName.ts b/src/lib/appName.ts new file mode 100644 index 0000000..b1eb4bb --- /dev/null +++ b/src/lib/appName.ts @@ -0,0 +1 @@ +export const appName = 'Awesome WebNative App' diff --git a/src/lib/session.ts b/src/lib/session.ts index 6ceacb3..72002fe 100644 --- a/src/lib/session.ts +++ b/src/lib/session.ts @@ -1,3 +1,5 @@ +import { appName } from '$lib/appName' + export type Session = { username: string authed: boolean @@ -10,9 +12,9 @@ type SessionError = 'Insecure Context' | 'Unsupported Browser' export const errorToMessage = (error: SessionError): string => { switch (error) { case 'Insecure Context': - return 'This application requires a secure context (HTTPS)' + return `${appName} requires a secure context (HTTPS)` case 'Unsupported Browser': - return 'Your browser does not support this application' + return `Your browser does not support ${appName}` } } diff --git a/src/routes/__layout.svelte b/src/routes/__layout.svelte index 1e172d1..975faf8 100644 --- a/src/routes/__layout.svelte +++ b/src/routes/__layout.svelte @@ -2,6 +2,7 @@ import { onMount } from 'svelte' import '../global.css' + import { appName } from '$lib/appName' import { initialize } from '$lib/common/webnative' import { deviceStore, sessionStore, theme } from '../stores' import { storeTheme } from '$lib/theme' @@ -46,6 +47,10 @@ init() + + {appName} + +