serverless-ircd 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (247) hide show
  1. package/.github/workflows/ci.yml +6 -1
  2. package/.gitmodules +3 -0
  3. package/CHANGELOG.md +214 -0
  4. package/README.md +110 -23
  5. package/apps/aws-stack/package.json +1 -1
  6. package/apps/cf-tcp-container/package.json +1 -1
  7. package/apps/cf-worker/package.json +1 -1
  8. package/apps/cf-worker/src/origin-allowlist.ts +99 -0
  9. package/apps/cf-worker/src/worker.ts +89 -9
  10. package/apps/cf-worker/tests/fixtures/web-dist/app/index.html +18 -0
  11. package/apps/cf-worker/tests/fixtures/web-dist/index.html +18 -0
  12. package/apps/cf-worker/tests/origin-allowlist.test.ts +101 -0
  13. package/apps/cf-worker/tests/smoke.test.ts +28 -2
  14. package/apps/cf-worker/tests/ws-origin.test.ts +89 -0
  15. package/apps/cf-worker/wrangler.test.toml +23 -0
  16. package/apps/cf-worker/wrangler.toml +54 -0
  17. package/apps/local-cli/package.json +1 -1
  18. package/apps/web/landing/index.html +217 -0
  19. package/apps/web/package.json +28 -0
  20. package/apps/web/scripts/build.mjs +125 -0
  21. package/apps/web/src/build-env.ts +43 -0
  22. package/apps/web/src/config-schema.ts +138 -0
  23. package/apps/web/static/config.json +28 -0
  24. package/apps/web/static/config.prod.json +28 -0
  25. package/apps/web/static/config.staging.json +28 -0
  26. package/apps/web/tests/build-env.test.ts +63 -0
  27. package/apps/web/tests/build-smoke.test.ts +103 -0
  28. package/apps/web/tests/config-schema.test.ts +432 -0
  29. package/apps/web/tests/workspace.test.ts +12 -0
  30. package/apps/web/tsconfig.json +10 -0
  31. package/apps/web/upstream/.browserslistrc +3 -0
  32. package/apps/web/upstream/.editorconfig +9 -0
  33. package/apps/web/upstream/.eslintignore +3 -0
  34. package/apps/web/upstream/.eslintrc.js +90 -0
  35. package/apps/web/upstream/.github/FUNDING.yml +12 -0
  36. package/apps/web/upstream/.github/ISSUE_TEMPLATE/bug_report.md +38 -0
  37. package/apps/web/upstream/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  38. package/apps/web/upstream/.github/workflows/push.yml +26 -0
  39. package/apps/web/upstream/.github/workflows/release.yml +33 -0
  40. package/apps/web/upstream/.github/workflows/release_manual.yml +55 -0
  41. package/apps/web/upstream/.prettierrc.js +9 -0
  42. package/apps/web/upstream/.stylelintignore +5 -0
  43. package/apps/web/upstream/.stylelintrc.js +21 -0
  44. package/apps/web/upstream/LICENSE +201 -0
  45. package/apps/web/upstream/README.md +76 -0
  46. package/apps/web/upstream/babel.config.js +25 -0
  47. package/apps/web/upstream/crowdin.yml +3 -0
  48. package/apps/web/upstream/index.html +35 -0
  49. package/apps/web/upstream/jest.config.js +7 -0
  50. package/apps/web/upstream/jsdoc.json +22 -0
  51. package/apps/web/upstream/package.json +80 -0
  52. package/apps/web/upstream/scripts/pre-commit +43 -0
  53. package/apps/web/upstream/src/components/App.vue +516 -0
  54. package/apps/web/upstream/src/components/AppSettings.vue +587 -0
  55. package/apps/web/upstream/src/components/AutoComplete.vue +284 -0
  56. package/apps/web/upstream/src/components/Avatar.vue +105 -0
  57. package/apps/web/upstream/src/components/AwayStatusIndicator.vue +77 -0
  58. package/apps/web/upstream/src/components/BufferKey.vue +121 -0
  59. package/apps/web/upstream/src/components/BufferSettings.vue +97 -0
  60. package/apps/web/upstream/src/components/Captcha.vue +85 -0
  61. package/apps/web/upstream/src/components/ChannelBanlist.vue +96 -0
  62. package/apps/web/upstream/src/components/ChannelInfo.vue +159 -0
  63. package/apps/web/upstream/src/components/ChannelInvitelist.vue +276 -0
  64. package/apps/web/upstream/src/components/ChannelList.vue +345 -0
  65. package/apps/web/upstream/src/components/Container.vue +401 -0
  66. package/apps/web/upstream/src/components/ContainerHeader.vue +522 -0
  67. package/apps/web/upstream/src/components/ControlInput.vue +1016 -0
  68. package/apps/web/upstream/src/components/LoadingAnimation.vue +104 -0
  69. package/apps/web/upstream/src/components/MediaViewer.vue +199 -0
  70. package/apps/web/upstream/src/components/MessageInfo.vue +192 -0
  71. package/apps/web/upstream/src/components/MessageList.vue +1028 -0
  72. package/apps/web/upstream/src/components/MessageListAvatar.vue +20 -0
  73. package/apps/web/upstream/src/components/MessageListMessageCompact.vue +361 -0
  74. package/apps/web/upstream/src/components/MessageListMessageInline.vue +257 -0
  75. package/apps/web/upstream/src/components/MessageListMessageModern.vue +430 -0
  76. package/apps/web/upstream/src/components/NetworkSettings.vue +528 -0
  77. package/apps/web/upstream/src/components/Nicklist.vue +309 -0
  78. package/apps/web/upstream/src/components/NicklistUser.vue +181 -0
  79. package/apps/web/upstream/src/components/NotConnected.vue +271 -0
  80. package/apps/web/upstream/src/components/SelfUser.vue +283 -0
  81. package/apps/web/upstream/src/components/ServerSelector.vue +162 -0
  82. package/apps/web/upstream/src/components/ServerView.vue +126 -0
  83. package/apps/web/upstream/src/components/SettingsAdvanced.vue +232 -0
  84. package/apps/web/upstream/src/components/SettingsAliases.vue +121 -0
  85. package/apps/web/upstream/src/components/Sidebar.vue +429 -0
  86. package/apps/web/upstream/src/components/SidebarAboutBuffer.vue +288 -0
  87. package/apps/web/upstream/src/components/SidebarState.vue +145 -0
  88. package/apps/web/upstream/src/components/StartupError.vue +35 -0
  89. package/apps/web/upstream/src/components/StateBrowser.vue +420 -0
  90. package/apps/web/upstream/src/components/StateBrowserBuffer.vue +124 -0
  91. package/apps/web/upstream/src/components/StateBrowserNetwork.vue +823 -0
  92. package/apps/web/upstream/src/components/StateBrowserUsermenu.vue +162 -0
  93. package/apps/web/upstream/src/components/TypingStatusIndicator.vue +34 -0
  94. package/apps/web/upstream/src/components/TypingUsersList.vue +56 -0
  95. package/apps/web/upstream/src/components/UrlEmbed.vue +149 -0
  96. package/apps/web/upstream/src/components/UserBox.vue +728 -0
  97. package/apps/web/upstream/src/components/inputtools/Emoji.vue +67 -0
  98. package/apps/web/upstream/src/components/inputtools/TextStyle.vue +142 -0
  99. package/apps/web/upstream/src/components/startups/CommonLayout.vue +208 -0
  100. package/apps/web/upstream/src/components/startups/CustomServer.vue +495 -0
  101. package/apps/web/upstream/src/components/startups/KiwiBnc.vue +361 -0
  102. package/apps/web/upstream/src/components/startups/Personal.vue +317 -0
  103. package/apps/web/upstream/src/components/startups/Welcome.vue +544 -0
  104. package/apps/web/upstream/src/components/startups/ZncLogin.vue +229 -0
  105. package/apps/web/upstream/src/components/utils/InputConfirm.vue +68 -0
  106. package/apps/web/upstream/src/components/utils/InputPrompt.vue +118 -0
  107. package/apps/web/upstream/src/components/utils/InputText.vue +172 -0
  108. package/apps/web/upstream/src/components/utils/IrcInput.vue +579 -0
  109. package/apps/web/upstream/src/components/utils/PluginWrapper.vue +26 -0
  110. package/apps/web/upstream/src/components/utils/TabbedView.vue +149 -0
  111. package/apps/web/upstream/src/components/utils/TransitionExpand.vue +97 -0
  112. package/apps/web/upstream/src/helpers/Colours.js +128 -0
  113. package/apps/web/upstream/src/helpers/IrcdDiffs.js +26 -0
  114. package/apps/web/upstream/src/helpers/Md5.js +193 -0
  115. package/apps/web/upstream/src/helpers/Misc.js +401 -0
  116. package/apps/web/upstream/src/helpers/TextFormatting.js +237 -0
  117. package/apps/web/upstream/src/libs/AliasRewriter.js +157 -0
  118. package/apps/web/upstream/src/libs/AudioManager.js +60 -0
  119. package/apps/web/upstream/src/libs/BouncerMiddleware.js +247 -0
  120. package/apps/web/upstream/src/libs/BouncerProvider.js +551 -0
  121. package/apps/web/upstream/src/libs/ChathistoryMiddleware.js +153 -0
  122. package/apps/web/upstream/src/libs/ConfigLoader.js +94 -0
  123. package/apps/web/upstream/src/libs/EmojiProvider.js +46 -0
  124. package/apps/web/upstream/src/libs/GlobalApi.js +346 -0
  125. package/apps/web/upstream/src/libs/IPC.js +51 -0
  126. package/apps/web/upstream/src/libs/InputHandler.js +921 -0
  127. package/apps/web/upstream/src/libs/IrcClient.js +1506 -0
  128. package/apps/web/upstream/src/libs/Logger.js +71 -0
  129. package/apps/web/upstream/src/libs/Message.js +169 -0
  130. package/apps/web/upstream/src/libs/MessageFormatter.js +364 -0
  131. package/apps/web/upstream/src/libs/MessageParser.js +249 -0
  132. package/apps/web/upstream/src/libs/Notifications.js +78 -0
  133. package/apps/web/upstream/src/libs/ServerConnection.js +270 -0
  134. package/apps/web/upstream/src/libs/ServerSession.js +102 -0
  135. package/apps/web/upstream/src/libs/SoundBleep.js +20 -0
  136. package/apps/web/upstream/src/libs/StatePersistence.js +90 -0
  137. package/apps/web/upstream/src/libs/ThemeManager.js +128 -0
  138. package/apps/web/upstream/src/libs/TypingMiddleware.js +105 -0
  139. package/apps/web/upstream/src/libs/WindowTitle.js +63 -0
  140. package/apps/web/upstream/src/libs/batchedAdd.js +74 -0
  141. package/apps/web/upstream/src/libs/bufferTools.js +177 -0
  142. package/apps/web/upstream/src/libs/polyfill/Element.closest.js +18 -0
  143. package/apps/web/upstream/src/libs/renderers/Html.js +113 -0
  144. package/apps/web/upstream/src/libs/settingTools.js +31 -0
  145. package/apps/web/upstream/src/libs/state/BufferState.js +703 -0
  146. package/apps/web/upstream/src/libs/state/NetworkState.js +158 -0
  147. package/apps/web/upstream/src/libs/state/UserState.js +89 -0
  148. package/apps/web/upstream/src/libs/state/common.js +26 -0
  149. package/apps/web/upstream/src/libs/state.js +961 -0
  150. package/apps/web/upstream/src/libs/storage/Local.js +51 -0
  151. package/apps/web/upstream/src/main.js +566 -0
  152. package/apps/web/upstream/src/res/autocompleteCommands.js +31 -0
  153. package/apps/web/upstream/src/res/configTemplates.js +373 -0
  154. package/apps/web/upstream/src/res/globalStyle.css +277 -0
  155. package/apps/web/upstream/src/res/kiwiLoadingLogo.png +0 -0
  156. package/apps/web/upstream/src/res/locales/app.af-ZA.po +1145 -0
  157. package/apps/web/upstream/src/res/locales/app.ar-SA.po +1145 -0
  158. package/apps/web/upstream/src/res/locales/app.bg-BG.po +1145 -0
  159. package/apps/web/upstream/src/res/locales/app.bs-BA.po +1145 -0
  160. package/apps/web/upstream/src/res/locales/app.ca-ES.po +1145 -0
  161. package/apps/web/upstream/src/res/locales/app.cs-CZ.po +1145 -0
  162. package/apps/web/upstream/src/res/locales/app.da-DK.po +1145 -0
  163. package/apps/web/upstream/src/res/locales/app.de-DE.po +1145 -0
  164. package/apps/web/upstream/src/res/locales/app.dev.po +1246 -0
  165. package/apps/web/upstream/src/res/locales/app.el-GR.po +1145 -0
  166. package/apps/web/upstream/src/res/locales/app.en-US.po +1145 -0
  167. package/apps/web/upstream/src/res/locales/app.es-419.po +1145 -0
  168. package/apps/web/upstream/src/res/locales/app.es-AR.po +1145 -0
  169. package/apps/web/upstream/src/res/locales/app.es-EM.po +536 -0
  170. package/apps/web/upstream/src/res/locales/app.es-ES.po +1145 -0
  171. package/apps/web/upstream/src/res/locales/app.es-US.po +1145 -0
  172. package/apps/web/upstream/src/res/locales/app.eu-ES.po +1145 -0
  173. package/apps/web/upstream/src/res/locales/app.fi-FI.po +1145 -0
  174. package/apps/web/upstream/src/res/locales/app.fr-FR.po +1145 -0
  175. package/apps/web/upstream/src/res/locales/app.gl-ES.po +1145 -0
  176. package/apps/web/upstream/src/res/locales/app.he-IL.po +1145 -0
  177. package/apps/web/upstream/src/res/locales/app.hi-IN.po +1145 -0
  178. package/apps/web/upstream/src/res/locales/app.hu-HU.po +1145 -0
  179. package/apps/web/upstream/src/res/locales/app.id-ID.po +1145 -0
  180. package/apps/web/upstream/src/res/locales/app.it-IT.po +1145 -0
  181. package/apps/web/upstream/src/res/locales/app.ja-JP.po +1145 -0
  182. package/apps/web/upstream/src/res/locales/app.ko-KR.po +1145 -0
  183. package/apps/web/upstream/src/res/locales/app.nl-NL.po +1145 -0
  184. package/apps/web/upstream/src/res/locales/app.no-NO.po +1145 -0
  185. package/apps/web/upstream/src/res/locales/app.pl-PL.po +1145 -0
  186. package/apps/web/upstream/src/res/locales/app.pt-BR.po +1145 -0
  187. package/apps/web/upstream/src/res/locales/app.pt-PT.po +1145 -0
  188. package/apps/web/upstream/src/res/locales/app.ro-RO.po +1145 -0
  189. package/apps/web/upstream/src/res/locales/app.ru-RU.po +1145 -0
  190. package/apps/web/upstream/src/res/locales/app.sl-SI.po +1145 -0
  191. package/apps/web/upstream/src/res/locales/app.sq-AL.po +1145 -0
  192. package/apps/web/upstream/src/res/locales/app.sr-SP.po +1145 -0
  193. package/apps/web/upstream/src/res/locales/app.sv-SE.po +1145 -0
  194. package/apps/web/upstream/src/res/locales/app.tr-TR.po +1145 -0
  195. package/apps/web/upstream/src/res/locales/app.uk-UA.po +1145 -0
  196. package/apps/web/upstream/src/res/locales/app.vi-VN.po +1145 -0
  197. package/apps/web/upstream/src/res/locales/app.zh-CN.po +1145 -0
  198. package/apps/web/upstream/src/res/locales/app.zh-TW.po +1145 -0
  199. package/apps/web/upstream/src/res/localesList.json +27 -0
  200. package/apps/web/upstream/src/res/logo.png +0 -0
  201. package/apps/web/upstream/src/thirdparty/about.html +43 -0
  202. package/apps/web/upstream/src/thirdparty/index.js +5 -0
  203. package/apps/web/upstream/src/thirdparty/kiwiirccom.vue +185 -0
  204. package/apps/web/upstream/static/config.json +28 -0
  205. package/apps/web/upstream/static/emoticons/smile.png +0 -0
  206. package/apps/web/upstream/static/favicon.png +0 -0
  207. package/apps/web/upstream/static/highlight.mp3 +0 -0
  208. package/apps/web/upstream/static/highlight.ogg +0 -0
  209. package/apps/web/upstream/static/locales/.gitignore +2 -0
  210. package/apps/web/upstream/static/plugins/customise.html.example +10 -0
  211. package/apps/web/upstream/static/themes/coffee/theme.css +145 -0
  212. package/apps/web/upstream/static/themes/common/base.css +1064 -0
  213. package/apps/web/upstream/static/themes/dark/theme.css +196 -0
  214. package/apps/web/upstream/static/themes/default/theme.css +92 -0
  215. package/apps/web/upstream/static/themes/elite/theme.css +248 -0
  216. package/apps/web/upstream/static/themes/grayfox/theme.css +143 -0
  217. package/apps/web/upstream/static/themes/nightswatch/theme.css +367 -0
  218. package/apps/web/upstream/static/themes/osprey/theme.css +115 -0
  219. package/apps/web/upstream/static/themes/radioactive/theme.css +1211 -0
  220. package/apps/web/upstream/static/themes/sky/theme.css +107 -0
  221. package/apps/web/upstream/tests/unit/BatchAdd.spec.js +174 -0
  222. package/apps/web/upstream/tests/unit/MessageParser.spec.js +125 -0
  223. package/apps/web/upstream/tests/unit/Misc.spec.js +24 -0
  224. package/apps/web/upstream/tests/unit/NetworkState.spec.js +58 -0
  225. package/apps/web/upstream/tests/unit/StartupError.spec.js +20 -0
  226. package/apps/web/upstream/vue.config.js +150 -0
  227. package/apps/web/upstream/yarn.lock +9767 -0
  228. package/apps/web/vitest.config.ts +13 -0
  229. package/biome.json +1 -0
  230. package/docs/Home.md +1 -0
  231. package/docs/WebClientGuide.md +535 -0
  232. package/package.json +2 -2
  233. package/packages/aws-adapter/package.json +1 -1
  234. package/packages/cf-adapter/package.json +1 -1
  235. package/packages/cf-adapter/tests/cf-harness.ts +12 -1
  236. package/packages/in-memory-runtime/package.json +1 -1
  237. package/packages/irc-core/package.json +1 -1
  238. package/packages/irc-core/reports/mutation/mutation.html +342 -0
  239. package/packages/irc-core/tests/batch.test.ts +15 -0
  240. package/packages/irc-core/tests/numerics.test.ts +13 -0
  241. package/packages/irc-core/tests/parser.test.ts +109 -0
  242. package/packages/irc-server/package.json +1 -1
  243. package/packages/irc-test-support/package.json +1 -1
  244. package/packages/irc-test-support/src/scenarios.ts +24 -2
  245. package/tools/ci-hardening/package.json +1 -1
  246. package/tools/load-test/package.json +1 -1
  247. package/tools/tcp-ws-forwarder/package.json +1 -1
