From 7ff1a9bc4bfdf39658b3f40c7b2d6b4555c45381 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Har=C4=99=C5=BClak?= Date: Thu, 29 Jun 2017 14:04:24 +0200 Subject: [PATCH 1/3] need be fixed --- app/components/projects-list/project/template.hbs | 2 +- app/styles/app.scss | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/components/projects-list/project/template.hbs b/app/components/projects-list/project/template.hbs index ecf2582..1522820 100644 --- a/app/components/projects-list/project/template.hbs +++ b/app/components/projects-list/project/template.hbs @@ -1,7 +1,7 @@ {{#paper-card as |card|}} {{#card.title as |title|}} {{#title.text as |text|}} - {{#text.headline class="h5"}} + {{#text.headline class="h5 project"}} {{shared/inline-input value=project.name onChange=(action 'saveProject')}} {{/text.headline}} {{#text.subhead}}{{project.version}}{{/text.subhead}} diff --git a/app/styles/app.scss b/app/styles/app.scss index 40d45e7..b761f12 100644 --- a/app/styles/app.scss +++ b/app/styles/app.scss @@ -27,8 +27,8 @@ body { } } -.project-list { - .project { +.project { text-overflow: ellipsis; - } + white-space: nowrap; + overflow: hidden; } From 2bf2ec661a491fc6348a6eabd36b1f6c7bbefbf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Har=C4=99=C5=BClak?= Date: Thu, 29 Jun 2017 14:09:50 +0200 Subject: [PATCH 2/3] open via editor feature --- app/components/projects-list/project/menu/component.js | 8 ++++++++ app/components/projects-list/project/menu/template.hbs | 2 +- app/components/projects-list/project/template.hbs | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/components/projects-list/project/menu/component.js b/app/components/projects-list/project/menu/component.js index 53f39ee..dd45166 100644 --- a/app/components/projects-list/project/menu/component.js +++ b/app/components/projects-list/project/menu/component.js @@ -3,12 +3,20 @@ const { Component, inject } = Ember; export default Component.extend({ notify: inject.service(), + terminal: inject.service(), + ideName: 'code', actions: { remove() { this.get('project').destroyRecord().then(() => { this.get('notify').success('notify.projects.remove.success'); }); + }, + + openInEditor() { + let projectPath = this.get('project.path') + let ideName = this.get('ideName'); + return this.get('terminal').execute(`${ideName} ${projectPath}`); } } }); diff --git a/app/components/projects-list/project/menu/template.hbs b/app/components/projects-list/project/menu/template.hbs index 19ce7b3..59b43bb 100644 --- a/app/components/projects-list/project/menu/template.hbs +++ b/app/components/projects-list/project/menu/template.hbs @@ -16,7 +16,7 @@ {{t "projects.actions.showInFolder"}} {{/content.menu-item}} - {{#content.menu-item onClick="openSomething" disabled=true}} + {{#content.menu-item onClick="openInEditor"}} {{paper-icon "code"}} {{t "projects.actions.openInEditor"}} {{/content.menu-item}} diff --git a/app/components/projects-list/project/template.hbs b/app/components/projects-list/project/template.hbs index 1522820..ecf2582 100644 --- a/app/components/projects-list/project/template.hbs +++ b/app/components/projects-list/project/template.hbs @@ -1,7 +1,7 @@ {{#paper-card as |card|}} {{#card.title as |title|}} {{#title.text as |text|}} - {{#text.headline class="h5 project"}} + {{#text.headline class="h5"}} {{shared/inline-input value=project.name onChange=(action 'saveProject')}} {{/text.headline}} {{#text.subhead}}{{project.version}}{{/text.subhead}} From 73ebede5a87c72f5b08b5c0546ada7fbfa86fa2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Har=C4=99=C5=BClak?= Date: Thu, 29 Jun 2017 14:32:37 +0200 Subject: [PATCH 3/3] open in directory works only on Linux --- app/components/projects-list/project/menu/component.js | 5 +++++ app/components/projects-list/project/menu/template.hbs | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/components/projects-list/project/menu/component.js b/app/components/projects-list/project/menu/component.js index dd45166..ba07d2d 100644 --- a/app/components/projects-list/project/menu/component.js +++ b/app/components/projects-list/project/menu/component.js @@ -17,6 +17,11 @@ export default Component.extend({ let projectPath = this.get('project.path') let ideName = this.get('ideName'); return this.get('terminal').execute(`${ideName} ${projectPath}`); + }, + + openInDirectory() { + let projectPath = this.get('project.path') + return this.get('terminal').execute(`nautilus ${projectPath}`) } } }); diff --git a/app/components/projects-list/project/menu/template.hbs b/app/components/projects-list/project/menu/template.hbs index 59b43bb..e3c5ffc 100644 --- a/app/components/projects-list/project/menu/template.hbs +++ b/app/components/projects-list/project/menu/template.hbs @@ -11,7 +11,7 @@ {{t "projects.actions.remove"}} {{/content.menu-item}} - {{#content.menu-item onClick="openSomething" disabled=true}} + {{#content.menu-item onClick="openInDirectory"}} {{paper-icon "folder-open"}} {{t "projects.actions.showInFolder"}} {{/content.menu-item}}