mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-06-10 03:13:32 -07:00
feat(notifications): add overlay notifications with position config
- Add Catppuccin Macchiato overlay notification stack with 3s transient timeout - Add `notifications.overlayPosition` config (top-left | top | top-right) - Route startup tokenization and subtitle annotation status through configured surfaces - Deduplicate rapid subtitle mode toggle notifications - Change `both` to mean overlay + system; add `osd-system` as legacy alias for old behavior - Keep `osd`/`osd-system` as config-file-only legacy values; Settings UI offers overlay/system/both/none
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import test from 'node:test';
|
||||
|
||||
import { withConfiguredOverlayNotificationPosition } from './overlay-notification-position';
|
||||
|
||||
test('overlay notification payloads inherit configured overlay position', () => {
|
||||
assert.deepEqual(
|
||||
withConfiguredOverlayNotificationPosition(
|
||||
{ title: 'SubMiner', body: 'Ready' },
|
||||
{ notifications: { overlayPosition: 'top' } },
|
||||
),
|
||||
{ title: 'SubMiner', body: 'Ready', position: 'top' },
|
||||
);
|
||||
});
|
||||
|
||||
test('overlay notification payload position can override configured position', () => {
|
||||
assert.deepEqual(
|
||||
withConfiguredOverlayNotificationPosition(
|
||||
{ title: 'SubMiner', body: 'Ready', position: 'top-left' },
|
||||
{ notifications: { overlayPosition: 'top-right' } },
|
||||
),
|
||||
{ title: 'SubMiner', body: 'Ready', position: 'top-left' },
|
||||
);
|
||||
});
|
||||
Reference in New Issue
Block a user