back to stable (pre bad test)

This commit is contained in:
2026-02-27 15:40:49 -06:00
parent d825be0ee4
commit b9840f1d32
4 changed files with 333 additions and 355 deletions
+6 -12
View File
@@ -232,8 +232,7 @@ function syncAuth(iframe) {
<span>Notes Embed</span>
<code style="font-size: 10px;">/embed/notes</code>
</div>
<iframe id="notes-iframe" src="https://tasgrid.ccllc.pro/embed/notes"
onload="syncAuthOnLoad(this)"></iframe>
<iframe id="notes-iframe" src="http://localhost:4000/embed/notes" onload="syncAuthOnLoad(this)"></iframe>
</div>
<div class="iframe-container">
@@ -242,7 +241,7 @@ function syncAuth(iframe) {
<span>Quick Add Embed</span>
<code style="font-size: 10px;">/embed/quick-add</code>
</div>
<iframe id="quick-add-iframe" src="https://tasgrid.ccllc.pro/embed/quick-add"
<iframe id="quick-add-iframe" src="http://localhost:4000/embed/quick-add"
onload="syncAuthOnLoad(this)"></iframe>
</div>
</div>
@@ -254,13 +253,8 @@ function syncAuth(iframe) {
function syncAuthOnLoad(iframe) {
console.log(`Iframe ${iframe.id} loaded, checking auth sync...`);
if (pb.authStore.isValid) {
console.log(`Syncing existing auth to ${iframe.id} ONLY`);
const payload = {
type: "TASGRID_AUTH",
token: pb.authStore.token,
user: pb.authStore.model
};
iframe.contentWindow.postMessage(payload, "*");
console.log(`Syncing existing auth to ${iframe.id}`);
sendAuthToIframes();
}
}
@@ -268,9 +262,9 @@ function syncAuth(iframe) {
const id = document.getElementById('note-id-input').value.trim();
const iframe = document.getElementById('notes-iframe');
if (id) {
iframe.src = `https://tasgrid.ccllc.pro/embed/notes?noteId=${id}`;
iframe.src = `http://localhost:4000/embed/notes?noteId=${id}`;
} else {
iframe.src = `https://tasgrid.ccllc.pro/embed/notes`;
iframe.src = `http://localhost:4000/embed/notes`;
}
}