@@ -0,0 +1,429 @@
1
+ <template>
2
+ <div
3
+ :class="['kiwi-sidebar-section-' + section]"
4
+ class="kiwi-sidebar kiwi-theme-bg"
5
+ >
6
+ <span v-if="!sidebarState.isOpen" class="kiwi-sidebar-options">
7
+ <div class="kiwi-sidebar-close" @click="sidebarState.close()">
8
+ {{ $t('close') }}<i class="fa fa-times" aria-hidden="true" />
9
+ </div>
10
+ </span>
11
+
12
+ <template v-if="sidebarState.activeComponent">
13
+ <component
14
+ :is="sidebarState.activeComponent"
15
+ v-bind="sidebarState.activeComponentProps"
16
+ :network="network"
17
+ :buffer="buffer"
18
+ :sidebar-state="sidebarState"
19
+ />
20
+ </template>
21
+ <template v-else-if="buffer">
22
+ <template v-if="buffer.isChannel()">
23
+ <div
24
+ v-if="section === 'settings'"
25
+ class="kiwi-sidebar-buffersettings"
26
+ @click.stop=""
27
+ >
28
+
29
+ <tabbed-view ref="tabs">
30
+ <tabbed-tab :header="$t('settings')" :focus="true" name="settings">
31
+ <h3>{{ $t('channel_settings') }}</h3>
32
+ <hr>
33
+ <channel-info :buffer="buffer" />
34
+
35
+ <div class="kiwi-sidebar-settings">
36
+ <h3>{{ $t('side_settings') }}</h3>
37
+ <hr>
38
+ <form class="u-form">
39
+ <label class="u-checkbox-wrapper">
40
+ <span>{{ $t('side_joins') }}</span>
41
+ <input v-model="settingShowJoinParts" type="checkbox">
42
+ </label>
43
+ <label class="u-checkbox-wrapper">
44
+ <span>{{ $t('side_topics') }}</span>
45
+ <input v-model="settingShowTopics" type="checkbox">
46
+ </label>
47
+ <label class="u-checkbox-wrapper">
48
+ <span>{{ $t('side_nick_changes') }}</span>
49
+ <input v-model="settingShowNickChanges" type="checkbox">
50
+ </label>
51
+ <label class="u-checkbox-wrapper">
52
+ <span>{{ $t('side_mode_changes') }}</span>
53
+ <input v-model="settingShowModeChanges" type="checkbox">
54
+ </label>
55
+ <label class="u-checkbox-wrapper">
56
+ <span>{{ $t('side_formatting') }}</span>
57
+ <input v-model="settingExtraFormatting" type="checkbox">
58
+ </label>
59
+ <label class="u-checkbox-wrapper">
60
+ <span>{{ $t('side_colours') }}</span>
61
+ <input v-model="settingColouredNicklist" type="checkbox">
62
+ </label>
63
+ <label class="u-checkbox-wrapper">
64
+ <span>{{ $t('settings_share_typing') }}</span>
65
+ <input v-model="settingShareTyping" type="checkbox">
66
+ </label>
67
+ </form>
68
+ </div>
69
+ </tabbed-tab>
70
+ <tabbed-tab :header="$t('access')" name="access">
71
+ <a
72
+ :class="{
73
+ 'kiwi-sidebar-accesstab--active': accessTab === 'banlist'
74
+ }"
75
+ class="u-link kiwi-sidebar-accesstab"
76
+ @click="accessTab='banlist'"
77
+ >
78
+ {{ $t('banned') }}
79
+ </a>
80
+ <a
81
+ :class="{
82
+ 'kiwi-sidebar-accesstab--active': accessTab === 'invitelist'
83
+ }"
84
+ class="u-link kiwi-sidebar-accesstab"
85
+ @click="accessTab='invitelist'"
86
+ >
87
+ {{ $t('invited') }}
88
+ </a>
89
+ <channel-banlist v-if="accessTab==='banlist'" :buffer="buffer" />
90
+ <channel-invitelist v-if="accessTab==='invitelist'" :buffer="buffer" />
91
+ </tabbed-tab>
92
+ <tabbed-tab :header="$t('notifications')" name="notifications">
93
+ <buffer-settings :buffer="buffer" />
94
+ </tabbed-tab>
95
+ <tabbed-tab
96
+ v-for="item in pluginUiElements"
97
+ :key="item.id"
98
+ :header="item.title()"
99
+ :name="item.tabName"
100
+ >
101
+ <component
102
+ :is="item.component"
103
+ v-bind="item.props"
104
+ :network="network"
105
+ :buffer="buffer"
106
+ :sidebar-state="sidebarState"
107
+ />
108
+ </tabbed-tab>
109
+ </tabbed-view>
110
+ </div>
111
+
112
+ <div
113
+ v-else-if="section === 'user'"
114
+ class="kiwi-sidebar-userbox"
115
+ @click.stop=""
116
+ >
117
+ <user-box
118
+ :network="network"
119
+ :buffer="buffer"
120
+ :user="sidebarState.sidebarUser"
121
+ :sidebar-state="sidebarState"
122
+ />
123
+ </div>
124
+
125
+ <nicklist
126
+ v-else-if="section === 'nicklist'"
127
+ :network="network"
128
+ :buffer="buffer"
129
+ :sidebar-state="sidebarState"
130
+ />
131
+
132
+ <sidebar-about-buffer
133
+ v-else-if="section === 'about'"
134
+ :network="network"
135
+ :buffer="buffer"
136
+ :sidebar-state="sidebarState"
137
+ />
138
+ </template>
139
+ <template v-else-if="buffer.isQuery()">
140
+ <div
141
+ v-if="section === 'user'"
142
+ class="kiwi-sidebar-userbox"
143
+ @click.stop=""
144
+ >
145
+ <user-box
146
+ :network="network"
147
+ :buffer="buffer"
148
+ :user="sidebarState.sidebarUser"
149
+ :sidebar-state="sidebarState"
150
+ />
151
+ </div>
152
+ </template>
153
+ </template>
154
+ <template v-else>
155
+ {{ $t('side_buffer') }}
156
+ </template>
157
+ </div>
158
+ </template>
159
+
160
+ <script>
161
+ 'kiwi public';
162
+
163
+ import UserBox from '@/components/UserBox';
164
+ import GlobalApi from '@/libs/GlobalApi';
165
+ import SidebarState from './SidebarState';
166
+ import BufferSettings from './BufferSettings';
167
+ import ChannelInfo from './ChannelInfo';
168
+ import SidebarAboutBuffer from './SidebarAboutBuffer';
169
+ import ChannelBanlist from './ChannelBanlist';
170
+ import ChannelInvitelist from './ChannelInvitelist';
171
+ import Nicklist from './Nicklist';
172
+
173
+ export { SidebarState as State };
174
+
175
+ export default {
176
+ components: {
177
+ BufferSettings,
178
+ SidebarAboutBuffer,
179
+ ChannelInfo,
180
+ ChannelBanlist,
181
+ ChannelInvitelist,
182
+ Nicklist,
183
+ UserBox,
184
+ },
185
+ props: ['network', 'buffer', 'sidebarState'],
186
+ data() {
187
+ return {
188
+ pluginUiElements: GlobalApi.singleton().sideBarPlugins,
189
+ accessTab: 'banlist',
190
+ };
191
+ },
192
+ computed: {
193
+ section() {
194
+ if (this.sidebarState.activeComponent) {
195
+ return 'component';
196
+ }
197
+
198
+ return this.sidebarState.section();
199
+ },
200
+ settingShowJoinParts: {
201
+ get() {
202
+ return this.buffer.setting('show_joinparts');
203
+ },
204
+ set(newVal) {
205
+ return this.buffer.setting('show_joinparts', newVal);
206
+ },
207
+ },
208
+ settingShowTopics: {
209
+ get() {
210
+ return this.buffer.setting('show_topics');
211
+ },
212
+ set(newVal) {
213
+ return this.buffer.setting('show_topics', newVal);
214
+ },
215
+ },
216
+ settingShowNickChanges: {
217
+ get() {
218
+ return this.buffer.setting('show_nick_changes');
219
+ },
220
+ set(newVal) {
221
+ return this.buffer.setting('show_nick_changes', newVal);
222
+ },
223
+ },
224
+ settingShowModeChanges: {
225
+ get() {
226
+ return this.buffer.setting('show_mode_changes');
227
+ },
228
+ set(newVal) {
229
+ return this.buffer.setting('show_mode_changes', newVal);
230
+ },
231
+ },
232
+ settingColouredNicklist: {
233
+ get() {
234
+ return this.buffer.setting('coloured_nicklist');
235
+ },
236
+ set(newVal) {
237
+ return this.buffer.setting('coloured_nicklist', newVal);
238
+ },
239
+ },
240
+ settingExtraFormatting: {
241
+ get() {
242
+ return this.buffer.setting('extra_formatting');
243
+ },
244
+ set(newVal) {
245
+ return this.buffer.setting('extra_formatting', newVal);
246
+ },
247
+ },
248
+ settingShareTyping: {
249
+ get: function getSettingShareTyping() {
250
+ return this.buffer.setting('share_typing');
251
+ },
252
+ set: function setSettingShareTyping(newVal) {
253
+ return this.buffer.setting('share_typing', newVal);
254
+ },
255
+ },
256
+ bufferType() {
257
+ let type = '';
258
+
259
+ if (!this.buffer) {
260
+ type = 'none';
261
+ } else if (this.buffer.isServer()) {
262
+ type = 'server';
263
+ } else if (this.buffer.isChannel()) {
264
+ type = 'channel';
265
+ } else if (this.buffer.isQuery()) {
266
+ type = 'query';
267
+ }
268
+
269
+ return type;
270
+ },
271
+ },
272
+ created() {
273
+ this.listen(this.$state, 'sidebar.tab.show', (tabName) => {
274
+ this.showTab(tabName);
275
+ });
276
+ },
277
+ methods: {
278
+ showTab(tabName) {
279
+ this.$refs.tabs.setActiveByName(tabName);
280
+ },
281
+ },
282
+ };
283
+
284
+ </script>
285
+
286
+ <style lang="less">
287
+ .kiwi-sidebar {
288
+ box-sizing: border-box;
289
+ display: flex;
290
+ flex-direction: column;
291
+ overflow: hidden;
292
+ z-index: 100;
293
+ }
294
+
295
+ .kiwi-sidebar.kiwi-sidebar-section-settings {
296
+ width: 500px;
297
+ max-width: 500px;
298
+ }
299
+
300
+ .kiwi-sidebar .u-form textarea {
301
+ min-width: 100%;
302
+ max-width: 100%;
303
+ min-height: 80px;
304
+ resize: vertical;
305
+ }
306
+
307
+ .kiwi-sidebar-buffersettings {
308
+ overflow: hidden;
309
+ height: 100%;
310
+ }
311
+
312
+ .kiwi-sidebar-buffersettings .u-tabbed-content {
313
+ padding: 1em;
314
+ }
315
+
316
+ .kiwi-sidebar-userbox {
317
+ overflow: hidden;
318
+ height: 100%;
319
+ }
320
+
321
+ .kiwi-sidebar-settings {
322
+ margin-bottom: 20px;
323
+ }
324
+
325
+ .kiwi-sidebar-settings label {
326
+ display: block;
327
+ }
328
+
329
+ @keyframes settingstransition {
330
+ from { margin-top: 50px; }
331
+ to { margin-top: 100px; }
332
+ }
333
+
334
+ @keyframes nicklisttransition {
335
+ from { height: 0; }
336
+ to { height: 100%; }
337
+ }
338
+
339
+ .kiwi-sidebar-accesstab {
340
+ margin-right: 1em;
341
+ }
342
+
343
+ .kiwi-sidebar-accesstab--active {
344
+ font-weight: bold;
345
+ }
346
+
347
+ .kiwi-channelbanlist-empty {
348
+ margin-top: 10px;
349
+ }
350
+
351
+ .kiwi-sidebar-options {
352
+ display: none;
353
+ }
354
+
355
+ @media screen and (max-width: 769px) {
356
+ .kiwi-sidebar-options {
357
+ display: block;
358
+ cursor: pointer;
359
+ font-weight: 600;
360
+ width: 100%;
361
+ position: relative;
362
+ box-sizing: border-box;
363
+ text-transform: uppercase;
364
+ line-height: 47px;
365
+ vertical-align: top;
366
+ }
367
+
368
+ .kiwi-sidebar-options .kiwi-sidebar-close {
369
+ width: 100%;
370
+ display: block;
371
+ padding: 0 15px;
372
+ height: 50px;
373
+ line-height: 50px;
374
+ text-align: right;
375
+ box-sizing: border-box;
376
+ letter-spacing: 2px;
377
+ transition: background 0.3s;
378
+ }
379
+
380
+ .kiwi-sidebar-options .kiwi-sidebar-close i {
381
+ margin-left: 5px;
382
+ font-size: 1.5em;
383
+ line-height: 47px;
384
+ position: relative;
385
+ top: 2px;
386
+ }
387
+
388
+ .kiwi-sidebar .u-tabbed-view-tab {
389
+ width: 100%;
390
+ }
391
+
392
+ .kiwi-sidebar .u-tabbed-view-tab.u-tabbed-view-tab--active {
393
+ border-bottom: 3px solid #42b992;
394
+ margin-bottom: 0;
395
+ }
396
+
397
+ .kiwi-sidebar .u-form input[type="checkbox"] {
398
+ margin-right: 4px;
399
+ }
400
+
401
+ .kiwi-sidebar .u-form label span {
402
+ margin-right: 0;
403
+ margin-left: 0;
404
+ }
405
+
406
+ .kiwi-container--sidebar-drawn .kiwi-sidebar {
407
+ width: 100%;
408
+ max-width: 100%;
409
+ }
410
+
411
+ .kiwi-sidebar-buffersettings {
412
+ padding-bottom: 10px;
413
+ }
414
+
415
+ .kiwi-channelbanlist {
416
+ float: left;
417
+ width: 100%;
418
+ }
419
+
420
+ .kiwi-channelbanlist-table {
421
+ margin-top: 30px;
422
+ }
423
+
424
+ .kiwi-channelbanlist .u-form {
425
+ line-height: 10px;
426
+ }
427
+ }
428
+
429
+ </style>