This is a projection, not a development branch. The tree above was constructed from the internal source named below under a manifest that decides which paths may leave, then scanned as a whole tree rather than as a series of patches, and only then published. Public history starts here because the history before it was not admissible, and neither was the tree. What used to stand in this repository included a rescue copy of another machine, a directory of phone handoffs, deployment wired to one house, and a submodule pointing at a forge no stranger can reach. None of that was ever the product. It stays in the private forge, which is allowed to hold the whole working organism, and this is what was deliberately sent out instead. Three mechanisms produced this tree, in decreasing order of trust. A top-level path the manifest does not name never arrives at all, which is the one that catches directories nobody has thought of yet. Named internal files inside admitted roots are dropped. A short, reviewed table replaces deployment defaults that a public build must not carry -- an endpoint aimed at one LAN, a VPN profile belonging to one phone, packaging built from one checkout path. Everything after this commit is an ordinary publication with the same three trailers, so a force push stops being routine and starts meaning that something deliberate happened. The trailers bind the projection to its source without pretending the public SHA is the private one: same lineage, different tree, and the record says so. Source-Sha: 8f27b1e76a8fef560a336aba18e6990713ff1047 Policy-Sha: 6b261d2f3e6e1fb19874846ba4bb1dfe15565d25b8618c1c1afba0419c101d27 Tree-Digest: 18ec3563c5e5ef9a414993a9f6734b251ff9ed3cd56eebdd6cac01e45c6e3067
126 lines
4.7 KiB
QML
126 lines
4.7 KiB
QML
pragma ComponentBehavior: Bound
|
|
import Qt.labs.synchronizer
|
|
import QtQuick
|
|
import QtQuick.Controls
|
|
import QtQuick.Layouts
|
|
import Quickshell
|
|
import qs
|
|
import qs.services
|
|
import qs.modules.common
|
|
import qs.modules.common.functions
|
|
import qs.modules.waffle.looks
|
|
import qs.modules.waffle.startMenu.startPage
|
|
import qs.modules.waffle.startMenu.searchPage
|
|
|
|
WBarAttachedPanelContent {
|
|
id: root
|
|
|
|
property bool searching: false
|
|
property string searchText: LauncherSearch.query
|
|
|
|
StartMenuContext {
|
|
id: context
|
|
}
|
|
|
|
Keys.onPressed: event => {
|
|
// Prevent Esc and Backspace from registering
|
|
if (event.key === Qt.Key_Escape)
|
|
return;
|
|
|
|
// Handle Backspace: focus and delete character if not focused
|
|
if (event.key === Qt.Key_Backspace) {
|
|
searchBar.forceFocus();
|
|
if (event.modifiers & Qt.ControlModifier) {
|
|
// Delete word before cursor
|
|
let text = searchBar.text;
|
|
let pos = searchBar.searchInput.cursorPosition;
|
|
if (pos > 0) {
|
|
// Find the start of the previous word
|
|
let left = text.slice(0, pos);
|
|
let match = left.match(/(\s*\S+)\s*$/);
|
|
let deleteLen = match ? match[0].length : 1;
|
|
searchBar.text = text.slice(0, pos - deleteLen) + text.slice(pos);
|
|
searchBar.searchInput.cursorPosition = pos - deleteLen;
|
|
}
|
|
} else {
|
|
// Delete character before cursor if any
|
|
if (searchBar.searchInput.cursorPosition > 0) {
|
|
searchBar.text = searchBar.text.slice(0, searchBar.searchInput.cursorPosition - 1) + searchBar.text.slice(searchBar.searchInput.cursorPosition);
|
|
searchBar.searchInput.cursorPosition -= 1;
|
|
}
|
|
}
|
|
// Always move cursor to end after programmatic edit
|
|
searchBar.searchInput.cursorPosition = searchBar.text.length;
|
|
event.accepted = true;
|
|
// If already focused, let TextField handle it
|
|
return;
|
|
}
|
|
|
|
// Only handle visible printable characters (ignore control chars, arrows, etc.)
|
|
if (event.text && event.text.length === 1 && event.key !== Qt.Key_Enter && event.key !== Qt.Key_Return && event.key !== Qt.Key_Delete && event.text.charCodeAt(0) >= 0x20) // ignore control chars like Backspace, Tab, etc.
|
|
{
|
|
if (!searchBar.searchInput.activeFocus) {
|
|
searchBar.forceFocus();
|
|
// Insert the character at the cursor position
|
|
searchBar.text = searchBar.text.slice(0, searchBar.searchInput.cursorPosition) + event.text + searchBar.text.slice(searchBar.searchInput.cursorPosition);
|
|
searchBar.searchInput.cursorPosition += 1;
|
|
event.accepted = true;
|
|
context.setCurrentIndex(0);
|
|
}
|
|
}
|
|
|
|
// Arrow keys for item navigation
|
|
if (event.key === Qt.Key_Down) {
|
|
let maxIndex = Math.max(0, LauncherSearch.results.length - 1);
|
|
context.setCurrentIndex(Math.min(context.currentIndex + 1, maxIndex));
|
|
event.accepted = true;
|
|
} else if (event.key === Qt.Key_Up) {
|
|
context.setCurrentIndex(Math.max(context.currentIndex - 1, 0));
|
|
event.accepted = true;
|
|
}
|
|
}
|
|
|
|
contentItem: WPane {
|
|
contentItem: WPanelPageColumn {
|
|
SearchBar {
|
|
id: searchBar
|
|
Layout.fillWidth: true
|
|
implicitWidth: 832 // TODO: Make sizes naturally inferred
|
|
horizontalPadding: 32
|
|
// verticalPadding: root.searching ? 32 : 16 // TODO: make this not nuke the panel
|
|
Synchronizer on searching {
|
|
property alias target: root.searching
|
|
}
|
|
focus: true
|
|
text: root.searchText
|
|
onTextChanged: {
|
|
LauncherSearch.query = text;
|
|
}
|
|
onAccepted: {
|
|
context.accepted();
|
|
}
|
|
}
|
|
Item {
|
|
implicitHeight: root.searching ? 800 : 800 // TODO: Make sizes naturally inferred
|
|
Layout.fillWidth: true
|
|
Loader {
|
|
id: pageContentLoader
|
|
anchors.fill: parent
|
|
sourceComponent: root.searching ? searchPageComp : startPageComp
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
Component {
|
|
id: searchPageComp
|
|
SearchPageContent {
|
|
context: context
|
|
}
|
|
}
|
|
|
|
Component {
|
|
id: startPageComp
|
|
StartPageContent {}
|
|
}
|
|
}
|