-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added handling of moderation events to ban a user.
Co-authored-by: Patrick Schmidt (Clon1998)
- Loading branch information
Showing
15 changed files
with
189 additions
and
22 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,48 @@ | ||
:host { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
height: inherit; | ||
color: var(--sl-color-neutral-700); | ||
} | ||
:host > div { | ||
display: flex; | ||
flex-direction: column; | ||
flex: 0 0 auto; | ||
width: 50%; | ||
padding-top: 3rem; | ||
} | ||
:host > div > h1 { | ||
padding: 0.5rem 0; | ||
align-self: center; | ||
} | ||
:host > div > p { | ||
align-self: center; | ||
} | ||
:host > div > sl-icon { | ||
fill: var(--sl-color-primary-600); | ||
font-size: 6rem; | ||
align-self: center; | ||
padding-bottom: 0.5rem; | ||
} | ||
|
||
:host > div > sl-button { | ||
margin: var(--sl-spacing-medium); | ||
align-self: center; | ||
} | ||
|
||
:host p { | ||
margin-top: 0; | ||
margin-bottom: 1rem; | ||
} | ||
|
||
@media (max-width: 1000px) { | ||
:host > div { | ||
width: 60%; | ||
} | ||
} | ||
@media (max-width: 800px) { | ||
:host > div { | ||
width: 80%; | ||
} | ||
} |
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,32 @@ | ||
import {CSSResultGroup, html} from 'lit'; | ||
import {customElement} from 'lit/decorators.js'; | ||
import {I18nLitElement} from '../i18n-mixin'; | ||
import {Component} from '../component'; | ||
import style from './player-no-access.css'; | ||
import {t} from "i18next"; | ||
|
||
@customElement('player-no-access') | ||
export class PlayerNoAccess extends Component { | ||
|
||
static override styles = <CSSResultGroup>[ | ||
I18nLitElement.styles, | ||
style, | ||
]; | ||
|
||
|
||
private home() { | ||
// Use location to navigate to the home page. | ||
location.assign("/") | ||
} | ||
|
||
protected override render() { | ||
return html` | ||
<div> | ||
<sl-icon name="shield-x"></sl-icon> | ||
<h1>${t("course.no_access.title")}</h1> | ||
<p>${t("course.no_access.description")}</p> | ||
<sl-button @click="${this.home}" variant="default">${t("course.overview")}</sl-button> | ||
</div> | ||
`; | ||
} | ||
} |
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
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 |
---|---|---|
@@ -1,7 +1,9 @@ | ||
import {VideoRoomParticipant} from "janus-gateway"; | ||
|
||
export type LpParticipantJoinedEvent = CustomEvent<VideoRoomParticipant>; | ||
|
||
declare global { | ||
interface GlobalEventHandlersEventMap { | ||
"lp-participant-joined": LpParticipantJoinedEvent; | ||
} | ||
} | ||
} |
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,9 @@ | ||
import {CourseParticipantModeration} from "../model/moderation"; | ||
|
||
export type LpParticipantModerationEvent = CustomEvent<CourseParticipantModeration>; | ||
|
||
declare global { | ||
interface GlobalEventHandlersEventMap { | ||
"lp-participant-moderation": LpParticipantModerationEvent; | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,12 @@ | ||
export type ModerationType = "PERMANENT_BAN"; | ||
|
||
export interface CourseParticipantModeration { | ||
|
||
readonly userId: string; | ||
|
||
readonly firstName: string; | ||
|
||
readonly familyName: string; | ||
|
||
readonly moderationType: ModerationType; | ||
} |
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 |
---|---|---|
|
@@ -4,6 +4,7 @@ export enum State { | |
CONNECTED, | ||
CONNECTED_FEATURES, | ||
DISCONNECTED, | ||
RECONNECTING | ||
RECONNECTING, | ||
NO_ACCESS, | ||
|
||
} | ||
} |
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