You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

118 lines
5.2 KiB

3 years ago
2 years ago
3 years ago
  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  6. <link href="https://fonts.yecdn.com/css2?family=Noto+Serif+SC:wght@300;700&display=swap" rel="stylesheet">
  7. <link href="https://fonts.yecdn.com/css2?family=Noto+Sans+SC&display=swap" rel="stylesheet">
  8. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
  9. <link rel="stylesheet" href="./static/index.css">
  10. <title>闭播</title>
  11. </head>
  12. <body>
  13. <div class="container" style="overflow: hidden;min-height: 100vh">
  14. <div style='padding:15px;margin-bottom:50px'>
  15. <h1>Simple is Better Than Complex</h1>
  16. </div>
  17. <div class="part1">
  18. <div id="new" class="new front">
  19. <div class="qbox">
  20. <h2 style="margin: -12px -7px 20px">房间列表</h2>
  21. <ul>
  22. {% for cid, title, is_private, user, token, user_cnt in ch_list %}
  23. <li class="mb-2">
  24. <b class="mr-3">{{title}}</b>
  25. <span class="u-cnt">{{user_cnt}}人在线</span>
  26. {% if is_private and not _cid %}
  27. 【非公开】
  28. {% else %}
  29. 第一发言者: <a href="{{user.url}}" target="_blank"><img class="rounded-circle" src="{{user.avat}}" width="20"></a>
  30. <form class="join-form" id="form-{{cid}}">
  31. <input type="hidden" name="channel" value="{{cid}}">
  32. <input type="hidden" name="token" value="{{token}}">
  33. <button type="submit" class="btn btn-link mb-2 join-btn">加入</button>
  34. <button type="button" class="btn btn-link mb-2 leave-btn">离开</button>
  35. </form>
  36. {% endif %}
  37. {% if user.id == me.id and not _cid %}
  38. <a href="?cid={{cid}}"><small>分享链接</small></a>
  39. {% endif %}
  40. </li>
  41. {% endfor %}
  42. </ul>
  43. {% if _cid %}
  44. <p><small>分享目前的网址给其他人,他们就可以加入房间了。<br>注意,这是加入非公开房间的唯一方式。<br><a href="?cid=">返回完整列表</a></small></p>
  45. {% endif %}
  46. <hr>
  47. <hr>
  48. <hr>
  49. <form class="form-inline" action="new" method='POST'>
  50. <input type="text" class="form-control mb-3 mr-sm-2" name="title" placeholder="房间名" maxlength="50" required>
  51. <div class="input-group mb-3 mr-sm-2">
  52. <input type="text" class="form-control" name="cid" placeholder="房间id,留空自动生成" pattern="[a-zA-Z0-9_\.\-]{0,63}">
  53. </div>
  54. <div class="form-check mr-sm-2">
  55. <input class="form-check-input" type="checkbox" name="private">
  56. <label class="form-check-label" for="inlineFormCheck">非公开</label>
  57. </div>
  58. <button type="submit" class="btn btn-link mb-2 btn-lg">新建!</button>
  59. </form>
  60. </div>
  61. </div>
  62. </div>
  63. <div class="part2" id="part2">
  64. <h2>圆桌会议成员</h2>
  65. <div class="qbox" id="local-player">
  66. <p>我 (
  67. <a href="{{me.url}}" target="_blank">
  68. <img class="rounded-circle" src="{{me.avat}}" width="20">
  69. </a>
  70. {{me.disp}} @{{me.acct}}
  71. )
  72. <a href="logout" class="logout-link">退出重新登录</a>
  73. </p>
  74. <div id="local-volume">
  75. <label>发言音量:</label>
  76. 0%
  77. <input type="range" id="local-volume-range" min="0" max="30" step="0.1" value="10" list="Z">
  78. <datalist id="Z">
  79. <option>10</option>
  80. <option>0</option>
  81. <option>30</option>
  82. </datalist>
  83. 300%
  84. </div>
  85. <progress value="0" max="1"></progress>
  86. <form class="form-inline mt-3 send-message" action="">
  87. <input type="text" class="form-control mb-1 mr-sm-2" name="text" placeholder="发送文字" required="">
  88. <button type="submit" class="btn btn-link mb-2">发送</button>
  89. </form>
  90. </div>
  91. <div id="remote-playerlist">
  92. </div>
  93. <h5>文字区</h5>
  94. <div class="qbox" id="chat-box">
  95. </div>
  96. </div>
  97. </div>
  98. <div class="footer">
  99. <p> 🄯 2021 Copyleft: closed.social</p>
  100. </div>
  101. <script type="text/javascript">
  102. window._APPID = "{{app_id}}";
  103. window._RTM_TOKEN = "{{rtm_token}}";
  104. window._MY_NAME = "{{me.acct}}";
  105. window._UID = {{me.id}};
  106. </script>
  107. <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
  108. <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ho+j7jyWK8fNQe+A12Hb8AhRq26LrZ/JpcUGGOn+Y7RsweNrtN/tE3MoK7ZeZDyx" crossorigin="anonymous"></script>
  109. <script src="https://download.agora.io/sdk/release/AgoraRTC_N-4.4.0.js"></script>
  110. <script src="https://cdn.jsdelivr.net/npm/agora-rtm-sdk@1.4.3/index.js"></script>
  111. <script src="./static/index.js"></script>
  112. </body>
  113. </html>