Skip to content
This repository has been archived by the owner on Dec 30, 2019. It is now read-only.

Feature options in project menu #9

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Rxbsxn
Copy link
Contributor

@Rxbsxn Rxbsxn commented Jul 7, 2017

WIP, but almost done. I think we let user define his OS and IDE, and later pass this information to component

When I come back. I will work on this feature: https://www.youtube.com/watch?v=lYGIaAkyu6M

@PoslinskiNet
Copy link
Member

It will close this issue: #10

@@ -11,12 +11,12 @@
<span>{{t "projects.actions.remove"}}</span>
{{/content.menu-item}}

{{#content.menu-item onClick="openSomething" disabled=true}}
{{#content.menu-item onClick="openInDirectory"}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

always use closure actions (action "openInDirectory") :)


openInDirectory() {
let projectPath = this.get('project.path')
return this.get('terminal').execute(`nautilus ${projectPath}`)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nautilus?
Rather than using 3rd parties try to use official electron API:
https://github.com/electron/electron/blob/master/docs/api/shell.md

@@ -3,12 +3,25 @@ const { Component, inject } = Ember;

export default Component.extend({
notify: inject.service(),
terminal: inject.service(),
ideName: 'code',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, hardcoded :/ I will push my changes related with settings but is still need to be tested. If you would like to practice, go ahead.


actions: {
remove() {
this.get('project').destroyRecord().then(() => {
this.get('notify').success('notify.projects.remove.success');
});
},

openInEditor() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can move these methods to terminal service and just pass them the path :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants