mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-24 20:18:53 +03:00
Fix dialog paths
This commit is contained in:
parent
ce1a64bc19
commit
3cd7898a0d
4 changed files with 37 additions and 33 deletions
|
@ -126,7 +126,7 @@ Page {
|
||||||
width: 22
|
width: 22
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
var component = Qt.createComponent("qrc:/qml/QuickSwitcher.qml");
|
var component = Qt.createComponent("qrc:/resources/qml/QuickSwitcher.qml");
|
||||||
if (component.status == Component.Ready) {
|
if (component.status == Component.Ready) {
|
||||||
var quickSwitch = component.createObject(timelineRoot);
|
var quickSwitch = component.createObject(timelineRoot);
|
||||||
quickSwitch.open();
|
quickSwitch.open();
|
||||||
|
@ -162,7 +162,7 @@ Page {
|
||||||
|
|
||||||
function openUserProfile() {
|
function openUserProfile() {
|
||||||
Nheko.updateUserProfile();
|
Nheko.updateUserProfile();
|
||||||
var component = Qt.createComponent("qrc:/qml/dialogs/UserProfile.qml");
|
var component = Qt.createComponent("qrc:/resources/qml/dialogs/UserProfile.qml");
|
||||||
if (component.status == Component.Ready) {
|
if (component.status == Component.Ready) {
|
||||||
var userProfile = component.createObject(timelineRoot, {
|
var userProfile = component.createObject(timelineRoot, {
|
||||||
"profile": Nheko.currentUser
|
"profile": Nheko.currentUser
|
||||||
|
|
|
@ -36,7 +36,7 @@ Pane {
|
||||||
// repeat: true
|
// repeat: true
|
||||||
//}
|
//}
|
||||||
function showAliasEditor(settings) {
|
function showAliasEditor(settings) {
|
||||||
var component = Qt.createComponent("qrc:/qml/dialogs/AliasEditor.qml");
|
var component = Qt.createComponent("qrc:/resources/qml/dialogs/AliasEditor.qml");
|
||||||
if (component.status == Component.Ready) {
|
if (component.status == Component.Ready) {
|
||||||
var dialog = component.createObject(timelineRoot, {
|
var dialog = component.createObject(timelineRoot, {
|
||||||
"roomSettings": settings
|
"roomSettings": settings
|
||||||
|
@ -48,7 +48,7 @@ Pane {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function showAllowedRoomsEditor(settings) {
|
function showAllowedRoomsEditor(settings) {
|
||||||
var component = Qt.createComponent("qrc:/qml/dialogs/AllowedRoomsSettingsDialog.qml");
|
var component = Qt.createComponent("qrc:/resources/qml/dialogs/AllowedRoomsSettingsDialog.qml");
|
||||||
if (component.status == Component.Ready) {
|
if (component.status == Component.Ready) {
|
||||||
var dialog = component.createObject(timelineRoot, {
|
var dialog = component.createObject(timelineRoot, {
|
||||||
"roomSettings": settings
|
"roomSettings": settings
|
||||||
|
@ -60,7 +60,7 @@ Pane {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function showPLEditor(settings) {
|
function showPLEditor(settings) {
|
||||||
var component = Qt.createComponent("qrc:/qml/dialogs/PowerLevelEditor.qml");
|
var component = Qt.createComponent("qrc:/resources/qml/dialogs/PowerLevelEditor.qml");
|
||||||
if (component.status == Component.Ready) {
|
if (component.status == Component.Ready) {
|
||||||
var dialog = component.createObject(timelineRoot, {
|
var dialog = component.createObject(timelineRoot, {
|
||||||
"roomSettings": settings
|
"roomSettings": settings
|
||||||
|
@ -72,7 +72,7 @@ Pane {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function showSpacePLApplyPrompt(settings, editingModel) {
|
function showSpacePLApplyPrompt(settings, editingModel) {
|
||||||
var component = Qt.createComponent("qrc:/qml/dialogs/PowerLevelSpacesApplyDialog.qml");
|
var component = Qt.createComponent("qrc:/resources/qml/dialogs/PowerLevelSpacesApplyDialog.qml");
|
||||||
if (component.status == Component.Ready) {
|
if (component.status == Component.Ready) {
|
||||||
var dialog = component.createObject(timelineRoot, {
|
var dialog = component.createObject(timelineRoot, {
|
||||||
"roomSettings": settings,
|
"roomSettings": settings,
|
||||||
|
@ -114,7 +114,7 @@ Pane {
|
||||||
sequence: "Ctrl+K"
|
sequence: "Ctrl+K"
|
||||||
|
|
||||||
onActivated: {
|
onActivated: {
|
||||||
var component = Qt.createComponent("qrc:/qml/QuickSwitcher.qml");
|
var component = Qt.createComponent("qrc:/resources/qml/QuickSwitcher.qml");
|
||||||
if (component.status == Component.Ready) {
|
if (component.status == Component.Ready) {
|
||||||
var quickSwitch = component.createObject(timelineRoot);
|
var quickSwitch = component.createObject(timelineRoot);
|
||||||
quickSwitch.open();
|
quickSwitch.open();
|
||||||
|
@ -142,7 +142,7 @@ Pane {
|
||||||
}
|
}
|
||||||
Connections {
|
Connections {
|
||||||
function onOpenJoinRoomDialog() {
|
function onOpenJoinRoomDialog() {
|
||||||
var component = Qt.createComponent("qrc:/qml/dialogs/JoinRoomDialog.qml");
|
var component = Qt.createComponent("qrc:/resources/qml/dialogs/JoinRoomDialog.qml");
|
||||||
if (component.status == Component.Ready) {
|
if (component.status == Component.Ready) {
|
||||||
var dialog = component.createObject(timelineRoot);
|
var dialog = component.createObject(timelineRoot);
|
||||||
dialog.show();
|
dialog.show();
|
||||||
|
@ -152,7 +152,7 @@ Pane {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function onOpenLogoutDialog() {
|
function onOpenLogoutDialog() {
|
||||||
var component = Qt.createComponent("qrc:/qml/dialogs/LogoutDialog.qml");
|
var component = Qt.createComponent("qrc:/resources/qml/dialogs/LogoutDialog.qml");
|
||||||
if (component.status == Component.Ready) {
|
if (component.status == Component.Ready) {
|
||||||
var dialog = component.createObject(timelineRoot);
|
var dialog = component.createObject(timelineRoot);
|
||||||
dialog.open();
|
dialog.open();
|
||||||
|
@ -162,7 +162,7 @@ Pane {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function onShowRoomJoinPrompt(summary) {
|
function onShowRoomJoinPrompt(summary) {
|
||||||
var component = Qt.createComponent("qrc:/qml/dialogs/ConfirmJoinRoomDialog.qml");
|
var component = Qt.createComponent("qrc:/resources/qml/dialogs/ConfirmJoinRoomDialog.qml");
|
||||||
if (component.status == Component.Ready) {
|
if (component.status == Component.Ready) {
|
||||||
var dialog = component.createObject(timelineRoot, {
|
var dialog = component.createObject(timelineRoot, {
|
||||||
"summary": summary
|
"summary": summary
|
||||||
|
@ -178,7 +178,7 @@ Pane {
|
||||||
}
|
}
|
||||||
Connections {
|
Connections {
|
||||||
function onNewDeviceVerificationRequest(flow) {
|
function onNewDeviceVerificationRequest(flow) {
|
||||||
var component = Qt.createComponent("qrc:/qml/device-verification/DeviceVerification.qml");
|
var component = Qt.createComponent("qrc:/resources/qml/device-verification/DeviceVerification.qml");
|
||||||
if (component.status == Component.Ready) {
|
if (component.status == Component.Ready) {
|
||||||
var dialog = component.createObject(timelineRoot, {
|
var dialog = component.createObject(timelineRoot, {
|
||||||
"flow": flow
|
"flow": flow
|
||||||
|
@ -194,7 +194,7 @@ Pane {
|
||||||
}
|
}
|
||||||
Connections {
|
Connections {
|
||||||
function onOpenInviteUsersDialog(invitees) {
|
function onOpenInviteUsersDialog(invitees) {
|
||||||
var component = Qt.createComponent("qrc:/qml/dialogs/InviteDialog.qml");
|
var component = Qt.createComponent("qrc:/resources/qml/dialogs/InviteDialog.qml");
|
||||||
if (component.status == Component.Ready) {
|
if (component.status == Component.Ready) {
|
||||||
var dialog = component.createObject(timelineRoot, {
|
var dialog = component.createObject(timelineRoot, {
|
||||||
"invitees": invitees
|
"invitees": invitees
|
||||||
|
@ -206,7 +206,7 @@ Pane {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function onOpenLeaveRoomDialog(roomid, reason) {
|
function onOpenLeaveRoomDialog(roomid, reason) {
|
||||||
var component = Qt.createComponent("qrc:/qml/dialogs/LeaveRoomDialog.qml");
|
var component = Qt.createComponent("qrc:/resources/qml/dialogs/LeaveRoomDialog.qml");
|
||||||
if (component.status == Component.Ready) {
|
if (component.status == Component.Ready) {
|
||||||
var dialog = component.createObject(timelineRoot, {
|
var dialog = component.createObject(timelineRoot, {
|
||||||
"roomId": roomid,
|
"roomId": roomid,
|
||||||
|
@ -219,7 +219,7 @@ Pane {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function onOpenProfile(profile) {
|
function onOpenProfile(profile) {
|
||||||
var component = Qt.createComponent("qrc:/qml/dialogs/UserProfile.qml");
|
var component = Qt.createComponent("qrc:/resources/qml/dialogs/UserProfile.qml");
|
||||||
if (component.status == Component.Ready) {
|
if (component.status == Component.Ready) {
|
||||||
var userProfile = component.createObject(timelineRoot, {
|
var userProfile = component.createObject(timelineRoot, {
|
||||||
"profile": profile
|
"profile": profile
|
||||||
|
@ -231,7 +231,7 @@ Pane {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function onOpenRoomMembersDialog(members, room) {
|
function onOpenRoomMembersDialog(members, room) {
|
||||||
var component = Qt.createComponent("qrc:/qml/dialogs/RoomMembers.qml");
|
var component = Qt.createComponent("qrc:/resources/qml/dialogs/RoomMembers.qml");
|
||||||
if (component.status == Component.Ready) {
|
if (component.status == Component.Ready) {
|
||||||
var membersDialog = component.createObject(timelineRoot, {
|
var membersDialog = component.createObject(timelineRoot, {
|
||||||
"members": members,
|
"members": members,
|
||||||
|
@ -244,7 +244,7 @@ Pane {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function onOpenRoomSettingsDialog(settings) {
|
function onOpenRoomSettingsDialog(settings) {
|
||||||
var component = Qt.createComponent("qrc:/qml/dialogs/RoomSettings.qml");
|
var component = Qt.createComponent("qrc:/resources/qml/dialogs/RoomSettings.qml");
|
||||||
if (component.status == Component.Ready) {
|
if (component.status == Component.Ready) {
|
||||||
var roomSettings = component.createObject(timelineRoot, {
|
var roomSettings = component.createObject(timelineRoot, {
|
||||||
"roomSettings": settings
|
"roomSettings": settings
|
||||||
|
@ -256,7 +256,7 @@ Pane {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function onShowImageOverlay(room, eventId, url, originalWidth, proportionalHeight) {
|
function onShowImageOverlay(room, eventId, url, originalWidth, proportionalHeight) {
|
||||||
var component = Qt.createComponent("qrc:/qml/dialogs/ImageOverlay.qml");
|
var component = Qt.createComponent("qrc:/resources/qml/dialogs/ImageOverlay.qml");
|
||||||
if (component.status == Component.Ready) {
|
if (component.status == Component.Ready) {
|
||||||
var dialog = component.createObject(timelineRoot, {
|
var dialog = component.createObject(timelineRoot, {
|
||||||
"room": room,
|
"room": room,
|
||||||
|
@ -272,7 +272,7 @@ Pane {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function onShowImagePackSettings(room, packlist) {
|
function onShowImagePackSettings(room, packlist) {
|
||||||
var component = Qt.createComponent("qrc:/qml/dialogs/ImagePackSettingsDialog.qml");
|
var component = Qt.createComponent("qrc:/resources/qml/dialogs/ImagePackSettingsDialog.qml");
|
||||||
if (component.status == Component.Ready) {
|
if (component.status == Component.Ready) {
|
||||||
var packSet = component.createObject(timelineRoot, {
|
var packSet = component.createObject(timelineRoot, {
|
||||||
"room": room,
|
"room": room,
|
||||||
|
@ -290,7 +290,7 @@ Pane {
|
||||||
Connections {
|
Connections {
|
||||||
function onNewInviteState() {
|
function onNewInviteState() {
|
||||||
if (CallManager.haveCallInvite && Settings.mobileMode) {
|
if (CallManager.haveCallInvite && Settings.mobileMode) {
|
||||||
var component = Qt.createComponent("qrc:/qml/voip/CallInvite.qml");
|
var component = Qt.createComponent("qrc:/resources/qml/voip/CallInvite.qml");
|
||||||
if (component.status == Component.Ready) {
|
if (component.status == Component.Ready) {
|
||||||
var dialog = component.createObject(timelineRoot);
|
var dialog = component.createObject(timelineRoot);
|
||||||
dialog.open();
|
dialog.open();
|
||||||
|
|
|
@ -367,6 +367,8 @@ Item {
|
||||||
TimelineEffects {
|
TimelineEffects {
|
||||||
id: timelineEffects
|
id: timelineEffects
|
||||||
|
|
||||||
|
shouldEffectsRun: timelineView.shouldEffectsRun
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
}
|
}
|
||||||
NhekoDropArea {
|
NhekoDropArea {
|
||||||
|
@ -416,7 +418,7 @@ Item {
|
||||||
effectsTimer.restart();
|
effectsTimer.restart();
|
||||||
}
|
}
|
||||||
function onShowRawMessageDialog(rawMessage) {
|
function onShowRawMessageDialog(rawMessage) {
|
||||||
var component = Qt.createComponent("qrc:/qml/dialogs/RawMessageDialog.qml");
|
var component = Qt.createComponent("qrc:/resources/qml/dialogs/RawMessageDialog.qml");
|
||||||
if (component.status == Component.Ready) {
|
if (component.status == Component.Ready) {
|
||||||
var dialog = component.createObject(timelineRoot, {
|
var dialog = component.createObject(timelineRoot, {
|
||||||
"rawMessage": rawMessage
|
"rawMessage": rawMessage
|
||||||
|
|
|
@ -6,34 +6,36 @@ import QtQuick 2.15
|
||||||
import QtQuick.Particles 2.15
|
import QtQuick.Particles 2.15
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
id: effectRoot
|
||||||
readonly property int maxLifespan: Math.max(confettiEmitter.lifeSpan, rainfallEmitter.lifeSpan)
|
readonly property int maxLifespan: Math.max(confettiEmitter.lifeSpan, rainfallEmitter.lifeSpan)
|
||||||
|
required property bool shouldEffectsRun
|
||||||
|
|
||||||
function pulseConfetti()
|
function pulseConfetti()
|
||||||
{
|
{
|
||||||
confettiEmitter.pulse(parent.height * 2)
|
confettiEmitter.pulse(effectRoot.height * 2)
|
||||||
}
|
}
|
||||||
|
|
||||||
function pulseRainfall()
|
function pulseRainfall()
|
||||||
{
|
{
|
||||||
rainfallEmitter.pulse(parent.height * 3.3)
|
rainfallEmitter.pulse(effectRoot.height * 3.3)
|
||||||
}
|
}
|
||||||
|
|
||||||
ParticleSystem {
|
ParticleSystem {
|
||||||
id: particleSystem
|
id: particleSystem
|
||||||
|
|
||||||
Component.onCompleted: pause();
|
Component.onCompleted: pause();
|
||||||
paused: !shouldEffectsRun
|
paused: !effectRoot.shouldEffectsRun
|
||||||
}
|
}
|
||||||
|
|
||||||
Emitter {
|
Emitter {
|
||||||
id: confettiEmitter
|
id: confettiEmitter
|
||||||
|
|
||||||
group: "confetti"
|
group: "confetti"
|
||||||
width: parent.width * 3/4
|
width: effectRoot.width * 3/4
|
||||||
enabled: false
|
enabled: false
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: effectRoot.horizontalCenter
|
||||||
y: parent.height
|
y: effectRoot.height
|
||||||
emitRate: Math.min(400 * Math.sqrt(parent.width * parent.height) / 870, 1000)
|
emitRate: Math.min(400 * Math.sqrt(effectRoot.width * effectRoot.height) / 870, 1000)
|
||||||
lifeSpan: 15000
|
lifeSpan: 15000
|
||||||
system: particleSystem
|
system: particleSystem
|
||||||
maximumEmitted: 500
|
maximumEmitted: 500
|
||||||
|
@ -42,8 +44,8 @@ Item {
|
||||||
sizeVariation: 4
|
sizeVariation: 4
|
||||||
velocity: PointDirection {
|
velocity: PointDirection {
|
||||||
x: 0
|
x: 0
|
||||||
y: -Math.min(450 * parent.height / 700, 1000)
|
y: -Math.min(450 * effectRoot.height / 700, 1000)
|
||||||
xVariation: Math.min(4 * parent.width / 7, 450)
|
xVariation: Math.min(4 * effectRoot.width / 7, 450)
|
||||||
yVariation: 250
|
yVariation: 250
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -74,7 +76,7 @@ Item {
|
||||||
Gravity {
|
Gravity {
|
||||||
system: particleSystem
|
system: particleSystem
|
||||||
groups: ["confetti"]
|
groups: ["confetti"]
|
||||||
anchors.fill: parent
|
anchors.fill: effectRoot
|
||||||
magnitude: 350
|
magnitude: 350
|
||||||
angle: 90
|
angle: 90
|
||||||
}
|
}
|
||||||
|
@ -83,11 +85,11 @@ Item {
|
||||||
id: rainfallEmitter
|
id: rainfallEmitter
|
||||||
|
|
||||||
group: "rain"
|
group: "rain"
|
||||||
width: parent.width
|
width: effectRoot.width
|
||||||
enabled: false
|
enabled: false
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: effectRoot.horizontalCenter
|
||||||
y: -60
|
y: -60
|
||||||
emitRate: parent.width / 50
|
emitRate: effectRoot.width / 50
|
||||||
lifeSpan: 10000
|
lifeSpan: 10000
|
||||||
system: particleSystem
|
system: particleSystem
|
||||||
velocity: PointDirection {
|
velocity: PointDirection {
|
||||||
|
|
Loading…
Reference in a new issue