RemoteStorage.Widget.View

Controls the visible widget

States

initialnot connected
authingin auth flow
connectedconnected to remote storage, not syncing at the moment
cipheredconnected, with cipher
notcipheredconnected, without cipher
busyconnected, syncing at the moment
offlineconnected, but no network connectivity
errorconnected, but sync error happened
unauthorizedconnected, but request returned 401
Summary
RemoteStorage.Widget.ViewControls the visible widget
Functions
setStateCall the function that applies the state to the widget
setUserAddressSet user address of the input field
setUserSecretKeySet user secret key
toggleBubbleShow the bubble when hidden and the other way around
hideBubbleHide the bubble
showBubbleShow the bubble
displayDraw the widget inside of the dom element with the id options.domID
Events
connectEmitted when the connect button is clicked
secret-enteredEmitted when the cipher button is clicked
secret-cancelledEmitted when the nocipher button is clicked
syncEmitted when the sync button is clicked
disconnectEmitted when the disconnect button is clicked
resetEmitted after crash triggers disconnect
displayEmitted when finished displaying the widget

Functions

setState

setState: function(state,
args)

Call the function that applies the state to the widget

Parameters

state args

setUserAddress

setUserAddress: function(addr)

Set user address of the input field

setUserSecretKey

setUserSecretKey: function(secretKey)

Set user secret key

toggleBubble

toggleBubble: function(event)

Show the bubble when hidden and the other way around

hideBubble

hideBubble: function()

Hide the bubble

showBubble

showBubble: function(event)

Show the bubble

display

display: function(options)

Draw the widget inside of the dom element with the id options.domID

Parameters

options

Returns

The widget div

Events

connect

Emitted when the connect button is clicked

secret-entered

Emitted when the cipher button is clicked

secret-cancelled

Emitted when the nocipher button is clicked

sync

Emitted when the sync button is clicked

disconnect

Emitted when the disconnect button is clicked

reset

Emitted after crash triggers disconnect

display

Emitted when finished displaying the widget

setState: function(state,
args)
Call the function that applies the state to the widget
setUserAddress: function(addr)
Set user address of the input field
setUserSecretKey: function(secretKey)
Set user secret key
toggleBubble: function(event)
Show the bubble when hidden and the other way around
hideBubble: function()
Hide the bubble
showBubble: function(event)
Show the bubble
display: function(options)
Draw the widget inside of the dom element with the id options.domID
Close