mirror of https://github.com/Nheko-Reborn/nheko
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
114 lines
2.1 KiB
114 lines
2.1 KiB
4 years ago
|
// SPDX-FileCopyrightText: 2021 Nheko Contributors
|
||
|
//
|
||
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||
|
|
||
|
import "./delegates"
|
||
|
import "./device-verification"
|
||
|
import "./emoji"
|
||
|
import "./voip"
|
||
|
import Qt.labs.platform 1.1 as Platform
|
||
|
import QtGraphicalEffects 1.0
|
||
|
import QtQuick 2.9
|
||
|
import QtQuick.Controls 2.13
|
||
|
import QtQuick.Layouts 1.3
|
||
|
import QtQuick.Window 2.2
|
||
|
import im.nheko 1.0
|
||
|
import im.nheko.EmojiModel 1.0
|
||
|
|
||
|
Page {
|
||
|
id: timelineRoot
|
||
|
|
||
|
palette: Nheko.colors
|
||
|
|
||
|
FontMetrics {
|
||
|
id: fontMetrics
|
||
|
}
|
||
|
|
||
|
EmojiPicker {
|
||
|
id: emojiPopup
|
||
|
|
||
|
colors: palette
|
||
|
model: TimelineManager.completerFor("allemoji", "")
|
||
|
}
|
||
|
|
||
|
Component {
|
||
|
id: userProfileComponent
|
||
|
|
||
|
UserProfile {
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
Component {
|
||
|
id: roomSettingsComponent
|
||
|
|
||
|
RoomSettings {
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
Component {
|
||
|
id: mobileCallInviteDialog
|
||
|
|
||
|
CallInvite {
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
Component {
|
||
|
id: quickSwitcherComponent
|
||
|
|
||
|
QuickSwitcher {
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
Shortcut {
|
||
|
sequence: "Ctrl+K"
|
||
|
onActivated: {
|
||
|
var quickSwitch = quickSwitcherComponent.createObject(timelineRoot);
|
||
|
TimelineManager.focusTimeline();
|
||
|
quickSwitch.open();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
Component {
|
||
|
id: deviceVerificationDialog
|
||
|
|
||
|
DeviceVerification {
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
Connections {
|
||
|
target: TimelineManager
|
||
|
onNewDeviceVerificationRequest: {
|
||
|
var dialog = deviceVerificationDialog.createObject(timelineRoot, {
|
||
|
"flow": flow
|
||
|
});
|
||
|
dialog.show();
|
||
|
}
|
||
|
onOpenProfile: {
|
||
|
var userProfile = userProfileComponent.createObject(timelineRoot, {
|
||
|
"profile": profile
|
||
|
});
|
||
|
userProfile.show();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
Connections {
|
||
|
target: CallManager
|
||
|
onNewInviteState: {
|
||
|
if (CallManager.haveCallInvite && Settings.mobileMode) {
|
||
|
var dialog = mobileCallInviteDialog.createObject(msgView);
|
||
|
dialog.open();
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
ChatPage {
|
||
|
anchors.fill: parent
|
||
|
}
|
||
|
|
||
|
}
|