Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2578469
JoinRoomPage.qml
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
JoinRoomPage.qml
View Options
/*
* This file is part of kazv.
* SPDX-FileCopyrightText: 2022 tusooa <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import
QtQuick
2.1
import
org
.
kde
.
kirigami
2.4
as
Kirigami
import
QtQuick
.
Controls
2.0
import
QtQuick
.
Layouts
1.1
Kirigami
.
Page
{
id: joinRoomPage
title:
l10n
.
get
(
'join-room-page-title'
)
ButtonGroup
{
id: visibilityButtons
}
ColumnLayout
{
width:
parent
.
width
spacing:
Kirigami
.
Units
.
largeSpacing
GridLayout
{
columns:
2
Label
{
text:
l10n
.
get
(
'join-room-page-id-or-alias-prompt'
)
}
TextField
{
id: idOrAlias
placeholderText:
l10n
.
get
(
'join-room-page-id-or-alias-placeholder'
)
Layout.fillWidth:
true
}
Label
{
text:
l10n
.
get
(
'join-room-page-servers-prompt'
)
}
TextArea
{
id: servers
placeholderText:
l10n
.
get
(
'join-room-page-servers-placeholder'
)
Layout.fillWidth:
true
}
}
Button
{
text:
l10n
.
get
(
'join-room-page-action-join-room'
)
onClicked:
joinRoomPage
.
joinRoom
()
}
}
Connections
{
target:
matrixSdk
function
onJoinRoomSuccessful
(
room
)
{
showPassiveNotification
(
l10n
.
get
(
'join-room-page-success-prompt'
,
{
room
}));
}
function
onJoinRoomFailed
(
room
,
errorCode
,
errorMsg
)
{
showPassiveNotification
(
l10n
.
get
(
'join-room-page-failed-prompt'
,
{
room
,
errorCode
,
errorMsg
}));
}
}
function
joinRoom
()
{
const
serverNames
=
servers
.
text
.
split
(
'\n'
).
map
(
k
=>
k
.
trim
()).
filter
(
k
=>
k
);
console
.
log
(
'room: '
,
idOrAlias
.
text
);
console
.
log
(
'servers: '
,
serverNames
);
matrixSdk
.
joinRoom
(
idOrAlias
.
text
,
serverNames
);
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jun 25, 5:23 AM (9 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
235163
Default Alt Text
JoinRoomPage.qml (1 KB)
Attached To
Mode
rK kazv
Attached
Detach File
Event Timeline
Log In to Comment