1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 13:32:50 -05:00

Compare commits

...

6 Commits

Author SHA1 Message Date
bbedward
1b7dcf56a8 bump VERSION 2026-01-14 08:00:15 -05:00
bbedward
502bb88e92 modals: fix wifi passowrd, polkit, and VPN import 2026-01-14 08:00:05 -05:00
bbedward
b76d0ce97d settings: fix child windows on newer quickshell-git 2026-01-13 16:58:08 -05:00
bbedward
fa66d330cf bump VERSION 2026-01-13 16:42:49 -05:00
Lucas
157eab2d07 settings: fix modal not opening on latest quickshell (#1357) 2026-01-13 16:42:38 -05:00
Lucas
f50ad2dc22 nix: escape version string (#1353) 2026-01-13 16:42:38 -05:00
15 changed files with 322 additions and 161 deletions

View File

@@ -61,11 +61,13 @@
(builtins.substring 6 2 longDate) (builtins.substring 6 2 longDate)
]; ];
version = version =
pkgs.lib.removePrefix "v" (pkgs.lib.trim (builtins.readFile ./quickshell/VERSION)) let
+ "+date=" rawVersion = pkgs.lib.removePrefix "v" (pkgs.lib.trim (builtins.readFile ./quickshell/VERSION));
+ mkDate (self.lastModifiedDate or "19700101") cleanVersion = builtins.replaceStrings [ " " ] [ "" ] rawVersion;
+ "_" dateSuffix = "+date=" + mkDate (self.lastModifiedDate or "19700101");
+ (self.shortRev or "dirty"); revSuffix = "_" + (self.shortRev or "dirty");
in
"${cleanVersion}${dateSuffix}${revSuffix}";
in in
{ {
dms-shell = pkgs.buildGoModule ( dms-shell = pkgs.buildGoModule (
@@ -83,7 +85,7 @@
ldflags = [ ldflags = [
"-s" "-s"
"-w" "-w"
"-X main.Version=${version}" "-X 'main.Version=${version}'"
]; ];
nativeBuildInputs = with pkgs; [ nativeBuildInputs = with pkgs; [

View File

@@ -203,6 +203,8 @@ Item {
Component.onCompleted: { Component.onCompleted: {
dockRecreateDebounce.start(); dockRecreateDebounce.start();
// Force PolkitService singleton to initialize
PolkitService.polkitAvailable;
} }
Connections { Connections {
@@ -315,19 +317,44 @@ Item {
} }
} }
WifiPasswordModal { LazyLoader {
id: wifiPasswordModal id: wifiPasswordModalLoader
active: false
Component.onCompleted: { Component.onCompleted: {
PopoutService.wifiPasswordModal = wifiPasswordModal; PopoutService.wifiPasswordModalLoader = wifiPasswordModalLoader;
}
WifiPasswordModal {
id: wifiPasswordModalItem
Component.onCompleted: {
PopoutService.wifiPasswordModal = wifiPasswordModalItem;
}
} }
} }
PolkitAuthModal { LazyLoader {
id: polkitAuthModal id: polkitAuthModalLoader
active: false
Component.onCompleted: { PolkitAuthModal {
PopoutService.polkitAuthModal = polkitAuthModal; id: polkitAuthModal
Component.onCompleted: {
PopoutService.polkitAuthModal = polkitAuthModal;
}
}
}
Connections {
target: PolkitService.agent
enabled: PolkitService.polkitAvailable
function onAuthenticationRequestStarted() {
polkitAuthModalLoader.active = true;
if (polkitAuthModalLoader.item)
polkitAuthModalLoader.item.show();
} }
} }
@@ -349,17 +376,21 @@ Item {
const now = Date.now(); const now = Date.now();
const timeSinceLastPrompt = now - lastCredentialsTime; const timeSinceLastPrompt = now - lastCredentialsTime;
if (wifiPasswordModal.visible && timeSinceLastPrompt < 1000) { wifiPasswordModalLoader.active = true;
if (!wifiPasswordModalLoader.item)
return;
if (wifiPasswordModalLoader.item.visible && timeSinceLastPrompt < 1000) {
NetworkService.cancelCredentials(lastCredentialsToken); NetworkService.cancelCredentials(lastCredentialsToken);
lastCredentialsToken = token; lastCredentialsToken = token;
lastCredentialsTime = now; lastCredentialsTime = now;
wifiPasswordModal.showFromPrompt(token, ssid, setting, fields, hints, reason, connType, connName, vpnService, fieldsInfo); wifiPasswordModalLoader.item.showFromPrompt(token, ssid, setting, fields, hints, reason, connType, connName, vpnService, fieldsInfo);
return; return;
} }
lastCredentialsToken = token; lastCredentialsToken = token;
lastCredentialsTime = now; lastCredentialsTime = now;
wifiPasswordModal.showFromPrompt(token, ssid, setting, fields, hints, reason, connType, connName, vpnService, fieldsInfo); wifiPasswordModalLoader.item.showFromPrompt(token, ssid, setting, fields, hints, reason, connType, connName, vpnService, fieldsInfo);
} }
} }
@@ -442,17 +473,15 @@ Item {
PopoutService.settingsModalLoader = settingsModalLoader; PopoutService.settingsModalLoader = settingsModalLoader;
} }
onActiveChanged: {
if (active && item) {
PopoutService.settingsModal = item;
PopoutService._onSettingsModalLoaded();
}
}
SettingsModal { SettingsModal {
id: settingsModal id: settingsModal
property bool wasShown: false property bool wasShown: false
Component.onCompleted: {
PopoutService.settingsModal = settingsModal;
PopoutService._onSettingsModalLoaded();
}
onVisibleChanged: { onVisibleChanged: {
if (visible) { if (visible) {
wasShown = true; wasShown = true;

View File

@@ -797,11 +797,9 @@ Item {
const modal = PopoutService.settingsModal; const modal = PopoutService.settingsModal;
if (modal) { if (modal) {
if (type === "wallpaper") { if (type === "wallpaper") {
modal.wallpaperBrowser.allowStacking = false; modal.openWallpaperBrowser(false);
modal.wallpaperBrowser.open();
} else if (type === "profile") { } else if (type === "profile") {
modal.profileBrowser.allowStacking = false; modal.openProfileBrowser(false);
modal.profileBrowser.open();
} }
} else { } else {
PopoutService.openSettings(); PopoutService.openSettings();

View File

@@ -128,7 +128,7 @@ FloatingWindow {
iconName: "open_in_new" iconName: "open_in_new"
backgroundColor: Theme.surfaceContainerHighest backgroundColor: Theme.surfaceContainerHighest
textColor: Theme.surfaceText textColor: Theme.surfaceText
onClicked: Qt.openUrlExternally("https://danklinux.com/blog/v1.2-release") onClicked: Qt.openUrlExternally("https://danklinux.com/blog/v1-2-release")
} }
DankButton { DankButton {

View File

@@ -74,9 +74,7 @@ Rectangle {
if (root.parentModal) { if (root.parentModal) {
root.parentModal.allowFocusOverride = true; root.parentModal.allowFocusOverride = true;
root.parentModal.shouldHaveFocus = false; root.parentModal.shouldHaveFocus = false;
if (root.parentModal.profileBrowser) { root.parentModal.openProfileBrowser();
root.parentModal.profileBrowser.open();
}
} }
} }
} }

View File

@@ -8,8 +8,26 @@ import qs.Widgets
FloatingWindow { FloatingWindow {
id: settingsModal id: settingsModal
property alias profileBrowser: profileBrowser property var profileBrowser: profileBrowserLoader.item
property alias wallpaperBrowser: wallpaperBrowser property var wallpaperBrowser: wallpaperBrowserLoader.item
function openProfileBrowser(allowStacking) {
profileBrowserLoader.active = true;
if (!profileBrowserLoader.item)
return;
if (allowStacking !== undefined)
profileBrowserLoader.item.allowStacking = allowStacking;
profileBrowserLoader.item.open();
}
function openWallpaperBrowser(allowStacking) {
wallpaperBrowserLoader.active = true;
if (!wallpaperBrowserLoader.item)
return;
if (allowStacking !== undefined)
wallpaperBrowserLoader.item.allowStacking = allowStacking;
wallpaperBrowserLoader.item.open();
}
property alias sidebar: sidebar property alias sidebar: sidebar
property int currentTabIndex: 0 property int currentTabIndex: 0
property bool shouldHaveFocus: visible property bool shouldHaveFocus: visible
@@ -96,41 +114,51 @@ FloatingWindow {
} }
} }
FileBrowserModal { LazyLoader {
id: profileBrowser id: profileBrowserLoader
active: false
allowStacking: true FileBrowserModal {
parentModal: settingsModal id: profileBrowserItem
browserTitle: I18n.tr("Select Profile Image", "profile image file browser title")
browserIcon: "person" allowStacking: true
browserType: "profile" parentModal: settingsModal
showHiddenFiles: true browserTitle: I18n.tr("Select Profile Image", "profile image file browser title")
fileExtensions: ["*.jpg", "*.jpeg", "*.png", "*.bmp", "*.gif", "*.webp"] browserIcon: "person"
onFileSelected: path => { browserType: "profile"
PortalService.setProfileImage(path); showHiddenFiles: true
close(); fileExtensions: ["*.jpg", "*.jpeg", "*.png", "*.bmp", "*.gif", "*.webp"]
} onFileSelected: path => {
onDialogClosed: () => { PortalService.setProfileImage(path);
allowStacking = true; close();
}
onDialogClosed: () => {
allowStacking = true;
}
} }
} }
FileBrowserModal { LazyLoader {
id: wallpaperBrowser id: wallpaperBrowserLoader
active: false
allowStacking: true FileBrowserModal {
parentModal: settingsModal id: wallpaperBrowserItem
browserTitle: I18n.tr("Select Wallpaper", "wallpaper file browser title")
browserIcon: "wallpaper" allowStacking: true
browserType: "wallpaper" parentModal: settingsModal
showHiddenFiles: true browserTitle: I18n.tr("Select Wallpaper", "wallpaper file browser title")
fileExtensions: ["*.jpg", "*.jpeg", "*.png", "*.bmp", "*.gif", "*.webp"] browserIcon: "wallpaper"
onFileSelected: path => { browserType: "wallpaper"
SessionData.setWallpaper(path); showHiddenFiles: true
close(); fileExtensions: ["*.jpg", "*.jpeg", "*.png", "*.bmp", "*.gif", "*.webp"]
} onFileSelected: path => {
onDialogClosed: () => { SessionData.setWallpaper(path);
allowStacking = true; close();
}
onDialogClosed: () => {
allowStacking = true;
}
} }
} }

View File

@@ -687,8 +687,8 @@ Rectangle {
if (modelData.secured && !modelData.saved) { if (modelData.secured && !modelData.saved) {
if (DMSService.apiVersion >= 7) { if (DMSService.apiVersion >= 7) {
NetworkService.connectToWifi(modelData.ssid); NetworkService.connectToWifi(modelData.ssid);
} else if (PopoutService.wifiPasswordModal) { } else {
PopoutService.wifiPasswordModal.show(modelData.ssid); PopoutService.showWifiPasswordModal(modelData.ssid);
} }
} else { } else {
NetworkService.connectToWifi(modelData.ssid); NetworkService.connectToWifi(modelData.ssid);
@@ -749,8 +749,8 @@ Rectangle {
if (networkContextMenu.currentSecured && !networkContextMenu.currentSaved) { if (networkContextMenu.currentSecured && !networkContextMenu.currentSaved) {
if (DMSService.apiVersion >= 7) { if (DMSService.apiVersion >= 7) {
NetworkService.connectToWifi(networkContextMenu.currentSSID); NetworkService.connectToWifi(networkContextMenu.currentSSID);
} else if (PopoutService.wifiPasswordModal) { } else {
PopoutService.wifiPasswordModal.show(networkContextMenu.currentSSID); PopoutService.showWifiPasswordModal(networkContextMenu.currentSSID);
} }
} else { } else {
NetworkService.connectToWifi(networkContextMenu.currentSSID); NetworkService.connectToWifi(networkContextMenu.currentSSID);

View File

@@ -22,18 +22,38 @@ Item {
readonly property var allInstances: SettingsData.desktopWidgetInstances || [] readonly property var allInstances: SettingsData.desktopWidgetInstances || []
readonly property var allGroups: SettingsData.desktopWidgetGroups || [] readonly property var allGroups: SettingsData.desktopWidgetGroups || []
DesktopWidgetBrowser { function showWidgetBrowser() {
id: widgetBrowser widgetBrowserLoader.active = true;
parentModal: root.parentModal if (widgetBrowserLoader.item)
onWidgetAdded: widgetType => { widgetBrowserLoader.item.show();
ToastService.showInfo(I18n.tr("Widget added")); }
function showDesktopPluginBrowser() {
desktopPluginBrowserLoader.active = true;
if (desktopPluginBrowserLoader.item)
desktopPluginBrowserLoader.item.show();
}
LazyLoader {
id: widgetBrowserLoader
active: false
DesktopWidgetBrowser {
parentModal: root.parentModal
onWidgetAdded: widgetType => {
ToastService.showInfo(I18n.tr("Widget added"));
}
} }
} }
PluginBrowser { LazyLoader {
id: desktopPluginBrowser id: desktopPluginBrowserLoader
parentModal: root.parentModal active: false
typeFilter: "desktop-widget"
PluginBrowser {
parentModal: root.parentModal
typeFilter: "desktop-widget"
}
} }
DankFlickable { DankFlickable {
@@ -74,13 +94,13 @@ Item {
DankButton { DankButton {
text: I18n.tr("Add Widget") text: I18n.tr("Add Widget")
iconName: "add" iconName: "add"
onClicked: widgetBrowser.show() onClicked: root.showWidgetBrowser()
} }
DankButton { DankButton {
text: I18n.tr("Browse Plugins") text: I18n.tr("Browse Plugins")
iconName: "store" iconName: "store"
onClicked: desktopPluginBrowser.show() onClicked: root.showDesktopPluginBrowser()
} }
} }
} }

View File

@@ -2,6 +2,7 @@ pragma ComponentBehavior: Bound
import QtQuick import QtQuick
import QtQuick.Layouts import QtQuick.Layouts
import Quickshell
import qs.Common import qs.Common
import qs.Modals.Common import qs.Modals.Common
import qs.Modals.FileBrowser import qs.Modals.FileBrowser
@@ -23,15 +24,25 @@ Item {
NetworkService.removeRef(); NetworkService.removeRef();
} }
FileBrowserModal { function openVpnFileBrowser() {
id: vpnFileBrowser vpnFileBrowserLoader.active = true;
browserTitle: I18n.tr("Import VPN") if (vpnFileBrowserLoader.item)
browserIcon: "vpn_key" vpnFileBrowserLoader.item.open();
browserType: "vpn" }
fileExtensions: VPNService.getFileFilter()
onFileSelected: path => { LazyLoader {
VPNService.importVpn(path.replace("file://", "")); id: vpnFileBrowserLoader
active: false
FileBrowserModal {
browserTitle: I18n.tr("Import VPN")
browserIcon: "vpn_key"
browserType: "vpn"
fileExtensions: VPNService.getFileFilter()
onFileSelected: path => {
VPNService.importVpn(path.replace("file://", ""));
}
} }
} }
@@ -1520,7 +1531,7 @@ Item {
hoverEnabled: true hoverEnabled: true
cursorShape: VPNService.importing ? Qt.BusyCursor : Qt.PointingHandCursor cursorShape: VPNService.importing ? Qt.BusyCursor : Qt.PointingHandCursor
enabled: !VPNService.importing enabled: !VPNService.importing
onClicked: vpnFileBrowser.open() onClicked: networkTab.openVpnFileBrowser()
} }
} }

View File

@@ -1,4 +1,5 @@
import QtQuick import QtQuick
import Quickshell
import qs.Common import qs.Common
import qs.Services import qs.Services
import qs.Widgets import qs.Widgets
@@ -209,7 +210,7 @@ FocusScope {
iconName: "store" iconName: "store"
enabled: DMSService.dmsAvailable enabled: DMSService.dmsAvailable
onClicked: { onClicked: {
pluginBrowser.show(); showPluginBrowser();
} }
} }
@@ -382,9 +383,11 @@ FocusScope {
Connections { Connections {
target: DMSService target: DMSService
function onPluginsListReceived(plugins) { function onPluginsListReceived(plugins) {
pluginBrowser.isLoading = false; if (!pluginBrowserLoader.item)
pluginBrowser.allPlugins = plugins; return;
pluginBrowser.updateFilteredPlugins(); pluginBrowserLoader.item.isLoading = false;
pluginBrowserLoader.item.allPlugins = plugins;
pluginBrowserLoader.item.updateFilteredPlugins();
} }
function onInstalledPluginsReceived(plugins) { function onInstalledPluginsReceived(plugins) {
var pluginMap = {}; var pluginMap = {};
@@ -410,22 +413,36 @@ FocusScope {
} }
Component.onCompleted: { Component.onCompleted: {
pluginBrowser.parentModal = pluginsTab.parentModal;
if (DMSService.dmsAvailable && DMSService.apiVersion >= 8) if (DMSService.dmsAvailable && DMSService.apiVersion >= 8)
DMSService.listInstalled(); DMSService.listInstalled();
if (PopoutService.pendingPluginInstall) if (PopoutService.pendingPluginInstall)
Qt.callLater(() => pluginBrowser.show()); Qt.callLater(showPluginBrowser);
} }
Connections { Connections {
target: PopoutService target: PopoutService
function onPendingPluginInstallChanged() { function onPendingPluginInstallChanged() {
if (PopoutService.pendingPluginInstall) if (PopoutService.pendingPluginInstall)
pluginBrowser.show(); showPluginBrowser();
} }
} }
PluginBrowser { LazyLoader {
id: pluginBrowser id: pluginBrowserLoader
active: false
PluginBrowser {
id: pluginBrowserItem
Component.onCompleted: {
pluginBrowserItem.parentModal = pluginsTab.parentModal;
}
}
}
function showPluginBrowser() {
pluginBrowserLoader.active = true;
if (pluginBrowserLoader.item)
pluginBrowserLoader.item.show();
} }
} }

View File

@@ -131,7 +131,7 @@ Item {
if (DMSService.dmsAvailable) if (DMSService.dmsAvailable)
DMSService.listInstalledThemes(); DMSService.listInstalledThemes();
if (PopoutService.pendingThemeInstall) if (PopoutService.pendingThemeInstall)
Qt.callLater(() => themeBrowser.show()); Qt.callLater(() => showThemeBrowser());
templateCheckProcess.running = true; templateCheckProcess.running = true;
if (CompositorService.isNiri || CompositorService.isHyprland || CompositorService.isDwl) if (CompositorService.isNiri || CompositorService.isHyprland || CompositorService.isDwl)
checkCursorIncludeStatus(); checkCursorIncludeStatus();
@@ -169,7 +169,7 @@ Item {
target: PopoutService target: PopoutService
function onPendingThemeInstallChanged() { function onPendingThemeInstallChanged() {
if (PopoutService.pendingThemeInstall) if (PopoutService.pendingThemeInstall)
themeBrowser.show(); showThemeBrowser();
} }
} }
@@ -939,7 +939,7 @@ Item {
text: I18n.tr("Browse Themes", "browse themes button") text: I18n.tr("Browse Themes", "browse themes button")
iconName: "store" iconName: "store"
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
onClicked: themeBrowser.show() onClicked: showThemeBrowser()
} }
} }
} }
@@ -2041,7 +2041,18 @@ Item {
} }
} }
ThemeBrowser { LazyLoader {
id: themeBrowser id: themeBrowserLoader
active: false
ThemeBrowser {
id: themeBrowserItem
}
}
function showThemeBrowser() {
themeBrowserLoader.active = true;
if (themeBrowserLoader.item)
themeBrowserLoader.item.show();
} }
} }

View File

@@ -139,7 +139,7 @@ Item {
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
cursorShape: Qt.PointingHandCursor cursorShape: Qt.PointingHandCursor
onClicked: mainWallpaperBrowser.open() onClicked: root.openMainWallpaperBrowser()
} }
} }
@@ -476,7 +476,7 @@ Item {
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
cursorShape: Qt.PointingHandCursor cursorShape: Qt.PointingHandCursor
onClicked: lightWallpaperBrowser.open() onClicked: root.openLightWallpaperBrowser()
} }
} }
@@ -660,7 +660,7 @@ Item {
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
cursorShape: Qt.PointingHandCursor cursorShape: Qt.PointingHandCursor
onClicked: darkWallpaperBrowser.open() onClicked: root.openDarkWallpaperBrowser()
} }
} }
@@ -1242,53 +1242,83 @@ Item {
} }
} }
FileBrowserModal { function openMainWallpaperBrowser() {
id: mainWallpaperBrowser mainWallpaperBrowserLoader.active = true;
parentModal: root.parentModal if (mainWallpaperBrowserLoader.item)
browserTitle: I18n.tr("Select Wallpaper", "wallpaper file browser title") mainWallpaperBrowserLoader.item.open();
browserIcon: "wallpaper" }
browserType: "wallpaper"
showHiddenFiles: true function openLightWallpaperBrowser() {
fileExtensions: ["*.jpg", "*.jpeg", "*.png", "*.bmp", "*.gif", "*.webp"] lightWallpaperBrowserLoader.active = true;
onFileSelected: path => { if (lightWallpaperBrowserLoader.item)
if (SessionData.perMonitorWallpaper) { lightWallpaperBrowserLoader.item.open();
SessionData.setMonitorWallpaper(selectedMonitorName, path); }
} else {
SessionData.setWallpaper(path); function openDarkWallpaperBrowser() {
darkWallpaperBrowserLoader.active = true;
if (darkWallpaperBrowserLoader.item)
darkWallpaperBrowserLoader.item.open();
}
LazyLoader {
id: mainWallpaperBrowserLoader
active: false
FileBrowserModal {
parentModal: root.parentModal
browserTitle: I18n.tr("Select Wallpaper", "wallpaper file browser title")
browserIcon: "wallpaper"
browserType: "wallpaper"
showHiddenFiles: true
fileExtensions: ["*.jpg", "*.jpeg", "*.png", "*.bmp", "*.gif", "*.webp"]
onFileSelected: path => {
if (SessionData.perMonitorWallpaper) {
SessionData.setMonitorWallpaper(selectedMonitorName, path);
} else {
SessionData.setWallpaper(path);
}
close();
} }
close();
} }
} }
FileBrowserModal { LazyLoader {
id: lightWallpaperBrowser id: lightWallpaperBrowserLoader
parentModal: root.parentModal active: false
browserTitle: I18n.tr("Select Wallpaper", "light mode wallpaper file browser title")
browserIcon: "light_mode" FileBrowserModal {
browserType: "wallpaper" parentModal: root.parentModal
showHiddenFiles: true browserTitle: I18n.tr("Select Wallpaper", "light mode wallpaper file browser title")
fileExtensions: ["*.jpg", "*.jpeg", "*.png", "*.bmp", "*.gif", "*.webp"] browserIcon: "light_mode"
onFileSelected: path => { browserType: "wallpaper"
SessionData.wallpaperPathLight = path; showHiddenFiles: true
SessionData.syncWallpaperForCurrentMode(); fileExtensions: ["*.jpg", "*.jpeg", "*.png", "*.bmp", "*.gif", "*.webp"]
SessionData.saveSettings(); onFileSelected: path => {
close(); SessionData.wallpaperPathLight = path;
SessionData.syncWallpaperForCurrentMode();
SessionData.saveSettings();
close();
}
} }
} }
FileBrowserModal { LazyLoader {
id: darkWallpaperBrowser id: darkWallpaperBrowserLoader
parentModal: root.parentModal active: false
browserTitle: I18n.tr("Select Wallpaper", "dark mode wallpaper file browser title")
browserIcon: "dark_mode" FileBrowserModal {
browserType: "wallpaper" parentModal: root.parentModal
showHiddenFiles: true browserTitle: I18n.tr("Select Wallpaper", "dark mode wallpaper file browser title")
fileExtensions: ["*.jpg", "*.jpeg", "*.png", "*.bmp", "*.gif", "*.webp"] browserIcon: "dark_mode"
onFileSelected: path => { browserType: "wallpaper"
SessionData.wallpaperPathDark = path; showHiddenFiles: true
SessionData.syncWallpaperForCurrentMode(); fileExtensions: ["*.jpg", "*.jpeg", "*.png", "*.bmp", "*.gif", "*.webp"]
SessionData.saveSettings(); onFileSelected: path => {
close(); SessionData.wallpaperPathDark = path;
SessionData.syncWallpaperForCurrentMode();
SessionData.saveSettings();
close();
}
} }
} }
} }

