Skip to content

Commit 57828a0

Browse files
authored
Twitch Auth: Improve custom scopes handling (#486)
1 parent 8b0abd0 commit 57828a0

File tree

7 files changed

+59
-28
lines changed

7 files changed

+59
-28
lines changed

CHANGELOG.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,14 @@
33
### Feature
44

55
* [x] Show Errors in the Dashboard - incl. a way to create a GitHub Issue from that
6-
* [ ] Ability to re-authenticate even when you are not in the normal ports
6+
* [x] Twitch Auth: Improve custom scopes handling (if any were already configured, these will be always applied)
77
* [ ] Tell the Streamer with warnings / dialogs that the Token will expire in X Days
8-
* [ ] Twitch Auth: Improve custom scopes handling
8+
* [ ] Ability to re-authenticate even when you are not in the normal ports
99

10-
* [ ] Recipe: more Twitch Command Blocks: Announce, Clear Chat, Start Commercial, Create Stream Marker, Slow Mode, Chat Settings
1110
* [ ] Recipe: more Obs Command Blocks: TBD
1211
* [ ] if easy/fast todo: Support for new OBS-websocket(.js) v5
1312

14-
### Misc
1513

16-
* [ ] Added a Twitch Raid Script Example
17-
* [ ] Recipe Example: Panic Button
1814

1915
## 2022.1-beta2
2016

README.md

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -167,19 +167,7 @@ See finished and upcoming changes in:
167167
- [CHANGELOG.md](CHANGELOG.md)
168168
- [`Milestone 2022.1`](https://github.com/negue/meme-box/milestone/5)
169169

170-
### 2022.2
171-
* [ ] Labels on or around the Media, each with their own Position / Animation
172-
* [ ] Changeable by Trigger Variables
173-
* [ ] Can be placed like in the Arrange View
174-
* [ ] OBS Websockets
175-
* [ ] Screen Arrange View gets the current OBS-Scene as Background to move stuff around
176-
* [ ] Overview of local media files not existing anymore
177-
* [ ] Replace all selected Trigger Action with an inline Recipes #439
178-
179-
### Future, if you want to help open a PR :)
180-
* [ ] Change media options by triggered variables (e.g. different style, or something)
181-
* [ ] Stats per commands / media / or something last cheerer and so on
182-
* [ ] more to be added :)
170+
### [Future Version](ROADMAP.md)
183171

184172
## How to help / contribute?
185173
* Improve Docs / Translations

ROADMAP.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
This list might be changed in future, depending on the amount of work that needs to be done for these Features.
2+
3+
### 2022.2 and later
4+
* [ ] Labels on or around the Media, each with their own Position / Animation
5+
* [ ] Changeable by Trigger Variables
6+
* [ ] Can be placed like in the Arrange View
7+
* [ ] OBS Websockets
8+
* [ ] Screen Arrange View gets the current OBS-Scene as Background to move stuff around
9+
* [ ] Overview of local media files not existing anymore
10+
* [ ] Replace all selected Trigger Action with an inline Recipes #439
11+
* [ ] Recipe: more Twitch Command Blocks: Announce, Clear Chat, Start Commercial, Create Stream Marker, Slow Mode, Chat Settings
12+
* [ ] Dependency: Twitch Scope System - for Scripts and Command Block Checks
13+
14+
### Misc
15+
16+
* [ ] Added a Twitch Raid Script Example
17+
* [ ] Dependency: Twitch Scope System
18+
* [ ] Recipe Example: Panic Button
19+
* [ ] Dependency: Twitch Scope System & New Command Blocks
20+
21+
### Future, if you want to help open a PR :)
22+
* [ ] Change media options by triggered variables (e.g. different style, or something)
23+
* [ ] Stats per commands / media / or something last cheerer and so on
24+
* [ ] more to be added :)

projects/recipe-core/src/lib/command-blocks.twitch.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
import {RecipeCommandBlockRegistry} from "./recipe.types";
22

3+
/*
4+
* Announcements: moderator:manage:announcements
5+
* https://dev.twitch.tv/docs/api/reference#send-chat-announcement
6+
*
7+
* Clear chat: moderator:manage:chat_messages
8+
* https://dev.twitch.tv/docs/api/reference#delete-chat-messages
9+
*
10+
* Start Commercial: channel:edit:commercial
11+
* https://dev.twitch.tv/docs/api/reference#start-commercial
12+
*
13+
* Start a Raid: channel:manage:raids
14+
* https://dev.twitch.tv/docs/api/reference#start-a-raid
15+
*
16+
* Create Stream Marker: channel:manage:broadcast
17+
* https://dev.twitch.tv/docs/api/reference#create-stream-marker
18+
*
19+
* Chat Settings: moderator:manage:chat_settings
20+
* https://dev.twitch.tv/docs/api/reference#update-chat-settings
21+
* Slow, Sub only, Follower only, unique
22+
*/
23+
324
export function registerTwitchCommandBlocks (
425
registry: RecipeCommandBlockRegistry
526
): void {

src/app/shared/dialogs/twitch-connection-edit/twitch-connection-edit.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ <h4>Twitch Main:
8484
mat-stroked-button color="primary"
8585
class="auth-buttons"
8686
(click)="tryAuthentication('main', true)" >
87-
Auth with Twitch (custom scopes)
87+
Config: Custom Scopes
8888
</button>
8989
</div>
9090

src/app/shared/dialogs/twitch-connection-edit/twitch-connection-edit.component.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@ export class TwitchConnectionEditComponent implements OnInit {
175175
});
176176
}
177177

178-
async tryAuthentication(type: string, withCustomScope = false) {
179-
if (withCustomScope) {
178+
async tryAuthentication(type: string, showCustomScopeConfig = false) {
179+
if (showCustomScopeConfig) {
180180
const newScopes = await this.dialogService.openTwitchScopeSelection({
181181
scopes: this._customScopes
182182
});
@@ -216,9 +216,7 @@ export class TwitchConnectionEditComponent implements OnInit {
216216
}
217217

218218
const scopesForThisToken = [...DEFAULT_TWITCH_SCOPES];
219-
if (withCustomScope) {
220-
scopesForThisToken.push(...this._customScopes);
221-
}
219+
scopesForThisToken.push(...this._customScopes);
222220

223221
const oauthHandler = new TwitchOAuthHandler(
224222
TWITCH_CLIENT_ID, scopesForThisToken.join('+'), currentUrl, true

src/app/shared/dialogs/twitch-scope-selection/twitch-scope-selection.component.scss

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ mat-dialog-actions {
1010
flex: 1;
1111
}
1212

13-
gewd-markdown {
14-
display: block;
15-
min-height: 360px;
13+
.scope-row {
14+
display: flex;
15+
align-items: center;
16+
17+
mat-form-field {
18+
flex: 1;
19+
}
1620
}

0 commit comments

Comments
 (0)