room.html 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409
  1. <template name="room">
  2. {{#if loaded}}
  3. <div class="landing">
  4. <div class="row">
  5. <div class="col-md-9" id="station-main">
  6. <nav>
  7. <div id="room-icons">
  8. <a class="back" href="/"><i class="fa fa-chevron-left"></i></a>
  9. {{#if isAdmin}}
  10. {{#if paused}}
  11. <i class="fa fa-play fa-1" id="play"></i>
  12. {{else}}
  13. <i class="fa fa-pause fa-1" id="pause"></i>
  14. {{/if}}
  15. <i class="fa fa-step-forward fa-1" id="skip"></i>
  16. <i class="fa fa-random fa-1" id="shuffle"></i>
  17. {{/if}}
  18. </div>
  19. <h3 id="room-header">
  20. {{{type}}}
  21. </h3>
  22. <div id="volume-container">
  23. <i class="fa fa-volume-down" id="volume-icon"></i>
  24. <input type="text" id="volume-slider" class="span2" value="" data-slider-min="0" data-slider-max="100" data-slider-step="1" data-slider-value="50" data-slider-orientation="horizontal" data-slider-selection="after" data-slider-tooltip="hide">
  25. </div>
  26. </nav>
  27. <div id="seeker-container">
  28. <div id="seeker-bar"></div>
  29. </div>
  30. <div class="row" id="song-media">
  31. <div class="col-md-8">
  32. <div class="embed-responsive embed-responsive-16by9" id="media-container">
  33. <!--div id="player" class="embed-responsive-item"></div-->
  34. </div>
  35. </div>
  36. <div id="song-info" class="col-md-4" style="margin-top:15px">
  37. <img class="song-img" onError="this.src='http://static.boredpanda.com/blog/wp-content/uploads/2014/04/amazing-fox-photos-182.jpg'" id="song-img"/>
  38. <h2 class="room-title">{{{title}}} <small id="time-display">(<span id="time-elapsed"></span> / <span id="time-total"></span>)</small></h2>
  39. <h2 class="room-artist">{{{artist}}}</h2>
  40. </div>
  41. </div>
  42. <!--<div class="row" id="settings">-->
  43. <!--<div class="col-md-4">-->
  44. <!--{{#if currentUser}}-->
  45. <!--<button type="button" id="song-modal" class="button action-button action-button-25" data-toggle="modal" data-target="#myModal">Add songs</button>-->
  46. <!--{{else}}-->
  47. <!--<button title="You need to be logged in to add songs." type="button" class="button btn btn-disabled action-button action-button-25" disabled>Add songs</button>-->
  48. <!--{{/if}}-->
  49. <!--</div>-->
  50. <!--<div class="col-md-4">-->
  51. <!--<button type="button" id="toggle-video" class="button action-button action-button-25">Hide video</button>-->
  52. <!--<div class="action-button action-button-25">-->
  53. <!--</div>-->
  54. <!--</div>-->
  55. <!---->
  56. <div class="row" id="settings">
  57. <div class="col-md-4">
  58. {{#if currentUser}}
  59. <button type="button" id="song-modal" class="button action-button" data-toggle="modal" data-target="#myModal">Add songs</button>
  60. {{else}}
  61. <button title="You need to be logged in to add songs." type="button" class="button btn btn-disabled action-button" disabled>Add songs</button>
  62. {{/if}}
  63. </div>
  64. <div class="col-md-4">
  65. <button type="button" id="toggle-video" class="button action-button">Hide video</button>
  66. <div class="action-button "></div>
  67. </div>
  68. </div>
  69. <div class="row" id="settings">
  70. {{#if currentUser}}
  71. <div class="col-md-2">
  72. <button title="Smile to this song." type="button" id="like" class="btn btn-success btn-lg {{liked}} action-button"><i class="fa fa-smile-o"> {{likes}}</i></button>
  73. </div>
  74. <div class="col-md-2">
  75. <button title="I dislike this song." type="button" id="dislike" class="btn btn-danger btn-lg {{disliked}} action-button"><i class="fa fa-meh-o"> {{dislikes}}</i></button>
  76. </div>
  77. {{else}}
  78. <div class="col-md-2">
  79. <button title="You need to be logged to smile this song." type="button" class="btn btn-success btn-lg action-button" disabled><i class="fa fa-smile-o"> {{likes}}</i></button>
  80. </div>
  81. <div class="col-md-2">
  82. <button title="You need to be logged to dislike this song." type="button" class="btn btn-danger btn-lg action-button" disabled><i class="fa fa-meh-o"> {{dislikes}}</i></button>
  83. </div>
  84. {{/if}}
  85. <div class="col-md-2">
  86. <button title="Report this song!" type="button" id="report-modal" class="btn btn-warning btn-lg report-button action-button" data-toggle="modal" data-target="#reportModal"><i class="fa fa-flag"></i></button>
  87. </div>
  88. </div>
  89. <!---->
  90. </div>
  91. <div class="col-md-3" id="side-panel">
  92. <ul class="nav nav-tabs nav-justified" data-tabs="tabs">
  93. <li role="presentation" class="active"><a data-toggle="tab" href="#playlist">Playlist</a></li>
  94. <li role="presentation"><a data-toggle="tab" href="#chat">Chat</a></li>
  95. </ul>
  96. <div id='content' class="tab-content sidebar-content">
  97. <div class="tab-pane active" id="playlist">
  98. {{> playlist}}
  99. </div>
  100. <div class="tab-pane" id="chat">
  101. <ul id="chat-ul">
  102. {{#each chat}}
  103. <li class="chat-message"><small class="chat-rank">[{{this.rank}}]</small> <a style="text-decoration: none" href="/u/{{this.username}}" target="_blank"><b class="bold">{{this.username}}</b></a>: {{this.message}}</li>
  104. <hr>
  105. {{/each}}
  106. </ul>
  107. <div id="chat-input-div">
  108. {{#if currentUser}}
  109. <input id="chat-input" placeholder="Type a message...">
  110. {{else}}
  111. <input id="chat-input" placeholder="Please register and login to chat." disabled>
  112. {{/if}}
  113. <div id="submit"><i id="submit-message" class="fa fa-paper-plane-o"></i>
  114. </div>
  115. </div>
  116. </div>
  117. </div>
  118. </div>
  119. </div>
  120. <!-- Modal -->
  121. <div id="myModal" class="modal fade" role="dialog">
  122. <div class="modal-dialog">
  123. <!-- Modal content-->
  124. <div class="modal-content">
  125. <div class="modal-header">
  126. <button type="button" class="close" data-dismiss="modal">&times;</button>
  127. <h4 class="modal-title">Search for a song</h4>
  128. </div>
  129. <div class="modal-body">
  130. <div id="search-info">
  131. <select name="type" id="search_type" class="song-input-select">
  132. <option name="youtube" id="search_youtube">YouTube</option>
  133. <option name="soundcloud" id="search_soundcloud">SoundCloud</option>
  134. </select>
  135. <input type="text" id="song-input" class="song-input">
  136. <button type="button" id="search-song" class="button">Search</button>
  137. <div id="song-results"></div>
  138. </div>
  139. <div id="add-info" style="display:none">
  140. <button type="button" id="return" class="button">Return</button>
  141. <label for="type" class="song-input-label">Song Type</label>
  142. <select name="type" id="type" class="song-input-select">
  143. <option name="youtube" id="youtube">YouTube</option>
  144. <option name="soundcloud" id="soundcloud">SoundCloud</option>
  145. </select>
  146. <label for="id" class="song-input-label">Song ID</label>
  147. <input class="song-input" name="id" id="id" type="text"/>
  148. <label for="id" class="song-input-label">Song Artist</label>
  149. <input class="song-input" name="artist" id="artist" type="text"/>
  150. <label for="title" class="song-input-label">Song Title</label>
  151. <input class="song-input" name="title" id="title" type="text"/>
  152. <label for="img" class="song-input-label">Song Img</label>
  153. <input class="song-input" name="img" id="img" type="text" />
  154. <button type="button" id="add-song-button" class="button">Add Song</button>
  155. </div>
  156. <!--small id="search-alert">Searching for a song fills out the above fields automatically, but you will still have to verify them.</small-->
  157. </div>
  158. <div class="modal-footer">
  159. <button id="close-modal-a" type="button" class="btn btn-default" data-dismiss="modal">Close</button>
  160. </div>
  161. </div>
  162. </div>
  163. </div>
  164. <!-- Report Modal -->
  165. <div id="reportModal" class="modal fade" role="dialog">
  166. <div class="modal-dialog">
  167. <!-- Modal content-->
  168. <div class="modal-content">
  169. <div class="modal-body">
  170. <button type="button" id="report-prev" class="btn btn-warning btn-lg btn-block">Report previous song ({{previousSongR.title}})</button>
  171. <button type="button" id="report-curr" class="btn btn-warning btn-lg btn-block" disabled>Report current song ({{currentSongR.title}})</button>
  172. <h3 class="text-primary"><b>Reporting:</b> {{reportingSong.title}} by {{reportingSong.artist}}</h3>
  173. <div class="report-layer-1">
  174. <div class="checkbox">
  175. <input class="checkbox-box" type="checkbox" id="report-song">
  176. <label for="report-song">
  177. Song
  178. </label>
  179. </div>
  180. <!-- Layer2 -->
  181. {{#if reportSong}}
  182. <div class="report-layer-2" id="report-song-list">
  183. <div class="checkbox">
  184. <input type="checkbox" id="report-song-not-playing">
  185. <label for="report-song-not-playing">
  186. Not playing
  187. </label>
  188. </div>
  189. <div class="checkbox">
  190. <input type="checkbox" id="report-song-does-not-exist">
  191. <label for="report-song-does-not-exist">
  192. Does not exist
  193. </label>
  194. </div>
  195. <div class="checkbox">
  196. <input type="checkbox" id="report-song-other">
  197. <label for="report-song-other">
  198. Other: <br>
  199. <textarea class="other-textarea" id="report-song-other-ta" type="text"></textarea>
  200. </label>
  201. </div>
  202. </div>
  203. {{/if}}
  204. <div class="checkbox">
  205. <input class="checkbox-box" type="checkbox" id="report-title">
  206. <label for="report-title">
  207. Title
  208. </label>
  209. </div>
  210. <!-- Layer2 -->
  211. {{#if reportTitle}}
  212. <div class="report-layer-2" id="report-title-list">
  213. <div class="checkbox">
  214. <input type="checkbox" id="report-title-incorrect">
  215. <label for="report-title-incorrect">
  216. Incorrect
  217. </label>
  218. </div>
  219. <div class="checkbox">
  220. <input type="checkbox" id="report-title-inappropriate">
  221. <label for="report-title-inappropriate">
  222. Inappropriate
  223. </label>
  224. </div>
  225. <div class="checkbox">
  226. <input type="checkbox" id="report-title-other">
  227. <label for="report-title-other">
  228. Other: <br>
  229. <textarea class="other-textarea" id="report-title-other-ta" type="text"></textarea>
  230. </label>
  231. </div>
  232. </div>
  233. {{/if}}
  234. <div class="checkbox">
  235. <input class="checkbox-box" type="checkbox" id="report-author">
  236. <label for="report-author">
  237. Author
  238. </label>
  239. </div>
  240. <!-- Layer2 -->
  241. {{#if reportAuthor}}
  242. <div class="report-layer-2" id="report-author-list">
  243. <div class="checkbox">
  244. <input type="checkbox" id="report-author-incorrect">
  245. <label for="report-author-incorrect">
  246. Incorrect
  247. </label>
  248. </div>
  249. <div class="checkbox">
  250. <input type="checkbox" id="report-author-inappropriate">
  251. <label for="report-author-inappropriate">
  252. Inappropriate
  253. </label>
  254. </div>
  255. <div class="checkbox">
  256. <input type="checkbox" id="report-author-other">
  257. <label for="report-author-other">
  258. Other: <br>
  259. <textarea class="other-textarea" id="report-author-other-ta" type="text"></textarea>
  260. </label>
  261. </div>
  262. </div>
  263. {{/if}}
  264. <div class="checkbox">
  265. <input class="checkbox-box" type="checkbox" id="report-duration">
  266. <label for="report-duration">
  267. Duration
  268. </label>
  269. </div>
  270. <!-- Layer2 -->
  271. {{#if reportDuration}}
  272. <div class="report-layer-2" id="report-duration-list">
  273. <div class="checkbox">
  274. <input type="checkbox" id="report-duration-long">
  275. <label for="report-duration-long">
  276. Too long
  277. </label>
  278. </div>
  279. <div class="checkbox">
  280. <input type="checkbox" id="report-duration-short">
  281. <label for="report-duration-short">
  282. Too short
  283. </label>
  284. </div>
  285. <div class="checkbox">
  286. <input type="checkbox" id="report-duration-other">
  287. <label for="report-duration-other">
  288. Other: <br>
  289. <textarea class="other-textarea" id="report-duration-other-ta" type="text"></textarea>
  290. </label>
  291. </div>
  292. </div>
  293. {{/if}}
  294. <div class="checkbox">
  295. <input class="checkbox-box" type="checkbox" id="report-audio">
  296. <label for="report-audio">
  297. Audio
  298. </label>
  299. </div>
  300. <!-- Layer2 -->
  301. {{#if reportAudio}}
  302. <div class="report-layer-2" id="report-audio-list">
  303. <div class="checkbox">
  304. <input type="checkbox" id="report-audio-inappropriate">
  305. <label for="report-audio-inappropriate">
  306. Inappropriate
  307. </label>
  308. </div>
  309. <div class="checkbox">
  310. <input type="checkbox" id="report-audio-not-playing">
  311. <label for="report-audio-not-playing">
  312. Not playing
  313. </label>
  314. </div>
  315. <div class="checkbox">
  316. <input type="checkbox" id="report-audio-other">
  317. <label for="report-audio-other">
  318. Other: <br>
  319. <textarea class="other-textarea" id="report-audio-other-ta" type="text"></textarea>
  320. </label>
  321. </div>
  322. </div>
  323. {{/if}}
  324. <div class="checkbox">
  325. <input class="checkbox-box" type="checkbox" id="report-albumart">
  326. <label for="report-albumart">
  327. Albumart
  328. </label>
  329. </div>
  330. <!-- Layer2 -->
  331. {{#if reportAlbumart}}
  332. <div class="report-layer-2" id="report-albumart-list">
  333. <div class="checkbox">
  334. <input type="checkbox" id="report-albumart-incorrect">
  335. <label for="report-albumart-incorrect">
  336. Incorrect
  337. </label>
  338. </div>
  339. <div class="checkbox">
  340. <input type="checkbox" id="report-albumart-inappropriate">
  341. <label for="report-albumart-inappropriate">
  342. Inappropriate
  343. </label>
  344. </div>
  345. <div class="checkbox">
  346. <input type="checkbox" id="report-albumart-not-showing">
  347. <label for="report-albumart-not-showing">
  348. Not showing
  349. </label>
  350. </div>
  351. <div class="checkbox">
  352. <input type="checkbox" id="report-albumart-other">
  353. <label for="report-albumart-other">
  354. Other: <br>
  355. <textarea class="other-textarea" id="report-albumart-other-ta" type="text"></textarea>
  356. </label>
  357. </div>
  358. </div>
  359. {{/if}}
  360. <div class="checkbox">
  361. <input class="checkbox-box" type="checkbox" id="report-other">
  362. <label for="report-other">
  363. Other: <br>
  364. <textarea class="other-textarea" id="report-other-ta" type="text"></textarea>
  365. </label>
  366. </div>
  367. </div>
  368. <button type="button" id="report-song-button" class="button">Submit</button>
  369. </div>
  370. <div class="modal-footer">
  371. <button id="close-modal-r" type="button" class="btn btn-default" data-dismiss="modal">Close</button>
  372. </div>
  373. </div>
  374. </div>
  375. </div>
  376. <ul class="bg-bubbles">
  377. <li></li>
  378. <li></li>
  379. <li></li>
  380. <li></li>
  381. <li></li>
  382. <li></li>
  383. <li></li>
  384. <li></li>
  385. <li></li>
  386. <li></li>
  387. </ul>
  388. </div>
  389. {{else}}
  390. {{> loading}}
  391. {{/if}}
  392. <script type="text/javascript">
  393. window.doorbellOptions = {
  394. appKey: 'v2Gu14c8s9HgBsAFCXNWIm2vlk11N12Plt2Wu5k2MbQIkM1Ao6kOTCbfN95ElEVM',
  395. hideEmail: true
  396. };
  397. (function(d, t) {
  398. var g = d.createElement(t);g.id = 'doorbellScript';g.type = 'text/javascript';g.async = true;g.src = 'https://embed.doorbell.io/button/2408?t='+(new Date().getTime());(d.getElementsByTagName('head')[0]||d.getElementsByTagName('body')[0]).appendChild(g);
  399. }(document, 'script'));
  400. </script>
  401. </template>