This commit is contained in:
+3
-1
@@ -1,3 +1,4 @@
|
||||
import { mountShare, viewerURL } from './share.js?v=1';
|
||||
import { bindCamera } from './interactions.js';
|
||||
import { layerVisible, presetLayers } from './pcb-layers.js';
|
||||
const comparison=location.pathname.startsWith('/compare/pcb/');
|
||||
@@ -80,6 +81,7 @@ async function start(){
|
||||
for(const svg of svgs)svg.addEventListener('click',e=>{const c=byId.get(e.target.closest('[data-change-id]')?.dataset.changeId);if(c)focus(c);});
|
||||
apply();
|
||||
}
|
||||
function expire(){const remaining=result.expires_at*1000-Date.now();if(remaining<=0){for(const view of views)view.destroy();document.querySelector('#pcb-workspace').replaceChildren();state.textContent='This PCB link has expired';}else setTimeout(expire,Math.min(2147483647,remaining));}expire();
|
||||
mountShare(document.querySelector('#pcb-share'),viewerURL(location.pathname,token));
|
||||
function expire(){if(result.expires_at===-1)return;const remaining=result.expires_at*1000-Date.now();if(remaining<=0){for(const view of views)view.destroy();document.querySelector('#pcb-workspace').replaceChildren();state.textContent='This PCB link has expired';}else setTimeout(expire,Math.min(2147483647,remaining));}expire();
|
||||
}
|
||||
start().catch(e=>{state.classList.remove('loading');state.textContent=e.name==='AbortError'?'':e.message;});
|
||||
|
||||
مرجع در شماره جدید
مسدود کردن کاربر