Skip to content

Commit f9a877b

Browse files
authored
Merge pull request #88 from Weilbyte/next
Take in changes from next to master
2 parents b4d16aa + e3255e8 commit f9a877b

File tree

12 files changed

+88
-274
lines changed

12 files changed

+88
-274
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2019
3+
Copyright 2021 Weilbyte
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

PVEDiscordDark.py

Lines changed: 0 additions & 191 deletions
This file was deleted.
1.55 KB
Loading

PVEDiscordDark/sass/PVEDiscordDark.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
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
1+
div[id^="pveDcHealth-"][id$="-body"], div[id^="pveDcGuests-"][id$="-body"],
2+
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,
3+
div[id^="pveDcSummary-"][id$="-innerCt"] > div:nth-child(3) > div:nth-child(2) > div
24
background-color: $darker
35

46
div[id^="pveDcSummary-"][id$="-innerCt"] > div:nth-child(4) > div:nth-child(3)
5-
border: 1px solid $darker
7+
border: 1px solid $darker

PVEDiscordDark/sass/special/_icons.sass

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@
5252
.fa-usb:before
5353
color: white
5454

55+
.fa-object-group:before
56+
color: white
57+
5558
.fa-hdd-o:before
5659
color: white
5760

PVEDiscordDark/sass/special/_specific.sass

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
background: $darker
2222

2323
div[id^="toolbar-"][id$="-innerCt"] div[id^="toolbar-"][id$="-targetEl"] div ul li div
24-
background-color: $dark
24+
background-color: $dark
2525

2626
div[id^="pveGuestStatusView-"][id$="-body"]
2727
background: $darker
@@ -89,9 +89,13 @@ a[id^="menuitem-"][id$="-itemEl"] div[class*="fa-trash-o"]:before
8989
background-color: transparent !important
9090
border: 1px solid #d23d3f !important
9191
div[id="menu-1029-targetEl"] > div[class*="x-menu-item"]
92-
background: $dark
92+
background: $dark
9393
div[id="menu-1029-targetEl"] > div[class*="x-menu-item"] > a[class*="x-menu-item-focus"]
94-
background: $darker
94+
background: $darker
9595
div[id="menu-1029-targetEl"] > div[class*="x-menu-item"] > div[class*="x-menu-item"] > a[aria-disabled="true"]
96-
opacity: 0.5
97-
background: $darker
96+
opacity: 0.5
97+
background: $darker
98+
99+
// Panels on "My Settings"
100+
div[id^="form-"][id$="-innerCt"][style="height: 160px; width: 356px;"], div[id^="fieldset-"][id$="-innerCt"]
101+
background: $darker

PVEDiscordDark/sass/x/_form.sass

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,6 @@
3737

3838
.x-form-cb-label-default
3939
color: inherit
40+
41+
.x-form-field-date .x-form-date-trigger
42+
background-image: url('/pve2/images/dd_date-trigger.png')

PVEDiscordDark/sass/x/_misc.sass

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,8 @@
2323
.install-mask
2424
color: white
2525
background-color: $darker
26+
27+
hr[class*="x-component"]
28+
border-width: 1px
29+
border-bottom-width: 0px
30+
border-color: rgba($blurple, 0.35)

PVEDiscordDark/serve.py

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Script to assist with PVEDiscordDark development
2+
#
3+
# 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
4+
# Meant to be used with the "Requestly" browser extension to redirect PVEDD requests from PVE server to localhost:3000
5+
#
6+
7+
from http.server import HTTPServer, BaseHTTPRequestHandler
8+
import json
9+
import os
10+
11+
PORT = 3000
12+
DIR_SASS = os.path.join(os.path.dirname(__file__), "sass")
13+
DIR_IMAGES = os.path.join(os.path.dirname(__file__), "images")
14+
DIR_JS = os.path.join(os.path.dirname(__file__), "js")
15+
16+
17+
class Server(BaseHTTPRequestHandler):
18+
def log_message(self, format, *args):
19+
return
20+
21+
def _set_headers(self, status, type):
22+
self.send_response(status)
23+
self.send_header("Content-type", type)
24+
self.end_headers()
25+
26+
def do_GET(self):
27+
status = 200
28+
type = "application/json"
29+
data = None
30+
31+
file = self.path.rpartition("/")[2]
32+
ext = file.rpartition(".")[2]
33+
34+
if ext == "css":
35+
data = open(os.path.join(DIR_SASS, "PVEDiscordDark.css"), "rb").read()
36+
type = "text/css"
37+
elif ext == "js":
38+
data = open(os.path.join(DIR_JS, "PVEDiscordDark.js"), "rb").read()
39+
type = "application/javascript"
40+
elif ext == "png" or ext == "jpg" or ext == "jpeg":
41+
try:
42+
data = open(os.path.join(DIR_IMAGES, file), "rb").read()
43+
type = f"image/{ext}"
44+
except FileNotFoundError:
45+
status = 404
46+
else:
47+
status = 400
48+
self._set_headers(status, type)
49+
if status == 200:
50+
self.wfile.write(data)
51+
else:
52+
self.wfile.write(json.dumps({"error": status}).encode())
53+
54+
55+
if __name__ == "__main__":
56+
print(f"Serving on localhost:{PORT}")
57+
server = HTTPServer(server_address=("", PORT), RequestHandlerClass=Server)
58+
try:
59+
server.serve_forever()
60+
except KeyboardInterrupt:
61+
quit()

0 commit comments

Comments
 (0)