feat: add browser upload queue and trusted sessions with bounded projections
This commit is contained in:
1 parent
84d52390f9
commit
b90aef79d0
79 files changed
+1962
-196
No files matched your search
@@ -0,0 +1,24 @@
|
||||
(() => {
|
||||
'use strict';
|
||||
const choice=document.getElementById('auth-remember');
|
||||
if(!choice)return;
|
||||
const sync=()=>{
|
||||
for(const form of document.querySelectorAll('.auth-form')){
|
||||
if(form===choice.form)continue;
|
||||
const path=new URL(form.action,location.href).pathname;
|
||||
if(!['/_/auth/ldap','/_/auth/magic-link'].includes(path))continue;
|
||||
let input=form.querySelector('input[name=remember]');
|
||||
if(!input){input=document.createElement('input');input.type='hidden';input.name='remember';form.append(input);}
|
||||
input.value=choice.checked?'1':'0';
|
||||
}
|
||||
for(const link of document.querySelectorAll('a.auth-provider-button')){
|
||||
const url=new URL(link.href,location.href);
|
||||
if(url.origin!==location.origin||url.pathname!=='/_/auth/oidc')continue;
|
||||
if(choice.checked)url.searchParams.set('remember','1');else url.searchParams.delete('remember');
|
||||
link.href=url.pathname+url.search;
|
||||
}
|
||||
};
|
||||
choice.addEventListener('change',sync);
|
||||
window.addEventListener('pageshow',sync);
|
||||
sync();
|
||||
})();
|
||||
Reference in new issue
Block a user