feat: Authenticated Shell, Quick Tabs and Change Password 1.05

This commit is contained in:
OpenVelo Agent
2026-07-22 10:35:25 +00:00
parent 305352b259
commit a8aa0c03ca
10 changed files with 425 additions and 41 deletions
@@ -48,6 +48,11 @@ export class AuthenticatedEventSourceService {
dispatch('error', new Event('error'));
};
const fireUnauthorized = () => {
if (closed) return;
dispatch('unauthorized', new Event('unauthorized'));
};
const start = async () => {
try {
const res = await fetch(url, {
@@ -56,6 +61,10 @@ export class AuthenticatedEventSourceService {
credentials: 'include',
signal: controller!.signal,
});
if (res.status === 401 || res.status === 403) {
if (!closed) fireUnauthorized();
return;
}
if (!res.ok || !res.body) {
fireError();
return;