-
-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement live and all followed games
- Merge Game and GamesFollowed models and inherit from Game - Create GamesLiveFollowed model and inherit from GamesTop - Set query parameters to UserFollowedGamesRoute - Add UserFollowedGamesController and add quickbar toggle button Resolve #243, #148, #109
- Loading branch information
1 parent
b47c5ca
commit 8c7d3ff
Showing
8 changed files
with
81 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
define([ | ||
"Ember" | ||
], function( | ||
Ember | ||
) { | ||
|
||
var get = Ember.get; | ||
var set = Ember.set; | ||
|
||
|
||
return Ember.Controller.extend({ | ||
queryParams: [ "all" ], | ||
|
||
actions: { | ||
"toggleAll": function() { | ||
// query parameters are strings | ||
set( this, "all", get( this, "all" ) === "true" ? "false" : "true" ); | ||
} | ||
} | ||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
define([ | ||
"models/twitch/GamesTop" | ||
], function( | ||
GamesTop | ||
) { | ||
|
||
return GamesTop.extend().reopenClass({ | ||
toString: function() { return "api/users/:user/follows/games/live"; } | ||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
define([ | ||
"models/twitch/GamesTopSerializer" | ||
], function( | ||
GamesTopSerializer | ||
) { | ||
|
||
return GamesTopSerializer.extend({ | ||
modelNameFromPayloadKey: function() { | ||
return "twitchGamesLiveFollowed"; | ||
} | ||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters