Skip to content

Commit

Permalink
PUSH
Browse files Browse the repository at this point in the history
-> Fixed issue with leaderboards
-> Update the links from demo page
-> Update readme
-> Made it clear for new dash installs how you get admin
-> Fixed bug on user delete
-> Fixed the login and register page design
-> Added nice tools inside the dash
-> Disabled Update Checker
-> Optimized Old code
  • Loading branch information
NaysKutzu committed May 26, 2024
1 parent cf74289 commit d45c98a
Show file tree
Hide file tree
Showing 34 changed files with 166 additions and 143 deletions.
1 change: 0 additions & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
github: ['nayskutzu']
ko_fi: nayskutzu
custom: ['https://paypal.me/mythicalsystems']
35 changes: 15 additions & 20 deletions .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ You can find a step-by-step installation documentation over here: 
https://docs.mythicalsystems.xyz
## Support

For support, discord server: [discord.gg/freehost](https://discord.gg/3FWyugpznc)
For support, discord server: [discord.gg/mythicalsystems](https://discord.mythicalsystems.xyz)


## Optimizations
Expand Down Expand Up @@ -61,15 +61,15 @@ Well, we created a table to compare the most commonly used pterodactyl clients,

Yes, if you choose to install MythicalDash you agree with:

- [Github Security Policy](https://github.com/MythicalLTD/MythicalDash/blob/develop/.github/SECURITY.md)
- [Github MIT License](https://github.com/MythicalLTD/MythicalDash/blob/develop/LICENSE)
- [Github Security Policy](https://github.com/MythicalLTD/MythicalDash/blob/legacy/.github/SECURITY.md)
- [Github MIT License](https://github.com/MythicalLTD/MythicalDash/blob/legacy/LICENSE)
- [MythicalGuard TOS](https://github.com/MythicalLTD/mythicalguard?tab=readme-ov-file#usage-restrictions-and-guidelines)


## Demo

You can find a live deployment copy of MythicalDash here:
- https://devclient.mythicalsystems.xyz
- https://mythicaldash.mythicalsystems.xyz

## Roadmap

Expand All @@ -84,26 +84,21 @@ Contributions are always welcome!
This project is used by the following companies:

- MythicalSystems
- Free2Host


## Screenshots

- ![App Screenshot1](https://i.imgur.com/fLIYnqK.png)
- ![App Screenshot2](https://i.imgur.com/k3hBOut.png)
- ![App Screenshot3](https://i.imgur.com/QDr6jk5.png)
- ![App Screenshot4](https://i.imgur.com/1o5WNHo.png)
- ![App Screenshot5](https://i.imgur.com/YcEb4YE.png)
- ![App Screenshot6](https://i.imgur.com/KuJMgZk.png)
- ![App Screenshot7](https://i.imgur.com/Nf0aFAt.png)
- ![App Screenshot8](https://i.imgur.com/GwVkHbT.png)
- ![App Screenshot9](https://i.imgur.com/mVBrtV5.png)
- ![App Screenshot10](https://i.imgur.com/70rXiHt.png)
- ![App Screenshot11](https://i.imgur.com/WrroKW3.png)
- ![App Screenshot1](/.github/imgs/1.png)
- ![App Screenshot2](/.github/imgs/2.png)
- ![App Screenshot3](/.github/imgs/3.png)
- ![App Screenshot4](/.github/imgs/4.png)
- ![App Screenshot5](/.github/imgs/5.png)
- ![App Screenshot6](/.github/imgs/6.png)
- ![App Screenshot7](/.github/imgs/7.jpg)
- ![App Screenshot8](/.github/imgs/8.gif)

## API Reference

We did not write specific API documentation, but you can use [Insomnia](https://insomnia.rest/download) to see more info on what requests you can execute with our API. Here you can download the JSON for the Insomnia client: https://raw.githubusercontent.com/MythicalLTD/MythicalDash/develop/Insomnia.json
We did not write specific API documentation, but you can use [Insomnia](https://insomnia.rest/download) to see more info on what requests you can execute with our API. Here you can download the JSON for the Insomnia client: https://raw.githubusercontent.com/MythicalLTD/MythicalDash/legacy/Insomnia_2024-02-29.yaml

## Tech Stack

Expand All @@ -123,7 +118,7 @@ Here is a list of the core components that MythicalDash uses to run!
Page dialogs are a simple method to navigate into the dash by using page ids!

## Why shall i use them?
Well you do not have to use them if you do not want to use them, but there are just for developers or ppl that get annoyed in trying to find something in the UI!
Well you do not have to use them if you do not want to use them, but there are just for legacyers or ppl that get annoyed in trying to find something in the UI!

## Are there some reservations?
Yes here there are:
Expand Down Expand Up @@ -167,5 +162,5 @@ Where here is a list:

## Serial Code:
```bash
1 740 704 993
1 036 044 163
```
Binary file added .github/imgs/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/imgs/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/imgs/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/imgs/4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/imgs/5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/imgs/6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/imgs/7.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/imgs/8.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build and PHP APP

on:
push:
branches: [ "develop" ]
branches: [ "legacy" ]
workflow_dispatch:

env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Deploy static content to Pages
on:
# Runs on pushes targeting the default branch
push:
branches: ["develop"]
branches: ["legacy"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down
14 changes: 7 additions & 7 deletions app/Main.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ public static function getAppUrl()
public static function getLatestReleaseInfo()
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.github.com/repos/mythicalltd/mythicaldash/releases/latest");
curl_setopt($ch, CURLOPT_HTTPHEADER, ['User-Agent: MythicalDash']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
curl_close($ch);
curl_setopt($ch, CURLOPT_URL, "https://api.github.com/repos/mythicalltd/mythicaldash/releases/latest");
curl_setopt($ch, CURLOPT_HTTPHEADER, ['User-Agent: MythicalDash']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
curl_close($ch);

return json_decode($response, true);
return json_decode($response, true);
}

public static function getLang()
Expand All @@ -62,7 +62,7 @@ public static function getLang()
$langFilePath = __DIR__ . '/../lang/' . $langConfig . '.php';

if (file_exists($langFilePath)) {
return include($langFilePath);
return include ($langFilePath);
} else {
self::handleLanguageError("Failed to start the dash. Please use a valid language file.");
}
Expand Down
8 changes: 7 additions & 1 deletion cli/scripts/SettingsHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ public void Setup()
{
logo = "https://avatars.githubusercontent.com/u/117385445";
}

Console.Write("Pterodactyl URL [");
Console.ForegroundColor = ConsoleColor.Yellow;
Console.Write($"https://panel.yourhost.net");
Expand All @@ -52,6 +51,13 @@ public void Setup()
panelurl = "https://panel.yourhost.net";
}

if (panelurl.EndsWith("/"))
{
panelurl = panelurl.TrimEnd('/');
Console.WriteLine("Removed trailing slash from Pterodactyl URL.");
Console.WriteLine("Next time be more careful with the URL.");
}

Console.Write("Pterodactyl API [");
Console.ForegroundColor = ConsoleColor.Yellow;
Console.Write($"ptla_000000000000000000000000000000000000000000");
Expand Down
Binary file added pages/assets/imgs/imgs/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pages/assets/imgs/imgs/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pages/assets/imgs/imgs/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pages/assets/imgs/imgs/4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pages/assets/imgs/imgs/5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pages/assets/imgs/imgs/6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pages/assets/imgs/imgs/7.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pages/assets/imgs/imgs/8.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 9 additions & 9 deletions pages/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ <h4 class="font-bold lg:leading-normal leading-normal text-4xl lg:text-5xl mb-5"
</div>
</div>
<div class="home-dashboard mt-8 z-3 wow animate__animated animate__fadeIn">
<img src="assets/imgs/dash.png" alt="" class="mover">
<img src="assets/imgs/imgs/1.png" alt="" class="mover">
</div>
</div>

Expand Down Expand Up @@ -177,7 +177,7 @@ <h3 class="mb-6 md:text-3xl text-2xl md:leading-normal leading-normal font-semib

<div class="grid md:grid-cols-2 grid-cols-1 items-center mt-16 gap-[30px]">
<div class="relative wow animate__animated animate__fadeInLeft" data-wow-delay=".3s">
<img src="assets/imgs/dash.png" class="rounded-lg shadow-md dark:shadow-gray-800" alt="">
<img src="assets/imgs/imgs/1.png" class="rounded-lg shadow-md dark:shadow-gray-800" alt="">
<div class="overflow-hidden absolute lg:h-[400px] h-[320px] lg:w-[400px] w-[320px] bg-indigo-600/5 bottom-0 left-0 rotate-45 -z-1 rounded-3xl"></div>
</div>

Expand All @@ -194,7 +194,7 @@ <h4 class="mb-4 text-2xl leading-normal font-medium">Great design</h4>
<div class="container md:mt-24 mt-16">
<div class="grid md:grid-cols-2 grid-cols-1 items-center gap-[30px]">
<div class="relative order-1 md:order-2 wow animate__animated animate__fadeInRight" data-wow-delay=".5s">
<img src="assets/imgs/settings.png" class="rounded-lg shadow-md dark:shadow-gray-800" alt="">
<img src="assets/imgs/imgs/8.gif" class="rounded-lg shadow-md dark:shadow-gray-800" alt="">
<div class="overflow-hidden absolute lg:h-[400px] h-[320px] lg:w-[400px] w-[320px] bg-indigo-600/5 bottom-0 right-0 rotate-45 -z-1 rounded-3xl"></div>
</div>

Expand Down Expand Up @@ -232,7 +232,7 @@ <h3 class="mb-4 md:text-3xl md:leading-normal text-2xl leading-normal font-semib
</div>

<div class="text-center mt-5">
<img src="https://cdn.discordapp.com/avatars/852910297245286411/f97bf2d370a4eb820798f792789aa920?size=1024" class="h-14 w-14 rounded-full shadow-md mx-auto" alt="">
<img src="https://cdn.discordapp.com/avatars/643450803100712996/b1cf06f2838b4ad4cc4f7cae98f466a7" class="h-14 w-14 rounded-full shadow-md mx-auto" alt="">
<h6 class="mt-2 font-semibold">NaysKutzu</h6>
<span class="text-slate-400 text-sm">MythicalNodes</span>
</div>
Expand All @@ -255,7 +255,7 @@ <h6 class="mt-2 font-semibold">NaysKutzu</h6>
</div>

<div class="text-center mt-5">
<img src="https://cdn.discordapp.com/avatars/927474938204528670/a_c4c759f9a9150e528eac26a44eab0dab.gif" class="h-14 w-14 rounded-full shadow-md mx-auto" alt="">
<img src="https://cdn.discordapp.com/avatars/643450803100712996/b1cf06f2838b4ad4cc4f7cae98f466a7" class="h-14 w-14 rounded-full shadow-md mx-auto" alt="">
<h6 class="mt-2 font-semibold">Roido</h6>
<span class="text-slate-400 text-sm">Free2Host</span>
</div>
Expand All @@ -276,7 +276,7 @@ <h6 class="mt-2 font-semibold">Roido</h6>
</div>

<div class="text-center mt-5">
<img src="https://cdn.discordapp.com/avatars/1168788770510868553/9c1f46c21c29a1e4c99b16e9156ad754.png" class="h-14 w-14 rounded-full shadow-md mx-auto" alt="">
<img src="https://cdn.discordapp.com/avatars/643450803100712996/b1cf06f2838b4ad4cc4f7cae98f466a7" class="h-14 w-14 rounded-full shadow-md mx-auto" alt="">
<h6 class="mt-2 font-semibold">kebab</h6>
<span class="text-slate-400 text-sm">Unknown</span>
</div>
Expand All @@ -297,7 +297,7 @@ <h6 class="mt-2 font-semibold">kebab</h6>
</div>

<div class="text-center mt-5">
<img src="https://cdn.discordapp.com/avatars/902613244978528306/d42cbb682907e5fbb08416984e8b91ef.png" class="h-14 w-14 rounded-full shadow-md mx-auto" alt="">
<img src="https://cdn.discordapp.com/avatars/643450803100712996/b1cf06f2838b4ad4cc4f7cae98f466a7" class="h-14 w-14 rounded-full shadow-md mx-auto" alt="">
<h6 class="mt-2 font-semibold">usslmuk</h6>
<span class="text-slate-400 text-sm">Unknown</span>
</div>
Expand All @@ -319,7 +319,7 @@ <h6 class="mt-2 font-semibold">usslmuk</h6>
</div>

<div class="text-center mt-5">
<img src="https://cdn.discordapp.com/avatars/988251604006371328/01699e52ea2d879af0ac6ba4f17f1e7e.png" class="h-14 w-14 rounded-full shadow-md mx-auto" alt="">
<img src="https://cdn.discordapp.com/avatars/643450803100712996/b1cf06f2838b4ad4cc4f7cae98f466a7" class="h-14 w-14 rounded-full shadow-md mx-auto" alt="">
<h6 class="mt-2 font-semibold">DollPong</h6>
<span class="text-slate-400 text-sm">Unknown</span>
</div>
Expand Down Expand Up @@ -359,7 +359,7 @@ <h6 class="mt-2 font-semibold">Lasse</h6>
</div>

<div class="text-center mt-5">
<img src="https://cdn.discordapp.com/avatars/1163168310607753418/0b3a40203828fc7fa18484f06a2e93d8.png" class="h-14 w-14 rounded-full shadow-md mx-auto" alt="">
<img src="https://cdn.discordapp.com/avatars/643450803100712996/b1cf06f2838b4ad4cc4f7cae98f466a7" class="h-14 w-14 rounded-full shadow-md mx-auto" alt="">
<h6 class="mt-2 font-semibold">Lordwolfy</h6>
<span class="text-slate-400 text-sm">Unknown</span>
</div>
Expand Down
Empty file removed public/FIRST_INSTALL
Empty file.
Empty file removed public/FIRST_USER
Empty file.
39 changes: 3 additions & 36 deletions view/admin/health.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,42 +52,9 @@
<div class="container-xxl flex-grow-1 container-p-y">
<h4 class="fw-bold py-3 mb-4"><span class="text-muted fw-light">Admin /</span> Health</h4>
<?php include(__DIR__ . '/../components/alert.php') ?>
<?php

$data = Main::getLatestReleaseInfo();
if ($data && isset($data['tag_name'])) {
$latestVersion = $data['tag_name'];
$pr = $data['prerelease'];
if ($pr == true) {
$pre = " (Prerelease)";
} else {
$pre = null;
}
if ($latestVersion == SettingsManager::getSetting("version")) {
?>
<div class="alert alert-success " role="alert">
You are up to date!
<br><br> Branch: <code><?= $data['target_commitish'] ?></code> <br>Version:
<code><?php echo $data['tag_name'] . $pre ?></code>
</div>
<?php
} else {
?>
<div class="alert alert-danger " role="alert">
You are not up-to-date with your MythicalDash installation, make sure to update <a
href="https://docs.mythicalsystems.xyz/docs/MythicalDash/upgrade">here</a>.
</div>
<?php
}
} else {
?>
<div class="alert alert-danger " role="alert">
Failed to get the info about MythicalDash version system: <br>
<code><?= $data['message'] ?></code>
</div>
<?php
}
?>
<div class="alert alert-danger " role="alert">
Failed to get the info about MythicalDash version system: <br>
<code>API Support Disabled</code></div>
<?php
/**
* Parse the PHP version to x.x format.
Expand Down
55 changes: 12 additions & 43 deletions view/admin/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
use MythicalDash\SettingsManager;
use MythicalDash\Main;

include(__DIR__ . '/../requirements/page.php');
include(__DIR__ . '/../requirements/admin.php');
include (__DIR__ . '/../requirements/page.php');
include (__DIR__ . '/../requirements/admin.php');

$userCountQuery = "SELECT COUNT(*) AS user_count FROM mythicaldash_users";
$userCountResult = $conn->query($userCountQuery);
Expand Down Expand Up @@ -34,7 +34,7 @@
<meta charset="utf-8" />
<meta name="viewport"
content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0" />
<?php include(__DIR__ . '/../requirements/head.php'); ?>
<?php include (__DIR__ . '/../requirements/head.php'); ?>
<title>
<?= SettingsManager::getSetting("name") ?> - Admin
</title>
Expand All @@ -46,48 +46,17 @@
</div>-->
<div class="layout-wrapper layout-content-navbar">
<div class="layout-container">
<?php include(__DIR__ . '/../components/sidebar.php') ?>
<?php include (__DIR__ . '/../components/sidebar.php') ?>
<div class="layout-page">
<?php include(__DIR__ . '/../components/navbar.php') ?>
<?php include (__DIR__ . '/../components/navbar.php') ?>
<div class="content-wrapper">
<div class="container-xxl flex-grow-1 container-p-y">
<h4 class="fw-bold py-3 mb-4"><span class="text-muted fw-light">Admin /</span> Statistics</h4>
<?php include(__DIR__ . '/../components/alert.php') ?>
<?php
$data = Main::getLatestReleaseInfo();
if ($data && isset($data['tag_name'])) {
$latestVersion = $data['tag_name'];
$pr = $data['prerelease'];
if ($pr == true) {
$pre = " (Prerelease)";
} else {
$pre = null;
}
if ($latestVersion == SettingsManager::getSetting("version")) {
?>
<div class="alert alert-success " role="alert">
You are up to date!
<br><br> Branch: <code><?= $data['target_commitish'] ?></code> <br>Version: <code><?php echo $data['tag_name'].$pre ?></code>
</div>
<?php
} else {
?>
<div class="alert alert-danger " role="alert">
You are not up-to-date with your MythicalDash installation, make sure to update <a
href="https://docs.mythicalsystems.xyz/docs/MythicalDash/upgrade">here</a>.
</div>
<?php
}
} else {
?>
<div class="alert alert-danger " role="alert">
Failed to get the info about MythicalDash version system: <br>
<code><?= $data['message'] ?></code>

</div>
<?php
}
?>
<?php include (__DIR__ . '/../components/alert.php') ?>
<div class="alert alert-danger " role="alert">
Failed to get the info about MythicalDash version system: <br>
<code>API Support Disabled</code>
</div>
<div class="">
<!-- Statistics -->
<div class="card h-100">
Expand Down Expand Up @@ -156,15 +125,15 @@
</div>
</div>
</div>
<?php include(__DIR__ . '/../components/footer.php') ?>
<?php include (__DIR__ . '/../components/footer.php') ?>
<div class="content-backdrop fade"></div>
</div>
</div>
</div>
<div class="layout-overlay layout-menu-toggle"></div>
<div class="drag-target"></div>
</div>
<?php include(__DIR__ . '/../requirements/footer.php') ?>
<?php include (__DIR__ . '/../requirements/footer.php') ?>
<script src="<?= $appURL ?>/assets/js/dashboards-ecommerce.js"></script>
<script>
function updateElapsedTime() {
Expand Down
Loading

0 comments on commit d45c98a

Please sign in to comment.