Skip to content

Commit

Permalink
Revert "Feature-9082: Enhance language dropdown button (#9131)"
Browse files Browse the repository at this point in the history
This reverts commit a341a19.
  • Loading branch information
norbusan committed Mar 21, 2024
1 parent 940cb42 commit 0d76e7a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 22 deletions.
2 changes: 1 addition & 1 deletion app/components/public/stream/side-panel.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<div class="chat-video-room">
<div>
<div class="ui inverted vertical fluid menu borderless stream-side-menu">
{{#each this.streamList as |stream|}}
{{#each this.streams as |stream|}}
<a href={{href-to 'public.stream.view' @event stream.slugName stream.id }} class="{{if (eq @currentRoom.microlocationId stream.microlocationId) 'video-active'}} item stream-item d-flex items-center" {{on "click" (fn @setupRoomChat stream) }} >
<span class="stream-preview-letter" style={{css background-color=(object-at (abs (mod stream.hash this.colors.length)) this.colors)}}>{{truncate (uppercase stream.name) 1 false}}</span>
<span class="ml-2">{{stream.name}}</span>
Expand Down
26 changes: 6 additions & 20 deletions app/components/public/stream/side-panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ export default class PublicStreamSidePanel extends Component<Args> {
@tracked showChat = false;
@tracked showRoomChat = false;
@tracked showVideoRoom = false;
@tracked languageList: any = [];

@tracked translationChannels = [{
id : '0',
Expand Down Expand Up @@ -148,22 +147,14 @@ export default class PublicStreamSidePanel extends Component<Args> {
isGlobalEventRoom : rooms.data.filter((room: any) => room.relationships['video-stream'].data ? room.relationships['video-stream'].data.id === stream.id : null).map((room: any) => room.attributes['is-global-event-room'])[0],
chatRoomName : rooms.data.filter((room: any) => room.relationships['video-stream'].data ? room.relationships['video-stream'].data.id === stream.id : null).map((room: any) => room.attributes['chat-room-name'])[0],
microlocationId : rooms.data.filter((room: any) => room.relationships['video-stream'].data ? room.relationships['video-stream'].data.id === stream.id : null).map((room: any) => room.id)[0],
hash : stringHashCode(stream.attributes.name + stream.id),
translations : []
})).forEach((stream: any) => {
hash : stringHashCode(stream.attributes.name + stream.id)
})).forEach(async(stream: any) => {
this.addStream(stream)
});
const languageLists: any = [];
Promise.all(this.streams.map(async(stream: any) => {
const res = await this.fetchTranslationChannels(stream.id);
const item = {
streamId: stream.id
}
languageLists.push(item);
stream.translations = res;
})).then(() => {
this.languageList = languageLists;
})
this.streams.forEach(async(stream: any) => {
const res = await this.fetchTranslationChannels(stream.id)
stream.translations = res
});
} catch (e) {
console.error('Error while loading rooms in video stream', e);
}
Expand All @@ -183,9 +174,4 @@ export default class PublicStreamSidePanel extends Component<Args> {
this.loading = false;
this.streams = [...this.streams];
}

@computed('[email protected]')
get streamList() {
return this.streams;
}
}
1 change: 0 additions & 1 deletion app/models/video-stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export default class VideoStream extends ModelBase.extend() {
@attr() additionalInformation!: string;
@attr() extra!: Extra;
@attr() chatRoomName?: string;
@attr() translations?: any[];

@hasMany('microlocation') rooms!: Microlocation[];
@hasMany('video-recording') videoRecordings!: VideoRecording[];
Expand Down

0 comments on commit 0d76e7a

Please sign in to comment.