Warning, /network/neochat/src/qml/RoomWindow.qml is written in an unsupported language. File is not indexed.
0001 // SPDX-FileCopyrightText: 2020 Carl Schwan <carl@carlschwan.eu> 0002 // SPDX-License-Identifier: GPL-3.0-or-later 0003 0004 import QtQuick 0005 import QtQuick.Controls as QQC2 0006 import QtQuick.Layouts 0007 0008 import org.kde.kirigami as Kirigami 0009 0010 import org.kde.neochat 0011 0012 Kirigami.ApplicationWindow { 0013 id: root 0014 0015 required property NeoChatRoom currentRoom 0016 required property NeoChatConnection connection 0017 0018 minimumWidth: Kirigami.Units.gridUnit * 10 0019 minimumHeight: Kirigami.Units.gridUnit * 15 0020 0021 Shortcut { 0022 sequence: StandardKey.Cancel 0023 onActivated: root.close() 0024 } 0025 pageStack.initialPage: RoomPage { 0026 id: roomPage 0027 visible: true 0028 currentRoom: root.currentRoom 0029 disableCancelShortcut: true 0030 connection: root.connection 0031 0032 timelineModel: TimelineModel { 0033 room: currentRoom 0034 } 0035 messageFilterModel: MessageFilterModel { 0036 sourceModel: roomPage.messageEventModel 0037 } 0038 mediaMessageFilterModel: MediaMessageFilterModel { 0039 sourceModel: roomPage.messageFilterModel 0040 } 0041 } 0042 0043 onCurrentRoomChanged: if (!currentRoom) { 0044 root.close(); 0045 } 0046 0047 property Item hoverLinkIndicator: QQC2.Control { 0048 parent: overlay.parent 0049 property string text 0050 opacity: linkText.text.length > 0 ? 1 : 0 0051 0052 z: 20 0053 x: 0 0054 y: parent.height - implicitHeight 0055 contentItem: QQC2.Label { 0056 id: linkText 0057 text: parent.text.startsWith("https://matrix.to/") ? "" : parent.text 0058 } 0059 Kirigami.Theme.colorSet: Kirigami.Theme.View 0060 background: Rectangle { 0061 color: Kirigami.Theme.backgroundColor 0062 } 0063 } 0064 }