알림 목록 정렬 기능 추가
This commit is contained in:
@@ -7,6 +7,9 @@ import {
|
||||
|
||||
export type TradeNotificationListLayout = 'list' | 'grid';
|
||||
|
||||
/** 알림 목록 정렬 */
|
||||
export type TradeNotificationListSort = 'market' | 'newest' | 'oldest';
|
||||
|
||||
export function loadTradeNotificationListLayout(): TradeNotificationListLayout {
|
||||
const v = getUiPreferences().tradeNotifications?.listLayout;
|
||||
return v === 'grid' ? 'grid' : 'list';
|
||||
@@ -25,3 +28,13 @@ export function loadTradeNotificationGridPreset(): TradeNotificationGridPresetId
|
||||
export function saveTradeNotificationGridPreset(preset: TradeNotificationGridPresetId): void {
|
||||
patchUiPreferences({ tradeNotifications: { gridPreset: preset } });
|
||||
}
|
||||
|
||||
export function loadTradeNotificationListSort(): TradeNotificationListSort {
|
||||
const v = getUiPreferences().tradeNotifications?.listSort;
|
||||
if (v === 'market' || v === 'oldest') return v;
|
||||
return 'newest';
|
||||
}
|
||||
|
||||
export function saveTradeNotificationListSort(sort: TradeNotificationListSort): void {
|
||||
patchUiPreferences({ tradeNotifications: { listSort: sort } });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user