Skip to content

Commit 2db1ac2

Browse files
authored
Update README.md
1 parent 0d42d30 commit 2db1ac2

File tree

1 file changed

+40
-23
lines changed

1 file changed

+40
-23
lines changed

README.md

+40-23
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
</a>
55
</p>
66

7-
<h1 align="center">@akarui/aoi.panel</h1>
7+
<h1 align="center">@aoijs/aoi.panel</h1>
88

99
![npm](https://img.shields.io/npm/dt/@akarui/aoi.panel?color=blue&label=NPM%20Downloads&logo=npm&logoColor=Green)
1010
![GitHub](https://img.shields.io/github/license/AkaruiDevelopment/panel?color=blue&logo=github)
@@ -19,19 +19,18 @@
1919

2020
- [Installation](#installation)
2121
- [Setup](#setup)
22-
- [Adding Multiple Users](#adding-multiple-users)
23-
- [Making Custom Pages](#making-custom-pages)
2422

2523
### Installation
2624

2725
```bash
28-
npm i @akarui/aoi.panel
26+
npm i @aoijs/aoi.panel
2927
```
3028

29+
![Login Page](./images/image.png)
3130
### Setup
3231

3332
```javascript
34-
const {Panel} = require("@akarui/aoi.panel")
33+
const {Panel} = require("@aoijs/aoi.panel")
3534
const {AoiClient} = require("aoi.js");
3635

3736
const client = new AoiClient({
@@ -48,39 +47,57 @@ const client = new AoiClient({
4847
}
4948
});
5049

50+
// Ping Command
51+
client.command({
52+
name: "ping",
53+
code: `Pong! $pingms`
54+
});
5155

5256
client.loadCommands("./commands/", true);
5357

58+
5459
const panel = new Panel({
55-
port: 3000,
56-
client: client
60+
port:3000,//port
61+
client:bot,//aoi.js client
62+
accounts : "/panel.userconfig.js" //accounts file (for security reasons must be a separate file)
5763
})
5864

59-
panel.loadAPI({
60-
auth: "Authentication-Key"//No spaces, keep it only alphanumeric.
61-
})
65+
panel.loadPanel();
6266

63-
panel.loadGUI({
64-
username: ["username 1"],
65-
password: ["Password 1"],
66-
})
6767
```
6868

69-
### Adding Multiple Users
70-
71-
```javascript
72-
panel.loadGUI({
73-
username: ["username 1", "username 2", "username 3"],
74-
password: ["Password 1", "Password 2", "Password 3"],
75-
})
69+
#### Example userconfig file for panel:
70+
71+
File: `panel.userconfig.js`
72+
```js
73+
module.exports = [
74+
{
75+
username: "administratorAccount",
76+
password: "adminpassword",
77+
perms: ["admin"]
78+
}, {
79+
username: "user",
80+
password: "user",
81+
perms: [ "startup"]
82+
}
83+
]
7684
```
85+
##### Panel Main Page
86+
![Panel Main Page](./images/image2.png)
87+
##### Panel Code Editor
88+
![code editor](./images/image3.png)
89+
##### Panel Terminal
90+
![terminal](./images/image4.png)
91+
##### Panel Code evaluate
92+
![eval1](./images/image6.png)
93+
![eval2](./images/image5.png)
7794

78-
### Making Custom Pages
7995

96+
### Making Custom Pages
97+
Panel uses the express.js framework. So all resources of express can be used while making custom pages e.t.c.
8098
```javascript
8199
const app = panel.app;
82100
app.get("/example", (req, res) => {
83101
res.send("This is an example page.");
84102
})
85103
```
86-

0 commit comments

Comments
 (0)