upgrade run ui

This commit is contained in:
Shivering Ocelot committed 2026-06-06 16:36:01 -05:00
1 parent bb204f2c6c
commit a10224d21e
6 files changed
+91 -18

No files matched your search

+6 -4
View File
@@ -7,14 +7,11 @@ import ContextMenu from './components/main/ContextMenu.vue'
import * as ui from './ui';
import * as backend from './backend';
import * as runs from './runs';
// possible states: loading, login, signup, logged
const loginState = ref('loading');
function triggerAlert () {
ui.alert("This is an alert");
}
function handleAuthResult (success) {
loginState.value = success ? 'logged' : 'login';
}
@@ -42,6 +39,11 @@ function signupSubmit (formElem) {
backend.signup(username, email, password).then(handleAuthResult);
}
const runsListener = runs.onCreated(run => {
console.log("new run", run);
});
runsListener.allRuns = true; // hack?
backend.authResult().then(handleAuthResult);
</script>