From 6eca9379cf1a021ea6ebf12b4d4475218a1addd0 Mon Sep 17 00:00:00 2001 From: Astatin3 <77305074+Astatin3@users.noreply.github.com> Date: Wed, 21 Feb 2024 10:48:11 -0700 Subject: [PATCH] Add docs --- README.md | 6 +++++- modules/main/Dashboard.html | 21 +++++++++++++++++---- modules/main/docs-home.html | 18 ++++++++++++++++++ modules/main/docs-writing-modules.html | 18 ++++++++++++++++++ modules/main/main.py | 2 +- modules/main/module.json | 18 ++++++++++++++++++ 6 files changed, 77 insertions(+), 6 deletions(-) create mode 100644 modules/main/docs-home.html create mode 100644 modules/main/docs-writing-modules.html diff --git a/README.md b/README.md index 35e5bef..b9baf05 100755 --- a/README.md +++ b/README.md @@ -2,4 +2,8 @@ ### A very dynamic dashboard, with many features -Check back later for the docs, but for now you can look at the pre-existing modules as examples. +Modulator is basically just a fancy dashboard template, but with a very extensible module system, and security features! + +[Read the wiki!](https://github.com/Astatin3/Modulator/wiki) + +![alt text](https://raw.githubusercontent.com/Astatin3/images/main/Modulator-1.png) \ No newline at end of file diff --git a/modules/main/Dashboard.html b/modules/main/Dashboard.html index eb13ad6..f1ba348 100755 --- a/modules/main/Dashboard.html +++ b/modules/main/Dashboard.html @@ -1,5 +1,18 @@ + +
-

-
A very dynamic dashboard, with many features
-

Check back later for the docs, but for now you can look at the pre-existing modules as examples.

-
\ No newline at end of file +
+ + + \ No newline at end of file diff --git a/modules/main/docs-home.html b/modules/main/docs-home.html new file mode 100644 index 0000000..91e40c8 --- /dev/null +++ b/modules/main/docs-home.html @@ -0,0 +1,18 @@ + + +
+
+
+ + \ No newline at end of file diff --git a/modules/main/docs-writing-modules.html b/modules/main/docs-writing-modules.html new file mode 100644 index 0000000..c2b0bd4 --- /dev/null +++ b/modules/main/docs-writing-modules.html @@ -0,0 +1,18 @@ + + +
+
+
+ + \ No newline at end of file diff --git a/modules/main/main.py b/modules/main/main.py index f3ea7b3..1574978 100755 --- a/modules/main/main.py +++ b/modules/main/main.py @@ -79,7 +79,7 @@ def changePassword(ac, data): correctName = ac.user.id == data['data']['id'] - if isAdmin and not 'old' in data['data']: + if isAdmin and correctName and not 'old' in data['data']: mm.sendPopupError(ac.rawClient, "Error", "You are not authorised") return diff --git a/modules/main/module.json b/modules/main/module.json index d828bfa..581de3c 100755 --- a/modules/main/module.json +++ b/modules/main/module.json @@ -14,6 +14,24 @@ "requiredPermGroup": "", "location": "modules/main/Dashboard.html" }, + { + "type": "folder", + "name": "Docs", + "pages": [ + { + "type": "page", + "name": "Home", + "requiredPermGroup": "", + "location": "modules/main/docs-home.html" + }, + { + "type": "page", + "name": "Modules", + "requiredPermGroup": "Admins", + "location": "modules/main/docs-writing-modules.html" + } + ] + }, { "type": "folder", "name": "Settings",