mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 12:38:48 +03:00
Merge branch 'master' of ssh://github.com/Nheko-Reborn/nheko
This commit is contained in:
commit
38ddfabee6
5 changed files with 38 additions and 55 deletions
|
@ -2,9 +2,9 @@
|
|||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import QtQuick 2.13
|
||||
import QtQuick.Controls 2.13
|
||||
import QtQuick.Layouts 1.13
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
|
||||
TextField {
|
||||
id: input
|
||||
|
|
|
@ -16,6 +16,8 @@ ScrollView {
|
|||
palette: colors
|
||||
padding: 8
|
||||
|
||||
ScrollBar.horizontal.visible: false
|
||||
|
||||
ListView {
|
||||
id: chat
|
||||
|
||||
|
|
|
@ -12,13 +12,6 @@ Popup {
|
|||
property int textHeight: Math.round(Qt.application.font.pixelSize * 2.4)
|
||||
property int textMargin: Math.round(textHeight / 8)
|
||||
|
||||
function delay(delayTime, cb) {
|
||||
timer.interval = delayTime;
|
||||
timer.repeat = false;
|
||||
timer.triggered.connect(cb);
|
||||
timer.start();
|
||||
}
|
||||
|
||||
background: null
|
||||
width: Math.round(parent.width / 2)
|
||||
x: Math.round(parent.width / 2 - width / 2)
|
||||
|
@ -29,9 +22,7 @@ Popup {
|
|||
palette: colors
|
||||
onOpened: {
|
||||
completerPopup.open();
|
||||
delay(200, function() {
|
||||
roomTextInput.forceActiveFocus();
|
||||
});
|
||||
}
|
||||
onClosed: {
|
||||
completerPopup.close();
|
||||
|
@ -93,10 +84,6 @@ Popup {
|
|||
target: completerPopup
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: timer
|
||||
}
|
||||
|
||||
Overlay.modal: Rectangle {
|
||||
color: "#aa1E1E1E"
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import "../"
|
||||
import QtMultimedia 5.6
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.1
|
||||
|
@ -107,45 +108,17 @@ Rectangle {
|
|||
width: parent.width
|
||||
spacing: 15
|
||||
|
||||
Rectangle {
|
||||
ImageButton {
|
||||
id: button
|
||||
|
||||
color: colors.window
|
||||
radius: 22
|
||||
height: 44
|
||||
width: 44
|
||||
states: [
|
||||
State {
|
||||
name: "stopped"
|
||||
|
||||
PropertyChanges {
|
||||
target: img
|
||||
source: "image://colorimage/:/icons/icons/ui/play-sign.png?" + colors.text
|
||||
}
|
||||
|
||||
},
|
||||
State {
|
||||
name: "playing"
|
||||
|
||||
PropertyChanges {
|
||||
target: img
|
||||
source: "image://colorimage/:/icons/icons/ui/pause-symbol.png?" + colors.text
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
|
||||
Image {
|
||||
id: img
|
||||
|
||||
anchors.centerIn: parent
|
||||
Layout.alignment: Qt.verticalCenter
|
||||
//color: colors.window
|
||||
//radius: 22
|
||||
height: 32
|
||||
width: 32
|
||||
z: 3
|
||||
source: "image://colorimage/:/icons/icons/ui/arrow-pointing-down.png?" + colors.text
|
||||
fillMode: Image.Pad
|
||||
}
|
||||
|
||||
TapHandler {
|
||||
onSingleTapped: {
|
||||
image: ":/icons/icons/ui/arrow-pointing-down.png"
|
||||
onClicked: {
|
||||
switch (button.state) {
|
||||
case "":
|
||||
TimelineManager.timeline.cacheMedia(model.data.id);
|
||||
|
@ -162,8 +135,27 @@ Rectangle {
|
|||
break;
|
||||
}
|
||||
}
|
||||
states: [
|
||||
State {
|
||||
name: "stopped"
|
||||
|
||||
PropertyChanges {
|
||||
target: button
|
||||
image: ":/icons/icons/ui/play-sign.png"
|
||||
}
|
||||
|
||||
},
|
||||
State {
|
||||
name: "playing"
|
||||
|
||||
PropertyChanges {
|
||||
target: button
|
||||
image: ":/icons/icons/ui/pause-symbol.png"
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
|
||||
CursorShape {
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
|
|
|
@ -482,6 +482,8 @@ InputBar::command(QString command, QString args)
|
|||
eventId, args.trimmed());
|
||||
} else if (command == "join") {
|
||||
ChatPage::instance()->joinRoom(args);
|
||||
} else if (command == "part" || command == "leave") {
|
||||
MainWindow::instance()->openLeaveRoomDialog(room->roomId());
|
||||
} else if (command == "invite") {
|
||||
ChatPage::instance()->inviteUser(args.section(' ', 0, 0), args.section(' ', 1, -1));
|
||||
} else if (command == "kick") {
|
||||
|
|
Loading…
Reference in a new issue