mirror of
https://github.com/khairul169/honey.git
synced 2025-04-28 14:59:32 +07:00
More page: make Security module functional
This commit is contained in:
parent
6da6035e0a
commit
1c637efae3
@ -8,7 +8,7 @@ This will be a dashboard hosted on my homeserver with self-hosted stuff. But, fo
|
|||||||
|
|
||||||
- [x] External config loaded with XHR (app list)
|
- [x] External config loaded with XHR (app list)
|
||||||
- [x] Apply config for the rest stuff (data shown in More page, default user settings)
|
- [x] Apply config for the rest stuff (data shown in More page, default user settings)
|
||||||
- [ ] Make 'Security' module functional
|
- [x] Make 'Security' module functional
|
||||||
- [x] CSS global color variables for easier theming
|
- [x] CSS global color variables for easier theming
|
||||||
- [ ] Fix blur flicker on showing/hiding pages
|
- [ ] Fix blur flicker on showing/hiding pages
|
||||||
- [x] Open in new tab setting
|
- [x] Open in new tab setting
|
||||||
|
@ -70,7 +70,7 @@
|
|||||||
<div class="icon fancy">shield</div>
|
<div class="icon fancy">shield</div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<div class="pp"><b id="security-pp">85</b>%</div>
|
<div class="pp"><b id="security-pp">85</b>%</div>
|
||||||
<div class="text">6 out of 7 listed services use secure connections</div>
|
<div class="text"><b id="services-secure"></b> out of <b id="services-total"></b> listed services use secure connections</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="boxes static">
|
<div class="boxes static">
|
||||||
|
@ -76,8 +76,9 @@ function load_config(conf) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function is_secure(uri) {
|
function is_secure(uri) {
|
||||||
if (uri.includes("tp://")) return false;
|
let secure = uri.indexOf("tps://") != -1;
|
||||||
if (!uri.startsWith("https://")) {
|
let insecure = uri.indexOf("tp://") != -1;
|
||||||
uri = location.href;
|
if (secure) return true;
|
||||||
}
|
if (insecure) return false;
|
||||||
|
return is_secure(location.href);
|
||||||
}
|
}
|
@ -51,11 +51,17 @@ function switch_theme(value) {
|
|||||||
|
|
||||||
function load_apps() {
|
function load_apps() {
|
||||||
let final = "";
|
let final = "";
|
||||||
for (let i = 0; i < CONFIG["services"].length; i++) {
|
let secures = 0;
|
||||||
|
let i = 0;
|
||||||
|
while (i < CONFIG["services"].length) {
|
||||||
let app = mk_entry(CONFIG["services"][i]);
|
let app = mk_entry(CONFIG["services"][i]);
|
||||||
final += app;
|
final += app;
|
||||||
|
i++;
|
||||||
}
|
}
|
||||||
get("applist").innerHTML = final;
|
get("applist").innerHTML = final;
|
||||||
|
set("services-total", i);
|
||||||
|
set("services-secure", secures);
|
||||||
|
set("security-pp", Math.round(100 * secures / i));
|
||||||
}
|
}
|
||||||
|
|
||||||
function new_tab_toggle(value) {
|
function new_tab_toggle(value) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user