2014-11-19 12:59:17 +00:00
|
|
|
open = require('open')
|
2014-12-01 14:11:00 +00:00
|
|
|
url = require('url')
|
2015-03-19 15:45:07 +00:00
|
|
|
settings = require('resin-settings-client')
|
2014-11-19 12:59:17 +00:00
|
|
|
|
2015-01-15 17:10:14 +00:00
|
|
|
exports.preferences =
|
|
|
|
signature: 'preferences'
|
|
|
|
description: 'open preferences form'
|
|
|
|
help: '''
|
|
|
|
Use this command to open the preferences form.
|
|
|
|
|
|
|
|
In the future, we will allow changing all preferences directly from the terminal.
|
|
|
|
For now, we open your default web browser and point it to the web based preferences form.
|
|
|
|
|
|
|
|
Examples:
|
2015-03-03 14:14:16 +00:00
|
|
|
|
2015-01-15 17:10:14 +00:00
|
|
|
$ resin preferences
|
|
|
|
'''
|
2015-01-16 12:34:59 +00:00
|
|
|
permission: 'user'
|
|
|
|
action: ->
|
2015-03-19 15:45:07 +00:00
|
|
|
absUrl = url.resolve(settings.get('remoteUrl'), '/preferences')
|
2015-01-15 17:10:14 +00:00
|
|
|
open(absUrl)
|