Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F114538
RoomInvitePage.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
RoomInvitePage.qml
View Options
/*
* This file is part of kazv.
* SPDX-FileCopyrightText: 2023 tusooa <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import
QtQuick
2.15
import
QtQuick
.
Layouts
1.15
import
QtQuick
.
Controls
2.15
import
org
.
kde
.
kirigami
2.20
as
Kirigami
import
'..'
as
Kazv
import
'../matrix-helpers.js'
as
Helpers
Kazv
.
ClosableScrollablePage
{
id: roomInvitePage
property
var
room
property
var
roomNameProvider:
Kazv
.
RoomNameProvider
{
room:
roomInvitePage
.
room
}
property
var
roomDisplayName:
roomNameProvider
.
name
property
var
inviting:
false
title:
l10n
.
get
(
'room-invite-page-title'
,
{
room:
roomDisplayName
})
property
var
inviteUser:
Kazv
.
AsyncHandler
{
trigger:
()
=>
{
roomInvitePage
.
inviting
=
true
;
return
room
.
inviteUser
(
inviteUserIdInput
.
text
);
}
onResolved:
{
roomInvitePage
.
inviting
=
false
;
if
(
!
success
)
{
showPassiveNotification
(
l10n
.
get
(
'room-invite-page-invite-failed-prompt'
,
{
errorCode:
data
.
errorCode
,
errorMsg:
data
.
error
}));
}
else
{
pageStack
.
removePage
(
roomInvitePage
);
}
}
}
Kirigami
.
FormLayout
{
TextField
{
id: inviteUserIdInput
objectName:
'inviteUserIdInput'
placeholderText:
l10n
.
get
(
'room-invite-invitee-matrix-id-placeholder'
)
Kirigami.FormData.label:
l10n
.
get
(
'room-invite-invitee-matrix-id-prompt'
)
}
Button
{
objectName:
'inviteUserButton'
text:
l10n
.
get
(
'room-invite-page-invite-button'
)
enabled:
!
roomInvitePage
.
inviting
Layout.fillWidth:
true
onClicked:
{
roomInvitePage
.
inviteUser
.
call
();
}
}
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 26, 11:05 AM (1 d, 14 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40275
Default Alt Text
RoomInvitePage.qml (1 KB)
Attached To
Mode
rK kazv
Attached
Detach File
Event Timeline
Log In to Comment