Class: Store

store~Store()

new Store()

The main Mobx State Tree store for the RML application in the media library view.
Properties:
Name Type Attributes Default Description
foldersNeedsRefresh Array.<mixed> <optional>
Node ids which needs to be refreshed when they gets queried
uploading Array.<module:store/Upload~Upload> <optional>
The upload queue
uploadTotalLoaded int <optional>
0 The upload total loaded
uploadTotalSize int <optional>
0 The upload total size
sortables object <optional>
Available sortables for the content order menu
treeSortables object <optional>
Available sortables for the tree order menu
uploadTotalBytesPerSec int <optional>
0 The uploader bytes per second
selected module:store/TreeNode~TreeNode <optional>
The selected tree node
currentUpload module:store/Upload~Upload <optional>
The current upload file
uploadTotalRemainTime string <optional>
The current upload remaining time in human readable form
readableUploadTotalLoaded string <optional>
The uploader total loaded in human readable form
readableUploadTotalSize string <optional>
The uploader total size in human readable form
readableUploadTotalBytesPerSec string <optional>
The uploader bytes per second in human readable form

Members

(async) fetchCounts

Update the folder count. If you pass no argument the folder count is requested from server.

(async) fetchTree

Fetch the folder tree.

handleSort

Handle sort mechanism.

(async) persist

Create a new tree node.

Methods

addFoldersNeedsRefresh()

Register a folder that it needs refresh.

addUploading(object) → {object}

Add an uploading file.
Parameters:
Name Type Description
object object The object to push
Returns:
The upload instance
Type
object

removeFoldersNeedsRefresh()

Register a folder that it needs refresh.

removeUploading(cid) → {object}

Remove an uploading file from queue.
Parameters:
Name Type Description
cid string The cid
Returns:
A copy of the original object
Type
object

setUploadTotal()

Set upload total stats.