-
Notifications
You must be signed in to change notification settings - Fork 239
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #88 from Weilbyte/next
Take in changes from next to master
- Loading branch information
Showing
12 changed files
with
88 additions
and
274 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
div[id^="pveDcHealth-"][id$="-body"], div[id^="pveDcGuests-"][id$="-body"], div[id^="pveDcSummary-"][id$="-innerCt"] > div:nth-child(3) > div:nth-child(2), div[id^="pveDcSummary-"][id$="-innerCt"] > div:nth-child(5) > div:nth-child(2) > div > div | ||
div[id^="pveDcHealth-"][id$="-body"], div[id^="pveDcGuests-"][id$="-body"], | ||
div[id^="pveDcSummary-"][id$="-innerCt"] > div:nth-child(3) > div:nth-child(2), div[id^="pveDcSummary-"][id$="-innerCt"] > div:nth-child(5) > div:nth-child(2) > div > div, | ||
div[id^="pveDcSummary-"][id$="-innerCt"] > div:nth-child(3) > div:nth-child(2) > div | ||
background-color: $darker | ||
|
||
div[id^="pveDcSummary-"][id$="-innerCt"] > div:nth-child(4) > div:nth-child(3) | ||
border: 1px solid $darker | ||
border: 1px solid $darker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,6 +52,9 @@ | |
.fa-usb:before | ||
color: white | ||
|
||
.fa-object-group:before | ||
color: white | ||
|
||
.fa-hdd-o:before | ||
color: white | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# Script to assist with PVEDiscordDark development | ||
# | ||
# By default serves HTTP on port 3000, any *.js request gets the JS script, any *.css request gets the CSS file and any image request gets corresponding image | ||
# Meant to be used with the "Requestly" browser extension to redirect PVEDD requests from PVE server to localhost:3000 | ||
# | ||
|
||
from http.server import HTTPServer, BaseHTTPRequestHandler | ||
import json | ||
import os | ||
|
||
PORT = 3000 | ||
DIR_SASS = os.path.join(os.path.dirname(__file__), "sass") | ||
DIR_IMAGES = os.path.join(os.path.dirname(__file__), "images") | ||
DIR_JS = os.path.join(os.path.dirname(__file__), "js") | ||
|
||
|
||
class Server(BaseHTTPRequestHandler): | ||
def log_message(self, format, *args): | ||
return | ||
|
||
def _set_headers(self, status, type): | ||
self.send_response(status) | ||
self.send_header("Content-type", type) | ||
self.end_headers() | ||
|
||
def do_GET(self): | ||
status = 200 | ||
type = "application/json" | ||
data = None | ||
|
||
file = self.path.rpartition("/")[2] | ||
ext = file.rpartition(".")[2] | ||
|
||
if ext == "css": | ||
data = open(os.path.join(DIR_SASS, "PVEDiscordDark.css"), "rb").read() | ||
type = "text/css" | ||
elif ext == "js": | ||
data = open(os.path.join(DIR_JS, "PVEDiscordDark.js"), "rb").read() | ||
type = "application/javascript" | ||
elif ext == "png" or ext == "jpg" or ext == "jpeg": | ||
try: | ||
data = open(os.path.join(DIR_IMAGES, file), "rb").read() | ||
type = f"image/{ext}" | ||
except FileNotFoundError: | ||
status = 404 | ||
else: | ||
status = 400 | ||
self._set_headers(status, type) | ||
if status == 200: | ||
self.wfile.write(data) | ||
else: | ||
self.wfile.write(json.dumps({"error": status}).encode()) | ||
|
||
|
||
if __name__ == "__main__": | ||
print(f"Serving on localhost:{PORT}") | ||
server = HTTPServer(server_address=("", PORT), RequestHandlerClass=Server) | ||
try: | ||
server.serve_forever() | ||
except KeyboardInterrupt: | ||
quit() |
Oops, something went wrong.