From f97b3bec5bda331bf7af7276658b11ec71725743 Mon Sep 17 00:00:00 2001 From: Jose Olarte III Date: Mon, 5 Jan 2026 20:57:15 +0800 Subject: [PATCH] feat(test-apps/daily-notification-test): implement notification status display in NotificationsView Replace placeholder content with functional notification status viewer that displays scheduled notifications and rollover information. Enables verification of both manually scheduled notifications and automatic rollover scheduling (24-hour recurrence). Features: - Display next scheduled notification time with formatted date/time - Show time until next notification (days, hours, minutes) - Display pending notification count - Show last notification delivery time - Display rollover status (enabled/disabled, last rollover time) when available - Additional status info (enabled, scheduled, errors) - Manual refresh button for status updates - Loading and error states with platform detection Uses typed plugin wrapper for type safety with fallback to raw plugin access for rollover fields not in TypeScript interface (iOS-specific fields). --- .../src/views/NotificationsView.vue | 437 +++++++++++++++++- 1 file changed, 432 insertions(+), 5 deletions(-) diff --git a/test-apps/daily-notification-test/src/views/NotificationsView.vue b/test-apps/daily-notification-test/src/views/NotificationsView.vue index 9d16559..1ac8bda 100644 --- a/test-apps/daily-notification-test/src/views/NotificationsView.vue +++ b/test-apps/daily-notification-test/src/views/NotificationsView.vue @@ -7,23 +7,274 @@

🔔 Notifications

-

Manage scheduled notifications

+

View scheduled notifications and rollover status

-
-

Notifications management coming soon...

+ +
+
+ +
+ +
+ âš ī¸ {{ errorMessage }} +
+ +
+ +
+
+

📅 Scheduled Notification

+ + {{ statusText }} + +
+ +
+
+ Next Notification: + {{ formattedNextTime }} +
+
+ Next Notification: + None scheduled +
+ +
+ Time Until: + {{ timeUntilNext }} +
+ +
+ Pending Count: + {{ notificationStatus.pending || 0 }} +
+ +
+ Last Notification: + {{ formattedLastTime }} +
+
+
+ + +
+
+

🔄 Rollover Status

+ + {{ rolloverInfo.enabled ? 'Active' : 'Inactive' }} + +
+ +
+
+ Last Rollover: + {{ formattedRolloverTime }} +
+
+ Last Rollover: + Never +
+
+ Rollover Enabled: + {{ rolloverInfo.enabled ? 'Yes' : 'No' }} +
+
+
+ + +
+
+

â„šī¸ Additional Information

+
+ +
+
+ Notifications Enabled: + {{ notificationStatus.isEnabled ? 'Yes' : 'No' }} +
+
+ Is Scheduled: + {{ notificationStatus.isScheduled ? 'Yes' : 'No' }} +
+
+ Error: + {{ notificationStatus.error }} +
+
+
+
+ +
+

No notification status available. Try refreshing.

+
+ +
+

Loading notification status...

+
@@ -82,7 +333,162 @@ export default toNative(NotificationsView) color: rgba(255, 255, 255, 0.8); } -.placeholder-content { +.notifications-content { + padding: 0 16px; +} + +.actions-bar { + margin-bottom: 24px; + display: flex; + justify-content: flex-end; +} + +.action-button { + padding: 12px 24px; + border: none; + border-radius: 8px; + font-size: 16px; + font-weight: 600; + cursor: pointer; + transition: all 0.2s ease; +} + +.action-button.refresh { + background: #1976d2; + color: white; +} + +.action-button.refresh:hover:not(:disabled) { + background: #1565c0; +} + +.action-button:disabled { + opacity: 0.5; + cursor: not-allowed; +} + +.error-message { + background: rgba(244, 67, 54, 0.2); + border: 1px solid rgba(244, 67, 54, 0.4); + border-radius: 8px; + padding: 16px; + margin-bottom: 24px; + color: #e57373; + font-size: 14px; +} + +.status-cards { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); + gap: 24px; + margin-bottom: 24px; +} + +.status-card { + background: rgba(255, 255, 255, 0.1); + border: 1px solid rgba(255, 255, 255, 0.2); + border-radius: 12px; + padding: 24px; + backdrop-filter: blur(10px); +} + +.status-card.main { + grid-column: 1 / -1; +} + +.card-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 20px; + padding-bottom: 16px; + border-bottom: 1px solid rgba(255, 255, 255, 0.1); +} + +.card-header h2 { + margin: 0; + font-size: 20px; + font-weight: 600; + color: white; +} + +.status-badge { + padding: 6px 12px; + border-radius: 16px; + font-size: 12px; + font-weight: 600; + text-transform: uppercase; +} + +.status-badge.success { + background: rgba(76, 175, 80, 0.3); + color: #81c784; + border: 1px solid rgba(76, 175, 80, 0.5); +} + +.status-badge.warning { + background: rgba(255, 152, 0, 0.3); + color: #ffb74d; + border: 1px solid rgba(255, 152, 0, 0.5); +} + +.status-badge.error { + background: rgba(244, 67, 54, 0.3); + color: #e57373; + border: 1px solid rgba(244, 67, 54, 0.5); +} + +.status-badge.info { + background: rgba(33, 150, 243, 0.3); + color: #64b5f6; + border: 1px solid rgba(33, 150, 243, 0.5); +} + +.card-content { + display: flex; + flex-direction: column; + gap: 16px; +} + +.info-row { + display: flex; + justify-content: space-between; + align-items: flex-start; + padding: 12px 0; + border-bottom: 1px solid rgba(255, 255, 255, 0.05); +} + +.info-row:last-child { + border-bottom: none; +} + +.info-row.error { + color: #e57373; +} + +.info-row .label { + font-size: 14px; + color: rgba(255, 255, 255, 0.7); + font-weight: 500; + flex: 0 0 40%; +} + +.info-row .value { + font-size: 14px; + color: white; + text-align: right; + flex: 1; + word-break: break-word; +} + +.info-row .value.highlight { + color: #81c784; + font-weight: 600; + font-size: 15px; +} + +.empty-state, +.loading-state { background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 12px; @@ -97,11 +503,32 @@ export default toNative(NotificationsView) .header-title-row { gap: 8px; } - + .back-button { min-width: 36px; height: 36px; font-size: 16px; } + + .status-cards { + grid-template-columns: 1fr; + } + + .status-card.main { + grid-column: 1; + } + + .info-row { + flex-direction: column; + gap: 8px; + } + + .info-row .label { + flex: 1; + } + + .info-row .value { + text-align: left; + } }