Initial Code

First Commit
This commit is contained in:
2025-06-16 01:13:41 +02:00
commit b9095962f8
50 changed files with 15586 additions and 0 deletions

BIN
public/.DS_Store vendored Executable file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

BIN
public/favicon/favicon-96x96.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

BIN
public/favicon/favicon.ico Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

1
public/favicon/favicon.svg Executable file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 105 KiB

21
public/favicon/site.webmanifest Executable file
View File

@@ -0,0 +1,21 @@
{
"name": "Eira Personal AI Assistant",
"short_name": "Eira",
"icons": [
{
"src": "/web-app-manifest-192x192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "maskable"
},
{
"src": "/web-app-manifest-512x512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable"
}
],
"theme_color": "#6f42c1",
"background_color": "#ffffff",
"display": "standalone"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

17
public/index.html Executable file
View File

@@ -0,0 +1,17 @@
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet" />
<link rel="icon" type="image/png" href="/favicon/favicon-96x96.png" sizes="96x96" />
<link rel="icon" type="image/svg+xml" href="/favicon/favicon.svg" />
<link rel="shortcut icon" href="/favicon/favicon.ico" />
<link rel="apple-touch-icon" sizes="180x180" href="/favicon/apple-touch-icon.png" />
<meta name="apple-mobile-web-app-title" content="Eira" />
<link rel="manifest" href="/favicon/site.webmanifest" />
<title>Eira - Personal AI Assistant</title>
</head>
<body>
<div id="app"></div>
<!-- Bootstrap Bundle JS (includes Popper.js) -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>

BIN
public/logo.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

49
public/sw.js Executable file
View File

@@ -0,0 +1,49 @@
self.addEventListener('push', event => {
let data = {
title: 'Eira',
body: 'You have a new notification',
icon: '/icons/eira-icon.png',
badge: '/icons/eira-badge.png',
data: {
url: '/' // default fallback
}
};
if (event.data) {
try {
const json = event.data.json();
data.title = json.title || data.title;
data.body = json.body || data.body;
data.icon = json.icon || data.icon;
data.badge = json.badge || data.badge;
data.data.url = json.data.url || data.data.url;
} catch (e) {
console.error('Error parsing push event data:', e);
}
}
event.waitUntil(self.registration.showNotification(data.title, {
body: data.body,
icon: data.icon,
badge: data.badge,
data: { url: data.data.url }
}));
});
self.addEventListener('notificationclick', event => {
event.notification.close();
const urlToOpen = event.notification.data.url || '/';
event.waitUntil(clients.matchAll({ type: 'window', includeUncontrolled: true })
.then(windowClients => {
for (const client of windowClients) {
if (client.url === urlToOpen && 'focus' in client) {
return client.focus();
}
}
if (clients.openWindow) {
return clients.openWindow(urlToOpen);
}
}));
});