group code popup
This commit is contained in:
@@ -1652,6 +1652,7 @@ globalThis.Wegwichtel = globalThis.Wegwichtel || {};
|
||||
if (shareInProgress) return;
|
||||
shareInProgress = true;
|
||||
try {
|
||||
if (ns.Groups.confirmShare && !await ns.Groups.confirmShare(routeName(route))) return;
|
||||
let sourceId = routeId(route);
|
||||
if (routeSource(route) === 'local') {
|
||||
if (!globalThis.confirm(ns.I18n.t('groups.upload-confirm'))) return;
|
||||
@@ -1712,6 +1713,14 @@ globalThis.Wegwichtel = globalThis.Wegwichtel || {};
|
||||
}
|
||||
|
||||
function bind() {
|
||||
for (const eventName of ['input', 'change', 'pointerdown', 'keydown']) {
|
||||
byId(ids.poiForm)?.addEventListener(eventName, () => {
|
||||
if (state.currentSource === 'group') ns.GroupPoints?.noteActivity?.();
|
||||
});
|
||||
}
|
||||
document.addEventListener('wegwichtel:point-lock-lost', () => {
|
||||
if (state.currentSource === 'group') setStatus(ns.I18n.t('point-locks.lost'));
|
||||
});
|
||||
for (const eventName of ['cancel', 'close']) {
|
||||
byId(ids.dialog)?.addEventListener(eventName, event => {
|
||||
if (pointSaveInProgress && eventName === 'cancel') { event.preventDefault(); return; }
|
||||
|
||||
Reference in New Issue
Block a user