-
-
Notifications
You must be signed in to change notification settings - Fork 201
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add auth check to LivestreamerService
and implement ModalAuthRequiredComponent. See #310
- Loading branch information
1 parent
90c3dbf
commit 84d5245
Showing
4 changed files
with
38 additions
and
0 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,19 @@ | ||
import ModalDialogComponent from "components/modal/ModalDialogComponent"; | ||
import layout from "templates/components/modal/ModalAuthRequiredComponent.hbs"; | ||
|
||
|
||
export default ModalDialogComponent.extend({ | ||
layout, | ||
|
||
"class": "modal-auth-required", | ||
|
||
goto: "goto", | ||
|
||
|
||
actions: { | ||
login() { | ||
this.sendAction( "goto", "user.auth" ); | ||
this.send( "close" ); | ||
} | ||
} | ||
}); |
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
12 changes: 12 additions & 0 deletions
12
src/templates/components/modal/ModalAuthRequiredComponent.hbs
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,12 @@ | ||
<div> | ||
{{#modal-header}} | ||
Authentication required | ||
{{/modal-header}} | ||
{{#modal-body}} | ||
Please sign in to your Twitch.tv account to be able to launch streams. | ||
{{/modal-body}} | ||
{{#modal-footer}} | ||
{{#form-button action="login" class="btn-success" icon="fa-sign-in"}}Sign in{{/form-button}} | ||
{{#form-button action="close" class="btn-danger" icon="fa-times" }}Close{{/form-button}} | ||
{{/modal-footer}} | ||
</div> |