View File

@@ -1,5 +1,6 @@
import QtQuick import QtQuick
import QtQuick.Layouts import QtQuick.Layouts
import Quickshell
import qs.Common import qs.Common
import qs.Services import qs.Services
import qs.Widgets import qs.Widgets
@@ -916,14 +917,28 @@ Item {
}); });
} }
WidgetSelectionPopup { LazyLoader {
id: widgetSelectionPopup id: widgetSelectionPopupLoader
parentModal: widgetsTab.parentModal active: false
onWidgetSelected: (widgetId, targetSection) => {
widgetsTab.addWidgetToSection(widgetId, targetSection); WidgetSelectionPopup {
id: widgetSelectionPopupItem
parentModal: widgetsTab.parentModal
onWidgetSelected: (widgetId, targetSection) => {
widgetsTab.addWidgetToSection(widgetId, targetSection);
}
} }
} }
function showWidgetSelectionPopup(sectionId) {
widgetSelectionPopupLoader.active = true;
if (!widgetSelectionPopupLoader.item)
return;
widgetSelectionPopupLoader.item.targetSection = sectionId;
widgetSelectionPopupLoader.item.allWidgets = widgetsTab.getWidgetsForPopup();
widgetSelectionPopupLoader.item.show();
}
DankFlickable { DankFlickable {
anchors.fill: parent anchors.fill: parent
clip: true clip: true
@@ -1113,9 +1128,7 @@ Item {
widgetsTab.handleItemOrderChanged(sectionId, newOrder); widgetsTab.handleItemOrderChanged(sectionId, newOrder);
} }
onAddWidget: sectionId => { onAddWidget: sectionId => {
widgetSelectionPopup.targetSection = sectionId; showWidgetSelectionPopup(sectionId);
widgetSelectionPopup.allWidgets = widgetsTab.getWidgetsForPopup();
widgetSelectionPopup.show();
} }
onRemoveWidget: (sectionId, index) => { onRemoveWidget: (sectionId, index) => {
widgetsTab.removeWidgetFromSection(sectionId, index); widgetsTab.removeWidgetFromSection(sectionId, index);
@@ -1170,9 +1183,7 @@ Item {
widgetsTab.handleItemOrderChanged(sectionId, newOrder); widgetsTab.handleItemOrderChanged(sectionId, newOrder);
} }
onAddWidget: sectionId => { onAddWidget: sectionId => {
widgetSelectionPopup.targetSection = sectionId; showWidgetSelectionPopup(sectionId);
widgetSelectionPopup.allWidgets = widgetsTab.getWidgetsForPopup();
widgetSelectionPopup.show();
} }
onRemoveWidget: (sectionId, index) => { onRemoveWidget: (sectionId, index) => {
widgetsTab.removeWidgetFromSection(sectionId, index); widgetsTab.removeWidgetFromSection(sectionId, index);
@@ -1227,9 +1238,7 @@ Item {
widgetsTab.handleItemOrderChanged(sectionId, newOrder); widgetsTab.handleItemOrderChanged(sectionId, newOrder);
} }
onAddWidget: sectionId => { onAddWidget: sectionId => {
widgetSelectionPopup.targetSection = sectionId; showWidgetSelectionPopup(sectionId);
widgetSelectionPopup.allWidgets = widgetsTab.getWidgetsForPopup();
widgetSelectionPopup.show();
} }
onRemoveWidget: (sectionId, index) => { onRemoveWidget: (sectionId, index) => {
widgetsTab.removeWidgetFromSection(sectionId, index); widgetsTab.removeWidgetFromSection(sectionId, index);

View File

@@ -27,7 +27,9 @@ Singleton {
property var colorPickerModal: null property var colorPickerModal: null
property var notificationModal: null property var notificationModal: null
property var wifiPasswordModal: null property var wifiPasswordModal: null
property var wifiPasswordModalLoader: null
property var polkitAuthModal: null property var polkitAuthModal: null
property var polkitAuthModalLoader: null
property var bluetoothPairingModal: null property var bluetoothPairingModal: null
property var networkInfoModal: null property var networkInfoModal: null
@@ -416,11 +418,17 @@ Singleton {
} }
function showWifiPasswordModal(ssid) { function showWifiPasswordModal(ssid) {
wifiPasswordModal?.show(ssid); if (wifiPasswordModalLoader)
wifiPasswordModalLoader.active = true;
if (wifiPasswordModal)
wifiPasswordModal.show(ssid);
} }
function showHiddenNetworkModal() { function showHiddenNetworkModal() {
wifiPasswordModal?.showHidden(); if (wifiPasswordModalLoader)
wifiPasswordModalLoader.active = true;
if (wifiPasswordModal)
wifiPasswordModal.showHidden();
} }
function hideWifiPasswordModal() { function hideWifiPasswordModal() {

View File

@@ -1 +1 @@
v1.2.0 v1.2.2