mirror of
https://github.com/zoriya/flood.git
synced 2026-06-07 12:24:50 +00:00
client: fully migrate to TypeScript
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
import type {FloodSettings} from '@shared/types/FloodSettings';
|
||||
|
||||
const defaultFloodSettings: Readonly<FloodSettings> = {
|
||||
language: 'auto',
|
||||
sortTorrents: {
|
||||
direction: 'desc',
|
||||
property: 'dateAdded',
|
||||
},
|
||||
torrentListColumns: [
|
||||
{id: 'name', visible: true},
|
||||
{id: 'percentComplete', visible: true},
|
||||
{id: 'downTotal', visible: true},
|
||||
{id: 'downRate', visible: true},
|
||||
{id: 'upTotal', visible: true},
|
||||
{id: 'upRate', visible: true},
|
||||
{id: 'eta', visible: true},
|
||||
{id: 'ratio', visible: true},
|
||||
{id: 'sizeBytes', visible: true},
|
||||
{id: 'peers', visible: true},
|
||||
{id: 'seeds', visible: true},
|
||||
{id: 'dateAdded', visible: true},
|
||||
{id: 'dateCreated', visible: false},
|
||||
{id: 'basePath', visible: false},
|
||||
{id: 'hash', visible: false},
|
||||
{id: 'isPrivate', visible: false},
|
||||
{id: 'message', visible: false},
|
||||
{id: 'trackerURIs', visible: false},
|
||||
{id: 'tags', visible: true},
|
||||
],
|
||||
torrentListColumnWidths: {
|
||||
name: 200,
|
||||
percentComplete: 100,
|
||||
downTotal: 100,
|
||||
downRate: 100,
|
||||
upTotal: 100,
|
||||
upRate: 100,
|
||||
eta: 100,
|
||||
ratio: 100,
|
||||
sizeBytes: 100,
|
||||
peers: 100,
|
||||
seeds: 100,
|
||||
dateAdded: 100,
|
||||
dateCreated: 100,
|
||||
basePath: 100,
|
||||
hash: 100,
|
||||
isPrivate: 100,
|
||||
message: 100,
|
||||
trackerURIs: 100,
|
||||
tags: 100,
|
||||
},
|
||||
torrentContextMenuActions: [
|
||||
{id: 'start', visible: true},
|
||||
{id: 'stop', visible: true},
|
||||
{id: 'remove', visible: true},
|
||||
{id: 'checkHash', visible: true},
|
||||
{id: 'setTaxonomy', visible: true},
|
||||
{id: 'move', visible: true},
|
||||
{id: 'setTracker', visible: false},
|
||||
{id: 'torrentDetails', visible: true},
|
||||
{id: 'torrentDownload', visible: true},
|
||||
{id: 'setPriority', visible: false},
|
||||
],
|
||||
torrentListViewSize: 'condensed',
|
||||
speedLimits: {
|
||||
download: [1024, 10240, 102400, 512000, 1048576, 2097152, 5242880, 10485760, 0],
|
||||
upload: [1024, 10240, 102400, 512000, 1048576, 2097152, 5242880, 10485760, 0],
|
||||
},
|
||||
startTorrentsOnLoad: false,
|
||||
mountPoints: [],
|
||||
};
|
||||
|
||||
export default defaultFloodSettings;
|
||||
@@ -1,23 +1,20 @@
|
||||
import Languages from '../../client/src/javascript/constants/Languages';
|
||||
import TorrentContextMenuItems from '../../client/src/javascript/constants/TorrentContextMenuItems';
|
||||
import TorrentProperties from '../../client/src/javascript/constants/TorrentProperties';
|
||||
import type {Language} from '../../client/src/javascript/constants/Languages';
|
||||
import type {TorrentContextMenuAction} from '../../client/src/javascript/constants/TorrentContextMenuActions';
|
||||
import type {TorrentListColumn} from '../../client/src/javascript/constants/TorrentListColumns';
|
||||
|
||||
export interface FloodSettings {
|
||||
language: keyof typeof Languages;
|
||||
language: Language;
|
||||
sortTorrents: {
|
||||
direction: 'desc' | 'asc';
|
||||
property: keyof typeof TorrentProperties;
|
||||
property: TorrentListColumn;
|
||||
};
|
||||
torrentDetails: Array<{
|
||||
id: keyof typeof TorrentProperties;
|
||||
torrentListColumns: Array<{
|
||||
id: TorrentListColumn;
|
||||
visible: boolean;
|
||||
}>;
|
||||
torrentListColumnWidths: {
|
||||
name?: number;
|
||||
percentComplete?: number;
|
||||
};
|
||||
torrentContextMenuItems: Array<{
|
||||
id: keyof typeof TorrentContextMenuItems;
|
||||
torrentListColumnWidths: Record<TorrentListColumn, number>;
|
||||
torrentContextMenuActions: Array<{
|
||||
id: TorrentContextMenuAction;
|
||||
visible: boolean;
|
||||
}>;
|
||||
torrentListViewSize: 'condensed' | 'expanded';
|
||||
|
||||
Reference in New Issue
Block a user