From 2519666e1c831f85836f9ce6d975d3ceb975c09d Mon Sep 17 00:00:00 2001 From: lolcat Date: Mon, 27 Nov 2023 01:01:56 -0500 Subject: google web, videos and news, various other fixes --- static/icon/call.png | Bin 0 -> 2155 bytes static/icon/directions.png | Bin 0 -> 1673 bytes static/serverping.js | 21 +++++++++++++++------ static/style.css | 6 ++++++ static/themes/Catppuccin Latte.css | 20 ++++++++++++++++++++ static/themes/Catpuccin Latte.css | 20 -------------------- 6 files changed, 41 insertions(+), 26 deletions(-) create mode 100644 static/icon/call.png create mode 100644 static/icon/directions.png create mode 100644 static/themes/Catppuccin Latte.css delete mode 100644 static/themes/Catpuccin Latte.css (limited to 'static') diff --git a/static/icon/call.png b/static/icon/call.png new file mode 100644 index 0000000..c91bece Binary files /dev/null and b/static/icon/call.png differ diff --git a/static/icon/directions.png b/static/icon/directions.png new file mode 100644 index 0000000..699da40 Binary files /dev/null and b/static/icon/directions.png differ diff --git a/static/serverping.js b/static/serverping.js index 5fe285d..a94fe50 100644 --- a/static/serverping.js +++ b/static/serverping.js @@ -160,6 +160,16 @@ function number_format(int){ return new Intl.NumberFormat().format(int); } +window.fetch = (function(fetch) { + return function(fn, t){ + const begin = Date.now(); + return fetch.apply(this, arguments).then(function(response) { + response.ping = Date.now() - begin; + return response; + }); + }; +})(window.fetch); + // parse initial server list fetch_server(window.location.origin); @@ -187,25 +197,24 @@ async function fetch_server(server){ list.push(server); var data = null; - var ping = new Date().getTime(); try{ - data = await fetch( + var payload = await fetch( server + "/ami4get" ); - if(data.status !== 200){ + if(payload.status !== 200){ // endpoint is not available errors++; div_failedreqs.textContent = number_format(errors); - console.warn(server + ": Invalid HTTP code " + data.status); + console.warn(server + ": Invalid HTTP code " + payload.status); return; } - data = await data.json(); - data.server.ping = new Date().getTime() - ping; + data = await payload.json(); + data.server.ping = payload.ping; }catch(error){ diff --git a/static/style.css b/static/style.css index bb76c2e..2ea2d73 100644 --- a/static/style.css +++ b/static/style.css @@ -499,6 +499,7 @@ h3,h4,h5,h6{ text-align:center; display:block; text-align:left; + white-space:nowrap; } .favicon-dropdown img{ @@ -1247,6 +1248,11 @@ table tr a:last-child{ padding-left:20px; } +.instances .go-back{ + margin-top:17px; + display:inline-block; +} + /* Responsive image diff --git a/static/themes/Catppuccin Latte.css b/static/themes/Catppuccin Latte.css new file mode 100644 index 0000000..7c70549 --- /dev/null +++ b/static/themes/Catppuccin Latte.css @@ -0,0 +1,20 @@ +:root{ + /* background */ + --1d2021: #eff1f5; + --282828: #eff1f5; + --3c3836: #dce0e8; + --504945: #5c5f77; + + /* font */ + --928374: #8c8fa1; + --a89984: #4c4f69; + --bdae93: #4c4f69; + --8ec07c: #df8e1d; + --ebdbb2: #4c4f69; + + /* code highlighter */ + --comment: #e64553; + --default: #eff1f5; + --keyword: #df8e1d; + --string: #209fb5; +} diff --git a/static/themes/Catpuccin Latte.css b/static/themes/Catpuccin Latte.css deleted file mode 100644 index 7c70549..0000000 --- a/static/themes/Catpuccin Latte.css +++ /dev/null @@ -1,20 +0,0 @@ -:root{ - /* background */ - --1d2021: #eff1f5; - --282828: #eff1f5; - --3c3836: #dce0e8; - --504945: #5c5f77; - - /* font */ - --928374: #8c8fa1; - --a89984: #4c4f69; - --bdae93: #4c4f69; - --8ec07c: #df8e1d; - --ebdbb2: #4c4f69; - - /* code highlighter */ - --comment: #e64553; - --default: #eff1f5; - --keyword: #df8e1d; - --string: #209fb5; -} -- cgit v1.2.3