-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add the option to make the application run on startup for all users #74
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,13 +12,14 @@ module.exports = class AutoLaunch | |
# to add Login Item | ||
# :name - {String} | ||
# :path - (Optional) {String} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You should add a new comment for the new option |
||
constructor: ({name, isHidden, mac, path}) -> | ||
constructor: ({name, isHidden, mac, path,onlyMe}) -> | ||
throw new Error 'You must specify a name' unless name? | ||
|
||
@opts = | ||
appName: name | ||
isHiddenOnLaunch: if isHidden? then isHidden else false | ||
mac: mac ? {} | ||
mac: mac ? {}, | ||
onlyMe:onlyMe?true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you add some spaces here please? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same for a few other areas actually |
||
|
||
versions = process?.versions | ||
if path? | ||
|
@@ -48,11 +49,11 @@ module.exports = class AutoLaunch | |
enable: => @api.enable @opts | ||
|
||
|
||
disable: => @api.disable @opts.appName, @opts.mac | ||
disable: => @api.disable @opts.appName, @opts.mac,@opts.onlyMe | ||
|
||
|
||
# Returns a Promise which resolves to a {Boolean} | ||
isEnabled: => @api.isEnabled @opts.appName, @opts.mac | ||
isEnabled: => @api.isEnabled @opts.appName, @opts.mac,@opts.onlyMe | ||
|
||
|
||
### Private ### | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A comment for
mac
is missingThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, use a name that is more representative of what's the purpose of the parameter. We usually talk about a user-wide or a system-wide installation (something like "systemWideInstall").