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.

630 lines
43 KiB

8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
5 years ago
5 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
8 years ago
  1. <!DOCTYPE html>
  2. <html ng-app="weechat">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=Edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
  7. <meta name="apple-mobile-web-app-capable" content="yes">
  8. <meta name="mobile-web-app-capable" content="yes">
  9. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  10. <meta name="apple-mobile-web-app-title" content="Glowing Bear">
  11. <meta name="theme-color" content="#181818">
  12. <meta http-equiv="x-dns-prefetch-control" content="off">
  13. <!-- && -->
  14. <link rel="manifest" href="webapp.manifest.json">
  15. <title ng-bind-template="{{ notificationStatus }}Glowing Bear {{ pageTitle}}"></title>
  16. <link rel="stylesheet" href="" integrity="sha512-Dop/vW3iOtayerlYAqCgkVr2aTr2ErwwTYOvRFUpzl2VhCMJyjQF0Q9TjUXIo6JhuM/3i0vVEt2e/7QQmnHQqw==" crossorigin="anonymous" />
  17. <link rel="shortcut icon" sizes="128x128" href="assets/img/glowing_bear_128x128.png">
  18. <link rel="apple-touch-icon" sizes="128x128" href="assets/img/glowing_bear_128x128.png">
  19. <link rel="shortcut icon" type="image/png" href="assets/img/favicon.png" >
  20. <link href="css/glowingbear.css" rel="stylesheet" media="screen">
  21. <link href="css/themes/dark.css" rel="stylesheet" media="screen" id="themeCSS" />
  22. <!-- <script src="" integrity="sha512-HKvDCFVKg8ZPGjecy6on7UECEpE76Y86h3GaE4JMCz+deFWdjcW/tWnh0hCfaBvURvlOa9f5CNVzt7EFkulYbw==" crossorigin="anonymous"></script> -->
  23. <script src="" integrity="sha256-9cBkVeU53NiJ9/BdcJta3HbERAmf5X9DE2WvL8V+gDs=" crossorigin="anonymous"></script>
  24. <script src="" integrity="sha512-kxj7VjlzsQgiku2vbRcZI0FJ0dXmPsiRLugiRxJrCROusKHaFfX/hGDD1/L/R0Y+xI8zlA2B5nm6USapz7nQbg==" crossorigin="anonymous"></script>
  25. <script src="" integrity="sha512-CMBjJdVIcw7zafkE+uedZCnw6r4ABU1Fev5xA7db0D097/NzhO6Ajo2kdZFOQ+y0kg9sE/t44bPAwuuNhUVIcQ==" crossorigin="anonymous"></script>
  26. </head>
  27. <body ng-controller="WeechatCtrl" ng-keydown="handleKeyPress($event)" ng-keyup="handleKeyRelease($event)" ng-keypress="handleKeyPress($event)" ng-class="{'no-overflow': connected}" ng-init="init()" lang="en-US">
  29. <div class="alert alert-danger upload-error" ng-show="uploadError" ng-cloak>
  30. <p><strong>Upload error:</strong> Image upload failed.</p>
  31. </div>
  32. <div ng-hide="connected" class="container">
  33. <h2>
  34. <img alt="logo" src="assets/img/glowing-bear.svg">
  35. <span>Glowing Bear</span>
  36. <small>WeeChat web frontend</small>
  37. </h2>
  38. <div class="alert alert-warning" ng-show="show_tls_warning" ng-cloak><strong>You're using Glowing Bear over an unencrypted connection (http://). This is not recommended!</strong> We recommend using our secure hosted version at <a href=""></a>, or <a href=""></a> for the latest development version. If your relay is on your local network, that is unfortunately impossible, but be aware of the implications.</div>
  39. <div class="alert alert-danger" ng-show="errorMessage" ng-cloak>
  40. <strong>Connection error</strong> The client was unable to connect to the WeeChat relay
  41. </div>
  42. <div class="alert alert-danger" ng-show="sslError" ng-cloak>
  43. <strong>Secure connection error</strong> A secure connection with the WeeChat relay could not be initiated. This is most likely because your browser does not trust your relay's certificate. Please read the encryption instructions below!
  44. </div>
  45. <div class="alert alert-danger" ng-show="securityError" ng-cloak>
  46. <strong>Secure connection error</strong> Unable to connect to unencrypted relay when you are connecting to Glowing Bear over HTTPS. Please use an encrypted relay or load the page without using HTTPS.
  47. </div>
  48. <div class="alert alert-danger" ng-show="oldWeechatError" ng-cloak>
  49. <strong>Weechat version error</strong> Weechat connected but did not respond to a handshake. This could mean weechat < version 2.9. Verify your weechat is 2.8 or older and check "Compatibility with Weechat 2.8 and older" or consider updating weechat.
  50. </div>
  51. <div class="alert alert-danger" ng-show="hashAlgorithmDisagree" ng-cloak>
  52. <strong>Hash algorithm error</strong> Weechat and glowing bear did not agree on a hashing algorithm, please do /set "pbkdf2+sha512" in weechat.
  53. </div>
  54. <div class="panel-group accordion">
  55. <div class="panel" data-state="active" ng-show=false>
  56. <div class="panel-heading">
  57. <h4 class="panel-title">
  58. <a class="accordion-toggle">
  59. Important Note!
  60. </a>
  61. </h4>
  62. </div>
  63. <div class="panel-collapse collapse">
  64. <div class="panel-body">
  65. <div class="form-group">
  66. <div class="alert alert-danger">
  67. GlowingBear requires JavaScript support to function. Additionally, you must allow JS from <code></code>. Please check your script blocker or browser settings.
  68. </div>
  69. Glowing Bear is a web frontend for the WeeChat IRC client and strives to be a modern interface. It relies on WeeChat to do all the heavy lifting and then provides some nice features on top of that, like embedding images, videos, and other content. The best part, however, is that you can use it from any modern internet device -- whether it's a computer, tablet, or smart phone -- and all your stuff is there, wherever you are. You don't have to deal with the messy technical details, and all you need to have installed is a browser or our app.
  70. </div>
  71. </div>
  72. </div>
  73. </div>
  74. <div class="panel" data-state="active">
  75. <div class="panel-heading">
  76. <h4 class="panel-title">
  77. <a class="accordion-toggle" ng-click="toggleAccordion($event)">
  78. Connection settings
  79. </a>
  80. </h4>
  81. </div>
  82. <div id="collapseOne" class="panel-collapse collapse">
  83. <div class="panel-body">
  84. <form class="form-signin" role="form">
  85. <div class="form-group">
  86. <div class="input-group">
  87. <div class="row no-gutter">
  88. <div class="col-sm-9">
  89. <label class="control-label" for="host">WeeChat relay hostname</label>
  90. <input type="text" class="form-control favorite-font" id="host" ng-model="settings.hostField" ng-change="parseHost()" ng-class="{'is-invalid': hostInvalid}" placeholder="Address" autocapitalize="off">
  91. </div>
  92. <div class="col-sm-3">
  93. <label class="control-label" for="port">Port</label>
  94. <input type="text" class="form-control favorite-font" id="port" ng-model="settings.port" ng-disabled="portDisabled" placeholder="Port">
  95. </div>
  96. </div>
  97. </div>
  98. <div class="row no-gutter">
  99. <div class="col-sm-12">
  100. <label class="control-label" for="password">WeeChat relay password</label>
  101. <input type="password" class="form-control favorite-font" id="password" ng-model="password" placeholder="Password">
  102. </div>
  103. </div>
  104. <div class="alert alert-danger" ng-show="passwordError" ng-cloak>
  105. Error: wrong password or token
  106. </div>
  107. <div class="checkbox">
  108. <label class="control-label" for="ssl">
  109. <input type="checkbox" id="ssl" ng-model="settings.ssl">
  110. Encryption. <strong>Strongly recommended!</strong> Need help? Check below.
  111. </label>
  112. </div>
  113. <div class="checkbox">
  114. <label class="control-label" for="compatibilityWeechat28">
  115. <input type="checkbox" id="compatibilityWeechat28" ng-model="settings.compatibilityWeechat28">
  116. Compatibility with Weechat 2.8 and older <a href="#plaintext" ng-click="toggleAccordionByName('gettingStartedAccordion')"><i class="glyphicon glyphicon-info-sign"></i></a>
  117. <span style="color: #888;display:block">WeeChat 2.9 is scheduled for release in July 2020, so you&apos;ll likely want to keep this enabled for now.</span>
  118. </label>
  119. </div>
  120. <div class="checkbox indent" ng-show="settings.compatibilityWeechat28">
  121. <label class="control-label" for="useTotp">
  122. <input type="checkbox" id="useTotp" ng-model="settings.useTotp">
  123. Use Time-based One-Time Password (automatic for Weechat >= 2.9)<a href="" target="_blank"><i class="glyphicon glyphicon-info-sign"></i></a>
  124. </label>
  125. </div>
  126. <div class="checkbox">
  127. <label class="control-label" for="savepassword">
  128. <input type="checkbox" id="savepassword" ng-model="settings.savepassword">
  129. Save password in your browser
  130. </label>
  131. </div>
  132. <div class="checkbox" ng-show="settings.savepassword || settings.autoconnect">
  133. <label class="control-label" for="autoconnect">
  134. <input type="checkbox" id="autoconnect" ng-model="settings.autoconnect" ng-disabled="settings.compatibilityWeechat28 && settings.useTotp">
  135. Automatically connect
  136. </label>
  137. </div>
  138. </div>
  139. <button class="btn btn-lg btn-primary" ng-disabled="hostInvalid || (totpInvalid && settings.useTotp)" ng-click="connect()" ng-cloak>{{ connectbutton }} <i ng-class="connectbuttonicon" class="glyphicon"></i></button>
  140. </form>
  141. </div>
  142. </div>
  143. </div>
  144. <div class="panel" data-state="collapsed" id="gettingStartedAccordion">
  145. <div class="panel-heading">
  146. <h4 class="panel-title">
  147. <a class="accordion-toggle" ng-click="toggleAccordion($event)">
  148. Getting Started
  149. </a>
  150. </h4>
  151. </div>
  152. <div id="collapseTwo" class="panel-collapse collapse">
  153. <div class="panel-body">
  154. <p><span class="label label-danger">WeeChat version 0.4.2 or higher is required, but WeeChat 2.9 or later is recommended for the best experience.</p>
  155. <h3>Use TLS encryption</h3>
  156. <p>To start using Glowing Bear, follow the instructions below to set up an encrypted relay. All communication goes directly between your browser and your WeeChat relay! This means that your server must be accessible. We never see any of your data or your password, and you don't need to trust a "cloud". All settings, including your password, are saved locally in your own browser between sessions.</p>
  157. <div class="alert alert-warning" ng-show="show_tls_warning"><strong>You're using Glowing Bear over an unencrypted connection (http://). This is not recommended!</strong> We recommend using our secure hosted version at <a href=""></a>, or <a href=""></a> for the latest and greatest development version. You can still follow the instructions below to set up an encrypted relay, though.</div>
  158. <p>When using encryption, all communication between your browser and WeeChat will be securely encrypted with TLS. This means that you have to set up a certificate. While it's possible to use a self-signed cert, we recommend against it, because it's handled poorly in browsers, and may not work at all on mobile devices. If you don't already have a certificate for your domain (or you don't have a domain), we strongly encourage you to get a certificate from <a href="">Let's Encrypt</a>—it's free and easy. We'll walk you through it.</p>
  159. <p><strong>If you don't have a domain</strong> you can get a free subdomain from providers such as <a href="">afraid</a>. You'll want to set up an 'A' record to your server's IP address, and quite possibly an AAAA record to its IPv6 address. These might take a few hours to propagate, if the steps below don't work right away, try again in a few hours.</p>
  160. <p><strong>Getting a certificate</strong> is easy. You'll need certbot—just follow the encryptions at <a href=""></a>. If you're not serving webpages on the same server or are unsure, select "none of the above" (if you are, you can probably use that webserver to proxy your relay, and skip this—check out the <a href="">instructions in our Wiki</a>). Next, get the certificate with <code>certbot certonly --standalone -d {{ || }}</code> and follow the instructions.</p>
  161. <p>Nearly done! Now you just need to copy the files into place. To do that, use the following commands, replacing the <strong>username</strong> placeholder with your actual username:</p>
  162. <pre>mkdir -p ~<strong>username</strong>/.weechat/ssl
  163. cat /etc/letsencrypt/live/{{ || }}/{fullchain,privkey}.pem &gt; ~<strong>username</strong>/.weechat/ssl/relay.pem
  164. chown -R <strong>username</strong>:<strong>username</strong> ~<strong>username</strong>/.weechat/ssl/</pre>
  165. <p>Once you've got the certificate and moved it in place, you can set up an encrypted relay on port {{ settings.port || 9001 }} with these WeeChat commands:</p>
  166. <pre>
  167. /set y0ur_StRonG-pa$sw0rd:of*choice
  168. /relay sslcertkey
  169. /relay add ssl.weechat {{ settings.port || 9001 }}
  170. </pre>
  171. <p>Your certificate needs to be renewed every couple of months. Either follow the instructions for automatic renewal at <a href=""></a>, or run <code>certbot renew</code> manually when renewal is due. <strong>Important:</strong> You'll need to follow the instructions for copying the certificate to the right place again, and re-run <code>/relay sslcertkey</code> in WeeChat.</p>
  172. <h3>Use TOTP (Time-based One-Time Password)</h3>
  173. <p><a href="">Configure</a> WeeChat for TOTP. The secret key has to be a base 32 string.</p>
  174. <pre>/secure set relay_totp_secret xxxxx
  175. /set "${}"</pre>
  176. <p>Open an authenticator app and create an entry with the same secret. In Glowing Bear check the checkbox for "use Time-based One-Time Password" and fill in the one time password as you see it in the authenticator app.</p>
  177. <h3><a name="plaintext"></a>Compatibility with WeeChat 2.8 and older</h3>
  178. <p><strong>Required for WeeChat <= 2.8</strong></p>
  179. <p>With WeeChat 2.9—scheduled for release in July 2020—relay client authentication was made more secure and resistant to brute forcing. Glowing Bear uses the most secure authentication method by default. However, to support older versions of WeeChat, this option allows Glowing Bear to still use the old authentication method, sending your password to WeeChat (in plain text if you are not using encryption!). Only enable this if you are using a WeeChat version before 2.9!</p>
  180. <p>By default, WeeChat 2.9 support several authentication methods. Of these, Glowing Bear only uses the most secure one, <code>pbkdf2+sha512</code>. You can check the list of enabled methods to ensure it is in there:
  181. <code>/set</code>
  182. </p>
  183. </div>
  184. </div>
  185. </div>
  186. <div class="panel" data-state="collapsed">
  187. <div class="panel-heading">
  188. <h4 class="panel-title">
  189. <a class="accordion-toggle" ng-click="toggleAccordion($event)">
  190. Usage instructions
  191. </a>
  192. </h4>
  193. </div>
  194. <div id="collapseThree" class="panel-collapse collapse">
  195. <div class="panel-body">
  196. <h3 style="margin-top: 0px">Shortcuts</h3>
  197. Glowing Bear has a few shortcuts:
  198. <ul>
  199. <li><kbd>ALT-n</kbd>: Toggle nicklist</li>
  200. <li><kbd>ALT-l</kbd>: Focus on input bar</li>
  201. <li><kbd>ALT-[0-9]</kbd>: Switch to buffer number N</li>
  202. <li><kbd>ALT-↑/↓</kbd>: Switch to buffer above/below</li>
  203. <li><kbd>ALT-a</kbd>: Focus on next buffer with activity</li>
  204. <li><kbd>ALT-&lt;</kbd>: Switch to previous active buffer</li>
  205. <li><kbd>ALT-g</kbd>: Focus on buffer list filter</li>
  206. <li><kbd>ALT-h</kbd>: Clear unread counters in every buffer (locally)</li>
  207. <li><kbd>Esc-Esc</kbd>: Disconnect (double-tap)</li>
  208. <li>Arrow keys: Navigate history, or navigate quick search buffer results. Pressing <kbd></kbd> while writing a message pushes it onto the history for later re-use, without sending it.</li>
  209. <li><kbd>Tab</kbd>: Complete nick</li>
  210. <li>The following readline/emacs style keybindings can be enabled with a setting: <span title="Move cursor to beginning of line"><kbd>Ctrl-a</kbd></span>, <span title="Move cursor to te end of the line"><kbd>Ctrl-e</kbd></span>, <span title="Delete from cursor to beginning of the line"><kbd>Ctrl-u</kbd></span>, <span title="Delete from cursor to the end of the line"><kbd>Ctrl-k</kbd></span>, <span title="Delete from cursor to previous space"><kbd>Ctrl-w</kbd></span></li>
  211. </ul>
  212. <h3>Pinning buffers</h3>
  213. <p>
  214. The option "Only show buffers with unread messages" is useful when you have a lot of buffers and can't meaningfully look at all of them at the same time. However, often you have a select few buffers that you use more frequently and would like to have displayed permanently.
  215. </p>
  216. <p>
  217. To pin a buffer, type <code>/buffer set localvar_set_pinned true</code>. <strong>Note</strong>: Local variables on buffers are not persisted across WeeChat restarts, so either use script <code></code> to automatically apply that upon buffer creation or use a trigger if you want automatic repinning when buffers get recreated. To unpin, you can use the same command and set anything other than <code>true</code>.
  218. </p>
  219. <p>
  220. Helpful trigger to automatically repin a buffer (in this instance, <var>irc.freenode.#weechat</var>): <pre><code>/trigger add autopin signal "buffer_opened" "${buffer[${tg_signal_data}].full_name} =~ <var>irc.freenode.#weechat</var>" "" "/command -buffer ${buffer[${tg_signal_data}].full_name} * /buffer set localvar_set_pinned true"</code></pre>
  221. </p>
  222. <h3>Setting a custom path</h3>
  223. <p>
  224. The hostname field can be used to set a custom path. Or a URL parameter can be used see section 'URL Parameters'.
  225. </p>
  226. <p>
  227. To connect to the weechat relay service we connect using a URL. A typical URL consists of 4 parts. <code>{scheme}://{host}:{port}/{path}</code>. The path can be changed by entering the relay's full URL (except the scheme).
  228. </p>
  229. <ul>
  230. <li><b>scheme</b>: The scheme must never be input. The scheme is "ws" if TLS isn't used and it is "wss" if TLS is used.</li>
  231. <li><b>host</b>: Can be an IPv4, IPv6 or a FQDN. IPv6 addresses must be wrapped in square brackets.</li>
  232. <li><b>port</b>: can be specified in the host field or the seperate port field. However if the path is specified in the host field the port must also be specified.</li>
  233. <li><b>path</b>: by defautl this is "weechat". In case <a href="">a proxy</a> is used the path can be changed by entering it in the host field.</li>
  234. </ul>
  235. <p>
  236. Examples of correct input for the host field are:
  237. </p>
  238. <ul>
  239. <li></li>
  240. <li></li>
  241. <li></li>
  242. <li>[2001:db8:85a3::8a2e:370:7334]</li>
  243. <li>[2001:db8:85a3::8a2e:370:7334]:8000</li>
  244. <li>[2001:db8:85a3::8a2e:370:7334]:8000/weechat2</li>
  245. <li></li>
  246. <li></li>
  247. <li></li>
  248. </ul>
  249. <p>
  250. Incorrect input for the host field:
  251. </p>
  252. <ul>
  253. <li><span class="text-danger">ws://</span> (do not specify the scheme)</li>
  254. <li><span class="text-danger"></span> (must specify port when specifying path)</li>
  255. <li><span class="text-danger">[2001:db8:85a3::8a2e:370:7334]/weechat2</span> (must specify port when specifying path)</li>
  256. <li><span class="text-danger"></span> (must specify port when specifying path)</li>
  257. <li><span class="text-danger">2001:db8:85a3::8a2e:370:7334</span> (must wrap IPv6 address in square brackets)</li>
  258. <li><span class="text-danger">2001:db8:85a3::8a2e:370:7334:8000</span> (must wrap IPv6 address in square brackets)</li>
  259. </ul>
  260. <h3>URL Parameters</h3>
  261. <p>
  262. Parameters can be passed in the URL to prefill the fields. This can be useful when you have multiple relays and want to use bookmarks to manage them.
  263. We do not recommend passing the password in this way as it will be visible in plain text and stored in history/bookmarks but it is possible. Special characters should be <a href="">URL encoded</a>.
  264. </p>
  265. <p>
  266. If we want just the path for example: <code></code>
  267. </p>
  268. <p>
  269. An example: <code></code>
  270. </p>
  271. <p>
  272. Available parameters:
  273. <ul>
  274. <li>host</li>
  275. <li>port</li>
  276. <li>path</li>
  277. <li>password</li>
  278. <li>autoconnect</li>
  279. </ul>
  280. </p>
  281. </div>
  282. </div>
  283. </div>
  284. <div class="panel" data-state="collapsed">
  285. <div class="panel-heading">
  286. <h4 class="panel-title">
  287. <a class="accordion-toggle" ng-click="toggleAccordion($event)">
  288. Install app
  289. </a>
  290. </h4>
  291. </div>
  292. <div id="collapseFour" class="panel-collapse collapse">
  293. <div class="panel-body">
  294. <p>You don't need to install anything to use Glowing Bear, it works with any modern browser. Start using it right now at the top of the page! However, there are a few ways to improve integration with your operating system.</p>
  295. <h3>Electron</h3>
  296. <p>Glowing Bear supports the electron shell. You'll have to build it yourself, though. Run the following commands, choosing your platform from the list in the last command: <pre>git clone
  297. cd glowing-bear
  298. npm install
  299. npm install electron-packager
  300. npm run build-electron-{windows, darwin, linux}</pre>
  301. <h3>Chrome</h3>
  302. <p>To install Glowing Bear as an app in Chrome for Android, select <kbd>Menu - Add to home screen</kbd>. In the desktop version of Chrome, click <kbd>Menu - More tools - Create application shortcuts</kbd>.</p>
  303. <h3>Android App</h3>
  304. <p>We used to have an Android app, but discontinued it for lack of maintainers. You can still build it for yourself, see <a href="">the app repository</a> for instructions. Sorry!</p>
  305. <h3>Firefox Browser</h3>
  306. <p>Firefox used to support apps, but this was removed from Firefox. There's nothing we can do about it. Sorry!</p>
  307. </div>
  308. </div>
  309. </div>
  310. <div class="panel" data-state="collapsed">
  311. <div class="panel-heading">
  312. <h4 class="panel-title">
  313. <a class="accordion-toggle" ng-click="toggleAccordion($event)">
  314. Get involved
  315. </a>
  316. </h4>
  317. </div>
  318. <div id="collapseFive" class="panel-collapse collapse">
  319. <div class="panel-body">
  320. <p>Glowing bear is built by a small group of developers in their free time. As we're always trying to improve it, we would love getting your feedback and help. If that sounds like something you might enjoy, check out our <a href="">project page</a> on GitHub!</p>
  321. <p>If you're interested in contributing or simply want to say hello, head over to <strong>#glowing-bear</strong> on <strong>freenode!</strong> We won't bite, promise :)</p>
  322. </div>
  323. </div>
  324. </div>
  325. </div>
  326. </div>
  327. <div class="content" id="content" sidebar-state="visible" ng-show="connected" ng-cloak>
  328. <div id="topbar">
  329. <div class="brand" ng-click="toggleSidebar()">
  330. <a href="#">
  331. <img alt="brand" src="assets/img/favicon.png" title="Connected to {{ }}:{{ settings.port}}">
  332. </a>
  333. <span class="badge" ng-show="unread > 0">{{unread}}</span>
  334. <span class="badge danger" ng-show="notifications > 0">{{notifications}}</span>
  335. <button ng-if="debugMode" ng-click="countWatchers()">Count<br />Watchers</button>
  336. </div>
  337. <div class="title" ng-click="showModal('topicModal')">
  338. <span class="desktop" ng-repeat="part in activeBuffer().title" ng-class="::part.classes" ng-bind-html="::(part.text | conditionalLinkify | DOMfilter:'irclinky')"></span>
  339. <span class="mobile" ng-class="{'active': activeBuffer().active, 'channel': activeBuffer().type === 'channel', 'channel_hash': activeBuffer().prefix === '#', 'channel_plus': activeBuffer().prefix === '+', 'channel_ampersand': activeBuffer().prefix === '&'}">{{ activeBuffer().trimmedName || activeBuffer().fullName }}</span>
  340. </div>
  341. <div class="actions pull-right vertical-line-left">
  342. <a class="settings-toggle" ng-click="showModal('settingsModal')" title="Options menu" href="#">
  343. <i class="glyphicon glyphicon-cog"></i>
  344. </a>
  345. <a ng-click="disconnect()" title="Disconnect from WeeChat" href="#">
  346. <i class="glyphicon glyphicon-off"></i>
  347. </a>
  348. </div>
  349. </div>
  350. <div id="sidebar" data-state="visible" ng-swipe-left="swipeLeft()" ng-swipe-disable-mouse class="vertical-line">
  351. <ul class="nav nav-pills nav-stacked" ng-class="{'indented': (predicate === 'serverSortKey'), 'showquickkeys': showQuickKeys, 'showjumpkeys': showJumpKeys}">
  352. <li class="bufferfilter">
  353. <form role="form">
  354. <div class="input-group">
  355. <span class="input-group-addon" id="jump-addon">Jump</span>
  356. <input class="form-control favorite-font" type="text" id="bufferFilter" ng-model="search" ng-keydown="handleSearchBoxKey($event)" placeholder="{{ search_placeholder || 'Search' }}" autocomplete="off" aria-describedby="jump-addon">
  357. </div>
  358. </form>
  359. </li>
  360. <li class="buffer" ng-class="{'active':,
  361. 'unread': buffer.unread,
  362. 'notification': buffer.notification,
  363. 'highlight': search && search_highlight_key === key,
  364. 'indent': buffer.indent,
  365. 'channel': buffer.type === 'channel',
  366. 'channel_hash': buffer.prefix === '#',
  367. 'channel_plus': buffer.prefix === '+',
  368. 'channel_ampersand': buffer.prefix === '&',
  369. 'private': buffer.type === 'private'}"
  370. ng-repeat="(key, buffer) in (filteredBuffers = (getBuffers() | toArray:'withidx' | filter:bufferlistfilter | filter:hasUnread | orderBy:predicate | getBufferQuickKeys:this))">
  371. <a ng-click="setActiveBuffer(" title="{{ buffer.fullName }}" href="#">
  372. <span class="badge pull-right" ng-class="{'danger': buffer.notification}" ng-bind="buffer.notification || buffer.unread"></span>
  373. <span class="buffer-quick-key">{{ buffer.$quickKey }}</span>
  374. <span class="buffer-jump-key">{{ ("0" + buffer.$jumpKey).slice(-2) }}</span>
  375. <span class="buffername">{{ buffer.trimmedName || buffer.fullName }}</span>
  376. </a>
  377. </li>
  378. </ul>
  379. </div>
  380. <div id="nicklist" ng-if="showNicklist" ng-swipe-right="swipeRight()" ng-swipe-disable-mouse class="favorite-font vertical-line-left">
  381. <ul class="nicklistgroup list-unstyled" ng-repeat="group in nicklist">
  382. <li ng-repeat="nick in group.nicks|orderBy:'name'">
  383. <a ng-click="openBuffer("><span ng-class="::nick.prefixClasses" ng-bind="::nick.prefix"></span><span ng-class="::nick.nameClasses" ng-bind=""></span></a>
  384. </li>
  385. </ul>
  386. </div>
  387. <div id="bufferlines" class="favorite-font" ng-swipe-right="swipeRight()" ng-swipe-left="swipeLeft()" ng-swipe-disable-mouse ng-class="{'withnicklist': showNicklist, 'hideTime': activeBuffer().hideBufferLineTimes}" when-scrolled="infiniteScroll()" imgur-drop>
  388. <table>
  389. <tbody>
  390. <tr class="bufferline">
  391. <td ng-hide="activeBuffer().allLinesFetched" colspan="3">
  392. <a class="fetchmorelines btn btn-xs btn-primary" ng-click="fetchMoreLines()" ng-hide="loadingLines" href="#">Fetch more lines</a>
  393. <span ng-show="loadingLines">Fetching more lines <i class="glyphicon glyphicon-refresh glyphicon-spin"></i></span>
  394. </td>
  395. </tr>
  396. </tbody>
  397. <tbody ng-repeat="bufferline in bufferlines">
  398. <tr class="bufferline">
  399. <td class="time">
  400. <span class="date" ng-class="::{'repeated-time': bufferline.shortTime==bufferlines[$index-1].shortTime}">
  401. <span class="cof-chat_time cob-chat_time coa-chat_time" ng-bind-html="::bufferline.formattedTime"></span>
  402. </span>
  403. </td>
  404. <td class="prefix"><span ng-class="::{'repeated-prefix': bufferline.prefixtext==bufferlines[$index-1].prefixtext}"><a ng-click="addMention(bufferline)"><span class="hidden-bracket" ng-if="::(bufferline.showHiddenBrackets)">&lt;</span><span ng-repeat="part in ::bufferline.prefix" ng-class="::part.classes" ng-bind="::part.text|prefixlimit:25"></span><span class="hidden-bracket" ng-if="::(bufferline.showHiddenBrackets)">&gt;</span></a></span></td><!--
  405. --><td class="message"><!--
  406. --><div ng-repeat="metadata in ::bufferline.metadata" plugin data="::metadata"></div><!--
  407. --><span ng-repeat="part in ::bufferline.content" class="text" ng-class="::part.classes.concat(['line-' + part.$$hashKey.replace(':','_')])" ng-bind-html="::part.text | conditionalLinkify:part.classes.includes('cof-chat_host') | DOMfilter:'codify' | DOMfilter:'irclinky' | DOMfilter:'inlinecolour' | DOMfilter:'latexmath':('.line-' + part.$$hashKey.replace(':','_')):settings.enableMathjax"></span>
  408. </td>
  409. </tr>
  410. <tr class="readmarker" ng-if="activeBuffer().lastSeen==$index">
  411. <td colspan="3">
  412. <hr id="readmarker">
  413. </td>
  414. </tr>
  415. </tbody>
  416. </table><span id="end-of-buffer"></span>
  417. </div>
  418. <div class="footer" ng-class="{'withnicklist': showNicklist}">
  419. <div input-bar input-id="sendMessage" command="command"></div>
  420. </div>
  421. </div>
  422. <div id="soundNotification"></div>
  423. <div id="reconnect" class="alert alert-danger" ng-click="reconnect()" ng-show="reconnecting" ng-cloak>
  424. <p><strong>Connection to WeeChat lost</strong></p>
  425. <i class="glyphicon glyphicon-refresh"></i>
  426. Reconnecting... <i class="glyphicon glyphicon-spin glyphicon-refresh"></i> <a class="btn btn-xs" ng-click="reconnect()" href="#">Click to try to reconnect now</a>
  427. </div>
  428. <div id="settingsModal" class="gb-modal" data-state="hidden">
  429. <div class="backdrop" ng-click="closeModal($event)"></div>
  430. <div class="modal-dialog">
  431. <div class="modal-content">
  432. <div class="modal-header">
  433. <button type="button" class="close" ng-click="closeModal($event)" aria-hidden="true">&times;</button>
  434. <span class="pull-right version">Glowing Bear version 0.10.0</span>
  435. <h4 class="modal-title">Settings</h4>
  436. <p>Settings will be stored in your browser.</p>
  437. </div>
  438. <div class="modal-body">
  439. <ul class="">
  440. <li class="standard-labels">
  441. <form class="form-horizontal" role="form">
  442. <div class="form-group">
  443. <label for="font" class="col-sm-3 control-label make-thinner">Preferred font</label>
  444. <div class="col-sm-4">
  445. <input type="text" ng-model="settings.fontfamily" class="form-control" id="font">
  446. </div>
  447. <label for="size" class="col-sm-1 control-label">Size</label>
  448. <div class="col-sm-3">
  449. <input type="text" ng-model="settings.fontsize" class="form-control" id="size">
  450. </div>
  451. </div>
  452. </form>
  453. </li>
  454. <li class="standard-labels">
  455. <form class="form-horizontal" role="form">
  456. <div class="form-group">
  457. <label for="theme" class="col-sm-3 control-label make-thinner">Theme</label>
  458. <div class="col-sm-8">
  459. <select id="theme" class="form-control" ng-model="settings.theme" ng-options="theme for theme in themes"></select>
  460. </div>
  461. </div>
  462. </form>
  463. </li>
  464. <li class="standard-labels">
  465. <form class="form-horizontal" role="form">
  466. <div class="form-group">
  467. <label for="custom-css" class="col-sm-3 control-label make-thinner">Custom CSS</label>
  468. <div class="col-sm-8">
  469. <textarea id="custom-css" class="form-control" ng-model="settings.customCSS"></textarea>
  470. </div>
  471. </div>
  472. </form>
  473. </li>
  474. <li class="standard-labels">
  475. <form class="form-horizontal" role="form">
  476. <div class="form-group">
  477. <label class="control-label col-sm-3" for="iToken">Imgur Token <a target="_blank" href=""><i class="glyphicon glyphicon-info-sign"></i></a></label>
  478. <div class="col-sm-4">
  479. <input type="text" class="form-control" ng-model="settings.iToken" placeholder="Access Token" autocapitalize="off">
  480. </div>
  481. <label class="control-label col-sm-1 lessleftpad" for="iAlb">Album</label>
  482. <div class="col-sm-3">
  483. <input type="text" class="form-control" ng-model="settings.iAlb" placeholder="Album Hash" autocapitalize="off">
  484. </div>
  485. </div>
  486. </form>
  487. </li>
  488. <li>
  489. <form class="form-inline" role="form">
  490. <div class="checkbox">
  491. <label>
  492. <input type="checkbox" ng-model="settings.onlyUnread">
  493. Only show buffers with unread messages
  494. </label>
  495. </div>
  496. </form>
  497. </li>
  498. <li>
  499. <form class="form-inline" role="form">
  500. <div class="checkbox">
  501. <label>
  502. <input type="checkbox" ng-model="settings.noembed">
  503. Hide embedded content by default<span class="text-muted settings-help">NSFW content will be hidden regardless of this choice</span>
  504. </label>
  505. </div>
  506. </form>
  507. </li>
  508. <li>
  509. <form class="form-inline" role="form">
  510. <div class="checkbox">
  511. <label>
  512. <input type="checkbox" ng-model="settings.hotlistsync">
  513. Mark messages as read in WeeChat
  514. </label>
  515. </div>
  516. </form>
  517. </li>
  518. <li class="mobile">
  519. <form class="form-inline" role="form">
  520. <div class="checkbox">
  521. <label>
  522. <input type="checkbox" ng-model="settings.alwaysnicklist">
  523. Always show nicklist
  524. </label>
  525. </div>
  526. </form>
  527. </li>
  528. <li class="desktop">
  529. <form class="form-inline" role="form">
  530. <div class="checkbox">
  531. <label>
  532. <input type="checkbox" ng-model="settings.nonicklist">
  533. Hide nicklist
  534. </label>
  535. </div>
  536. </form>
  537. </li>
  538. <li>
  539. <form class="form-inline" role="form">
  540. <div class="checkbox">
  541. <label>
  542. <input type="checkbox" ng-model="settings.orderbyserver">
  543. Hierarchical buffer view (order by server)
  544. </label>
  545. </div>
  546. </form>
  547. </li>
  548. <li>
  549. <form class="form-inline" role="form">
  550. <div class="checkbox">
  551. <label>
  552. <input type="checkbox" ng-model="settings.readlineBindings">
  553. Enable common readline keybindings in input bar
  554. </label>
  555. </div>
  556. </form>
  557. </li>
  558. <li>
  559. <form class="form-inline" role="form">
  560. <div class="checkbox">
  561. <label>
  562. <input type="checkbox" ng-model="settings.useFavico">
  563. Display unread count in favicon
  564. </label>
  565. </div>
  566. </form>
  567. </li>
  568. <li>
  569. <form class="form-inline" role="form">
  570. <div class="checkbox">
  571. <label>
  572. <input type="checkbox" ng-model="settings.soundnotification">
  573. Play sound on notification
  574. </label>
  575. </div>
  576. </form>
  577. </li>
  578. <li>
  579. <form class="form-inline" role="form">
  580. <div class="checkbox">
  581. <label>
  582. <input type="checkbox" ng-model="settings.enableMathjax">
  583. Enable LaTeX math rendering
  584. </label>
  585. </div>
  586. </form>
  587. </li>
  588. <li class="desktop">
  589. <form class="form-inline" role="form">
  590. <div class="checkbox">
  591. <label>
  592. <input type="checkbox" ng-model="settings.enableQuickKeys">
  593. Use Alt+[0-9] to switch buffers
  594. </label>
  595. </div>
  596. </form>
  597. </li>
  598. </ul>
  599. </div>
  600. <div class="modal-footer">
  601. <button type="button" class="btn btn-primary" ng-click="closeModal($event)">Close</button>
  602. </div>
  603. </div><!-- /.modal-content -->
  604. </div><!-- /.modal-dialog -->
  605. </div><!-- /.modal -->
  606. <div id="topicModal" class="gb-modal" data-state="hidden">
  607. <div class="backdrop" ng-click="closeModal($event)"></div>
  608. <div class="modal-dialog">
  609. <div class="modal-content">
  610. <div class="modal-header">
  611. <button type="button" class="close" ng-click="closeModal($event)" aria-hidden="true">&times;</button>
  612. <h4 class="modal-title">Channel topic {{ activeBuffer().shortName || activeBuffer().fullName }}</h4>
  613. <span ng-repeat="part in activeBuffer().title" ng-class="::part.classes" ng-bind-html="::(part.text | conditionalLinkify | DOMfilter:'irclinky')"></span>
  614. </div>
  615. <div class="modal-footer">
  616. <button type="button" class="btn btn-primary" ng-click="closeModal($event)">Close</button>
  617. </div>
  618. </div><!-- /.modal-content -->
  619. </div><!-- /.modal-dialog -->
  620. </div><!-- /.modal -->
  621. </body>
  622. </html>