diff --git a/src-tauri/src/notifications.rs b/src-tauri/src/notifications.rs index f6096943..470c06da 100644 --- a/src-tauri/src/notifications.rs +++ b/src-tauri/src/notifications.rs @@ -93,11 +93,12 @@ impl YaakNotifier { let seen = get_kv(window).await?; if seen.contains(¬ification.id) || (age > Duration::days(2)) { debug!("Already seen notification {}", notification.id); - return Ok(()); + continue; } debug!("Got notification {:?}", notification); let _ = window.emit_to(window.label(), "notification", notification.clone()); + break; // Only show one notification } Ok(()) diff --git a/src-web/components/LicenseBadge.tsx b/src-web/components/LicenseBadge.tsx index 28df195b..f3a29632 100644 --- a/src-web/components/LicenseBadge.tsx +++ b/src-web/components/LicenseBadge.tsx @@ -2,32 +2,19 @@ import type { LicenseCheckStatus } from '@yaakapp-internal/license'; import { useLicense } from '@yaakapp-internal/license'; import type { ReactNode } from 'react'; import { openSettings } from '../commands/openSettings'; -import { appInfo } from '../hooks/useAppInfo'; import { useLicenseConfirmation } from '../hooks/useLicenseConfirmation'; import type { ButtonProps } from './core/Button'; import { Button } from './core/Button'; -import { Icon } from './core/Icon'; -import { HStack } from './core/Stacks'; import { SettingsTab } from './Settings/SettingsTab'; const details: Record< - LicenseCheckStatus['type'] | 'dev' | 'beta', + LicenseCheckStatus['type'], { label: ReactNode; color: ButtonProps['color'] } | null > = { - beta: { - label: ( - - Beta Feedback - - - ), - color: 'info', - }, - dev: { label: 'Develop', color: 'secondary' }, commercial_use: null, invalid_license: { label: 'License Error', color: 'danger' }, - personal_use: { label: 'Personal Use', color: 'success' }, - trialing: { label: 'Personal Use', color: 'success' }, + personal_use: { label: 'Personal Use', color: 'notice' }, + trialing: { label: 'Personal Use', color: 'notice' }, }; export function LicenseBadge() { @@ -62,8 +49,7 @@ export function LicenseBadge() { return null; } - const checkType = appInfo.version.includes('beta') ? 'beta' : check.data.type; - const detail = details[checkType]; + const detail = details[check.data.type]; if (detail == null) { return null; }