Constellation, Spacedust, Slingshot, UFOs: atproto crates and services for microcosm

try the button

Changed files
+14 -1
who-am-i
templates
+14 -1
who-am-i/templates/prompt.hbs
···
<div id="need-storage" class="hidden">
<p class="problem">Sorry, your browser is blocking access.</p>
-
<p>Try <a href="/" target="_blank">connecting directly</a> first (but no promises).</p>
</div>
···
const allowEl = document.getElementById('handle-action'); // for known-did
const connectEl = document.getElementById('connect'); // for anon
const needStorageEl = document.getElementById('need-storage'); // for safari/frame isolation
function err(e, msg) {
loaderEl.classList.add('hidden');
···
promptEl.classList.add('hidden');
infoEl.classList.add('hidden');
needStorageEl.classList.remove('hidden');
}
});
}
···
<div id="need-storage" class="hidden">
<p class="problem">Sorry, your browser is blocking access.</p>
+
<p>
+
Try <a href="/" target="_blank">connecting directly</a> first (but no promises).
+
Clicking <button id="desperation">this button</button> might also help.
+
</p>
</div>
···
const allowEl = document.getElementById('handle-action'); // for known-did
const connectEl = document.getElementById('connect'); // for anon
const needStorageEl = document.getElementById('need-storage'); // for safari/frame isolation
+
const desperationEl = document.getElementById('desperation');
function err(e, msg) {
loaderEl.classList.add('hidden');
···
promptEl.classList.add('hidden');
infoEl.classList.add('hidden');
needStorageEl.classList.remove('hidden');
+
desperation.addEventListener('click', () => {
+
document.requestStorageAccess({
+
cookies: true,
+
localStorage: true,
+
}).then(
+
() => desperation.textContent = "(maybe helped?)",
+
() => desperation.textContent = "(doubtful)",
+
);
+
})
}
});
}