Skip to content

Commit bf2eb40

Browse files
committed
Cosmetics changes
Docs ==== - Updates UI == Module / Menu: renaming, File Manager to System Server ===== - Tweak tags
1 parent 953b8a4 commit bf2eb40

File tree

14 files changed

+38
-26
lines changed

14 files changed

+38
-26
lines changed

docs/custom/files.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ Using component FileEdit, see [Components](https://moonmodules.org/MoonLight/com
2525

2626
### Server
2727

28-
[FilesService.h](https://github.com/MoonModules/MoonLight/blob/main/lib/moonbase/FilesService.h) and [FilesService.cpp](https://github.com/MoonModules/MoonLight/blob/main/lib/moonbase/FilesService.cpp)
28+
[FilesService.h](https://github.com/ewowi/MoonBase/blob/main/src/custom/FilesService.h) and [FilesService.cpp](https://github.com/ewowi/MoonBase/blob/main/src/custom/FilesService.cpp)
2929

3030
### UI
3131

32-
[Files.svelte](https://github.com/MoonModules/MoonLight/blob/main/interface/src/routes/moonbase/files/Files.svelte)
32+
[Files.svelte](https://github.com/ewowi/MoonBase/blob/main/interface/src/routes/moonbase/files/Files.svelte)

docs/custom/module/animations.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717

1818
## Technical
1919

20-
* See [Modules](../modules/)
20+
* See [Modules](/docs/custom/modules.md)
2121

2222
### Server
2323

24-
[ModuleAnimations.h](/src/custom/ModuleAnimations.h)
24+
[ModuleAnimations.h](https://github.com/ewowi/MoonBase/blob/main/src/custom/ModuleAnimations.h)
2525

2626
### UI
2727

docs/custom/module/demo.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66

77
## Technical
88

9-
* See [Modules](../modules/)
9+
* See [Modules](/docs/custom/modules.md)
1010

1111
### Server
1212

13-
[ModuleDemo.h](/src/custom/ModuleDemo.h)
13+
[ModuleDemo.h](https://github.com/ewowi/MoonBase/blob/main/src/custom/ModuleDemo.h)
1414

1515
### UI
1616

docs/general/customizingsveltekit.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,10 @@
7777
* interface/source/routes/+layout.svelte
7878
* Don't show if captive portal: {#if (!window.location.href.includes("192.168.4.1") && $page.data.features.monitor)}
7979
* interface/source/routes/statusbar.svelte
80-
* show help: ```<a href="https://moonmodules.org{window.location.pathname} target="_blank">?</a>```
80+
* show help:
81+
```html
82+
<a href="https://moonmodules.org{window.location.pathname} target="_blank">?</a>
83+
```
8184
* main.cpp: esp_log_set_vprintf(my_vprintf); WIP
8285
* ci pio
8386
* run in loopTask to avoid stack size crashes in httpd

docs/general/gettingstarted.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070

7171
### Current script supported
7272

73-
```
73+
```cpp
7474
void setup() {
7575
printf("Run Live Script good afternoon\n");
7676
}
@@ -81,7 +81,7 @@ void main() {
8181

8282
### Homework assignment
8383

84-
```
84+
```cpp
8585
void setup() {
8686
printf("Run Live Script good morning\n");
8787
}

docs/structure.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,15 @@ The menu consists of an array of menu items. These are defined as follows:
5252
},
5353
```
5454

55-
- Where `title` refers to the page title. It must be identical to `page.data.title` as defined in the `+page.ts` in any of your routes. If they do not match the corresponding menu item is not highlighted on first page load or a page refresh. A minimum `+page.ts` looks like this:
55+
- Where `title` refers to the page title. It must be identical to `page.data.title` as defined in the `+page.ts` in any of your routes. If they do not match the corresponding menu item is not highlighted on first page load or a page refresh.
56+
57+
<img width="30" src="https://github.com/user-attachments/assets/b0e8af99-ed76-422a-8bd1-bfbd9e0f4c44"/>
58+
59+
!!! info
60+
61+
Note: In MoonBase matching is not done on title but on href, which is not compared with page.ts title but with page.url.pathname + page.url.search (see Menu.svelte)
62+
63+
A minimum `+page.ts` looks like this:
5664

5765
```ts
5866
import type { PageLoad } from "./$types";

interface/src/routes/custom/module/Module.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131
<Router class="lex-shrink-0 mr-2 h-6 w-6 self-end" />
132132
{/snippet}
133133
{#snippet title()}
134-
<span >Module {page.url.searchParams.get('module')}</span>
134+
<span>{page.url.searchParams.get('module')}</span>
135135
{/snippet}
136136

137137
{#if !page.data.features.security || $user.admin}

interface/src/routes/menu.svelte

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,28 +48,22 @@
4848
4949
let menuItems = $state([
5050
{
51-
title: 'Custom',
51+
title: 'Modules',
5252
icon: StarIcon,
5353
feature: true,
5454
submenu: [
5555
{
56-
title: 'Module Animations',
56+
title: 'Animations',
5757
icon: BulbIcon,
5858
href: '/custom/module?module=animations',
5959
feature: page.data.features.moonlight,
6060
},
6161
{
62-
title: 'Module Demo',
62+
title: 'Demo',
6363
icon: BulbIcon,
6464
href: '/custom/module?module=demo',
6565
feature: true,
6666
},
67-
{
68-
title: 'File Manager',
69-
icon: FilesIcon,
70-
href: '/custom/files',
71-
feature: page.data.features.filemanager,
72-
},
7367
]
7468
},
7569
{
@@ -133,6 +127,12 @@
133127
href: '/system/metrics',
134128
feature: page.data.features.analytics
135129
},
130+
{
131+
title: 'File Manager',
132+
icon: FilesIcon,
133+
href: '/custom/files',
134+
feature: page.data.features.filemanager,
135+
},
136136
{
137137
title: 'Firmware Update',
138138
icon: Update,

src/custom/FilesService.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include <PsychicHttp.h>
2121
#include <ESP32SvelteKit.h>
2222

23+
#undef TAG
2324
#define TAG "🌙"
2425

2526
void walkThroughFiles(File folder, std::function<void(File, File)> fun);

src/custom/Module.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111

1212
#include "Module.h"
1313

14-
#define TAG "🌙"
15-
1614
void setDefaults(JsonObject root, JsonArray definition) {
1715
for (JsonObject property: definition) {
1816
if (property["type"] != "array") {

0 commit comments

Comments
 (0)