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.
- package/.github/workflows/ci.yml +6 -1
- package/.gitmodules +3 -0
- package/CHANGELOG.md +214 -0
- package/README.md +110 -23
- package/apps/aws-stack/package.json +1 -1
- package/apps/cf-tcp-container/package.json +1 -1
- package/apps/cf-worker/package.json +1 -1
- package/apps/cf-worker/src/origin-allowlist.ts +99 -0
- package/apps/cf-worker/src/worker.ts +89 -9
- package/apps/cf-worker/tests/fixtures/web-dist/app/index.html +18 -0
- package/apps/cf-worker/tests/fixtures/web-dist/index.html +18 -0
- package/apps/cf-worker/tests/origin-allowlist.test.ts +101 -0
- package/apps/cf-worker/tests/smoke.test.ts +28 -2
- package/apps/cf-worker/tests/ws-origin.test.ts +89 -0
- package/apps/cf-worker/wrangler.test.toml +23 -0
- package/apps/cf-worker/wrangler.toml +54 -0
- package/apps/local-cli/package.json +1 -1
- package/apps/web/landing/index.html +217 -0
- package/apps/web/package.json +28 -0
- package/apps/web/scripts/build.mjs +125 -0
- package/apps/web/src/build-env.ts +43 -0
- package/apps/web/src/config-schema.ts +138 -0
- package/apps/web/static/config.json +28 -0
- package/apps/web/static/config.prod.json +28 -0
- package/apps/web/static/config.staging.json +28 -0
- package/apps/web/tests/build-env.test.ts +63 -0
- package/apps/web/tests/build-smoke.test.ts +103 -0
- package/apps/web/tests/config-schema.test.ts +432 -0
- package/apps/web/tests/workspace.test.ts +12 -0
- package/apps/web/tsconfig.json +10 -0
- package/apps/web/upstream/.browserslistrc +3 -0
- package/apps/web/upstream/.editorconfig +9 -0
- package/apps/web/upstream/.eslintignore +3 -0
- package/apps/web/upstream/.eslintrc.js +90 -0
- package/apps/web/upstream/.github/FUNDING.yml +12 -0
- package/apps/web/upstream/.github/ISSUE_TEMPLATE/bug_report.md +38 -0
- package/apps/web/upstream/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- package/apps/web/upstream/.github/workflows/push.yml +26 -0
- package/apps/web/upstream/.github/workflows/release.yml +33 -0
- package/apps/web/upstream/.github/workflows/release_manual.yml +55 -0
- package/apps/web/upstream/.prettierrc.js +9 -0
- package/apps/web/upstream/.stylelintignore +5 -0
- package/apps/web/upstream/.stylelintrc.js +21 -0
- package/apps/web/upstream/LICENSE +201 -0
- package/apps/web/upstream/README.md +76 -0
- package/apps/web/upstream/babel.config.js +25 -0
- package/apps/web/upstream/crowdin.yml +3 -0
- package/apps/web/upstream/index.html +35 -0
- package/apps/web/upstream/jest.config.js +7 -0
- package/apps/web/upstream/jsdoc.json +22 -0
- package/apps/web/upstream/package.json +80 -0
- package/apps/web/upstream/scripts/pre-commit +43 -0
- package/apps/web/upstream/src/components/App.vue +516 -0
- package/apps/web/upstream/src/components/AppSettings.vue +587 -0
- package/apps/web/upstream/src/components/AutoComplete.vue +284 -0
- package/apps/web/upstream/src/components/Avatar.vue +105 -0
- package/apps/web/upstream/src/components/AwayStatusIndicator.vue +77 -0
- package/apps/web/upstream/src/components/BufferKey.vue +121 -0
- package/apps/web/upstream/src/components/BufferSettings.vue +97 -0
- package/apps/web/upstream/src/components/Captcha.vue +85 -0
- package/apps/web/upstream/src/components/ChannelBanlist.vue +96 -0
- package/apps/web/upstream/src/components/ChannelInfo.vue +159 -0
- package/apps/web/upstream/src/components/ChannelInvitelist.vue +276 -0
- package/apps/web/upstream/src/components/ChannelList.vue +345 -0
- package/apps/web/upstream/src/components/Container.vue +401 -0
- package/apps/web/upstream/src/components/ContainerHeader.vue +522 -0
- package/apps/web/upstream/src/components/ControlInput.vue +1016 -0
- package/apps/web/upstream/src/components/LoadingAnimation.vue +104 -0
- package/apps/web/upstream/src/components/MediaViewer.vue +199 -0
- package/apps/web/upstream/src/components/MessageInfo.vue +192 -0
- package/apps/web/upstream/src/components/MessageList.vue +1028 -0
- package/apps/web/upstream/src/components/MessageListAvatar.vue +20 -0
- package/apps/web/upstream/src/components/MessageListMessageCompact.vue +361 -0
- package/apps/web/upstream/src/components/MessageListMessageInline.vue +257 -0
- package/apps/web/upstream/src/components/MessageListMessageModern.vue +430 -0
- package/apps/web/upstream/src/components/NetworkSettings.vue +528 -0
- package/apps/web/upstream/src/components/Nicklist.vue +309 -0
- package/apps/web/upstream/src/components/NicklistUser.vue +181 -0
- package/apps/web/upstream/src/components/NotConnected.vue +271 -0
- package/apps/web/upstream/src/components/SelfUser.vue +283 -0
- package/apps/web/upstream/src/components/ServerSelector.vue +162 -0
- package/apps/web/upstream/src/components/ServerView.vue +126 -0
- package/apps/web/upstream/src/components/SettingsAdvanced.vue +232 -0
- package/apps/web/upstream/src/components/SettingsAliases.vue +121 -0
- package/apps/web/upstream/src/components/Sidebar.vue +429 -0
- package/apps/web/upstream/src/components/SidebarAboutBuffer.vue +288 -0
- package/apps/web/upstream/src/components/SidebarState.vue +145 -0
- package/apps/web/upstream/src/components/StartupError.vue +35 -0
- package/apps/web/upstream/src/components/StateBrowser.vue +420 -0
- package/apps/web/upstream/src/components/StateBrowserBuffer.vue +124 -0
- package/apps/web/upstream/src/components/StateBrowserNetwork.vue +823 -0
- package/apps/web/upstream/src/components/StateBrowserUsermenu.vue +162 -0
- package/apps/web/upstream/src/components/TypingStatusIndicator.vue +34 -0
- package/apps/web/upstream/src/components/TypingUsersList.vue +56 -0
- package/apps/web/upstream/src/components/UrlEmbed.vue +149 -0
- package/apps/web/upstream/src/components/UserBox.vue +728 -0
- package/apps/web/upstream/src/components/inputtools/Emoji.vue +67 -0
- package/apps/web/upstream/src/components/inputtools/TextStyle.vue +142 -0
- package/apps/web/upstream/src/components/startups/CommonLayout.vue +208 -0
- package/apps/web/upstream/src/components/startups/CustomServer.vue +495 -0
- package/apps/web/upstream/src/components/startups/KiwiBnc.vue +361 -0
- package/apps/web/upstream/src/components/startups/Personal.vue +317 -0
- package/apps/web/upstream/src/components/startups/Welcome.vue +544 -0
- package/apps/web/upstream/src/components/startups/ZncLogin.vue +229 -0
- package/apps/web/upstream/src/components/utils/InputConfirm.vue +68 -0
- package/apps/web/upstream/src/components/utils/InputPrompt.vue +118 -0
- package/apps/web/upstream/src/components/utils/InputText.vue +172 -0
- package/apps/web/upstream/src/components/utils/IrcInput.vue +579 -0
- package/apps/web/upstream/src/components/utils/PluginWrapper.vue +26 -0
- package/apps/web/upstream/src/components/utils/TabbedView.vue +149 -0
- package/apps/web/upstream/src/components/utils/TransitionExpand.vue +97 -0
- package/apps/web/upstream/src/helpers/Colours.js +128 -0
- package/apps/web/upstream/src/helpers/IrcdDiffs.js +26 -0
- package/apps/web/upstream/src/helpers/Md5.js +193 -0
- package/apps/web/upstream/src/helpers/Misc.js +401 -0
- package/apps/web/upstream/src/helpers/TextFormatting.js +237 -0
- package/apps/web/upstream/src/libs/AliasRewriter.js +157 -0
- package/apps/web/upstream/src/libs/AudioManager.js +60 -0
- package/apps/web/upstream/src/libs/BouncerMiddleware.js +247 -0
- package/apps/web/upstream/src/libs/BouncerProvider.js +551 -0
- package/apps/web/upstream/src/libs/ChathistoryMiddleware.js +153 -0
- package/apps/web/upstream/src/libs/ConfigLoader.js +94 -0
- package/apps/web/upstream/src/libs/EmojiProvider.js +46 -0
- package/apps/web/upstream/src/libs/GlobalApi.js +346 -0
- package/apps/web/upstream/src/libs/IPC.js +51 -0
- package/apps/web/upstream/src/libs/InputHandler.js +921 -0
- package/apps/web/upstream/src/libs/IrcClient.js +1506 -0
- package/apps/web/upstream/src/libs/Logger.js +71 -0
- package/apps/web/upstream/src/libs/Message.js +169 -0
- package/apps/web/upstream/src/libs/MessageFormatter.js +364 -0
- package/apps/web/upstream/src/libs/MessageParser.js +249 -0
- package/apps/web/upstream/src/libs/Notifications.js +78 -0
- package/apps/web/upstream/src/libs/ServerConnection.js +270 -0
- package/apps/web/upstream/src/libs/ServerSession.js +102 -0
- package/apps/web/upstream/src/libs/SoundBleep.js +20 -0
- package/apps/web/upstream/src/libs/StatePersistence.js +90 -0
- package/apps/web/upstream/src/libs/ThemeManager.js +128 -0
- package/apps/web/upstream/src/libs/TypingMiddleware.js +105 -0
- package/apps/web/upstream/src/libs/WindowTitle.js +63 -0
- package/apps/web/upstream/src/libs/batchedAdd.js +74 -0
- package/apps/web/upstream/src/libs/bufferTools.js +177 -0
- package/apps/web/upstream/src/libs/polyfill/Element.closest.js +18 -0
- package/apps/web/upstream/src/libs/renderers/Html.js +113 -0
- package/apps/web/upstream/src/libs/settingTools.js +31 -0
- package/apps/web/upstream/src/libs/state/BufferState.js +703 -0
- package/apps/web/upstream/src/libs/state/NetworkState.js +158 -0
- package/apps/web/upstream/src/libs/state/UserState.js +89 -0
- package/apps/web/upstream/src/libs/state/common.js +26 -0
- package/apps/web/upstream/src/libs/state.js +961 -0
- package/apps/web/upstream/src/libs/storage/Local.js +51 -0
- package/apps/web/upstream/src/main.js +566 -0
- package/apps/web/upstream/src/res/autocompleteCommands.js +31 -0
- package/apps/web/upstream/src/res/configTemplates.js +373 -0
- package/apps/web/upstream/src/res/globalStyle.css +277 -0
- package/apps/web/upstream/src/res/kiwiLoadingLogo.png +0 -0
- package/apps/web/upstream/src/res/locales/app.af-ZA.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.ar-SA.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.bg-BG.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.bs-BA.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.ca-ES.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.cs-CZ.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.da-DK.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.de-DE.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.dev.po +1246 -0
- package/apps/web/upstream/src/res/locales/app.el-GR.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.en-US.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.es-419.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.es-AR.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.es-EM.po +536 -0
- package/apps/web/upstream/src/res/locales/app.es-ES.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.es-US.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.eu-ES.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.fi-FI.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.fr-FR.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.gl-ES.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.he-IL.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.hi-IN.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.hu-HU.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.id-ID.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.it-IT.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.ja-JP.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.ko-KR.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.nl-NL.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.no-NO.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.pl-PL.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.pt-BR.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.pt-PT.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.ro-RO.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.ru-RU.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.sl-SI.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.sq-AL.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.sr-SP.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.sv-SE.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.tr-TR.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.uk-UA.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.vi-VN.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.zh-CN.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.zh-TW.po +1145 -0
- package/apps/web/upstream/src/res/localesList.json +27 -0
- package/apps/web/upstream/src/res/logo.png +0 -0
- package/apps/web/upstream/src/thirdparty/about.html +43 -0
- package/apps/web/upstream/src/thirdparty/index.js +5 -0
- package/apps/web/upstream/src/thirdparty/kiwiirccom.vue +185 -0
- package/apps/web/upstream/static/config.json +28 -0
- package/apps/web/upstream/static/emoticons/smile.png +0 -0
- package/apps/web/upstream/static/favicon.png +0 -0
- package/apps/web/upstream/static/highlight.mp3 +0 -0
- package/apps/web/upstream/static/highlight.ogg +0 -0
- package/apps/web/upstream/static/locales/.gitignore +2 -0
- package/apps/web/upstream/static/plugins/customise.html.example +10 -0
- package/apps/web/upstream/static/themes/coffee/theme.css +145 -0
- package/apps/web/upstream/static/themes/common/base.css +1064 -0
- package/apps/web/upstream/static/themes/dark/theme.css +196 -0
- package/apps/web/upstream/static/themes/default/theme.css +92 -0
- package/apps/web/upstream/static/themes/elite/theme.css +248 -0
- package/apps/web/upstream/static/themes/grayfox/theme.css +143 -0
- package/apps/web/upstream/static/themes/nightswatch/theme.css +367 -0
- package/apps/web/upstream/static/themes/osprey/theme.css +115 -0
- package/apps/web/upstream/static/themes/radioactive/theme.css +1211 -0
- package/apps/web/upstream/static/themes/sky/theme.css +107 -0
- package/apps/web/upstream/tests/unit/BatchAdd.spec.js +174 -0
- package/apps/web/upstream/tests/unit/MessageParser.spec.js +125 -0
- package/apps/web/upstream/tests/unit/Misc.spec.js +24 -0
- package/apps/web/upstream/tests/unit/NetworkState.spec.js +58 -0
- package/apps/web/upstream/tests/unit/StartupError.spec.js +20 -0
- package/apps/web/upstream/vue.config.js +150 -0
- package/apps/web/upstream/yarn.lock +9767 -0
- package/apps/web/vitest.config.ts +13 -0
- package/biome.json +1 -0
- package/docs/Home.md +1 -0
- package/docs/WebClientGuide.md +535 -0
- package/package.json +2 -2
- package/packages/aws-adapter/package.json +1 -1
- package/packages/cf-adapter/package.json +1 -1
- package/packages/cf-adapter/tests/cf-harness.ts +12 -1
- package/packages/in-memory-runtime/package.json +1 -1
- package/packages/irc-core/package.json +1 -1
- package/packages/irc-core/reports/mutation/mutation.html +342 -0
- package/packages/irc-core/tests/batch.test.ts +15 -0
- package/packages/irc-core/tests/numerics.test.ts +13 -0
- package/packages/irc-core/tests/parser.test.ts +109 -0
- package/packages/irc-server/package.json +1 -1
- package/packages/irc-test-support/package.json +1 -1
- package/packages/irc-test-support/src/scenarios.ts +24 -2
- package/tools/ci-hardening/package.json +1 -1
- package/tools/load-test/package.json +1 -1
- package/tools/tcp-ws-forwarder/package.json +1 -1
|
@@ -0,0 +1,587 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="kiwi-appsettings">
|
|
3
|
+
|
|
4
|
+
<div class="kiwi-appsettings-close" @click="closeSettings">
|
|
5
|
+
<span>{{ $t('close') }}</span>
|
|
6
|
+
<i class="fa fa-times" aria-hidden="true" />
|
|
7
|
+
</div>
|
|
8
|
+
|
|
9
|
+
<form class="u-form">
|
|
10
|
+
<tabbed-view ref="tabs" class="kiwi-appsettings-tab-container">
|
|
11
|
+
<tabbed-tab :header="$t('settings_general')" :focus="true" name="general">
|
|
12
|
+
|
|
13
|
+
<div class="kiwi-appsettings-block">
|
|
14
|
+
<h3>{{ $t('settings_general') }}</h3>
|
|
15
|
+
<div class="kiwi-appsettings-section kiwi-appsettings-general">
|
|
16
|
+
<label class="kiwi-appsettings-setting-language">
|
|
17
|
+
<span>{{ $t('settings_language') }}</span>
|
|
18
|
+
<div><i class="fa fa-globe" /></div>
|
|
19
|
+
<select v-model="settingLanguage">
|
|
20
|
+
<option value="">
|
|
21
|
+
Auto
|
|
22
|
+
</option>
|
|
23
|
+
<option v-for="l in localesList" :key="l[0]" :value="l[0]">
|
|
24
|
+
{{ l[1] }}
|
|
25
|
+
</option>
|
|
26
|
+
</select>
|
|
27
|
+
</label>
|
|
28
|
+
<label class="kiwi-appsettings-setting-theme">
|
|
29
|
+
<span>{{ $t('settings_theme') }} </span>
|
|
30
|
+
<a
|
|
31
|
+
:title="$t('refresh_theme')"
|
|
32
|
+
class="kiwi-appsettings-theme-reload"
|
|
33
|
+
@click="refreshTheme"
|
|
34
|
+
>
|
|
35
|
+
<i class="fa fa-refresh" aria-hidden="true" />
|
|
36
|
+
</a>
|
|
37
|
+
<select v-model="theme">
|
|
38
|
+
<option
|
|
39
|
+
v-for="t in settings.themes"
|
|
40
|
+
:key="t.name"
|
|
41
|
+
:value="t.name"
|
|
42
|
+
>
|
|
43
|
+
{{ t.name }}
|
|
44
|
+
</option>
|
|
45
|
+
</select>
|
|
46
|
+
</label>
|
|
47
|
+
<label v-if="theme==='custom'">
|
|
48
|
+
<span>{{ $t('settings_themeurl') }} </span>
|
|
49
|
+
<input v-model="customThemeUrl" class="u-input">
|
|
50
|
+
</label>
|
|
51
|
+
<label class="u-checkbox-wrapper">
|
|
52
|
+
<span>{{ $t('settings_show_autocomplete') }} </span>
|
|
53
|
+
<input v-model="settingShowAutoComplete" type="checkbox">
|
|
54
|
+
</label>
|
|
55
|
+
<label v-if="themeSupportsMonospace" class="u-checkbox-wrapper">
|
|
56
|
+
<span>{{ $t('settings_use_monospace') }} </span>
|
|
57
|
+
<input v-model="settingUseMonospace" type="checkbox">
|
|
58
|
+
</label>
|
|
59
|
+
<div
|
|
60
|
+
v-if="canRegisterProtocolHandler"
|
|
61
|
+
style="margin-top: 10px; text-align: center;"
|
|
62
|
+
>
|
|
63
|
+
<a
|
|
64
|
+
class="u-button u-button-primary"
|
|
65
|
+
@click="makeDefaultProtocolHandler()"
|
|
66
|
+
>
|
|
67
|
+
<i>{{ $t('settings_default_handler') }}</i>
|
|
68
|
+
</a>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
|
|
73
|
+
<div class="kiwi-appsettings-block">
|
|
74
|
+
<h3>{{ $t('settings_messages_title') }}</h3>
|
|
75
|
+
<div class="kiwi-appsettings-section kiwi-appsettings-messages">
|
|
76
|
+
<label class="kiwi-appsettings-messagelistDisplay">
|
|
77
|
+
<span>{{ $t('settings_messagelayout') }} </span>
|
|
78
|
+
<select v-model="settingMessageLayout">
|
|
79
|
+
<option value="traditional">Traditional</option>
|
|
80
|
+
<option value="modern">Modern</option>
|
|
81
|
+
<option value="inline">Inline</option>
|
|
82
|
+
</select>
|
|
83
|
+
</label>
|
|
84
|
+
<label class="u-checkbox-wrapper">
|
|
85
|
+
<span>{{ $t('settings_timestamps') }} </span>
|
|
86
|
+
<input v-model="settingBufferShowTimestamps" type="checkbox">
|
|
87
|
+
</label>
|
|
88
|
+
<label class="u-checkbox-wrapper">
|
|
89
|
+
<span>{{ $t('settings_24hour_timestamps') }} </span>
|
|
90
|
+
<input v-model="timestamps_24h" type="checkbox">
|
|
91
|
+
</label>
|
|
92
|
+
<label class="u-checkbox-wrapper">
|
|
93
|
+
<span>{{ $t('settings_emoticons') }} </span>
|
|
94
|
+
<input v-model="settingBufferShowEmoticons" type="checkbox">
|
|
95
|
+
</label>
|
|
96
|
+
<label class="u-checkbox-wrapper">
|
|
97
|
+
<span>{{ $t('settings_block_private') }} </span>
|
|
98
|
+
<input v-model="settingBufferBlockPms" type="checkbox">
|
|
99
|
+
</label>
|
|
100
|
+
<label
|
|
101
|
+
class="kiwi-appsettings-full kiwi-appsettings-setting-scrollback"
|
|
102
|
+
>
|
|
103
|
+
<input
|
|
104
|
+
v-model="settingBufferScrollbackSize"
|
|
105
|
+
type="number"
|
|
106
|
+
class="u-input"
|
|
107
|
+
>
|
|
108
|
+
<span>{{ $t('settings_scrollback') }} </span>
|
|
109
|
+
</label>
|
|
110
|
+
<label class="u-checkbox-wrapper">
|
|
111
|
+
<span>{{ $t('settings_formatting') }} </span>
|
|
112
|
+
<input v-model="settingBufferExtraFormatting" type="checkbox">
|
|
113
|
+
</label>
|
|
114
|
+
<label class="u-checkbox-wrapper">
|
|
115
|
+
<span>{{ $t('settings_nick_colouring') }} </span>
|
|
116
|
+
<input v-model="settingBufferColourNicknames" type="checkbox">
|
|
117
|
+
</label>
|
|
118
|
+
<label class="u-checkbox-wrapper">
|
|
119
|
+
<span>{{ $t('settings_share_typing') }} </span>
|
|
120
|
+
<input v-model="settingBufferShareTyping" type="checkbox">
|
|
121
|
+
</label>
|
|
122
|
+
<label class="u-checkbox-wrapper">
|
|
123
|
+
<span>{{ $t('settings_show_inline_previews') }} </span>
|
|
124
|
+
<input v-model="settingBufferInlineLinkPreviews" type="checkbox">
|
|
125
|
+
</label>
|
|
126
|
+
</div>
|
|
127
|
+
</div>
|
|
128
|
+
|
|
129
|
+
<div class="kiwi-appsettings-block">
|
|
130
|
+
<h3>{{ $t('notifications') }}</h3>
|
|
131
|
+
<div class="kiwi-appsettings-section kiwi-appsettings-notifications">
|
|
132
|
+
<label class="kiwi-appsettings-setting-showjoinpart u-checkbox-wrapper">
|
|
133
|
+
<span>{{ $t('settings_show_joinpart') }} </span>
|
|
134
|
+
<input v-model="settingBufferTrafficAsActivity" type="checkbox">
|
|
135
|
+
</label>
|
|
136
|
+
<label class="u-checkbox-wrapper">
|
|
137
|
+
<span>{{ $t('settings_mute_sound') }} </span>
|
|
138
|
+
<input v-model="settingBufferMuteSound" type="checkbox">
|
|
139
|
+
</label>
|
|
140
|
+
<label class="kiwi-appsettings-full">
|
|
141
|
+
<span>{{ $t('settings_highlight') }} </span>
|
|
142
|
+
<input v-model="settingHighlights" type="text" class="u-input">
|
|
143
|
+
</label>
|
|
144
|
+
</div>
|
|
145
|
+
</div>
|
|
146
|
+
|
|
147
|
+
<div class="kiwi-appsettings-block">
|
|
148
|
+
<h3>{{ $t('operator_tools') }}</h3>
|
|
149
|
+
<div class="kiwi-appsettings-section kiwi-appsettings-operator-tools">
|
|
150
|
+
<label>
|
|
151
|
+
<span>{{ $t('settings_default_ban_mask') }} </span>
|
|
152
|
+
<input v-model="settingDefaultBanMask" class="u-input">
|
|
153
|
+
</label>
|
|
154
|
+
<label>
|
|
155
|
+
<span>{{ $t('settings_default_kick_reason') }}</span>
|
|
156
|
+
<input v-model="settingDefaultKickReason" class="u-input">
|
|
157
|
+
</label>
|
|
158
|
+
</div>
|
|
159
|
+
</div>
|
|
160
|
+
<div
|
|
161
|
+
v-if="!$state.setting('hide_advanced') && !settingAdvancedEnable"
|
|
162
|
+
class="kiwi-appsettings-block"
|
|
163
|
+
>
|
|
164
|
+
<h3>{{ $t('settings_advanced_title') }}</h3>
|
|
165
|
+
<div class="kiwi-appsettings-section kiwi-appsettings-advanced-enable">
|
|
166
|
+
<div>
|
|
167
|
+
<span style="font-weight: 600;">
|
|
168
|
+
{{ $t('warning') }}
|
|
169
|
+
</span>
|
|
170
|
+
{{ $t('settings_advanced_warning') }}
|
|
171
|
+
</div>
|
|
172
|
+
<div style="margin-top: 10px; text-align: center;">
|
|
173
|
+
<a class="u-button u-button-warning" @click="enableAdvancedTab()">
|
|
174
|
+
<i>{{ $t('settings_advanced_button') }}</i>
|
|
175
|
+
</a>
|
|
176
|
+
</div>
|
|
177
|
+
</div>
|
|
178
|
+
</div>
|
|
179
|
+
</tabbed-tab>
|
|
180
|
+
|
|
181
|
+
<tabbed-tab :header="$t('settings_aliases')" name="aliases">
|
|
182
|
+
<div class="kiwi-appsettings-block kiwi-appsettings-block-aliases">
|
|
183
|
+
<h3>{{ $t('settings_aliases') }}</h3>
|
|
184
|
+
<div class="kiwi-appsettings-section kiwi-appsettings-aliases">
|
|
185
|
+
<settings-aliases />
|
|
186
|
+
</div>
|
|
187
|
+
</div>
|
|
188
|
+
</tabbed-tab>
|
|
189
|
+
|
|
190
|
+
<tabbed-tab
|
|
191
|
+
v-if="settingAdvancedEnable"
|
|
192
|
+
:header="$t('settings_advanced')"
|
|
193
|
+
name="advanced"
|
|
194
|
+
>
|
|
195
|
+
<div class="kiwi-appsettings-block kiwi-appsettings-block-advanced">
|
|
196
|
+
<div class="kiwi-appsettings-section kiwi-appsettings-advanced">
|
|
197
|
+
<settings-advanced />
|
|
198
|
+
</div>
|
|
199
|
+
</div>
|
|
200
|
+
</tabbed-tab>
|
|
201
|
+
|
|
202
|
+
<tabbed-tab
|
|
203
|
+
v-for="item in pluginUiElements"
|
|
204
|
+
:key="item.id"
|
|
205
|
+
:header="item.title()"
|
|
206
|
+
:name="item.tabName"
|
|
207
|
+
>
|
|
208
|
+
<component :is="item.component" v-bind="item.props" />
|
|
209
|
+
</tabbed-tab>
|
|
210
|
+
</tabbed-view>
|
|
211
|
+
</form>
|
|
212
|
+
</div>
|
|
213
|
+
</template>
|
|
214
|
+
|
|
215
|
+
<script>
|
|
216
|
+
'kiwi public';
|
|
217
|
+
|
|
218
|
+
import _ from 'lodash';
|
|
219
|
+
import ThemeManager from '@/libs/ThemeManager';
|
|
220
|
+
import GlobalApi from '@/libs/GlobalApi';
|
|
221
|
+
import localesList from '@/res/localesList';
|
|
222
|
+
import SettingsAliases from './SettingsAliases';
|
|
223
|
+
import SettingsAdvanced from './SettingsAdvanced';
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Returns an object for a vuejs computated property on a state settings value
|
|
227
|
+
* This allows default settings from the server config, but overrides with user config
|
|
228
|
+
*/
|
|
229
|
+
function bindSetting(settingName) {
|
|
230
|
+
return {
|
|
231
|
+
get: function settingGetter() {
|
|
232
|
+
return this.$state.setting(settingName);
|
|
233
|
+
},
|
|
234
|
+
set: function settingSetter(newVal) {
|
|
235
|
+
this.$state.setting(settingName, newVal);
|
|
236
|
+
},
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
export default {
|
|
241
|
+
components: {
|
|
242
|
+
SettingsAliases,
|
|
243
|
+
SettingsAdvanced,
|
|
244
|
+
},
|
|
245
|
+
data: function data() {
|
|
246
|
+
return {
|
|
247
|
+
theme: '',
|
|
248
|
+
customThemeUrl: '',
|
|
249
|
+
pluginUiElements: GlobalApi.singleton().appSettingsPlugins,
|
|
250
|
+
localesList,
|
|
251
|
+
};
|
|
252
|
+
},
|
|
253
|
+
computed: {
|
|
254
|
+
themeSupportsMonospace: function themeSupportsMonospace() {
|
|
255
|
+
let themeMgr = ThemeManager.instance();
|
|
256
|
+
let val = themeMgr.themeVar('supports-monospace');
|
|
257
|
+
return val === '1';
|
|
258
|
+
},
|
|
259
|
+
canRegisterProtocolHandler: function canRegisterProtocolHandler() {
|
|
260
|
+
return !!navigator.registerProtocolHandler && this.$state.setting('allowRegisterProtocolHandler');
|
|
261
|
+
},
|
|
262
|
+
timestamps_24h: {
|
|
263
|
+
get: function get24Timestamps() {
|
|
264
|
+
// %H is 24 hour format
|
|
265
|
+
return this.$state.setting('buffers.timestamp_format').substr(0, 2) === '%H';
|
|
266
|
+
},
|
|
267
|
+
set: function set24Timestamps(newVal) {
|
|
268
|
+
let newFormat = newVal ?
|
|
269
|
+
'%H:%M:%S' :
|
|
270
|
+
'%l:%M:%S %p';
|
|
271
|
+
this.$state.setting('buffers.timestamp_format', newFormat);
|
|
272
|
+
},
|
|
273
|
+
},
|
|
274
|
+
settings: function getSettings() {
|
|
275
|
+
return this.$state.settings;
|
|
276
|
+
},
|
|
277
|
+
settingShowAutoComplete: bindSetting('showAutocomplete'),
|
|
278
|
+
settingUseMonospace: bindSetting('useMonospace'),
|
|
279
|
+
settingHighlights: bindSetting('highlights'),
|
|
280
|
+
settingBufferColourNicknames: bindSetting('buffers.colour_nicknames_in_messages'),
|
|
281
|
+
settingBufferShowTimestamps: bindSetting('buffers.show_timestamps'),
|
|
282
|
+
settingBufferShowEmoticons: bindSetting('buffers.show_emoticons'),
|
|
283
|
+
settingBufferBlockPms: bindSetting('buffers.block_pms'),
|
|
284
|
+
settingBufferScrollbackSize: bindSetting('buffers.scrollback_size'),
|
|
285
|
+
settingBufferExtraFormatting: bindSetting('buffers.extra_formatting'),
|
|
286
|
+
settingBufferTrafficAsActivity: bindSetting('buffers.traffic_as_activity'),
|
|
287
|
+
settingBufferMuteSound: bindSetting('buffers.mute_sound'),
|
|
288
|
+
settingBufferShareTyping: bindSetting('buffers.share_typing'),
|
|
289
|
+
settingBufferInlineLinkPreviews: bindSetting('buffers.inline_link_auto_previews'),
|
|
290
|
+
settingDefaultBanMask: bindSetting('buffers.default_ban_mask'),
|
|
291
|
+
settingDefaultKickReason: bindSetting('buffers.default_kick_reason'),
|
|
292
|
+
settingAdvancedEnable: {
|
|
293
|
+
get: function getSettingShowAdvancedTab() {
|
|
294
|
+
return this.$state.ui.show_advanced_tab;
|
|
295
|
+
},
|
|
296
|
+
set: function setSettingShowAdvancedTab(newVal) {
|
|
297
|
+
this.$state.ui.show_advanced_tab = newVal;
|
|
298
|
+
},
|
|
299
|
+
},
|
|
300
|
+
settingLanguage: {
|
|
301
|
+
get: function getSettingLanguage() {
|
|
302
|
+
return this.$state.setting('language') || '';
|
|
303
|
+
},
|
|
304
|
+
set: function setSettingLanguage(newVal) {
|
|
305
|
+
this.$state.setting('language', newVal || null);
|
|
306
|
+
},
|
|
307
|
+
},
|
|
308
|
+
messageLayouts() {
|
|
309
|
+
return {
|
|
310
|
+
traditional: 'compact',
|
|
311
|
+
modern: 'modern',
|
|
312
|
+
inline: 'inline',
|
|
313
|
+
};
|
|
314
|
+
},
|
|
315
|
+
settingMessageLayout: {
|
|
316
|
+
set: function setSettingMessageLayout(newVal) {
|
|
317
|
+
let l = this.messageLayouts;
|
|
318
|
+
this.$state.setting('buffers.messageLayout', l[newVal] || l.modern);
|
|
319
|
+
},
|
|
320
|
+
get() {
|
|
321
|
+
let s = this.$state.setting('buffers.messageLayout');
|
|
322
|
+
let l = _.invert(this.messageLayouts);
|
|
323
|
+
return l[s];
|
|
324
|
+
},
|
|
325
|
+
},
|
|
326
|
+
},
|
|
327
|
+
created: function created() {
|
|
328
|
+
this.listenForThemeSettings();
|
|
329
|
+
|
|
330
|
+
this.listen(this.$state, 'settings.tab.show', (tabName) => {
|
|
331
|
+
this.showTab(tabName);
|
|
332
|
+
});
|
|
333
|
+
},
|
|
334
|
+
methods: {
|
|
335
|
+
closeSettings: function closeSettings() {
|
|
336
|
+
this.$state.$emit('active.component');
|
|
337
|
+
},
|
|
338
|
+
refreshTheme: function refreshTheme() {
|
|
339
|
+
ThemeManager.instance().reload();
|
|
340
|
+
},
|
|
341
|
+
showTab(tabName) {
|
|
342
|
+
this.$refs.tabs.setActiveByName(tabName);
|
|
343
|
+
},
|
|
344
|
+
listenForThemeSettings: function listenForThemeSettings() {
|
|
345
|
+
let themeMgr = ThemeManager.instance();
|
|
346
|
+
let watches = [];
|
|
347
|
+
|
|
348
|
+
// Called when the current theme changes (including url refreshes)
|
|
349
|
+
let updateFn = () => {
|
|
350
|
+
let theme = themeMgr.currentTheme();
|
|
351
|
+
this.theme = theme.name;
|
|
352
|
+
this.customThemeUrl = theme.name === 'custom' ?
|
|
353
|
+
theme.url :
|
|
354
|
+
'';
|
|
355
|
+
};
|
|
356
|
+
|
|
357
|
+
let watchTheme = (newVal) => {
|
|
358
|
+
themeMgr.setTheme(newVal);
|
|
359
|
+
};
|
|
360
|
+
|
|
361
|
+
let watchCustomThemeUrl = (newVal) => {
|
|
362
|
+
if (themeMgr.currentTheme().name === 'custom') {
|
|
363
|
+
themeMgr.setCustomThemeUrl(newVal);
|
|
364
|
+
}
|
|
365
|
+
};
|
|
366
|
+
|
|
367
|
+
// Remove all our attached events to cleanup
|
|
368
|
+
let teardownFn = () => {
|
|
369
|
+
this.$state.$off('theme.change', updateFn);
|
|
370
|
+
watches.forEach((unwatchFn) => unwatchFn());
|
|
371
|
+
this.$off('hook:destroy', teardownFn);
|
|
372
|
+
};
|
|
373
|
+
|
|
374
|
+
// Update our info with the latest theme settings before we start
|
|
375
|
+
// listening for changes
|
|
376
|
+
updateFn();
|
|
377
|
+
|
|
378
|
+
this.$state.$on('theme.change', updateFn);
|
|
379
|
+
this.$once('hook:destroyed', teardownFn);
|
|
380
|
+
|
|
381
|
+
// $watch returns a function to stop watching the data field. Add them into
|
|
382
|
+
// an array to make it easier to iterate over them all and unwatch them all
|
|
383
|
+
// when needed.
|
|
384
|
+
watches = [
|
|
385
|
+
this.$watch('theme', watchTheme),
|
|
386
|
+
this.$watch('customThemeUrl', watchCustomThemeUrl),
|
|
387
|
+
];
|
|
388
|
+
},
|
|
389
|
+
enableAdvancedTab() {
|
|
390
|
+
this.settingAdvancedEnable = true;
|
|
391
|
+
this.$nextTick(() => {
|
|
392
|
+
this.showTab('advanced');
|
|
393
|
+
this.$el.scrollTop = 0;
|
|
394
|
+
});
|
|
395
|
+
},
|
|
396
|
+
makeDefaultProtocolHandler() {
|
|
397
|
+
navigator.registerProtocolHandler('irc', document.location.origin + document.location.pathname + '#%s', 'Kiwi IRC');
|
|
398
|
+
navigator.registerProtocolHandler('ircs', document.location.origin + document.location.pathname + '#%s', 'Kiwi IRC');
|
|
399
|
+
},
|
|
400
|
+
},
|
|
401
|
+
};
|
|
402
|
+
</script>
|
|
403
|
+
|
|
404
|
+
<style lang="less">
|
|
405
|
+
.kiwi-appsettings {
|
|
406
|
+
box-sizing: border-box;
|
|
407
|
+
height: 100%;
|
|
408
|
+
overflow-y: auto;
|
|
409
|
+
padding: 0;
|
|
410
|
+
position: relative;
|
|
411
|
+
|
|
412
|
+
.u-form {
|
|
413
|
+
width: 100%;
|
|
414
|
+
overflow: hidden;
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
.u-form label.kiwi-appsettings-setting-language.kiwi-appsettings-setting-language {
|
|
419
|
+
display: flex;
|
|
420
|
+
margin-bottom: 2em;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
.kiwi-appsettings-setting-language select {
|
|
424
|
+
flex-grow: 0;
|
|
425
|
+
max-width: 200px;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
.kiwi-appsettings-setting-language div {
|
|
429
|
+
flex-grow: 1;
|
|
430
|
+
text-align: right;
|
|
431
|
+
margin-right: 1em;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
.kiwi-appsettings-setting-language .fa-globe {
|
|
435
|
+
vertical-align: middle;
|
|
436
|
+
font-size: 1.8em;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
.kiwi-appsettings-setting-theme span {
|
|
440
|
+
margin-left: 0;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
.kiwi-appsettings-setting-theme select {
|
|
444
|
+
float: right;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
.kiwi-appsettings-setting-showjoinpart span {
|
|
448
|
+
max-width: none;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
.kiwi-appsettings-full span,
|
|
452
|
+
.kiwi-appsettings-full input {
|
|
453
|
+
width: 100%;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
.kiwi-appsettings-aliases {
|
|
457
|
+
padding: 1em 20px 2em 20px;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
.kiwi-appsettings .kiwi-appsettings-setting-scrollback input {
|
|
461
|
+
margin-right: 10px;
|
|
462
|
+
width: 80px;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
.kiwi-appsettings-tab-container {
|
|
466
|
+
width: 100%;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
.kiwi-appsettings .u-form label {
|
|
470
|
+
display: block;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
.kiwi-appsettings .u-form label span {
|
|
474
|
+
text-align: left;
|
|
475
|
+
margin-left: 0;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
.kiwi-appsettings-theme-reload {
|
|
479
|
+
margin-left: 1em;
|
|
480
|
+
float: right;
|
|
481
|
+
cursor: pointer;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
.kiwi-settings-aliases-input {
|
|
485
|
+
height: auto;
|
|
486
|
+
min-height: 300px;
|
|
487
|
+
min-height: 400px;
|
|
488
|
+
line-height: normal;
|
|
489
|
+
width: 100%;
|
|
490
|
+
max-width: 100%;
|
|
491
|
+
resize: vertical;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
.kiwi-appsettings-block {
|
|
495
|
+
max-width: 400px;
|
|
496
|
+
width: auto;
|
|
497
|
+
display: block;
|
|
498
|
+
box-sizing: border-box;
|
|
499
|
+
margin: 20px auto 20px auto;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
.kiwi-appsettings-block.kiwi-appsettings-block-advanced {
|
|
503
|
+
max-width: inherit;
|
|
504
|
+
margin: 20px;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
.kiwi-appsettings-block h3 {
|
|
508
|
+
width: 100%;
|
|
509
|
+
line-height: 45px;
|
|
510
|
+
padding: 0 10px;
|
|
511
|
+
box-sizing: border-box;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
.kiwi-appsettings-section {
|
|
515
|
+
padding: 10px;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
.kiwi-appsettings-block-aliases {
|
|
519
|
+
max-width: 750px;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
.kiwi-appsettings-close {
|
|
523
|
+
cursor: pointer;
|
|
524
|
+
position: absolute;
|
|
525
|
+
top: 0;
|
|
526
|
+
right: 0;
|
|
527
|
+
padding: 0 10px;
|
|
528
|
+
font-weight: 600;
|
|
529
|
+
box-sizing: border-box;
|
|
530
|
+
text-transform: uppercase;
|
|
531
|
+
line-height: 55px;
|
|
532
|
+
text-align: right;
|
|
533
|
+
transition: background 0.3s;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
.kiwi-appsettings-close h2 {
|
|
537
|
+
padding: 10px 0 11px 20px;
|
|
538
|
+
width: auto;
|
|
539
|
+
float: left;
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
.kiwi-appsettings-close a {
|
|
543
|
+
float: right;
|
|
544
|
+
position: static;
|
|
545
|
+
background: none;
|
|
546
|
+
border: none;
|
|
547
|
+
padding: 10px 20px;
|
|
548
|
+
font-size: 1.4em;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
.kiwi-appsettings-close i {
|
|
552
|
+
margin-left: 10px;
|
|
553
|
+
font-size: 1.5em;
|
|
554
|
+
float: right;
|
|
555
|
+
line-height: 53px;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
.kiwi-appsettings-messagelistDisplay select {
|
|
559
|
+
float: right;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
@media screen and (max-width: 769px) {
|
|
563
|
+
.kiwi-appsettings {
|
|
564
|
+
width: 100%;
|
|
565
|
+
z-index: 999;
|
|
566
|
+
position: fixed;
|
|
567
|
+
left: 0;
|
|
568
|
+
top: 0;
|
|
569
|
+
transition: left 0.5s;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
.kiwi-appsettings .kiwi-appsettings-block {
|
|
573
|
+
width: 90%;
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
.kiwi-appsettings .u-form label span {
|
|
577
|
+
width: auto;
|
|
578
|
+
margin-right: 0;
|
|
579
|
+
display: inline-block;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
.kiwi-appsettings-close,
|
|
583
|
+
.kiwi-appsettings-close i {
|
|
584
|
+
line-height: 46px;
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
</style>
|