C++ / fmt (pull_request) Failing after 6s
C++ / build (pull_request) Failing after 9s
C++ / clang-tidy (pull_request) Failing after 10s
JS/TS / fmt (pull_request) Successful in 13s
JS/TS / lint (pull_request) Successful in 8s
Python / static (pull_request) Successful in 30s
Rust / build (pull_request) Successful in 49s
Rust / fmt (pull_request) Successful in 26s
Python / verify (pull_request) Successful in 1m44s
Rust / clippy (pull_request) Successful in 44s
54 lines
940 B
QML
54 lines
940 B
QML
pragma Singleton
|
|
|
|
import Quickshell
|
|
import QtQuick
|
|
import ZShell.Config
|
|
import qs.Services
|
|
import qs.Services
|
|
|
|
Singleton {
|
|
id: root
|
|
|
|
function create(parent: Item, props: var): void {
|
|
chatComp.createObject(parent ?? dummy, props);
|
|
ShellState.forActive().sidebar = false;
|
|
ChatState.isWindow = true;
|
|
}
|
|
|
|
QtObject {
|
|
id: dummy
|
|
}
|
|
|
|
Component {
|
|
id: chatComp
|
|
|
|
FloatingWindow {
|
|
id: win
|
|
|
|
property var props
|
|
|
|
color: Colors.tPalette.m3surface
|
|
implicitHeight: chat.implicitHeight
|
|
implicitWidth: chat.implicitWidth
|
|
minimumSize.height: Config.sidebar.sizes.width
|
|
minimumSize.width: Config.sidebar.sizes.width
|
|
surfaceFormat.opaque: false
|
|
title: qsTr("ZShell - %1").arg(ChatState.title)
|
|
|
|
Component.onCompleted: ChatState.screen = screen
|
|
onVisibleChanged: {
|
|
if (!visible) {
|
|
destroy();
|
|
ChatState.isWindow = false;
|
|
}
|
|
}
|
|
|
|
SidebarView {
|
|
id: chat
|
|
|
|
anchors.fill: parent
|
|
}
|
|
}
|
|
}
|
|
}
|