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,271 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="{ connecting: shouldShowLoading }" class="kiwi-notconnected kiwi-warning-block">
|
|
3
|
+
<template v-if="!shouldShowLoading">
|
|
4
|
+
<div class="kiwi-notconnected-caption">
|
|
5
|
+
<span>{{ $t('not_connected') }}</span>
|
|
6
|
+
<i v-if="!shouldShowLoading" class="fa fa-frown-o" aria-hidden="true" />
|
|
7
|
+
</div>
|
|
8
|
+
<div class="kiwi-notconnected-buttons">
|
|
9
|
+
<template v-if="isChannel()">
|
|
10
|
+
<span
|
|
11
|
+
:disabled="!readyToStart"
|
|
12
|
+
class="kiwi-notconnected-button"
|
|
13
|
+
@click="reconnect"
|
|
14
|
+
>
|
|
15
|
+
<i class="fa fa-arrow-circle-o-right" aria-hidden="true" />
|
|
16
|
+
{{ $t('reconnect_channel', {channel: buffer.name}) }}
|
|
17
|
+
</span>
|
|
18
|
+
</template>
|
|
19
|
+
<template v-else-if="isServer()">
|
|
20
|
+
<span
|
|
21
|
+
:disabled="!readyToStart"
|
|
22
|
+
class="kiwi-notconnected-button"
|
|
23
|
+
@click="reconnect"
|
|
24
|
+
>
|
|
25
|
+
<i class="fa fa-arrow-circle-o-right" aria-hidden="true" />
|
|
26
|
+
{{ $t('reconnect_network', {network: buffer.getNetwork().name}) }}
|
|
27
|
+
</span>
|
|
28
|
+
</template>
|
|
29
|
+
<template v-else-if="isQuery()">
|
|
30
|
+
<span
|
|
31
|
+
:disabled="!readyToStart"
|
|
32
|
+
class="kiwi-notconnected-button"
|
|
33
|
+
@click="reconnect"
|
|
34
|
+
>
|
|
35
|
+
<i class="fa fa-arrow-circle-o-right" aria-hidden="true" />
|
|
36
|
+
{{ $t('reconnect_query', {user: buffer.name}) }}
|
|
37
|
+
</span>
|
|
38
|
+
</template>
|
|
39
|
+
|
|
40
|
+
<a
|
|
41
|
+
v-if="!restrictedServer"
|
|
42
|
+
class="kiwi-notconnected-button kiwi-notconnected-button-settings"
|
|
43
|
+
@click="showNetworkSettings"
|
|
44
|
+
>
|
|
45
|
+
<i class="fa fa-cogs" aria-hidden="true" />
|
|
46
|
+
</a>
|
|
47
|
+
</div>
|
|
48
|
+
</template>
|
|
49
|
+
<div v-else class="kiwi-notconnected-caption">
|
|
50
|
+
{{ $t('connecting') }}
|
|
51
|
+
<i
|
|
52
|
+
class="fa fa-refresh fa-spin kiwi-notconnected-bigicon"
|
|
53
|
+
aria-hidden="true"
|
|
54
|
+
/>
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
<captcha
|
|
58
|
+
class="kiwi-notconnected-captcha"
|
|
59
|
+
:network="network"
|
|
60
|
+
/>
|
|
61
|
+
</div>
|
|
62
|
+
</template>
|
|
63
|
+
|
|
64
|
+
<script>
|
|
65
|
+
|
|
66
|
+
'kiwi public';
|
|
67
|
+
|
|
68
|
+
import Captcha from '@/components/Captcha';
|
|
69
|
+
|
|
70
|
+
export default {
|
|
71
|
+
components: {
|
|
72
|
+
Captcha,
|
|
73
|
+
},
|
|
74
|
+
props: ['buffer', 'network'],
|
|
75
|
+
data() {
|
|
76
|
+
return {
|
|
77
|
+
forceLoader: false,
|
|
78
|
+
};
|
|
79
|
+
},
|
|
80
|
+
computed: {
|
|
81
|
+
netStatus() {
|
|
82
|
+
return this.buffer.getNetwork().state;
|
|
83
|
+
},
|
|
84
|
+
shouldShowLoading() {
|
|
85
|
+
this.maybeForceLoader();
|
|
86
|
+
|
|
87
|
+
if (this.network.state !== 'disconnected' || this.forceLoader) {
|
|
88
|
+
return true;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
return false;
|
|
92
|
+
},
|
|
93
|
+
restrictedServer() {
|
|
94
|
+
return this.$state.setting('restricted');
|
|
95
|
+
},
|
|
96
|
+
readyToStart() {
|
|
97
|
+
return true;
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
methods: {
|
|
101
|
+
maybeForceLoader() {
|
|
102
|
+
// The connection can fail almost imediately making it look like
|
|
103
|
+
// the connection attempt didn't try anything. Make the connection
|
|
104
|
+
// loder stay visible for at elast X seconds to indicate it's actually
|
|
105
|
+
// tried something.
|
|
106
|
+
let minimumLoaderViewtime = 2000;
|
|
107
|
+
let networkState = this.network.state;
|
|
108
|
+
|
|
109
|
+
if (networkState !== 'disconnected' && !this.forceLoader) {
|
|
110
|
+
this.forceLoader = true;
|
|
111
|
+
setTimeout(() => {
|
|
112
|
+
this.forceLoader = false;
|
|
113
|
+
}, minimumLoaderViewtime);
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
isChannel() {
|
|
117
|
+
return this.buffer.isChannel();
|
|
118
|
+
},
|
|
119
|
+
isServer() {
|
|
120
|
+
return this.buffer.isServer();
|
|
121
|
+
},
|
|
122
|
+
isQuery() {
|
|
123
|
+
return this.buffer.isQuery();
|
|
124
|
+
},
|
|
125
|
+
reconnect() {
|
|
126
|
+
if (!this.readyToStart) {
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
if (this.buffer.isChannel()) {
|
|
130
|
+
this.buffer.enabled = true;
|
|
131
|
+
}
|
|
132
|
+
this.buffer.getNetwork().ircClient.connect();
|
|
133
|
+
},
|
|
134
|
+
showNetworkSettings() {
|
|
135
|
+
let network = this.buffer.getNetwork();
|
|
136
|
+
network.showServerBuffer('settings');
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
};
|
|
140
|
+
</script>
|
|
141
|
+
|
|
142
|
+
<style lang="less">
|
|
143
|
+
.kiwi-notconnected {
|
|
144
|
+
box-sizing: border-box;
|
|
145
|
+
padding: 5px 20px;
|
|
146
|
+
transition: background-color 0.3s;
|
|
147
|
+
display: flex;
|
|
148
|
+
align-items: center;
|
|
149
|
+
justify-content: center;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.kiwi-notconnected.connecting {
|
|
153
|
+
text-align: center;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.kiwi-notconnected-caption {
|
|
157
|
+
display: inline-block;
|
|
158
|
+
width: auto;
|
|
159
|
+
cursor: default;
|
|
160
|
+
line-height: 50px;
|
|
161
|
+
font-size: 1.2em;
|
|
162
|
+
font-weight: 900;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.kiwi-notconnected-caption i {
|
|
166
|
+
font-weight: normal;
|
|
167
|
+
font-size: 1.5em;
|
|
168
|
+
position: relative;
|
|
169
|
+
right: -3px;
|
|
170
|
+
top: 3px;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.kiwi-notconnected-captcha {
|
|
174
|
+
display: inline-block;
|
|
175
|
+
margin-left: 3em;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.kiwi-notconnected-buttons {
|
|
179
|
+
float: right;
|
|
180
|
+
width: auto;
|
|
181
|
+
text-align: center;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.kiwi-notconnected-button {
|
|
185
|
+
width: auto;
|
|
186
|
+
display: inline-block;
|
|
187
|
+
padding: 5px 10px;
|
|
188
|
+
border-radius: 7px;
|
|
189
|
+
cursor: pointer;
|
|
190
|
+
border: 2px solid;
|
|
191
|
+
margin: 6px 0 0 10px;
|
|
192
|
+
height: 37px;
|
|
193
|
+
overflow: hidden;
|
|
194
|
+
box-sizing: border-box;
|
|
195
|
+
transition: opacity 0.3s, color 0.3s, background-color 0.3s;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.kiwi-notconnected-button:hover[disabled] {
|
|
199
|
+
cursor: not-allowed;
|
|
200
|
+
opacity: 0.65;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.kiwi-notconnected-button:hover {
|
|
204
|
+
opacity: 1;
|
|
205
|
+
transition: all 0.2s;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.kiwi-notconnected-button i {
|
|
209
|
+
float: left;
|
|
210
|
+
font-size: 1.6em;
|
|
211
|
+
line-height: 24px;
|
|
212
|
+
margin-right: 5px;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.kiwi-notconnected-button-settings {
|
|
216
|
+
opacity: 0.8;
|
|
217
|
+
border: none;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.kiwi-notconnected-button-settings i {
|
|
221
|
+
margin-right: 0;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
@media screen and (max-width: 1024px) {
|
|
225
|
+
.kiwi-notconnected-caption {
|
|
226
|
+
font-size: 1em;
|
|
227
|
+
width: 100%;
|
|
228
|
+
text-align: center;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.kiwi-notconnected-buttons {
|
|
232
|
+
width: 100%;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.kiwi-notconnected-button {
|
|
236
|
+
margin: 0;
|
|
237
|
+
font-size: 1em;
|
|
238
|
+
padding: 0 10px;
|
|
239
|
+
line-height: 33px;
|
|
240
|
+
width: auto;
|
|
241
|
+
box-sizing: border-box;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.kiwi-notconnected-button i {
|
|
245
|
+
line-height: 36px;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
@media screen and (max-width: 769px) {
|
|
250
|
+
.kiwi-notconnected {
|
|
251
|
+
font-size: 0.8em;
|
|
252
|
+
padding: 0 10px;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.kiwi-notconnected-caption {
|
|
256
|
+
width: 100%;
|
|
257
|
+
text-align: center;
|
|
258
|
+
font-size: 1.3em;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.kiwi-notconnected-buttons {
|
|
262
|
+
width: 100%;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.kiwi-notconnected-button {
|
|
266
|
+
font-size: 1.2em;
|
|
267
|
+
display: inline-block;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
</style>
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="kiwi-selfuser kiwi-theme-bg">
|
|
3
|
+
<div v-if="!self_user_settings_open" class="kiwi-selfuser-mask">
|
|
4
|
+
<span class="kiwi-selfuser-nick">
|
|
5
|
+
<away-status-indicator :network="network" :user="network.currentUser()" />
|
|
6
|
+
{{ network.nick }}
|
|
7
|
+
<i class="fa fa-times" aria-hidden="true" @click="closeSelfUser()" />
|
|
8
|
+
<i class="fa fa-pencil" aria-hidden="true" @click="openSelfActions()" />
|
|
9
|
+
<i
|
|
10
|
+
class="fa fa-user"
|
|
11
|
+
aria-hidden="true"
|
|
12
|
+
@click="openProfile()"
|
|
13
|
+
/>
|
|
14
|
+
</span>
|
|
15
|
+
<span class="kiwi-selfuser-host">
|
|
16
|
+
{{ netUser.username }}@{{ netUser.host }} ( {{ modeString }} )
|
|
17
|
+
</span>
|
|
18
|
+
<div v-if="networkSupportsAway()" class="u-form kiwi-away-checkbox-form">
|
|
19
|
+
<label class="kiwi-selfuser-away-label">
|
|
20
|
+
<span>{{ $t('away') }}</span>
|
|
21
|
+
<input v-model="awayStatus" type="checkbox">
|
|
22
|
+
</label>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
<div v-else class="kiwi-selfuser-actions">
|
|
26
|
+
<div v-if="error_message" class="kiwi-selfuser-error-message">{{ error_message }}</div>
|
|
27
|
+
<input-prompt
|
|
28
|
+
v-focus
|
|
29
|
+
:label="$t('enter_new_nick')"
|
|
30
|
+
:block="true"
|
|
31
|
+
@submit="onNewNickSubmit"
|
|
32
|
+
@cancel="closeNickChange"
|
|
33
|
+
/>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</template>
|
|
37
|
+
|
|
38
|
+
<script>
|
|
39
|
+
|
|
40
|
+
'kiwi public';
|
|
41
|
+
|
|
42
|
+
import * as TextFormatting from '@/helpers/TextFormatting';
|
|
43
|
+
import AwayStatusIndicator from './AwayStatusIndicator';
|
|
44
|
+
|
|
45
|
+
export default {
|
|
46
|
+
components: {
|
|
47
|
+
AwayStatusIndicator,
|
|
48
|
+
},
|
|
49
|
+
props: {
|
|
50
|
+
network: Object,
|
|
51
|
+
},
|
|
52
|
+
data() {
|
|
53
|
+
return {
|
|
54
|
+
new_nick: '',
|
|
55
|
+
error_message: '',
|
|
56
|
+
event_listeners: [],
|
|
57
|
+
self_user_settings_open: false,
|
|
58
|
+
};
|
|
59
|
+
},
|
|
60
|
+
computed: {
|
|
61
|
+
modeString() {
|
|
62
|
+
let str = '';
|
|
63
|
+
this.network.ircClient.user.modes.forEach((mode) => {
|
|
64
|
+
str += mode;
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
// Only show the + if there are modes to show
|
|
68
|
+
if (str) {
|
|
69
|
+
str = '+' + str;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return str;
|
|
73
|
+
},
|
|
74
|
+
netUser() {
|
|
75
|
+
return this.network.ircClient.user;
|
|
76
|
+
},
|
|
77
|
+
awayStatus: {
|
|
78
|
+
get() {
|
|
79
|
+
return this.network.currentUser().away;
|
|
80
|
+
},
|
|
81
|
+
set(val) {
|
|
82
|
+
this.network.ircClient.raw('AWAY', val ? 'Currently away' : '');
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
methods: {
|
|
87
|
+
openSelfActions() {
|
|
88
|
+
this.self_user_settings_open = true;
|
|
89
|
+
this.error_message = '';
|
|
90
|
+
},
|
|
91
|
+
openProfile() {
|
|
92
|
+
this.$state.$emit('userbox.show', this.network.currentUser());
|
|
93
|
+
},
|
|
94
|
+
closeSelfUser() {
|
|
95
|
+
this.$emit('close');
|
|
96
|
+
},
|
|
97
|
+
onNewNickSubmit(newVal, done) {
|
|
98
|
+
if (this.event_listeners.length) {
|
|
99
|
+
// nick change already in progress
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
this.new_nick = newVal;
|
|
103
|
+
this.changeNick(done);
|
|
104
|
+
},
|
|
105
|
+
changeNick(done) {
|
|
106
|
+
let nick = this.new_nick.trim();
|
|
107
|
+
if (nick.length === 0) {
|
|
108
|
+
this.error_message = TextFormatting.t('error_empty_nick');
|
|
109
|
+
done();
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
if (nick.match(/(^[0-9])|(\s)/)) {
|
|
113
|
+
this.error_message = TextFormatting.t('error_no_number');
|
|
114
|
+
done();
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
if (nick === this.network.currentUser().nick) {
|
|
118
|
+
this.error_message = TextFormatting.t('error_nick_in_use', { nick });
|
|
119
|
+
done();
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
this.error_message = '';
|
|
123
|
+
|
|
124
|
+
this.listenForNickEvents(done);
|
|
125
|
+
this.network.ircClient.changeNick(nick);
|
|
126
|
+
},
|
|
127
|
+
listenForNickEvents(done) {
|
|
128
|
+
this.event_listeners.push(
|
|
129
|
+
this.listen(this.network.ircClient, 'nick', (event) => {
|
|
130
|
+
if (event.new_nick !== this.network.currentUser().nick) {
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
this.closeNickChange();
|
|
134
|
+
})
|
|
135
|
+
);
|
|
136
|
+
this.event_listeners.push(
|
|
137
|
+
this.listen(this.network.ircClient, 'nick in use', (event) => {
|
|
138
|
+
this.error_message = TextFormatting.t('error_nick_in_use', { nick: event.nick });
|
|
139
|
+
this.removeNickEventListeners();
|
|
140
|
+
done();
|
|
141
|
+
})
|
|
142
|
+
);
|
|
143
|
+
this.event_listeners.push(
|
|
144
|
+
this.listen(this.network.ircClient, 'nick invalid', (event) => {
|
|
145
|
+
this.error_message = TextFormatting.t('error_nick_invalid', { nick: event.nick });
|
|
146
|
+
this.removeNickEventListeners();
|
|
147
|
+
done();
|
|
148
|
+
})
|
|
149
|
+
);
|
|
150
|
+
|
|
151
|
+
// Maybe the nickchange will result in an event we are not listening for above
|
|
152
|
+
const timeout = this.setTimeout(() => {
|
|
153
|
+
this.error_message = TextFormatting.t('error_unexpected');
|
|
154
|
+
this.removeNickEventListeners();
|
|
155
|
+
}, 4000);
|
|
156
|
+
this.event_listeners.push(() => {
|
|
157
|
+
this.clearTimeout(timeout);
|
|
158
|
+
});
|
|
159
|
+
},
|
|
160
|
+
removeNickEventListeners() {
|
|
161
|
+
while (this.event_listeners.length) {
|
|
162
|
+
this.event_listeners.shift()();
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
closeNickChange() {
|
|
166
|
+
this.removeNickEventListeners();
|
|
167
|
+
this.self_user_settings_open = false;
|
|
168
|
+
},
|
|
169
|
+
networkSupportsAway() {
|
|
170
|
+
return this.network.ircClient.network.cap.isEnabled('away-notify');
|
|
171
|
+
},
|
|
172
|
+
checkUserAway() {
|
|
173
|
+
return !!this.network.currentUser().away;
|
|
174
|
+
},
|
|
175
|
+
getUserFromString(name) {
|
|
176
|
+
return this.$state.getUser(this.network.id, name);
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
};
|
|
180
|
+
</script>
|
|
181
|
+
|
|
182
|
+
<style>
|
|
183
|
+
.kiwi-selfuser-nick,
|
|
184
|
+
.kiwi-selfuser-host,
|
|
185
|
+
.kiwi-selfuser-status {
|
|
186
|
+
display: inline-block;
|
|
187
|
+
padding: 0 10px;
|
|
188
|
+
cursor: default;
|
|
189
|
+
width: 100%;
|
|
190
|
+
box-sizing: border-box;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.kiwi-selfuser-nick {
|
|
194
|
+
min-width: 85px;
|
|
195
|
+
font-weight: bold;
|
|
196
|
+
padding: 5px 10px 0 10px;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.kiwi-selfuser-modes {
|
|
200
|
+
font-weight: normal;
|
|
201
|
+
opacity: 0.8;
|
|
202
|
+
font-size: 0.8em;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.kiwi-selfuser-host {
|
|
206
|
+
font-style: italic;
|
|
207
|
+
opacity: 0.8;
|
|
208
|
+
padding-left: 26px;
|
|
209
|
+
font-size: 0.8em;
|
|
210
|
+
word-break: break-all;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.kiwi-controlinput-selfuser .kiwi-close-icon {
|
|
214
|
+
line-height: 36px;
|
|
215
|
+
border-radius: 0;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/* Style the icons in the SelfUser */
|
|
219
|
+
|
|
220
|
+
.kiwi-selfuser-nick i {
|
|
221
|
+
font-weight: 400;
|
|
222
|
+
float: right;
|
|
223
|
+
opacity: 0.6;
|
|
224
|
+
cursor: pointer;
|
|
225
|
+
margin-top: 3px;
|
|
226
|
+
transition: all 0.3s;
|
|
227
|
+
margin-right: 15px;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.kiwi-selfuser-nick i:hover {
|
|
231
|
+
opacity: 1;
|
|
232
|
+
transition: all 0.2s;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.kiwi-selfuser-nick i:first-of-type {
|
|
236
|
+
margin-right: 0;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.u-form.kiwi-away-checkbox-form {
|
|
240
|
+
padding: 0 0 5px 24px;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.u-form .kiwi-selfuser-away-label {
|
|
244
|
+
margin: 0 0 2px 0;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.u-form .kiwi-selfuser-away-label span {
|
|
248
|
+
margin-right: 5px;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.kiwi-selfuser-error-message {
|
|
252
|
+
width: 100%;
|
|
253
|
+
display: block;
|
|
254
|
+
padding: 0.5em 10px;
|
|
255
|
+
box-sizing: border-box;
|
|
256
|
+
word-break: break-word;
|
|
257
|
+
margin: 5px 0 5px 0;
|
|
258
|
+
text-align: center;
|
|
259
|
+
border-radius: 6px;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.kiwi-selfuser-actions {
|
|
263
|
+
padding: 5px 10px;
|
|
264
|
+
margin-bottom: 10px;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.kiwi-selfuser-actions form {
|
|
268
|
+
position: relative;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.kiwi-selfuser-actions form .u-input-prompt-label {
|
|
272
|
+
display: block;
|
|
273
|
+
width: 100%;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.kiwi-selfuser-actions .u-input-button-container {
|
|
277
|
+
position: absolute;
|
|
278
|
+
top: 2px;
|
|
279
|
+
right: 2px;
|
|
280
|
+
z-index: 1;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
</style>
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
:class="{'kiwi-serverselector--custom': presetServer === 'custom'}"
|
|
4
|
+
class="kiwi-serverselector"
|
|
5
|
+
>
|
|
6
|
+
<div v-if="usePreset && presetNetworks.length > 0" class="kiwi-serverselector-presets">
|
|
7
|
+
<label>
|
|
8
|
+
<span>{{ $t('server') }}</span>
|
|
9
|
+
<select v-model="presetServer">
|
|
10
|
+
<option value="custom">Custom Server</option>
|
|
11
|
+
<option disabled>-----------------</option>
|
|
12
|
+
<option
|
|
13
|
+
v-for="s in presetNetworks"
|
|
14
|
+
:key="s.name"
|
|
15
|
+
:value="toUri(s)"
|
|
16
|
+
>{{ s.name }}</option>
|
|
17
|
+
</select>
|
|
18
|
+
</label>
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<template v-if="showCustom || presetNetworks.length === 0 || !usePreset">
|
|
22
|
+
<input-text
|
|
23
|
+
v-model="connection.server"
|
|
24
|
+
v-focus
|
|
25
|
+
:label="$t('server')"
|
|
26
|
+
class="kiwi-networksettings-connection-address"
|
|
27
|
+
/>
|
|
28
|
+
|
|
29
|
+
<input-text
|
|
30
|
+
v-model="connection.port"
|
|
31
|
+
:label="$t('settings_port')"
|
|
32
|
+
type="number"
|
|
33
|
+
class="kiwi-networksettings-connection-port"
|
|
34
|
+
>
|
|
35
|
+
<span
|
|
36
|
+
:class="{ 'kiwi-customserver-tls--enabled' : connection.tls }"
|
|
37
|
+
class="fa-stack fa-lg kiwi-customserver-tls"
|
|
38
|
+
@click="toggleTls"
|
|
39
|
+
>
|
|
40
|
+
<i
|
|
41
|
+
v-if="connection.tls"
|
|
42
|
+
class="fa fa-lock fa-stack-1x kiwi-customserver-tls-lock"
|
|
43
|
+
/>
|
|
44
|
+
<i
|
|
45
|
+
v-else
|
|
46
|
+
class="fa fa-unlock fa-stack-1x kiwi-customserver-tls-minus"
|
|
47
|
+
/>
|
|
48
|
+
</span>
|
|
49
|
+
</input-text>
|
|
50
|
+
</template>
|
|
51
|
+
</div>
|
|
52
|
+
</template>
|
|
53
|
+
|
|
54
|
+
<script>
|
|
55
|
+
|
|
56
|
+
'kiwi public';
|
|
57
|
+
|
|
58
|
+
import _ from 'lodash';
|
|
59
|
+
import * as Misc from '@/helpers/Misc';
|
|
60
|
+
|
|
61
|
+
export default {
|
|
62
|
+
props: {
|
|
63
|
+
usePreset: {
|
|
64
|
+
type: Boolean,
|
|
65
|
+
default: true,
|
|
66
|
+
},
|
|
67
|
+
networkList: {
|
|
68
|
+
type: Array,
|
|
69
|
+
default: () => [],
|
|
70
|
+
},
|
|
71
|
+
connection: {
|
|
72
|
+
type: Object,
|
|
73
|
+
default: () => {},
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
data: function data() {
|
|
77
|
+
return {
|
|
78
|
+
name: '',
|
|
79
|
+
presetNetworks: [],
|
|
80
|
+
showCustom: true,
|
|
81
|
+
willEmit: false,
|
|
82
|
+
};
|
|
83
|
+
},
|
|
84
|
+
computed: {
|
|
85
|
+
presetServer: {
|
|
86
|
+
set(newVal) {
|
|
87
|
+
if (newVal === 'custom') {
|
|
88
|
+
this.name = '';
|
|
89
|
+
this.connection.server = '';
|
|
90
|
+
this.connection.port = 6697;
|
|
91
|
+
this.connection.tls = true;
|
|
92
|
+
|
|
93
|
+
this.showCustom = true;
|
|
94
|
+
} else {
|
|
95
|
+
let addr = Misc.parsePresetServer(newVal);
|
|
96
|
+
this.name = addr.name;
|
|
97
|
+
this.connection.server = addr.server;
|
|
98
|
+
this.connection.port = addr.port;
|
|
99
|
+
this.connection.tls = addr.tls;
|
|
100
|
+
|
|
101
|
+
this.showCustom = false;
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
get() {
|
|
105
|
+
return this.showCustom ?
|
|
106
|
+
'custom' :
|
|
107
|
+
this.toUri(this.connection);
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
created() {
|
|
112
|
+
if (this.networkList) {
|
|
113
|
+
this.importUris(this.networkList);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// If the given network is in the preset server list, select it
|
|
117
|
+
let con = this.connection;
|
|
118
|
+
if (_.find(this.presetNetworks, (s) => {
|
|
119
|
+
let match = s.server === con.server && s.port === con.port && s.tls === con.tls;
|
|
120
|
+
return match;
|
|
121
|
+
})) {
|
|
122
|
+
this.showCustom = false;
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
methods: {
|
|
126
|
+
toUri(s) {
|
|
127
|
+
return `${s.server}:${s.tls ? '+' : ''}${s.port}`;
|
|
128
|
+
},
|
|
129
|
+
toggleTls() {
|
|
130
|
+
this.connection.tls = !this.connection.tls;
|
|
131
|
+
|
|
132
|
+
// Switching the port only if were currently using the most common TLS/plain text ports
|
|
133
|
+
if (this.connection.tls && this.connection.port === 6667) {
|
|
134
|
+
this.connection.port = 6697;
|
|
135
|
+
} else if (!this.connection.tls && this.connection.port === 6697) {
|
|
136
|
+
this.connection.port = 6667;
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
importUris(serverList) {
|
|
140
|
+
// [ 'freenode|irc.freenode.net:+6697', 'irc.snoonet.org:6667' ]
|
|
141
|
+
let servers = serverList.map((s) => Misc.parsePresetServer(s));
|
|
142
|
+
this.$set(this, 'presetNetworks', servers);
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
};
|
|
146
|
+
</script>
|
|
147
|
+
|
|
148
|
+
<style>
|
|
149
|
+
.kiwi-serverselector-presets {
|
|
150
|
+
margin-bottom: 1em;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.kiwi-serverselector-presets label span {
|
|
154
|
+
margin-left: 0;
|
|
155
|
+
transition: opacity 0.2s, width 0.2s;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.kiwi-serverselector--custom .kiwi-serverselector-presets label span {
|
|
159
|
+
max-width: 0;
|
|
160
|
+
opacity: 0;
|
|
161
|
+
}
|
|
162
|
+
</style>
|