Skip to content

Commit 55d4148

Browse files
committed
MoonLight/MoonBase feature, add ModuleInstances
Docs ==== - move around - add moonbase/module/instances.md - mkdocs.yml: move around UI == - MultiInput: add ip type (WIP) - Menu: reintroduce MoonLight and MoonBase and add Instances Server ===== - features.ini / Features.h / FeaturesService.cpp + modules: Replace FT_FILEMANAGER with FT_MOONBASE - ModuleInstances.h: new! - main.cpp: add ModuleInstances, add loop1s and loop10s
1 parent 3d9aa79 commit 55d4148

File tree

26 files changed

+14276
-14096
lines changed

26 files changed

+14276
-14096
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.

docs/moonbase/module/instances.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Instances module
2+
3+
<img width="517" alt="image" src="https://github.com/user-attachments/assets/022fde4d-9a3b-456c-ade5-e18219e5a5d5" />
4+
5+
## Functional
6+
7+
* Instance name: name of this instance
8+
* Instances: Instances found on the network
9+
10+
## Technical
11+
12+
* See [Modules](../modules.md)
13+
14+
### Server
15+
16+
[ModuleInstances.h](https://github.com/ewowi/MoonBase/blob/main/src/custom/ModuleInstances.h)
17+
18+
### UI
19+
20+
Generated
File renamed without changes.

features.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ build_flags =
88
-D FT_SLEEP=1
99
-D FT_BATTERY=1
1010
-D FT_ANALYTICS=1
11-
-D FT_FILEMANAGER=1
11+
-D FT_MOONBASE=1
12+
-D FT_MOONLIGHT=1 ; if disabled, FastLED should also be commented out in platformio.ini, required: FT_MOONBASE=1
1213
-D FT_LIVESCRIPT=1
13-
-D FT_MOONLIGHT=1 ; if disabled, FastLED can also be commented out in platformio.ini, recommended FT_FILEMANAGER=1

interface/src/lib/components/custom/MultiInput.svelte

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,20 @@
134134
on:change={onChange}
135135
on:input={(event:any) => {if (changeOnInput) onChange(event)}}
136136
/>
137+
{:else if property.type == "ip"}
138+
<input
139+
type={property.type}
140+
class="input input-bordered invalid:border-error invalid:border-2"
141+
minlength={property.min}
142+
maxlength={property.max}
143+
bind:value={value}
144+
on:change={onChange}
145+
on:input={(event:any) => {if (changeOnInput) onChange(event)}}
146+
/>
147+
<a
148+
href="http://{value}"
149+
target ="_blank"
150+
>{value}</a>
137151
{:else if property.type == "button"}
138152
<button class="btn btn-primary" type="button" on:click={(event:any) => {if (value==null) value = 1; else value++; onChange(event)}}
139153
>{property.name}</button

interface/src/routes/menu.svelte

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,21 +48,40 @@
4848
4949
let menuItems = $state([
5050
{
51-
title: 'Modules',
51+
title: 'MoonLight',
5252
icon: StarIcon,
5353
feature: true,
5454
submenu: [
5555
{
5656
title: 'Animations',
5757
icon: BulbIcon,
58-
href: '/modules/module?module=animations',
58+
href: '/moonbase/module?module=animations',
5959
feature: page.data.features.moonlight,
6060
},
61+
]
62+
},
63+
{
64+
title: 'MoonBase',
65+
icon: StarIcon,
66+
feature: true,
67+
submenu: [
68+
{
69+
title: 'File Manager',
70+
icon: FilesIcon,
71+
href: '/moonbase/files',
72+
feature: page.data.features.moonbase,
73+
},
74+
{
75+
title: 'Instances',
76+
icon: BulbIcon,
77+
href: '/moonbase/module?module=instances',
78+
feature: page.data.features.moonbase,
79+
},
6180
{
6281
title: 'Demo',
6382
icon: BulbIcon,
64-
href: '/modules/module?module=demo',
65-
feature: true,
83+
href: '/moonbase/module?module=demo',
84+
feature: page.data.features.moonbase,
6685
},
6786
]
6887
},
@@ -127,12 +146,6 @@
127146
href: '/system/metrics',
128147
feature: page.data.features.analytics
129148
},
130-
{
131-
title: 'File Manager',
132-
icon: FilesIcon,
133-
href: '/system/files',
134-
feature: page.data.features.filemanager,
135-
},
136149
{
137150
title: 'Firmware Update',
138151
icon: Update,
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { PageLoad } from './$types';
22

33
export const load = (async ({fetch}) => {
4-
return { title: 'Files' };
4+
return { title: 'File Manager' };
55
}) satisfies PageLoad;

0 commit comments

Comments
 (0)