diff --git a/client/package.json b/client/package.json
index 983b5e5..a68a5e2 100644
--- a/client/package.json
+++ b/client/package.json
@@ -17,6 +17,7 @@
"@tauri-apps/cli": "^1.5.10",
"@tsconfig/svelte": "^5.0.2",
"@types/howler": "^2.2.11",
+ "@types/konami-code-js": "^0.8.3",
"@types/three": "^0.161.2",
"autoprefixer": "^10.4.17",
"postcss": "^8.4.35",
@@ -35,6 +36,7 @@
"@threlte/extras": "^8.8.0",
"camera-controls": "^2.8.3",
"howler": "^2.2.4",
+ "konami-code-js": "^0.8.1",
"material-icons": "^1.13.12",
"material-symbols": "^0.15.0",
"overlayscrollbars-svelte": "^0.5.3",
diff --git a/client/pnpm-lock.yaml b/client/pnpm-lock.yaml
index 1ec875f..6180997 100644
--- a/client/pnpm-lock.yaml
+++ b/client/pnpm-lock.yaml
@@ -23,6 +23,9 @@ dependencies:
howler:
specifier: ^2.2.4
version: 2.2.4
+ konami-code-js:
+ specifier: ^0.8.1
+ version: 0.8.1
material-icons:
specifier: ^1.13.12
version: 1.13.12
@@ -61,6 +64,9 @@ devDependencies:
'@types/howler':
specifier: ^2.2.11
version: 2.2.11
+ '@types/konami-code-js':
+ specifier: ^0.8.3
+ version: 0.8.3
'@types/three':
specifier: ^0.161.2
version: 0.161.2
@@ -724,6 +730,10 @@ packages:
resolution: {integrity: sha512-7aBoUL6RbSIrqKnpEgfa1wSNUBK06mn08siP2QI0zYk7MXfEJAaORc4tohamQYqCqVESoDyRWSdQn2BOKWj2Qw==}
dev: true
+ /@types/konami-code-js@0.8.3:
+ resolution: {integrity: sha512-TYwIDZ16MuzqHdgv/zhbbE3p/iXY/FotJkMYx1oOzZKJoINezl91stc/U/i5AknH5lrEpXoims+tsCnAwIJGew==}
+ dev: true
+
/@types/pug@2.0.10:
resolution: {integrity: sha512-Sk/uYFOBAB7mb74XcpizmH0KOR2Pv3D2Hmrh1Dmy5BmK3MpdSa5kqZcg6EKBdklU0bFXX9gCfzvpnyUehrPIuA==}
dev: true
@@ -1312,6 +1322,10 @@ packages:
engines: {node: '>=6'}
dev: true
+ /konami-code-js@0.8.1:
+ resolution: {integrity: sha512-bJ0tuWYLYiUueIVTpA0MV4h4Gz1X16uuJggh5TpIWXOQoLv0238SU7Im23z2wYKCCBsOfk5j4HKWB/pqdCgu5Q==}
+ dev: false
+
/lilconfig@2.1.0:
resolution: {integrity: sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==}
engines: {node: '>=10'}
diff --git a/splash-screen/src/assets/background.jpg b/client/public/splash-screen.jpg
similarity index 100%
rename from splash-screen/src/assets/background.jpg
rename to client/public/splash-screen.jpg
diff --git a/client/public/splashscreen.html b/client/public/splashscreen.html
index a9d4d8a..8644943 100644
--- a/client/public/splashscreen.html
+++ b/client/public/splashscreen.html
@@ -4,17 +4,17 @@
Jankboard 2
-
-
diff --git a/client/src/assets/wallpaper.jpg b/client/src/assets/wallpaper.jpg
index d8691f5..046062e 100644
Binary files a/client/src/assets/wallpaper.jpg and b/client/src/assets/wallpaper.jpg differ
diff --git a/client/src/globals.d.ts b/client/src/globals.d.ts
index 444d7c6..35fa02b 100644
--- a/client/src/globals.d.ts
+++ b/client/src/globals.d.ts
@@ -1,3 +1,11 @@
+declare module 'konami-code-js' {
+ export default class KonamiCode {
+ constructor(options: any = {})
+ setCallback: (callback: () => void) => void
+ disable: () => void
+ }
+}
+
type Gear = 'park' | 'reverse' | 'neutral' | 'low' | 'auto' | 'drive'
type Mode = 'chill' | 'ludicrous' | 'cruise'
diff --git a/client/src/lib/Apps/Camera/Camera.svelte b/client/src/lib/Apps/Camera/Camera.svelte
index c43b895..0ce73e0 100644
--- a/client/src/lib/Apps/Camera/Camera.svelte
+++ b/client/src/lib/Apps/Camera/Camera.svelte
@@ -1,15 +1,16 @@
-
+
-
+
diff --git a/client/src/lib/Apps/Camera/CameraContainer.svelte b/client/src/lib/Apps/Camera/CameraContainer.svelte
index 279667b..6445aec 100644
--- a/client/src/lib/Apps/Camera/CameraContainer.svelte
+++ b/client/src/lib/Apps/Camera/CameraContainer.svelte
@@ -7,10 +7,19 @@
-->
diff --git a/client/src/lib/Apps/Settings/Settings.svelte b/client/src/lib/Apps/Settings/Settings.svelte
index b60def9..9cc389d 100644
--- a/client/src/lib/Apps/Settings/Settings.svelte
+++ b/client/src/lib/Apps/Settings/Settings.svelte
@@ -5,6 +5,9 @@
import SettingsSelector from './SettingsSelector.svelte'
import SettingsInput from './SettingsInput.svelte'
import SettingsToggle from './SettingsToggle.svelte'
+ import KonamiCode from 'konami-code-js'
+ import { onMount } from 'svelte'
+ import { fly } from 'svelte/transition'
settingsStore.subscribe(async value => {
window.localStorage.setItem('settings', JSON.stringify(value))
@@ -15,43 +18,97 @@
settingsStore.reset()
Notifications.success('Settings reset! Refresh for all changes to apply.')
}
+
+ let unlockSecret = false
+
+ onMount(() => {
+ const kc = new KonamiCode()
+ kc.setCallback(() => {
+ kc.disable()
+ unlockSecret = true
+ })
+ })
Settings
Hover over setting names to see helpful tooltips
- General
-
Disable Annoyances
-
Go Woke
-
- RNG Weight
-
-
Voice Prompt Language
-
Sentry Mode
+
General
+
+ -
+ Disable Annoyances
+
+ -
+ Voice Prompt Language
+
+
+
+
+ Camera Configuration
+
+
+ -
+ Front Camera IP
+
+ -
+ Rear Camera IP
+
+
+
Fun
+
+ -
+ Sentry Mode
+
+ -
+
+ RNG Weight
+
+
+
+ {#if unlockSecret}
+
+ {/if}
+
+
+
diff --git a/client/src/lib/Apps/Settings/SettingsInput.svelte b/client/src/lib/Apps/Settings/SettingsInput.svelte
index 74ed9b5..f6bb6e9 100644
--- a/client/src/lib/Apps/Settings/SettingsInput.svelte
+++ b/client/src/lib/Apps/Settings/SettingsInput.svelte
@@ -13,7 +13,6 @@
const handleSubmit = async () => {
await tick()
- // @ts-expect-error
settingsStore.update(setting, value)
}
diff --git a/client/src/lib/Sequences/sequences.ts b/client/src/lib/Sequences/sequences.ts
index 7479479..50d0fa8 100644
--- a/client/src/lib/Sequences/sequences.ts
+++ b/client/src/lib/Sequences/sequences.ts
@@ -217,7 +217,7 @@ export const infotainmentBootupSequence = async () => {
}
if (!get(sequenceStore).initializationComplete) {
- const unsubscribe = sequenceStore.subscribe((data) => {
+ const unsubscribe = sequenceStore.subscribe(data => {
if (data.initializationComplete) {
sequence()
unsubscribe()
@@ -237,7 +237,7 @@ export const infotainmentBootupSequence = async () => {
*/
const waitForInfotainmentBootup = (sequence: () => void) => {
if (!get(sequenceStore).infotainmentStartedFirstTime) {
- const unsubscribe = sequenceStore.subscribe((data) => {
+ const unsubscribe = sequenceStore.subscribe(data => {
if (data.infotainmentStartedFirstTime) {
sequence()
unsubscribe()
diff --git a/client/src/lib/stores/settingsStore.ts b/client/src/lib/stores/settingsStore.ts
index d435135..48dfe73 100644
--- a/client/src/lib/stores/settingsStore.ts
+++ b/client/src/lib/stores/settingsStore.ts
@@ -11,6 +11,8 @@ export interface SettingsStoreData {
randomWeight: number
voiceLang: SupportedLanguage
sentry: boolean
+ frontCameraAddr: string
+ rearCameraAddr: string
}
export const defaults: SettingsStoreData = {
@@ -18,8 +20,10 @@ export const defaults: SettingsStoreData = {
goWoke: true, // go woke (for showing parents or other officials where DEI has taken over), disables "offensive" sequences
fastStartup: false, // skip the loading splash screen (for development purposes. Setting this from within the app has no effect.)
randomWeight: 1, // the weight of random events (multiplied by the original probability)
- voiceLang: 'en-US', // locale-specific voice for alerts
- sentry: true, // protect the robot and operator from foreign threats
+ voiceLang: 'en-UK', // locale-specific voice for alerts
+ sentry: false, // protect the robot and operator from foreign threats
+ frontCameraAddr: '',
+ rearCameraAddr: '',
}
const createSequenceStore = () => {
@@ -30,7 +34,7 @@ const createSequenceStore = () => {
data: keyof SettingsStoreData,
newValue: SettingsStoreData[typeof data]
) => {
- update((store) => {
+ update(store => {
// @ts-expect-error
store[data] = newValue
return store
diff --git a/splash-screen/README.md b/splash-screen/README.md
index 3d1558c..ea0eac7 100644
--- a/splash-screen/README.md
+++ b/splash-screen/README.md
@@ -44,3 +44,4 @@ screen!**
inlined.
4. Rename this outputted `index.html` to `splashscreen.html`, and then move it
into `/client/public`, replacing the existing `splashscreen.html`.
+ Note: the background image will not load in development since it's designed to load `/splash-screen.jpg` from the main app. Update the `splash-screen.jpg` image in `client/public` to change it.
diff --git a/splash-screen/src/App.svelte b/splash-screen/src/App.svelte
index 679f1d4..9722dd1 100644
--- a/splash-screen/src/App.svelte
+++ b/splash-screen/src/App.svelte
@@ -3,13 +3,7 @@
-
-
-
-
-
-
-
+ Jankboard 2
diff --git a/splash-screen/src/lib/Loading.svelte b/splash-screen/src/lib/Loading.svelte
index 5894a0e..2f99b49 100644
--- a/splash-screen/src/lib/Loading.svelte
+++ b/splash-screen/src/lib/Loading.svelte
@@ -1,8 +1,9 @@