Skip to content

Commit

Permalink
Prettier Format
Browse files Browse the repository at this point in the history
  • Loading branch information
iMidnights committed Nov 12, 2022
1 parent 0667319 commit 9bfa8cc
Show file tree
Hide file tree
Showing 81 changed files with 96,622 additions and 26,406 deletions.
58 changes: 29 additions & 29 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
name: NPM Publish

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm ci

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
name: NPM Publish

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm ci

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
hehe, my eyes burn now :D
hehe, my eyes burn now :D
34 changes: 18 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,31 @@
## Information

This theme is in beta release, more information at [discord-dashboard discord](https://discord.gg/CHbfcSbEgd).

## Documentation

Docs are available at [Soft-UI Docs](https://dbd-docs.assistantscenter.com/soft-ui/).

## Preview

![Preview](./soft-ui-preview.png)

## Features


The table below shows the features **dbd-soft-ui** has compared to other themes for **[discord-dashboard](https://npmjs.com/package/discord-dashboard)**.

|*Features* |dbd-soft-ui|[dbd-capriham-theme](https://npmjs.com/package/dbd-capriham-theme)|[dbd-dark-dashboard](https://npmjs.com/package/dbd-dark-dashboard)|
|-------------|---------------|-------------|--------------------------|
|Command Categories|<p align="center">✅</p>|<p align="center">❌</p>|<p align="center">✅</p>
|Light Theme|<p align="center">✅</p>|<p align="center">✅</p>|<p align="center">❌</p>
|Dark Theme|<p align="center">✅</p>|<p align="center">❌</p>|<p align="center">✅</p>
|Server Information|<p align="center">✅</p>|<p align="center">❌</p>|<p align="center">✅</p>
|User Information|<p align="center">✅</p>|<p align="center">❌</p>|<p align="center">❌</p>
|Admin Page|<p align="center">✅</p>|<p align="center">❌</p>|<p align="center">❌</p>
|Pterodactyl Support|<p align="center">✅</p>|<p align="center">❌</p>|<p align="center">❌</p>
|Feeds v2|<p align="center">✅</p>|<p align="center">❌</p>|<p align="center">❌</p>
|Customisable Color Scheme|<p align="center">✅</p>|<p align="center">❌</p>|<p align="center">❌</p>
|Premium|<p align="center">✅</p>|<p align="center">❌</p>|<p align="center">❌</p>
|Statistics|<p align="center">✅</p>|<p align="center">❌</p>|<p align="center">❌</p>
|Commands Search|<p align="center">✅</p>|<p align="center">❌</p>|<p align="center">❌</p>
|Shard Statistics|<p align="center">✅</p>|<p align="center">❌</p>|<p align="center">❌</p>
| _Features_ | dbd-soft-ui | [dbd-capriham-theme](https://npmjs.com/package/dbd-capriham-theme) | [dbd-dark-dashboard](https://npmjs.com/package/dbd-dark-dashboard) |
| ------------------------- | ------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
| Command Categories | <p align="center">✅</p> | <p align="center">❌</p> | <p align="center">✅</p> |
| Light Theme | <p align="center">✅</p> | <p align="center">✅</p> | <p align="center">❌</p> |
| Dark Theme | <p align="center">✅</p> | <p align="center">❌</p> | <p align="center">✅</p> |
| Server Information | <p align="center">✅</p> | <p align="center">❌</p> | <p align="center">✅</p> |
| User Information | <p align="center">✅</p> | <p align="center">❌</p> | <p align="center">❌</p> |
| Admin Page | <p align="center">✅</p> | <p align="center">❌</p> | <p align="center">❌</p> |
| Pterodactyl Support | <p align="center">✅</p> | <p align="center">❌</p> | <p align="center">❌</p> |
| Feeds v2 | <p align="center">✅</p> | <p align="center">❌</p> | <p align="center">❌</p> |
| Customisable Color Scheme | <p align="center">✅</p> | <p align="center">❌</p> | <p align="center">❌</p> |
| Premium | <p align="center">✅</p> | <p align="center">❌</p> | <p align="center">❌</p> |
| Statistics | <p align="center">✅</p> | <p align="center">❌</p> | <p align="center">❌</p> |
| Commands Search | <p align="center">✅</p> | <p align="center">❌</p> | <p align="center">❌</p> |
| Shard Statistics | <p align="center">✅</p> | <p align="center">❌</p> | <p align="center">❌</p> |
8 changes: 4 additions & 4 deletions icons.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ const icons = [
"volume-off",
"volume-up",
"wifi",
"wrench"
"wrench",
]
const otherIcons = [
"youtube",
Expand All @@ -275,14 +275,14 @@ const otherIcons = [
"npm",
"spotify",
"usb",
"windows"
"windows",
]

function run() {
return {
icons,
otherIcons
otherIcons,
}
}

module.exports = run();
module.exports = run()
76 changes: 45 additions & 31 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,54 +1,68 @@
const colors = require('colors');
const npmUpdater = require('./utils/updater/npm');
const fileUpdater = require('./utils/updater/files');
const consolePrefix = `${"[".blue}${"dbd-soft-ui".yellow}${"]".blue} `;
const Keyv = require('keyv');
const path = require('path')
const colors = require("colors")
const npmUpdater = require("./utils/updater/npm")
const fileUpdater = require("./utils/updater/files")
const consolePrefix = `${"[".blue}${"dbd-soft-ui".yellow}${"]".blue} `
const Keyv = require("keyv")
const path = require("path")

module.exports = (themeConfig = {}) => {
return {
themeCodename: 'softui',
viewsPath: path.join(__dirname, '/views'),
staticPath: path.join(__dirname, '/views/src'),
themeCodename: "softui",
viewsPath: path.join(__dirname, "/views"),
staticPath: path.join(__dirname, "/views/src"),
themeConfig: {
...themeConfig,
defaultLocales: require('./locales.js'),
defaultLocales: require("./locales.js"),
},
messages: {
error: {
addonLicense: `${consolePrefix}${"Failed to initialise {{ADDON}}.\nThe license this addon was installed with does not match your current discord-dashboard license.".cyan}`,
addonLicense: `${consolePrefix}${
"Failed to initialise {{ADDON}}.\nThe license this addon was installed with does not match your current discord-dashboard license."
.cyan
}`,
},
success: {
addonLoaded: `${consolePrefix}${"Successfully loaded {{ADDON}}.".cyan}`
}
addonLoaded: `${consolePrefix}${
"Successfully loaded {{ADDON}}.".cyan
}`,
},
},
embedBuilderComponent: require('fs').readFileSync(path.join(__dirname, '/embedBuilderComponent.txt'), 'utf8'),
embedBuilderComponent: require("fs").readFileSync(
path.join(__dirname, "/embedBuilderComponent.txt"),
"utf8"
),
init: async (app, config) => {
let outdated = false;
(async () => {
let check = await npmUpdater.update();
await fileUpdater.update();
if (!check) outdated = true;
})();
let outdated = false
;(async () => {
let check = await npmUpdater.update()
await fileUpdater.update()
if (!check) outdated = true
})()

const db = new Keyv(themeConfig.dbdriver || "sqlite://"+path.join(__dirname, '/database.sqlite'));
const db = new Keyv(
themeConfig.dbdriver ||
"sqlite://" + path.join(__dirname, "/database.sqlite")
)

db.on('error', err => { console.log('Connection Error', err);process.exit() });
db.on("error", (err) => {
console.log("Connection Error", err)
process.exit()
})

themeConfig = {
...themeConfig,
defaultLocales: require('./locales.js'),
defaultLocales: require("./locales.js"),
}

require('./utils/functions/errorHandler')(config, themeConfig, db)
require('./utils/functions/settingsPage')(config, themeConfig, db)
require("./utils/functions/errorHandler")(config, themeConfig, db)
require("./utils/functions/settingsPage")(config, themeConfig, db)
// await require('./utils/addonManager').execute(themeConfig, config, app, module.exports.messages);
require('./utils/initPages').init(config, themeConfig, app, db);
}
require("./utils/initPages").init(config, themeConfig, app, db)
},
}
}

module.exports.partials = __dirname + '/views/partials';
module.exports.formTypes = require('./utils/formtypes');
module.exports.Feed = require('./utils/feedHandler');
module.exports.cmdHandler = require('./utils/cmdHandler');
module.exports.partials = __dirname + "/views/partials"
module.exports.formTypes = require("./utils/formtypes")
module.exports.Feed = require("./utils/feedHandler")
module.exports.cmdHandler = require("./utils/cmdHandler")
33 changes: 17 additions & 16 deletions locales.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
module.exports = {
"enUS": {
name: 'English',
enUS: {
name: "English",
index: {
feeds: ["Current Users", "CPU", "System Platform", "Server Count"],
card: {
category: "Soft UI",
title: "Assistants - The center of everything",
description: "Assistants Discord Bot management panel. Assistants Bot was created to give others the ability to do what they want. Just.<br>That's an example text.<br><br><b><i>Feel free to use HTML</i></b>",
description:
"Assistants Discord Bot management panel. Assistants Bot was created to give others the ability to do what they want. Just.<br>That's an example text.<br><br><b><i>Feel free to use HTML</i></b>",
footer: "Learn More",
image: "/img/soft-ui.webp",
linkText: "Learn more"
linkText: "Learn more",
},
feedsTitle: "Feeds",
graphTitle: "Graphs",
Expand All @@ -19,9 +20,9 @@ module.exports = {
memberCount: "Members",
info: {
info: "Info",
server: "Server Information"
}
}
server: "Server Information",
},
},
},
privacyPolicy: {
title: "Privacy Policy",
Expand All @@ -36,7 +37,7 @@ module.exports = {
admin: "Admin",
account: "Account Pages",
login: "Sign In",
logout: "Sign Out"
logout: "Sign Out",
},
navbar: {
home: "Home",
Expand All @@ -52,7 +53,7 @@ module.exports = {
leaderboard: "Leaderboard",
profile: "Profile",
maintenance: "Under Maintenance",
}
},
},
title: {
pages: {
Expand All @@ -67,10 +68,10 @@ module.exports = {
leaderboard: "Leaderboard",
profile: "Profile",
maintenance: "Under Maintenance",
}
},
},
preloader: {
text: "Page is loading..."
text: "Page is loading...",
},
premium: {
title: "Want more from Assistants?",
Expand All @@ -87,8 +88,8 @@ module.exports = {
language: {
title: "Site Language",
description: "Select your preferred language!",
}
}
}
}
}
},
},
},
},
}
Loading

0 comments on commit 9bfa8cc

Please sign in to comment.