Skip to content

Commit 064af6e

Browse files
committed
Merge remote-tracking branch 'origin/master' into development
2 parents 9596086 + f6c280e commit 064af6e

File tree

80 files changed

+983
-308
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+983
-308
lines changed

README.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,16 @@ You will need the following things properly installed on your computer.
2121
* [Yarn](https://yarnpkg.com/)
2222
* [Ember CLI](https://ember-cli.com/)
2323
* [Google Chrome](https://google.com/chrome/)
24+
* [CodingBlocks Online Server](https://github.com/coding-blocks/codingblocks.online.server)
2425

2526
## Installation
2627

28+
* Make sure [CodingBlocks Online Server](https://github.com/coding-blocks/codingblocks.online.server) is installed and running
2729
* `git clone https://github.com/coding-blocks/codingblocks.online.projectx` this repository
2830
* `cd codingblocks.online.projectx`
2931
* `yarn install`
3032

31-
## Running / Development
33+
## Running for Development
3234

3335
* `export oss=true && ember serve`
3436
* Visit your app at [http://localhost:4200](http://localhost:4200).
@@ -38,18 +40,13 @@ You will need the following things properly installed on your computer.
3840

3941
Make use of the many generators for code, try `ember help generate` for more details
4042

41-
### Running Tests
42-
43-
* `ember test`
44-
* `ember test --server`
45-
4643
### Linting
4744

4845
* `npm run lint:hbs`
4946
* `npm run lint:js`
5047
* `npm run lint:js -- --fix`
5148

52-
### Building
49+
### Building (for production)
5350

5451
* `ember build` (development)
5552
* `ember build --environment production` (production)

app/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
.push([f])},catch:function(){return k&&new k()},c:l}};})(window,document,[]);
9797
</script>
9898

99-
<script src="https://hack.codingblocks.com/index.js"></script>
99+
<script src="https://unpkg.com/@coding-blocks/[email protected]/dist/index.js" async></script>
100100

101101
{{content-for "body-footer"}}
102102
</body>

app/models/comment.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ export default DS.Model.extend({
66
name: DS.attr(),
77
avatarTemplate: DS.attr(),
88
username: DS.attr(),
9-
updatedAt: DS.attr(),
9+
createdAt: DS.attr('date'),
10+
updatedAt: DS.attr('date'),
1011
doubt: DS.belongsTo('doubt'),
1112
discourseTopicId: DS.attr()
1213
})

app/models/course.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export default DS.Model.extend({
4040
backgroundImage: DS.attr(),
4141
rating: DS.attr('number'),
4242
seoMeta: DS.attr(),
43+
code: DS.attr(),
4344
topRun: computed('activeRuns', 'runs', function () {
4445
let runs = this.activeRuns
4546

@@ -60,10 +61,6 @@ export default DS.Model.extend({
6061
feedback: computed('feedbacks', function () {
6162
return this.feedbacks.objectAt(0);
6263
}),
63-
canHazDoubtsLink: and('categoryId', 'doubtSubCategoryId'),
64-
doubtsLink: computed('categoryId', 'doubtSubCategoryId', function () {
65-
return `${env.discussBaseUrl}/c/${this.categoryId}/${this.doubtSubCategoryId}`;
66-
}),
6764
difficultyName: computed('difficulty', function () {
6865
switch(+this.difficulty) {
6966
case 0: return 'beginner' ; break;

app/models/doubt.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@ export default DS.Model.extend({
1111
firebaseRef: DS.attr(),
1212
comments: DS.hasMany('comment'),
1313
feedbacks: DS.hasMany('doubt-feedback'),
14-
resolvedById: DS.attr()
14+
resolvedById: DS.attr(),
15+
createdAt: DS.attr('date')
1516
})

app/models/run-attempt.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export default DS.Model.extend({
99
revoked: DS.attr(),
1010
certificateApproved: DS.attr(),
1111
rating: DS.attr(),
12+
runTier: DS.attr(),
1213
completedContents: DS.attr('number'),
1314
approvalRequested: DS.attr('boolean'),
1415
doubtSupport: DS.attr('date'),

app/models/run.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,15 @@ export default DS.Model.extend({
2424
description: DS.attr(),
2525
productId: DS.attr(),
2626
totalContents: DS.attr("number"),
27+
tier: DS.attr(),
2728
course: DS.belongsTo("course", { inverse: "runs" }),
2829
sections: DS.hasMany("sections"),
2930
user: DS.belongsTo("user"),
3031
runAttempts: DS.hasMany("run-attempt"),
3132
announcements: DS.hasMany("announcement"),
3233
ta: DS.hasMany("ta"),
3334
runRequests: DS.hasMany("run-request"),
35+
shift: DS.attr(),
3436
topRunAttempt: computed("runAttempts", function() {
3537
return this.runAttempts.objectAt(0);
3638
}),

app/pods/application-loading/route.js

Lines changed: 0 additions & 4 deletions
This file was deleted.

app/pods/application-loading/template.hbs

Lines changed: 0 additions & 1 deletion
This file was deleted.

app/pods/application/route.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@ import ApplicationRouteMixin from "ember-simple-auth/mixins/application-route-mi
33
import UtmCookieRouteMixin from "../../mixins/utm-cookie-route"
44
import { inject as service } from "@ember/service";
55
import { isNone } from "@ember/utils";
6+
import { get } from '@ember/object';
67

78
export default Route.extend(ApplicationRouteMixin, UtmCookieRouteMixin, {
89
session: service(),
910
currentUser: service(),
1011
store: service(),
1112
headData: service(),
13+
pageProgress: service(),
1214
onesignal: service(),
1315
metrics: service(), // !important: keep this here to init trackers for all routes
1416
// routeAfterAuthentication: 'dashboard',
@@ -72,5 +74,15 @@ export default Route.extend(ApplicationRouteMixin, UtmCookieRouteMixin, {
7274
setupController(controller, model) {
7375
this._super(controller, model);
7476
controller.set("model", model);
77+
},
78+
actions: {
79+
loading(transition) {
80+
const pageProgress = get(this, 'pageProgress');
81+
pageProgress.start(transition.targetName);
82+
transition.promise.finally(() => {
83+
pageProgress.done();
84+
});
85+
return true
86+
}
7587
}
7688
});

0 commit comments

Comments
 (0)