room.html 26 KB

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