parent
dec241e6b6
commit
f7418d6174
@ -0,0 +1,11 @@
|
|||||||
|
import { createSelector } from 'reselect';
|
||||||
|
import { RootFolderAppState } from 'App/State/SettingsAppState';
|
||||||
|
import createSortedSectionSelector from 'Store/Selectors/createSortedSectionSelector';
|
||||||
|
import sortByName from 'Utilities/Array/sortByName';
|
||||||
|
|
||||||
|
export default function createRootFoldersSelector() {
|
||||||
|
return createSelector(
|
||||||
|
createSortedSectionSelector('settings.rootFolders', sortByName),
|
||||||
|
(rootFolders: RootFolderAppState) => rootFolders
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
import ModelBase from 'App/ModelBase';
|
||||||
|
|
||||||
|
interface RootFolder extends ModelBase {
|
||||||
|
id: number;
|
||||||
|
name: string;
|
||||||
|
path: string;
|
||||||
|
accessible: boolean;
|
||||||
|
freeSpace?: number;
|
||||||
|
unmappedFolders: object[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export default RootFolder;
|
Loading…
Reference in new issue