room.html 29 KB

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