From ba4a4f4f5f05345f3baf14237950bb54d9e64083 Mon Sep 17 00:00:00 2001 From: Keithkiarie Date: Wed, 6 Jan 2021 17:42:39 +0300 Subject: [PATCH 1/7] ignore package-lock.json --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index c40a1b2..6f8112c 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ /.node_modules.ember-try/ /bower.json.ember-try /package.json.ember-try +package-lock.json From 5640bc7d750fa6c6c95c50d74438515de2f52f8f Mon Sep 17 00:00:00 2001 From: Keithkiarie Date: Wed, 6 Jan 2021 17:43:16 +0300 Subject: [PATCH 2/7] installed dependencies --- package.json | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index 64da720..a68c6b3 100644 --- a/package.json +++ b/package.json @@ -18,38 +18,38 @@ "test": "ember test" }, "devDependencies": { - "@ember/edition-utils": "^1.1.1", - "@ember/optional-features": "^1.0.0", + "@ember/edition-utils": "^1.2.0", + "@ember/optional-features": "^1.3.0", "@glimmer/component": "^0.14.0-alpha.12", - "babel-eslint": "^10.0.2", - "bootstrap": "^4.3.1", + "babel-eslint": "^10.1.0", + "bootstrap": "^4.5.3", "broccoli-asset-rev": "^3.0.0", - "ember-auto-import": "^1.2.20", - "ember-bootstrap": "^3.0.0", - "ember-cli": "^3.23.0", + "ember-auto-import": "^1.10.1", + "ember-bootstrap": "^3.1.4", + "ember-cli": "^3.24.0", "ember-cli-app-version": "^3.2.0", - "ember-cli-babel": "^7.11.1", + "ember-cli-babel": "^7.23.0", "ember-cli-dependency-checker": "^3.1.0", - "ember-cli-htmlbars": "^4.0.0", + "ember-cli-htmlbars": "^4.4.0", "ember-cli-inject-live-reload": "^2.0.1", "ember-cli-sri": "^2.1.1", "ember-cli-uglify": "^3.0.0", - "ember-data": "~3.13.0", - "ember-export-application-global": "^2.0.0", - "ember-load-initializers": "^2.0.0", + "ember-data": "^3.13.3", + "ember-export-application-global": "^2.0.1", + "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", - "ember-qunit": "^4.4.1", + "ember-qunit": "^4.6.0", "ember-resolver": "^5.1.3", "ember-source": "https://s3.amazonaws.com/builds.emberjs.com/beta/shas/6e99174bb69b4670f65a58cf8c436210d38ffebb.tgz", - "ember-template-lint": "^1.5.0", + "ember-template-lint": "^1.14.0", "ember-welcome-page": "^4.0.0", - "eslint": "^6.1.0", - "eslint-plugin-ember": "^7.1.0", + "eslint": "^6.8.0", + "eslint-plugin-ember": "^7.13.0", "eslint-plugin-node": "^10.0.0", "loader.js": "^4.7.0", - "qunit-dom": "^0.9.0" + "qunit-dom": "^0.9.2" }, "engines": { "node": "8.* || >= 10.*" } -} \ No newline at end of file +} From 0f0daf0f26702bf1397e0f343afd37a9d7801d17 Mon Sep 17 00:00:00 2001 From: Keithkiarie Date: Wed, 6 Jan 2021 17:53:49 +0300 Subject: [PATCH 3/7] pin task functionality --- app/components/single-task.hbs | 2 +- app/components/single-task.js | 13 +++++++++++-- app/components/task-list.hbs | 2 +- app/components/task-list.js | 12 +++++++++++- app/controllers/index.js | 7 +++++++ app/templates/index.hbs | 2 +- 6 files changed, 32 insertions(+), 6 deletions(-) diff --git a/app/components/single-task.hbs b/app/components/single-task.hbs index d644ec8..5e82d6a 100644 --- a/app/components/single-task.hbs +++ b/app/components/single-task.hbs @@ -5,7 +5,7 @@
- Pin + Pin {{#if this.task.isComplete}} Undo {{else}} diff --git a/app/components/single-task.js b/app/components/single-task.js index 30b0515..5041d4e 100644 --- a/app/components/single-task.js +++ b/app/components/single-task.js @@ -1,7 +1,16 @@ import Component from '@ember/component'; -import { tagName } from '@ember-decorators/component'; +import { + tagName +} from '@ember-decorators/component'; +import { + action +} from '@ember/object'; -export default +export default @tagName('') class SingleTaskComponent extends Component { + @action + pin_task() { + this.onSentUp(this.task); + } } diff --git a/app/components/task-list.hbs b/app/components/task-list.hbs index 41b6c7c..963723c 100644 --- a/app/components/task-list.hbs +++ b/app/components/task-list.hbs @@ -1,7 +1,7 @@
    {{#each this.tasks as |task|}} - + {{/each}}
\ No newline at end of file diff --git a/app/components/task-list.js b/app/components/task-list.js index d02703f..0d45b13 100644 --- a/app/components/task-list.js +++ b/app/components/task-list.js @@ -1,7 +1,17 @@ import Component from '@ember/component'; -import { tagName } from '@ember-decorators/component'; +import { + tagName +} from '@ember-decorators/component'; +import { + action +} from '@ember/object'; export default @tagName('') + class TaskListComponent extends Component { + @action + receivedAction() { + this.onSentUp(arguments[0]); + } } diff --git a/app/controllers/index.js b/app/controllers/index.js index 78d8779..9b24c62 100644 --- a/app/controllers/index.js +++ b/app/controllers/index.js @@ -1,4 +1,11 @@ import Controller from '@ember/controller'; +import { + action +} from '@ember/object'; export default class IndexController extends Controller { + @action + pinned() { + this.set('pinnedTask', arguments[0]); + } } diff --git a/app/templates/index.hbs b/app/templates/index.hbs index 13a70b0..546b2fe 100644 --- a/app/templates/index.hbs +++ b/app/templates/index.hbs @@ -25,7 +25,7 @@ No Pinned Tasks {{/if}}

Other Tasks

- +