room.html 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525
  1. <template name="room">
  2. <header>
  3. <nav>
  4. <div class="nav-wrapper teal accent-4">
  5. <ul class="left hide-on-med-and-down">
  6. <li><a href="/"><i class="material-icons">home</i></a></li>
  7. <li><a href="#add_song_modal" class="tooltipped" data-position="bottom" data-delay="50" data-tooltip="Request a song" id="add-song-modal-button"><i class="material-icons">playlist_add</i></a></li>
  8. <li><a href="#report_modal" class="tooltipped" data-position="bottom" data-delay="50" data-tooltip="Flag a song" id="report-modal-button"><i class="material-icons">flag</i></a></li>
  9. <li><a id="vote-skip" class="tooltipped" data-position="bottom" data-delay="50" data-tooltip="Vote to skip this song"><i class="material-icons left">skip_next</i>{{votes}}</a></li>
  10. <li><a id="like" class="tooltipped" data-position="bottom" data-delay="50" data-tooltip="Like this song"><i class="material-icons left" style="font-size: 1.5em">thumb_up</i>{{likes}}</a></li>
  11. <li><a id="dislike" class="tooltipped" data-position="bottom" data-delay="50" data-tooltip="Dislike this song"><i class="material-icons left" style="font-size: 1.5em">thumb_down</i>{{dislikes}}</a></li>
  12. {{#if isAdmin}}
  13. <li><a class='dropdown-button' data-activates='admin-dropdown'><i class="material-icons">control_point</i></a></li>
  14. {{/if}}
  15. </ul>
  16. <span class="brand-logo center">{{type}}</span>
  17. <ul class="right hide-on-med-and-down">
  18. <li><a href="#" data-position="bottom" data-delay="50" data-tooltip="Playlist" id="playlist-slideout" data-activates="playlist-slide-out" class="tooltipped header-collapse"><i class="material-icons">queue_music</i></a></li>
  19. <li><a href="#" data-position="bottom" data-delay="50" data-tooltip="Chat" id="chat-slideout" data-activates="chat-slide-out" class="tooltipped header-collapse"><i class="material-icons">chat</i></a></li>
  20. <li><a href="#" data-position="bottom" data-delay="50" data-tooltip="Users" id="users-slideout" data-activates="users-slide-out" class="tooltipped header-collapse"><i class="material-icons">people</i></a></li>
  21. </ul>
  22. </div>
  23. </nav>
  24. </header>
  25. {{> alerts}}
  26. <main id="room-content">
  27. <div class="container room-container">
  28. <div class="row">
  29. <div class="col s12 m10 l8 offset-l2 offset-m1" id="media-container">
  30. <div class="video-container">
  31. <div id="player"></div>
  32. </div>
  33. </div>
  34. <div class="col s12 m10 l8 offset-l2 offset-m1">
  35. <div class="row">
  36. <div class="col s12 m12 l8">
  37. <h4 id="time-display"><span id="time-elapsed"></span> / <span id="time-total"></span></h4>
  38. <h3>{{{title}}}</h3>
  39. <h4 class="thin" style="margin-left: 0">{{{artist}}}</h4>
  40. <div class="row">
  41. <form action="#" class="left col s4 m4 l4">
  42. <p class="range-field" style="margin-top: 0">
  43. <input type="range" id="volume_slider" min="0" max="100"/>
  44. </p>
  45. </form>
  46. <div class="right col s4 m4 l2">
  47. <ul>
  48. <li id="like" class="left"><i id="thumbs_up"
  49. class="material-icons {{liked}}">thumb_up</i>
  50. </li>
  51. <li id="dislike" class="right"><i id="thumbs_down"
  52. class="material-icons {{disliked}}">thumb_down</i>
  53. </li>
  54. </ul>
  55. </div>
  56. </div>
  57. <div class="seeker-bar-container white" id="preview-progress">
  58. <div class="seeker-bar teal" style="width: 0%"></div>
  59. </div>
  60. </div>
  61. <img alt="Not loading" class="responsive-img song-img col s12 m12 l4"
  62. onError="this.src='http://static.boredpanda.com/blog/wp-content/uploads/2014/04/amazing-fox-photos-182.jpg'"
  63. id="song-img" style="margin-top: 10px !important"/>
  64. </div>
  65. </div>
  66. </div>
  67. </div>
  68. </main>
  69. <!--Chat slideout-->
  70. <div id="chat-slide-out" class="side-nav room-slideout">
  71. <h5>Chat</h5>
  72. <ul class="chat-ul">
  73. {{#each globalChat}}
  74. {{#emojione}}
  75. <li class="chat-message" style="line-height: 30px">
  76. <span title="{{time}}" style="float: right; margin-top: 15px">{{rtime time}}</span>
  77. <small class="rank-{{this.rawrank}}" style="margin-top: 15px">{{this.rank}}</small>
  78. <a style="text-decoration: none; font-size: 0.9em; height: 0.9em; font-weight: 500" href="/u/{{this.username}}" target="_blank">{{this.username}}</a>
  79. <p style="clear: both; line-height: 1.2em; margin-left: 13px; margin-bottom: 0; font-size: 1.2em">{{this.message}}</p>
  80. </li>
  81. {{/emojione}}
  82. {{/each}}
  83. </ul>
  84. <div>
  85. <div class="row">
  86. <div class="input-field col s12">
  87. <input id="chat-message" type="text">
  88. <label for="chat-message">Send a message</label>
  89. </div>
  90. </div>
  91. <a id="submit" class="waves-effect waves-light btn">Send</a>
  92. </div>
  93. </div>
  94. <!--Playlist slideout-->
  95. <div id="playlist-slide-out" class="side-nav room-slideout">
  96. <h5>Playlist</h5>
  97. {{> playlist}}
  98. </div>
  99. <div id="users-slide-out" class="side-nav room-slideout">
  100. <h5>Users In Room</h5>
  101. <ul>
  102. {{#each usersInRoom}}
  103. <li><a href=/u/{{this}} target="_blank">{{this}}</a></li>
  104. {{/each}}
  105. </ul>
  106. </div>
  107. <!--Admin room controls-->
  108. <ul id='admin-dropdown' style="background-color: #00bfa5 !important; display: none">
  109. <li><a id="pause"><i class="material-icons">pause</i></a></li>
  110. <li><a id="skip"><i class="material-icons">skip_next</i></a></li>
  111. <li><a id="shuffle"><i class="material-icons">shuffle</i></a></li>
  112. <li><a id="lock"><i class="material-icons">lock_outline</i></a></li>
  113. </ul>
  114. <!--Add song modal-->
  115. <div id="add_song_modal" class="modal">
  116. <div class="modal-content container">
  117. <div class="row">
  118. <form class="black-text" id="search-info">
  119. <div class="row">
  120. <div class="input-field">
  121. <select id="si_or_pl">
  122. <option value="singleVideo" selected>Single Song</option>
  123. <option value="importPlaylist">Import Playlist</option>
  124. <label>Import Type</label>
  125. </select>
  126. </div>
  127. </div>
  128. {{#if singleVideo}}
  129. {{#if editingSong}}
  130. <div class="row">
  131. <button type="button" id="return-button" style="margin-bottom: 20px;"
  132. class="btn btn-small col l4 m4 s8 offset-l4 offset-m4 offset-s2 center waves-effect waves-light">
  133. Return
  134. </button>
  135. <h4 class="center-align col l12 m12 s12">Add Song</h4>
  136. <div class="input-field col l8 m8 s12 offset-l2 offset-m2">
  137. <select multiple id="genres">
  138. <option value="" disabled selected>Select Genre(s):</option>
  139. <option value="edm">EDM</option>
  140. <option value="chill">Chill</option>
  141. <option value="pop">Pop</option>
  142. <option value="country">Country</option>
  143. <option value="rock">Rock</option>
  144. <option value="randb">R&B</option>
  145. <option value="rap">Rap</option>
  146. <option value="heavymetal">Heavy Metal</option>
  147. <option value="christmas">Christmas</option>
  148. <option value="alternative">Alternative</option>
  149. </select>
  150. <label class="white-text">Genre(s)</label>
  151. </div>
  152. <div class="input-field col l8 m8 s12 offset-l2 offset-m2">
  153. <i class="material-icons prefix">vpn_key</i>
  154. <label for="id" class="teal-text">Song ID</label>
  155. <input class="validate" name="id" id="id" type="text" pattern=".{11}"/>
  156. </div>
  157. <div class="input-field col l8 m8 s12 offset-l2 offset-m2">
  158. <i class="material-icons prefix">person</i>
  159. <label for="artist" class="teal-text">Song Artist</label>
  160. <input class="validate" name="artist" id="artist" aria-required="true"
  161. type="text"/>
  162. </div>
  163. <div class="input-field col l8 m8 s12 offset-l2 offset-m2">
  164. <i class="material-icons prefix">subject</i>
  165. <label for="title" class="teal-text">Song Title</label>
  166. <input class="validate required" name="title" id="title" type="text"/>
  167. </div>
  168. <button type="button" id="add-song-button"
  169. class="btn btn-large col l6 m6 s10 offset-l3 offset-m3 offset-s1 waves-effect waves-light">
  170. Add Song
  171. </button>
  172. </div>
  173. <script>
  174. $('#genres').material_select();
  175. </script>
  176. {{else}}
  177. <div class="row" id="single-video">
  178. <div class="input-field">
  179. <input id="song-input" type="text" class="validate">
  180. <label for="search_for_song">Search for song</label>
  181. </div>
  182. <a class="waves-effect waves-light btn" id="search-song"><i
  183. class="material-icons left">search</i>Search</a>
  184. {{#if singleVideoResultsActive}}
  185. <div id="single-video-results">
  186. <div style="overflow: auto; height: 30vh; margin-top: 1rem;">
  187. <ul class="collection teal-text">
  188. {{#each result in singleVideoResults}}
  189. <li class="collection-item avatar youtube-search-result-li">
  190. <img src="{{result.image}}"
  191. onerror="this.src='http://static.boredpanda.com/blog/wp-content/uploads/2014/04/amazing-fox-photos-182.jpg'"
  192. alt="" class="video-import-thumbnail">
  193. <span class="title video-import-text">{{result.title}}</span>
  194. <p class="video-import-text">{{result.artist}} <br>
  195. <a href="https://youtube.com/watch?v={{result.id}}"
  196. target="_blank">View Video In YouTube</a>
  197. </p>
  198. <a href="#" class="secondary-content" id="addSong"
  199. data-result="{{result.id}}"><i class="material-icons"
  200. data-result="{{result.id}}">add</i></a>
  201. </li>
  202. {{/each}}
  203. </ul>
  204. </div>
  205. </div>
  206. {{/if}}
  207. </div>
  208. {{/if}}
  209. {{else}}
  210. <div class="row" id="import-playlist">
  211. <div class="input-field">
  212. <input id="playlist-url" type="text" class="validate">
  213. <label for="search_for_song">Playlist URL</label>
  214. </div>
  215. <div class="progress">
  216. <div class="determinate" id="import-progress" style="width: 0%"></div>
  217. </div>
  218. <a class="waves-effect waves-light btn" id="import-playlist-button">Import
  219. Playlist</a>
  220. {{#if playlistImportVideosActive}}
  221. <a class="waves-effect waves-light btn" id="confirm-import">Confirm selection
  222. and add songs to queue</a>
  223. <div class="input-field col l12 m12 s12">
  224. <select multiple id="genres_pl">
  225. <option value="" disabled selected>Select Genre(s):</option>
  226. <option value="edm">EDM</option>
  227. <option value="chill">Chill</option>
  228. <option value="pop">Pop</option>
  229. <option value="country">Country</option>
  230. <option value="rock">Rock</option>
  231. <option value="randb">R&B</option>
  232. <option value="rap">Rap</option>
  233. <option value="heavymetal">Heavy Metal</option>
  234. <option value="christmas">Christmas</option>
  235. <option value="alternative">Alternative</option>
  236. </select>
  237. <label class="white-text">Genre(s)</label>
  238. </div>
  239. <script>
  240. $('#genres_pl').material_select();
  241. </script>
  242. <div id="import-playlist-results">
  243. <ul class="collection teal-text">
  244. {{#each result in importPlaylistVideos}}
  245. <li class="collection-item avatar youtube-search-result-li">
  246. <img src="{{result.image}}"
  247. onerror="this.src='http://static.boredpanda.com/blog/wp-content/uploads/2014/04/amazing-fox-photos-182.jpg'"
  248. alt="" class="video-import-thumbnail">
  249. <span class="title video-import-text">{{result.title}}</span>
  250. <p class="video-import-text">{{result.artist}} <br>
  251. <a href="https://youtube.com/watch?v={{result.id}}"
  252. target="_blank">View Video In YouTube</a>
  253. </p>
  254. <a href="#" class="secondary-content" id="removeSong"
  255. data-result="{{result.id}}"><i class="material-icons"
  256. data-result="{{result.id}}">remove</i></a>
  257. </li>
  258. {{/each}}
  259. </ul>
  260. </div>
  261. {{/if}}
  262. </div>
  263. {{/if}}
  264. </form>
  265. <div id="song-results"></div>
  266. </div>
  267. <div class="row">
  268. <form class="black-text hide" id="add-info">
  269. <div class="row">
  270. <div class="input-field">
  271. <input id="song-id" type="text" class="validate">
  272. <label for="song-id">Song ID</label>
  273. </div>
  274. </div>
  275. <div class="row">
  276. <a class="waves-effect waves-light btn" id="add-song-button"><i
  277. class="material-icons left">playlist_add</i>Request Song</a>
  278. </div>
  279. </form>
  280. </div>
  281. </div>
  282. <div class="divider"></div>
  283. <div class="modal-footer">
  284. <a href="#" class="modal-action modal-close waves-effect btn">Close</a>
  285. </div>
  286. </div>
  287. <!--Report modal-->
  288. <div id="report_modal" class="modal">
  289. <div class="modal-content container">
  290. <h4>Reporting:</h4>
  291. <h5>{{currentSong.title}} <span class="thin">by</span> {{currentSong.artist}}</h5>
  292. <div class="report-layer-1">
  293. <div>
  294. <input type="checkbox" id="report-song">
  295. <label for="report-song">
  296. Song
  297. </label>
  298. </div>
  299. <!-- Layer2 -->
  300. {{#if reportSong}}
  301. <div class="report-layer-2" id="report-song-list">
  302. <p>
  303. <input type="checkbox" id="report-song-not-playing">
  304. <label for="report-song-not-playing">
  305. Not playing
  306. </label>
  307. </p>
  308. <p>
  309. <input type="checkbox" id="report-song-does-not-exist">
  310. <label for="report-song-does-not-exist">
  311. Does not exist
  312. </label>
  313. </p>
  314. <p>
  315. <input type="checkbox" id="report-song-other">
  316. <label for="report-song-other">
  317. Other:
  318. </label>
  319. {{#if reportSongOther}}
  320. <div class="input-field">
  321. <textarea class="materialize-textarea" id="report-song-other-ta" type="text"></textarea>
  322. <label for="report-song-other-ta">What is the issue?</label>
  323. </div>
  324. {{/if}}
  325. </p>
  326. </div>
  327. {{/if}}
  328. <div class="checkbox">
  329. <input type="checkbox" id="report-title">
  330. <label for="report-title">
  331. Title
  332. </label>
  333. </div>
  334. <!-- Layer2 -->
  335. {{#if reportTitle}}
  336. <div class="report-layer-2" id="report-title-list">
  337. <p>
  338. <input type="checkbox" id="report-title-incorrect">
  339. <label for="report-title-incorrect">
  340. Incorrect
  341. </label>
  342. </p>
  343. <p>
  344. <input type="checkbox" id="report-title-inappropriate">
  345. <label for="report-title-inappropriate">
  346. Inappropriate
  347. </label>
  348. </p>
  349. <p>
  350. <input type="checkbox" id="report-title-other">
  351. <label for="report-title-other">
  352. Other:
  353. </label>
  354. {{#if reportTitleOther}}
  355. <div class="input-field">
  356. <textarea class="materialize-textarea" id="report-title-other-ta" type="text"></textarea>
  357. <label for="report-title-other-ta">What is the issue?</label>
  358. </div>
  359. {{/if}}
  360. </p>
  361. </div>
  362. {{/if}}
  363. <div>
  364. <input type="checkbox" id="report-artist">
  365. <label for="report-artist">
  366. Artist
  367. </label>
  368. </div>
  369. <!-- Layer2 -->
  370. {{#if reportArtist}}
  371. <div class="report-layer-2" id="report-artist-list">
  372. <p>
  373. <input type="checkbox" id="report-artist-incorrect">
  374. <label for="report-artist-incorrect">
  375. Incorrect
  376. </label>
  377. </p>
  378. <p>
  379. <input type="checkbox" id="report-artist-inappropriate">
  380. <label for="report-artist-inappropriate">
  381. Inappropriate
  382. </label>
  383. </p>
  384. <p>
  385. <input type="checkbox" id="report-artist-other">
  386. <label for="report-artist-other">
  387. Other:
  388. </label>
  389. {{#if reportArtistOther}}
  390. <div class="input-field">
  391. <textarea class="materialize-textarea" id="report-artist-other-ta" type="text"></textarea>
  392. <label for="report-artist-other-ta">What is the issue?</label>
  393. </div>
  394. {{/if}}
  395. </p>
  396. </div>
  397. {{/if}}
  398. <div class="checkbox">
  399. <input type="checkbox" id="report-duration">
  400. <label for="report-duration">
  401. Duration
  402. </label>
  403. </div>
  404. <!-- Layer2 -->
  405. {{#if reportDuration}}
  406. <div class="report-layer-2" id="report-duration-list">
  407. <div class="checkbox">
  408. <input type="checkbox" id="report-duration-long">
  409. <label for="report-duration-long">
  410. Too long
  411. </label>
  412. </div>
  413. <div class="checkbox">
  414. <input type="checkbox" id="report-duration-short">
  415. <label for="report-duration-short">
  416. Too short
  417. </label>
  418. </div>
  419. <div class="checkbox">
  420. <input type="checkbox" id="report-duration-other">
  421. <label for="report-duration-other">
  422. Other: <br>
  423. </label>
  424. {{#if reportDurationOther}}
  425. <div class="input-field">
  426. <textarea class="materialize-textarea" id="report-duration-other-ta" type="text"></textarea>
  427. <label for="report-duration-other-ta">What is the issue?</label>
  428. </div>
  429. {{/if}}
  430. </div>
  431. </div>
  432. {{/if}}
  433. <div class="checkbox">
  434. <input type="checkbox" id="report-albumart">
  435. <label for="report-albumart">
  436. Albumart
  437. </label>
  438. </div>
  439. <!-- Layer2 -->
  440. {{#if reportAlbumart}}
  441. <div class="report-layer-2" id="report-albumart-list">
  442. <div class="checkbox">
  443. <input type="checkbox" id="report-albumart-incorrect">
  444. <label for="report-albumart-incorrect">
  445. Incorrect
  446. </label>
  447. </div>
  448. <div class="checkbox">
  449. <input type="checkbox" id="report-albumart-inappropriate">
  450. <label for="report-albumart-inappropriate">
  451. Inappropriate
  452. </label>
  453. </div>
  454. <div class="checkbox">
  455. <input type="checkbox" id="report-albumart-not-showing">
  456. <label for="report-albumart-not-showing">
  457. Not showing
  458. </label>
  459. </div>
  460. <div class="checkbox">
  461. <input type="checkbox" id="report-albumart-other">
  462. <label for="report-albumart-other">
  463. Other:
  464. </label>
  465. {{#if reportAlbumartOther}}
  466. <div class="input-field">
  467. <textarea class="materialize-textarea" id="report-albumart-other-ta" type="text"></textarea>
  468. <label for="report-albumart-other-ta">What is the issue?</label>
  469. </div>
  470. {{/if}}
  471. </div>
  472. </div>
  473. {{/if}}
  474. <div class="checkbox">
  475. <input type="checkbox" id="report-other">
  476. <label for="report-other">
  477. Other: <br>
  478. </label>
  479. {{#if reportOther}}
  480. <div class="input-field">
  481. <textarea class="materialize-textarea" id="report-other-ta" type="text"></textarea>
  482. <label for="report-other-ta">What is the issue?</label>
  483. </div>
  484. {{/if}}
  485. </div>
  486. </div>
  487. <a id="report-song-button" class="waves-effect waves-light btn">Report Song</a>
  488. </div>
  489. <div class="divider"></div>
  490. <div class="modal-footer">
  491. <a class="modal-action modal-close waves-effect btn">Close</a>
  492. </div>
  493. </div>
  494. <script>
  495. $("#add-song-modal-button").leanModal({
  496. dismissible: true,
  497. opacity: .5,
  498. in_duration: 500,
  499. out_duration: 200
  500. });
  501. $("#report-modal-button").leanModal({
  502. dismissible: true,
  503. opacity: .5,
  504. in_duration: 500,
  505. out_duration: 200
  506. });
  507. $(".dropdown-button").dropdown({
  508. belowOrigin: true
  509. });
  510. $('select').material_select();
  511. $("#chat-slideout").sideNav({
  512. menuWidth: 350,
  513. edge: 'right'
  514. });
  515. $("#playlist-slideout").sideNav({
  516. menuWidth: 350,
  517. edge: 'right'
  518. });
  519. $("#users-slideout").sideNav({
  520. menuWidth: 350,
  521. edge: 'right'
  522. });
  523. $('.tooltipped').tooltip({delay: 50});
  524. </script>
  525. </template>