aboutsummaryrefslogtreecommitdiff
path: root/src/frontend/app/components/UpdateNotification.tsx
diff options
context:
space:
mode:
authorAriel Costas Guerrero <ariel@costas.dev>2025-09-07 17:29:53 +0200
committerAriel Costas Guerrero <ariel@costas.dev>2025-09-07 17:29:53 +0200
commit8182a08f60e88595984ba80b472f29ccf53c19bd (patch)
treec377ad8a7d43b8794b5df0f7283f71ac24408210 /src/frontend/app/components/UpdateNotification.tsx
parent577a6f00a0f006ca51276ae606835c2d892da872 (diff)
feat: Enhance development scripts and add Angular support
- Added new scripts for Angular development and formatting in package.json. - Updated workspaces to include Angular frontend. - Modified backend project file to exclude specific views from content inclusion. - Updated logging settings in appsettings.json to include HttpClient warnings. - Refactored TimetableTable component for cleaner rendering. - Removed UpdateNotification component and related service worker management code. - Simplified service worker registration in root component. - Cleaned up settings page by removing update management functionality. - Improved stoplist component structure for better readability. - Updated PWA worker to streamline caching and response handling.
Diffstat (limited to 'src/frontend/app/components/UpdateNotification.tsx')
-rw-r--r--src/frontend/app/components/UpdateNotification.tsx63
1 files changed, 0 insertions, 63 deletions
diff --git a/src/frontend/app/components/UpdateNotification.tsx b/src/frontend/app/components/UpdateNotification.tsx
deleted file mode 100644
index c8e21ea..0000000
--- a/src/frontend/app/components/UpdateNotification.tsx
+++ /dev/null
@@ -1,63 +0,0 @@
-import { useState, useEffect } from "react";
-import { Download, X } from "lucide-react";
-import { swManager } from "../utils/serviceWorkerManager";
-import "./UpdateNotification.css";
-
-export function UpdateNotification() {
- const [showUpdate, setShowUpdate] = useState(false);
- const [isUpdating, setIsUpdating] = useState(false);
-
- useEffect(() => {
- swManager.onUpdate(() => {
- setShowUpdate(true);
- });
- }, []);
-
- const handleUpdate = async () => {
- setIsUpdating(true);
- swManager.activateUpdate();
-
- // Wait for the page to reload
- setTimeout(() => {
- window.location.reload();
- }, 500);
- };
-
- const handleDismiss = () => {
- setShowUpdate(false);
- };
-
- if (!showUpdate) return null;
-
- return (
- <div className="update-notification">
- <div className="update-content">
- <div className="update-icon">
- <Download size={20} />
- </div>
- <div className="update-text">
- <div className="update-title">Nueva versión disponible</div>
- <div className="update-description">
- Actualiza para obtener las últimas mejoras
- </div>
- </div>
- <div className="update-actions">
- <button
- className="update-button"
- onClick={handleUpdate}
- disabled={isUpdating}
- >
- {isUpdating ? "Actualizando..." : "Actualizar"}
- </button>
- <button
- className="update-dismiss"
- onClick={handleDismiss}
- aria-label="Cerrar notificación"
- >
- <X size={16} />
- </button>
- </div>
- </div>
- </div>
- );
-}