install + about copyparty button in account popup

This commit is contained in:
Til Schmitter 2026-06-20 15:36:12 +02:00
parent cfdbce96a8
commit 7e702559c2
4 changed files with 33 additions and 6 deletions

View file

@ -5542,6 +5542,13 @@ html.by #spaceUsed_bar {
text-align: right;
left: auto;
}
#op_acc a:not(.btn),
#op_acc input {
font-size: 1.2em;
display: block;
cursor: pointer;
justify-self: end;
}
#opa_acc label {
cursor: pointer !important;
}
@ -5769,10 +5776,6 @@ html.f #u2c3t span {
html.f #u2cards span {
font-size: .8em;
}
html.f #blogout,
html.f #goh {
font-size: 1.2em;
}
html.f #gridzoom a,
html.f #gridchop a,
html.f #twig, html.f #twobytwo,
@ -6010,6 +6013,9 @@ html.fy #wtico {
line-height: 1.1em;
border-radius: 0;
}
html.fy #wstack #wtico:hover{
background: var(--bg-u2) !important;
}
html.fy #wtoggle,
html.fy #wtoggle * {
line-height: .99em;

View file

@ -77,11 +77,14 @@
<p id="acc_name">Login</p>
</a>
<div id="accessType" style="display: block;">{{ srv_info }}</div>
<a href="{{ r }}/?h" id="goh" style="display: block;">control-panel</a>
<form id="flogout" style="display: block;" method="post" enctype="multipart/form-data">
<input type="hidden" name="act" value="logout" />
<input id="blogout" type="submit" />
</form>
<a href="{{ r }}/?h" id="goh">control-panel</a>
<div class="sep" style="display: block; height: 1px; background: rgba(120, 120, 120, .5); margin: .2em;"></div>
<a id="inst" hidden>install as app</a>
<a id="pb" href="https://github.com/9001/copyparty">about copyparty</a>
</span>
<div id="opdesc"></div>

View file

@ -266,7 +266,7 @@ if (1)
"cl_themes": "theme",
"cl_accent": "accent color (keep empty for default)$Nsupports any css color, like rgba(255, 210, 0, 1)",
"cl_radius": "corner radius in pixels (keep empty for default)",
"cl_fun": "enables or disables the FUN 🎉🚀👽🐹🥳❗ (reload the page after changing this setting)",
"cl_fun": "enables or disables the FUN (hides most emojis) 🎉🚀👽🐹🥳❗$Nreload the page after changing this setting.",
"cl_langs": "language",
"cl_ziptype": "folder download",
"cl_uopts": "upload",

View file

@ -2442,4 +2442,22 @@ window.addEventListener('load', async () => {
}
});
if(ebi('inst')){
var installPrompt = null;
window.addEventListener("beforeinstallprompt", function(e) {
e.preventDefault();
installPrompt = e;
ebi('inst').removeAttribute("hidden");
});
ebi('inst').onclick = async function(){
if (!installPrompt) {
return;
}
const result = await installPrompt.prompt();
console.log(`Install prompt was: ${result.outcome}`);
installPrompt = null;
ebi('inst').setAttribute("hidden", "");
}
}
J_UTL = 2;