mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-22 17:39:12 +01:00
Fix notification not showing all
This commit is contained in:
@@ -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(())
|
||||
|
||||
@@ -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: (
|
||||
<HStack space={1}>
|
||||
<span>Beta Feedback</span>
|
||||
<Icon size="xs" icon="external_link" />
|
||||
</HStack>
|
||||
),
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user