diff --git a/init/conf/config.go b/init/conf/config.go index 32fc7b7..ea9ad29 100644 --- a/init/conf/config.go +++ b/init/conf/config.go @@ -1,20 +1,22 @@ package conf type PixelWebConfig struct { - APIURLExternal string `toml:"api_url_external"` - APIURLInternal string `toml:"api_url_internal"` - StaticResourceDir string `toml:"static_resource_dir"` - TemplateDir string `toml:"template_dir"` - DebugMode bool `toml:"debug_mode"` - MaintenanceMode bool `toml:"maintenance_mode"` + APIURLExternal string `toml:"api_url_external"` + APIURLInternal string `toml:"api_url_internal"` + SessionCookieDomain string `toml:"session_cookie_domain"` + StaticResourceDir string `toml:"static_resource_dir"` + TemplateDir string `toml:"template_dir"` + DebugMode bool `toml:"debug_mode"` + MaintenanceMode bool `toml:"maintenance_mode"` } const DefaultConfig = `# Pixeldrain Web UI server configuration -api_url_external = "/api" # Used in the web browser -api_url_internal = "http://127.0.0.1:8080" # Used for internal API requests to the pixeldrain server, not visible to users -static_resource_dir = "res/static" -template_dir = "res/template" -debug_mode = false -maintenance_mode = false +api_url_external = "/api" # Used in the web browser +api_url_internal = "http://127.0.0.1:8080" # Used for internal API requests to the pixeldrain server, not visible to users +session_cookie_domain = ".pixeldrain.com" +static_resource_dir = "res/static" +template_dir = "res/template" +debug_mode = false +maintenance_mode = false ` diff --git a/res/static/img/checker0.png b/res/static/img/checker0.png index 2906d48..b374e00 100644 Binary files a/res/static/img/checker0.png and b/res/static/img/checker0.png differ diff --git a/res/static/img/checker1.png b/res/static/img/checker1.png index 8339346..a7531a4 100644 Binary files a/res/static/img/checker1.png and b/res/static/img/checker1.png differ diff --git a/res/static/img/checker10.png b/res/static/img/checker10.png index fc3a588..671e883 100644 Binary files a/res/static/img/checker10.png and b/res/static/img/checker10.png differ diff --git a/res/static/img/checker11.png b/res/static/img/checker11.png index 678dc1c..c9c2ccb 100644 Binary files a/res/static/img/checker11.png and b/res/static/img/checker11.png differ diff --git a/res/static/img/checker12.png b/res/static/img/checker12.png index 33ea84b..c4b7cca 100644 Binary files a/res/static/img/checker12.png and b/res/static/img/checker12.png differ diff --git a/res/static/img/checker13.png b/res/static/img/checker13.png index 51eda0d..1dc29a4 100644 Binary files a/res/static/img/checker13.png and b/res/static/img/checker13.png differ diff --git a/res/static/img/checker14.png b/res/static/img/checker14.png index 25c34c5..bf6dd0b 100644 Binary files a/res/static/img/checker14.png and b/res/static/img/checker14.png differ diff --git a/res/static/img/checker15.png b/res/static/img/checker15.png index b247441..315fae9 100644 Binary files a/res/static/img/checker15.png and b/res/static/img/checker15.png differ diff --git a/res/static/img/checker16.png b/res/static/img/checker16.png index b323ee4..1f7f457 100644 Binary files a/res/static/img/checker16.png and b/res/static/img/checker16.png differ diff --git a/res/static/img/checker2.png b/res/static/img/checker2.png index 960f5cb..870e699 100644 Binary files a/res/static/img/checker2.png and b/res/static/img/checker2.png differ diff --git a/res/static/img/checker3.png b/res/static/img/checker3.png index f16bb99..5fa02df 100644 Binary files a/res/static/img/checker3.png and b/res/static/img/checker3.png differ diff --git a/res/static/img/checker4.png b/res/static/img/checker4.png index df96930..188138f 100644 Binary files a/res/static/img/checker4.png and b/res/static/img/checker4.png differ diff --git a/res/static/img/checker5.png b/res/static/img/checker5.png index 4e990af..b21dfab 100644 Binary files a/res/static/img/checker5.png and b/res/static/img/checker5.png differ diff --git a/res/static/img/checker6.png b/res/static/img/checker6.png index 1171b47..ac8897d 100644 Binary files a/res/static/img/checker6.png and b/res/static/img/checker6.png differ diff --git a/res/static/img/checker7.png b/res/static/img/checker7.png index 321f976..d44f8ef 100644 Binary files a/res/static/img/checker7.png and b/res/static/img/checker7.png differ diff --git a/res/static/img/checker8.png b/res/static/img/checker8.png index 4654561..dab6231 100644 Binary files a/res/static/img/checker8.png and b/res/static/img/checker8.png differ diff --git a/res/static/img/checker9.png b/res/static/img/checker9.png index 7783a6c..584d833 100644 Binary files a/res/static/img/checker9.png and b/res/static/img/checker9.png differ diff --git a/res/static/script/Toolbar.js b/res/static/script/Toolbar.js index 5aa290a..b4f77a9 100644 --- a/res/static/script/Toolbar.js +++ b/res/static/script/Toolbar.js @@ -18,13 +18,11 @@ var Toolbar = { document.getElementById("toolbar").style.left = "-9em"; document.getElementById("filepreview").style.left = "0px"; - document.getElementById("info_popup").style.left = "1em"; this.visible = false; } else { document.getElementById("toolbar").style.left = "0px"; document.getElementById("filepreview").style.left = "8em"; - document.getElementById("info_popup").style.left = "9em"; this.visible = true; } @@ -175,7 +173,7 @@ function loadCaptcha(){ var DetailsWindow = { visible: false, - popupDiv: document.getElementById("info_popup"), + popupDiv: document.getElementById("details_popup"), detailsButton: document.getElementById("btnDetails"), toggle: function () { if (this.visible) { diff --git a/res/static/style/layout.css b/res/static/style/layout.css index 83f02e3..c8b1591 100644 --- a/res/static/style/layout.css +++ b/res/static/style/layout.css @@ -62,10 +62,11 @@ body{ margin: 0; text-align: center; /* Center the header and body */ line-height: 1.5em; - height: 100%; overflow-x: hidden; color: #bfbfbf; /* Fallback */ color: var(--text_color); + box-sizing: border-box; + padding: 0; } /* Page layout elements */ @@ -83,14 +84,13 @@ body{ min-width: 300px; width: 100%; height: auto; - padding: 0px 8px 0px 8px; + padding: 0 10px 0 10px; + margin: 30px 0 30px 0; box-sizing: border-box; background-color: var(--body_color); - margin-top: 30px; - margin-bottom: 30px; text-align: left; - box-shadow: #000000 8px 8px 50px, 5px; - box-shadow: var(--shadow_color) 8px 8px var(--shadow_spread) var(--shadow_intensity); + box-shadow: #000000 0 0 10px, 5px; + box-shadow: var(--shadow_color) 0 0 var(--shadow_spread) var(--shadow_intensity); z-index: 1; word-break: break-word; } @@ -112,8 +112,8 @@ body{ .navigation a:hover { background: linear-gradient(#82c13e, #6da234); background: linear-gradient(var(--highlight_color), var(--highlight_color_dark)); - box-shadow: #82c13e, 2px 2px 8px #000000; - box-shadow: var(--highlight_border), 2px 2px 8px var(--shadow_color); + box-shadow: #82c13e, 1px 1px 4px #000000; + box-shadow: var(--highlight_border), 1px 1px 4px var(--shadow_color); color: #000000; color: var(--highlight_text_color); transition: box-shadow 0.5s; @@ -150,19 +150,43 @@ body{ position: relative; width: auto; height: auto; - margin: 0 -8px 0 -8px; + margin: 0 -10px 0 -10px; box-sizing: border-box; overflow: hidden; text-align: center; - padding: 4px 0px 4px 0px; + padding: .5em; z-index: 101; } -.highlight_dark {background-color: var(--accent_color_dark); border-color: var(--accent_color_dark_border); box-shadow: inset 1px 1px 12px -1px var(--shadow_color);} -.highlight_middle {background-color: var(--accent_color_medium); border-color: var(--accent_color_medium_border); box-shadow: inset 1px 1px 8px -1px var(--shadow_color);} -.highlight_light {background-color: var(--accent_color_light); border-color: var(--accent_color_light_border); box-shadow: 1px 1px 4px var(--shadow_color);} -.highlight_green {background-color: rgba(0, 255, 0, 0.05); border-color: #00d000;} -.highlight_blue {background-color: rgba(32, 32, 255, 0.2); border-color: rgb(54, 54, 255);} -.highlight_red {background-color: rgba(255, 0, 0, 0.1); border-color: #B00000;} +.highlight_dark { + background-color: var(--accent_color_dark); + border-color: var(--accent_color_dark_border); + box-shadow: inset 1px 1px 8px -1px var(--shadow_color);} +.highlight_middle { + background-color: var(--accent_color_medium); + border-color: var(--accent_color_medium_border); + box-shadow: inset 1px 1px 6px -1px var(--shadow_color);} +.highlight_light { + background-color: var(--accent_color_light); + border-color: var(--accent_color_light_border); + box-shadow: 1px 1px 4px var(--shadow_color);} +.highlight_green { + background-color: rgba(0, 255, 0, 0.05); + border-color: #00d000;} +.highlight_blue { + background-color: rgba(32, 32, 255, 0.2); + border-color: rgb(54, 54, 255);} +.highlight_red { + background-color: rgba(255, 0, 0, 0.1); + border-color: #B00000;} + +body > .highlight_dark, +body > .highlight_middle, +body > .highlight_light, +body > .highlight_green, +body > .highlight_blue, +body > .highlight_red { + margin: 0; +} .border_top {border-top-width: 1px; border-top-style: solid;} .border_bottom {border-bottom-width: 1px; border-bottom-style: solid;} @@ -189,8 +213,11 @@ hr{ width: 12px; /* for vertical scrollbars */ height: 12px; /* for horizontal scrollbars */ } -::-webkit-scrollbar-track {background: var(--accent_color_dark);} -::-webkit-scrollbar-thumb {background-color: var(--accent_color_light);} +::-webkit-scrollbar-track {background: var(--scrollbar_background_color);} +::-webkit-scrollbar-thumb { + background-color: var(--scrollbar_foreground_color); + border-radius: 6px; +} ::-webkit-scrollbar-corner{background: transparent;} a {color: var(--highlight_color); text-decoration: none;} @@ -312,7 +339,7 @@ select{ margin: 2px; background: linear-gradient(var(--input_color), var(--input_color_dark)); padding: 6px 8px 6px 8px; - box-shadow: 2px 2px 8px var(--shadow_color); + box-shadow: 2px 2px 4px var(--shadow_color); font-weight: bold; font-size: 0.85em; overflow: hidden; @@ -340,7 +367,7 @@ select:focus{ color: #bfbfbf; /* Fallback */ color: var(--input_text_color); text-decoration: none; - box-shadow: var(--highlight_border), 2px 2px 8px var(--shadow_color); + box-shadow: var(--highlight_border), 2px 2px 4px var(--shadow_color); } button:active, .button:active, @@ -349,7 +376,7 @@ input[type="button"]:active, input[type="color"]:active, select:active{ background: linear-gradient(var(--input_color_dark), var(--input_color)); - box-shadow: inset 5px 5px 10px var(--shadow_color); + box-shadow: inset 4px 4px 8px var(--shadow_color); padding: 11px 3px 1px 13px; /* Exactly 5px offset compared to the inactive padding to give a depth effect */ } .button_full_width {width: calc(100% - 4px);} @@ -376,7 +403,7 @@ input[type="number"]{ box-sizing: border-box; border-radius: 4px; background: linear-gradient(var(--input_color_dark), var(--input_color)); - box-shadow: inset 3px 3px 6px var(--shadow_color); + box-shadow: inset 2px 2px 4px var(--shadow_color); padding: 3px 5px; color: var(--input_text_color); height: 26px; diff --git a/res/static/style/viewer.css b/res/static/style/viewer.css index d014aa2..dc9a20b 100644 --- a/res/static/style/viewer.css +++ b/res/static/style/viewer.css @@ -190,32 +190,15 @@ body{ /* ===================== || MISC COMPONENTS || ===================== */ -.full_popup{ + +.popup { position: fixed; visibility: hidden; opacity: 0; - transition: visibility 1s, opacity 1s, left 1s; - background-color: var(--background_color); - left: 9em; - right: 1em; - bottom: 1em; - top: 1em; - overflow-y: scroll; - padding: 1em; - box-sizing: border-box; - text-align: left; - box-shadow: var(--shadow_color) 0px 0px 50px; - z-index: 100; -} -.captcha_popup{ - position: fixed; - visibility: hidden; - opacity: 0; - transition: visibility 1s, opacity 1s, left 1s; - background-color: var(--background_color); + transition: visibility 1s, opacity 1s; + background-color: var(--body_color); border-color: var(--accent_color_dark_border); - height: auto; - width: 450px; + max-height: 100%; max-width: 100%; top: 10%; left: 50%; @@ -224,6 +207,20 @@ body{ box-sizing: border-box; text-align: left; box-shadow: var(--shadow_color) 0px 0px 50px; +} +.popup .highlight_light { + font-size: 1.2em; +} + +.details_popup{ + overflow-y: scroll; + width: 1200px; + height: 800px; + z-index: 100; +} +.captcha_popup{ + height: auto; + width: 450px; z-index: 101; } #captcha_popup_captcha > div { diff --git a/res/template/apidoc.html b/res/template/apidoc.html index 2eb7023..a4ec1f3 100644 --- a/res/template/apidoc.html +++ b/res/template/apidoc.html @@ -79,10 +79,10 @@ {{template "api-list-post"}} {{template "api-list-get"}} - - {{/*template "api-filesystem-path-post"*/}} - {{/*template "api-filesystem-path-get"*/}} - {{/*template "api-filesystem-path-delete"*/}} +

Filesystem Methods

+ {{template "api-filesystem-path-post"}} + {{template "api-filesystem-path-get"}} + {{template "api-filesystem-path-delete"}} {{template "footer"}} diff --git a/res/template/file_viewer.html b/res/template/file_viewer.html index 55ac138..596da13 100644 --- a/res/template/file_viewer.html +++ b/res/template/file_viewer.html @@ -117,14 +117,11 @@ -
- Close -

File Info

+ -
+