-
Notifications
You must be signed in to change notification settings - Fork 1.8k
/
Copy pathside-panel.hbs
108 lines (104 loc) · 5.26 KB
/
side-panel.hbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<button {{did-insert this.setup}} class="ui icon button stream-side-panel-button" {{action (mut this.shown) true}}>
<i class="angle right icon"></i>
</button>
{{#if this.isChatShowing}}
<div class="ui chat-stream-side-panel-button right">
<i class="rocketchat large icon p-4 chat-panel-icon" {{on "click" @showChatPanel}} role="button"></i>
</div>
{{/if}}
{{#if this.shown}}
<div class="d-flex flex-column stream-side-panel" >
<div class="ui header inverted ml-4 mt-4">
<a href={{href-to 'public' @event (query-params side_panel='true')}}>
<p class="text-white">{{@event.name}}</p>
</a>
</div>
<div class="ml-4">
<div class="mr-8 pt-1" style="font-size: 0.9rem;">
<Public::EventDateTime @event={{@event}} />
</div>
<button class="ui icon button stream-side-panel-button right" {{action (mut this.shown) false}}>
<i class="angle left icon pr-2"></i>
</button>
</div>
<div class="ui inverted vertical fluid menu borderless stream-side-menu" style="flex-shrink: 0;">
{{#if (and @event.isSchedulePublished this.showSessions)}}
<a class="ui labeled fluid item {{if (eq @currentRoute 'public.sessions.index') 'video-active'}}" href={{href-to 'public.sessions' @event (query-params side_panel='true')}}>
<span><i class="calendar icon"></i>
{{t 'Schedule'}}</span>
</a>
{{/if}}
{{#if this.showSpeakers}}
<a class="ui labeled icon item {{if (eq @currentRoute 'public.speakers') 'video-active'}}" href={{href-to 'public.speakers' @event (query-params side_panel='true')}}>
<span><i class="bullhorn icon"></i>
{{t 'Speakers'}}</span>
</a>
{{/if}}
{{#if this.showExhibitors}}
<a class="ui labeled icon item {{if (eq @currentRoute 'public.exhibition.index') 'video-active'}}" href={{href-to 'public.exhibition' @event (query-params side_panel='true')}}>
<span><i class="image icon"></i>
{{t 'Exhibition'}}</span>
</a>
{{/if}}
{{#if (and @event.isChatEnabled this.settings.rocketChatUrl (or @currentRoom.isChatEnabled @currentRoom.isGlobalEventRoom))}}
<a href="#" class="ui labeled icon item" role="button" {{on "click" @showChatPanel}}>
<span><i class="comment icon"></i>
{{t 'Chat'}}</span>
</a>
{{/if}}
{{#if this.showVideoRoom}}
<div class="item">
<span><i class="video icon"></i>
{{t 'Video Rooms'}}</span>
</div>
{{/if}}
</div>
{{#if this.showVideoRoom}}
<div class="chat-video-room">
<div>
<div class="ui inverted vertical fluid menu borderless stream-side-menu">
{{#each this.streamList 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>
{{#if (gt stream.translations.length 1)}}
<div class="block-side-panel">
<div class="translation-dropdown-button translation-dropdown-container">
<UiDropdown class="btn btn-secondary dropdown-toggle"
@selected={{this.selectingLanguage.getName}}
@onChange={{ action "switchLanguage"}} as |execute mapper|
{{action 'switchRoom' stream}} >
<div class="{{if (and this.selectingLanguage.getName (eq @currentRoom.id stream.id)) 'translate-hidden'}} translation-dropdown-wrapper">
<div class="translation-dropdown-component">
<i class="language icon"></i>
</div>
<div class="translation-dropdown-component translation-length">
{{stream.translations.length}} {{t}}
</div>
<div class="translation-dropdown-component">
<i class="dropdown icon translation-dropdown-icon"> </i>
</div>
</div>
{{#if (and (eq @currentRoom.id stream.id) this.selectingLanguage.getName)}}
<div class="text">{{this.selectingLanguage.getName}}</div>
{{/if}}
<div class="ui translation menu custom-menu">
{{#each stream.translations as |channel|}}
<div class="item custom-item" data-value="{{map-value mapper channel}}">{{channel.name}}</div>
{{/each}}
</div>
</UiDropdown>
</div>
</div>
{{/if}}
</a>
{{/each}}
</div>
</div>
</div>
{{/if}}
{{#if this.loading}}
<div class="ui active centered inline loader"></div>
{{/if}}
</div>
{{/if}}