mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 13:32:50 -05:00
Compare commits
6 Commits
816819bf9f
...
v1.2.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1b7dcf56a8 | ||
|
|
502bb88e92 | ||
|
|
b76d0ce97d | ||
|
|
fa66d330cf | ||
|
|
157eab2d07 | ||
|
|
f50ad2dc22 |
14
flake.nix
14
flake.nix
@@ -61,11 +61,13 @@
|
||||
(builtins.substring 6 2 longDate)
|
||||
];
|
||||
version =
|
||||
pkgs.lib.removePrefix "v" (pkgs.lib.trim (builtins.readFile ./quickshell/VERSION))
|
||||
+ "+date="
|
||||
+ mkDate (self.lastModifiedDate or "19700101")
|
||||
+ "_"
|
||||
+ (self.shortRev or "dirty");
|
||||
let
|
||||
rawVersion = pkgs.lib.removePrefix "v" (pkgs.lib.trim (builtins.readFile ./quickshell/VERSION));
|
||||
cleanVersion = builtins.replaceStrings [ " " ] [ "" ] rawVersion;
|
||||
dateSuffix = "+date=" + mkDate (self.lastModifiedDate or "19700101");
|
||||
revSuffix = "_" + (self.shortRev or "dirty");
|
||||
in
|
||||
"${cleanVersion}${dateSuffix}${revSuffix}";
|
||||
in
|
||||
{
|
||||
dms-shell = pkgs.buildGoModule (
|
||||
@@ -83,7 +85,7 @@
|
||||
ldflags = [
|
||||
"-s"
|
||||
"-w"
|
||||
"-X main.Version=${version}"
|
||||
"-X 'main.Version=${version}'"
|
||||
];
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
|
||||
@@ -203,6 +203,8 @@ Item {
|
||||
|
||||
Component.onCompleted: {
|
||||
dockRecreateDebounce.start();
|
||||
// Force PolkitService singleton to initialize
|
||||
PolkitService.polkitAvailable;
|
||||
}
|
||||
|
||||
Connections {
|
||||
@@ -315,19 +317,44 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
WifiPasswordModal {
|
||||
id: wifiPasswordModal
|
||||
LazyLoader {
|
||||
id: wifiPasswordModalLoader
|
||||
active: false
|
||||
|
||||
Component.onCompleted: {
|
||||
PopoutService.wifiPasswordModal = wifiPasswordModal;
|
||||
PopoutService.wifiPasswordModalLoader = wifiPasswordModalLoader;
|
||||
}
|
||||
|
||||
WifiPasswordModal {
|
||||
id: wifiPasswordModalItem
|
||||
|
||||
Component.onCompleted: {
|
||||
PopoutService.wifiPasswordModal = wifiPasswordModalItem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PolkitAuthModal {
|
||||
id: polkitAuthModal
|
||||
LazyLoader {
|
||||
id: polkitAuthModalLoader
|
||||
active: false
|
||||
|
||||
Component.onCompleted: {
|
||||
PopoutService.polkitAuthModal = 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 timeSinceLastPrompt = now - lastCredentialsTime;
|
||||
|
||||
if (wifiPasswordModal.visible && timeSinceLastPrompt < 1000) {
|
||||
wifiPasswordModalLoader.active = true;
|
||||
if (!wifiPasswordModalLoader.item)
|
||||
return;
|
||||
|
||||
if (wifiPasswordModalLoader.item.visible && timeSinceLastPrompt < 1000) {
|
||||
NetworkService.cancelCredentials(lastCredentialsToken);
|
||||
lastCredentialsToken = token;
|
||||
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;
|
||||
}
|
||||
|
||||
lastCredentialsToken = token;
|
||||
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;
|
||||
}
|
||||
|
||||
onActiveChanged: {
|
||||
if (active && item) {
|
||||
PopoutService.settingsModal = item;
|
||||
PopoutService._onSettingsModalLoaded();
|
||||
}
|
||||
}
|
||||
|
||||
SettingsModal {
|
||||
id: settingsModal
|
||||
property bool wasShown: false
|
||||
|
||||
Component.onCompleted: {
|
||||
PopoutService.settingsModal = settingsModal;
|
||||
PopoutService._onSettingsModalLoaded();
|
||||
}
|
||||
|
||||
onVisibleChanged: {
|
||||
if (visible) {
|
||||
wasShown = true;
|
||||
|
||||
@@ -797,11 +797,9 @@ Item {
|
||||
const modal = PopoutService.settingsModal;
|
||||
if (modal) {
|
||||
if (type === "wallpaper") {
|
||||
modal.wallpaperBrowser.allowStacking = false;
|
||||
modal.wallpaperBrowser.open();
|
||||
modal.openWallpaperBrowser(false);
|
||||
} else if (type === "profile") {
|
||||
modal.profileBrowser.allowStacking = false;
|
||||
modal.profileBrowser.open();
|
||||
modal.openProfileBrowser(false);
|
||||
}
|
||||
} else {
|
||||
PopoutService.openSettings();
|
||||
|
||||
@@ -128,7 +128,7 @@ FloatingWindow {
|
||||
iconName: "open_in_new"
|
||||
backgroundColor: Theme.surfaceContainerHighest
|
||||
textColor: Theme.surfaceText
|
||||
onClicked: Qt.openUrlExternally("https://danklinux.com/blog/v1.2-release")
|
||||
onClicked: Qt.openUrlExternally("https://danklinux.com/blog/v1-2-release")
|
||||
}
|
||||
|
||||
DankButton {
|
||||
|
||||
@@ -74,9 +74,7 @@ Rectangle {
|
||||
if (root.parentModal) {
|
||||
root.parentModal.allowFocusOverride = true;
|
||||
root.parentModal.shouldHaveFocus = false;
|
||||
if (root.parentModal.profileBrowser) {
|
||||
root.parentModal.profileBrowser.open();
|
||||
}
|
||||
root.parentModal.openProfileBrowser();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,8 +8,26 @@ import qs.Widgets
|
||||
FloatingWindow {
|
||||
id: settingsModal
|
||||
|
||||
property alias profileBrowser: profileBrowser
|
||||
property alias wallpaperBrowser: wallpaperBrowser
|
||||
property var profileBrowser: profileBrowserLoader.item
|
||||
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 int currentTabIndex: 0
|
||||
property bool shouldHaveFocus: visible
|
||||
@@ -96,41 +114,51 @@ FloatingWindow {
|
||||
}
|
||||
}
|
||||
|
||||
FileBrowserModal {
|
||||
id: profileBrowser
|
||||
LazyLoader {
|
||||
id: profileBrowserLoader
|
||||
active: false
|
||||
|
||||
allowStacking: true
|
||||
parentModal: settingsModal
|
||||
browserTitle: I18n.tr("Select Profile Image", "profile image file browser title")
|
||||
browserIcon: "person"
|
||||
browserType: "profile"
|
||||
showHiddenFiles: true
|
||||
fileExtensions: ["*.jpg", "*.jpeg", "*.png", "*.bmp", "*.gif", "*.webp"]
|
||||
onFileSelected: path => {
|
||||
PortalService.setProfileImage(path);
|
||||
close();
|
||||
}
|
||||
onDialogClosed: () => {
|
||||
allowStacking = true;
|
||||
FileBrowserModal {
|
||||
id: profileBrowserItem
|
||||
|
||||
allowStacking: true
|
||||
parentModal: settingsModal
|
||||
browserTitle: I18n.tr("Select Profile Image", "profile image file browser title")
|
||||
browserIcon: "person"
|
||||
browserType: "profile"
|
||||
showHiddenFiles: true
|
||||
fileExtensions: ["*.jpg", "*.jpeg", "*.png", "*.bmp", "*.gif", "*.webp"]
|
||||
onFileSelected: path => {
|
||||
PortalService.setProfileImage(path);
|
||||
close();
|
||||
}
|
||||
onDialogClosed: () => {
|
||||
allowStacking = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FileBrowserModal {
|
||||
id: wallpaperBrowser
|
||||
LazyLoader {
|
||||
id: wallpaperBrowserLoader
|
||||
active: false
|
||||
|
||||
allowStacking: true
|
||||
parentModal: settingsModal
|
||||
browserTitle: I18n.tr("Select Wallpaper", "wallpaper file browser title")
|
||||
browserIcon: "wallpaper"
|
||||
browserType: "wallpaper"
|
||||
showHiddenFiles: true
|
||||
fileExtensions: ["*.jpg", "*.jpeg", "*.png", "*.bmp", "*.gif", "*.webp"]
|
||||
onFileSelected: path => {
|
||||
SessionData.setWallpaper(path);
|
||||
close();
|
||||
}
|
||||
onDialogClosed: () => {
|
||||
allowStacking = true;
|
||||
FileBrowserModal {
|
||||
id: wallpaperBrowserItem
|
||||
|
||||
allowStacking: true
|
||||
parentModal: settingsModal
|
||||
browserTitle: I18n.tr("Select Wallpaper", "wallpaper file browser title")
|
||||
browserIcon: "wallpaper"
|
||||
browserType: "wallpaper"
|
||||
showHiddenFiles: true
|
||||
fileExtensions: ["*.jpg", "*.jpeg", "*.png", "*.bmp", "*.gif", "*.webp"]
|
||||
onFileSelected: path => {
|
||||
SessionData.setWallpaper(path);
|
||||
close();
|
||||
}
|
||||
onDialogClosed: () => {
|
||||
allowStacking = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -687,8 +687,8 @@ Rectangle {
|
||||
if (modelData.secured && !modelData.saved) {
|
||||
if (DMSService.apiVersion >= 7) {
|
||||
NetworkService.connectToWifi(modelData.ssid);
|
||||
} else if (PopoutService.wifiPasswordModal) {
|
||||
PopoutService.wifiPasswordModal.show(modelData.ssid);
|
||||
} else {
|
||||
PopoutService.showWifiPasswordModal(modelData.ssid);
|
||||
}
|
||||
} else {
|
||||
NetworkService.connectToWifi(modelData.ssid);
|
||||
@@ -749,8 +749,8 @@ Rectangle {
|
||||
if (networkContextMenu.currentSecured && !networkContextMenu.currentSaved) {
|
||||
if (DMSService.apiVersion >= 7) {
|
||||
NetworkService.connectToWifi(networkContextMenu.currentSSID);
|
||||
} else if (PopoutService.wifiPasswordModal) {
|
||||
PopoutService.wifiPasswordModal.show(networkContextMenu.currentSSID);
|
||||
} else {
|
||||
PopoutService.showWifiPasswordModal(networkContextMenu.currentSSID);
|
||||
}
|
||||
} else {
|
||||
NetworkService.connectToWifi(networkContextMenu.currentSSID);
|
||||
|
||||
@@ -22,18 +22,38 @@ Item {
|
||||
readonly property var allInstances: SettingsData.desktopWidgetInstances || []
|
||||
readonly property var allGroups: SettingsData.desktopWidgetGroups || []
|
||||
|
||||
DesktopWidgetBrowser {
|
||||
id: widgetBrowser
|
||||
parentModal: root.parentModal
|
||||
onWidgetAdded: widgetType => {
|
||||
ToastService.showInfo(I18n.tr("Widget added"));
|
||||
function showWidgetBrowser() {
|
||||
widgetBrowserLoader.active = true;
|
||||
if (widgetBrowserLoader.item)
|
||||
widgetBrowserLoader.item.show();
|
||||
}
|
||||
|
||||
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 {
|
||||
id: desktopPluginBrowser
|
||||
parentModal: root.parentModal
|
||||
typeFilter: "desktop-widget"
|
||||
LazyLoader {
|
||||
id: desktopPluginBrowserLoader
|
||||
active: false
|
||||
|
||||
PluginBrowser {
|
||||
parentModal: root.parentModal
|
||||
typeFilter: "desktop-widget"
|
||||
}
|
||||
}
|
||||
|
||||
DankFlickable {
|
||||
@@ -74,13 +94,13 @@ Item {
|
||||
DankButton {
|
||||
text: I18n.tr("Add Widget")
|
||||
iconName: "add"
|
||||
onClicked: widgetBrowser.show()
|
||||
onClicked: root.showWidgetBrowser()
|
||||
}
|
||||
|
||||
DankButton {
|
||||
text: I18n.tr("Browse Plugins")
|
||||
iconName: "store"
|
||||
onClicked: desktopPluginBrowser.show()
|
||||
onClicked: root.showDesktopPluginBrowser()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import qs.Common
|
||||
import qs.Modals.Common
|
||||
import qs.Modals.FileBrowser
|
||||
@@ -23,15 +24,25 @@ Item {
|
||||
NetworkService.removeRef();
|
||||
}
|
||||
|
||||
FileBrowserModal {
|
||||
id: vpnFileBrowser
|
||||
browserTitle: I18n.tr("Import VPN")
|
||||
browserIcon: "vpn_key"
|
||||
browserType: "vpn"
|
||||
fileExtensions: VPNService.getFileFilter()
|
||||
function openVpnFileBrowser() {
|
||||
vpnFileBrowserLoader.active = true;
|
||||
if (vpnFileBrowserLoader.item)
|
||||
vpnFileBrowserLoader.item.open();
|
||||
}
|
||||
|
||||
onFileSelected: path => {
|
||||
VPNService.importVpn(path.replace("file://", ""));
|
||||
LazyLoader {
|
||||
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
|
||||
cursorShape: VPNService.importing ? Qt.BusyCursor : Qt.PointingHandCursor
|
||||
enabled: !VPNService.importing
|
||||
onClicked: vpnFileBrowser.open()
|
||||
onClicked: networkTab.openVpnFileBrowser()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import qs.Common
|
||||
import qs.Services
|
||||
import qs.Widgets
|
||||
@@ -209,7 +210,7 @@ FocusScope {
|
||||
iconName: "store"
|
||||
enabled: DMSService.dmsAvailable
|
||||
onClicked: {
|
||||
pluginBrowser.show();
|
||||
showPluginBrowser();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -382,9 +383,11 @@ FocusScope {
|
||||
Connections {
|
||||
target: DMSService
|
||||
function onPluginsListReceived(plugins) {
|
||||
pluginBrowser.isLoading = false;
|
||||
pluginBrowser.allPlugins = plugins;
|
||||
pluginBrowser.updateFilteredPlugins();
|
||||
if (!pluginBrowserLoader.item)
|
||||
return;
|
||||
pluginBrowserLoader.item.isLoading = false;
|
||||
pluginBrowserLoader.item.allPlugins = plugins;
|
||||
pluginBrowserLoader.item.updateFilteredPlugins();
|
||||
}
|
||||
function onInstalledPluginsReceived(plugins) {
|
||||
var pluginMap = {};
|
||||
@@ -410,22 +413,36 @@ FocusScope {
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
pluginBrowser.parentModal = pluginsTab.parentModal;
|
||||
if (DMSService.dmsAvailable && DMSService.apiVersion >= 8)
|
||||
DMSService.listInstalled();
|
||||
if (PopoutService.pendingPluginInstall)
|
||||
Qt.callLater(() => pluginBrowser.show());
|
||||
Qt.callLater(showPluginBrowser);
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: PopoutService
|
||||
function onPendingPluginInstallChanged() {
|
||||
if (PopoutService.pendingPluginInstall)
|
||||
pluginBrowser.show();
|
||||
showPluginBrowser();
|
||||
}
|
||||
}
|
||||
|
||||
PluginBrowser {
|
||||
id: pluginBrowser
|
||||
LazyLoader {
|
||||
id: pluginBrowserLoader
|
||||
active: false
|
||||
|
||||
PluginBrowser {
|
||||
id: pluginBrowserItem
|
||||
|
||||
Component.onCompleted: {
|
||||
pluginBrowserItem.parentModal = pluginsTab.parentModal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function showPluginBrowser() {
|
||||
pluginBrowserLoader.active = true;
|
||||
if (pluginBrowserLoader.item)
|
||||
pluginBrowserLoader.item.show();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ Item {
|
||||
if (DMSService.dmsAvailable)
|
||||
DMSService.listInstalledThemes();
|
||||
if (PopoutService.pendingThemeInstall)
|
||||
Qt.callLater(() => themeBrowser.show());
|
||||
Qt.callLater(() => showThemeBrowser());
|
||||
templateCheckProcess.running = true;
|
||||
if (CompositorService.isNiri || CompositorService.isHyprland || CompositorService.isDwl)
|
||||
checkCursorIncludeStatus();
|
||||
@@ -169,7 +169,7 @@ Item {
|
||||
target: PopoutService
|
||||
function onPendingThemeInstallChanged() {
|
||||
if (PopoutService.pendingThemeInstall)
|
||||
themeBrowser.show();
|
||||
showThemeBrowser();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -939,7 +939,7 @@ Item {
|
||||
text: I18n.tr("Browse Themes", "browse themes button")
|
||||
iconName: "store"
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
onClicked: themeBrowser.show()
|
||||
onClicked: showThemeBrowser()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2041,7 +2041,18 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
ThemeBrowser {
|
||||
id: themeBrowser
|
||||
LazyLoader {
|
||||
id: themeBrowserLoader
|
||||
active: false
|
||||
|
||||
ThemeBrowser {
|
||||
id: themeBrowserItem
|
||||
}
|
||||
}
|
||||
|
||||
function showThemeBrowser() {
|
||||
themeBrowserLoader.active = true;
|
||||
if (themeBrowserLoader.item)
|
||||
themeBrowserLoader.item.show();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ Item {
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: mainWallpaperBrowser.open()
|
||||
onClicked: root.openMainWallpaperBrowser()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -476,7 +476,7 @@ Item {
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: lightWallpaperBrowser.open()
|
||||
onClicked: root.openLightWallpaperBrowser()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -660,7 +660,7 @@ Item {
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: darkWallpaperBrowser.open()
|
||||
onClicked: root.openDarkWallpaperBrowser()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1242,53 +1242,83 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
FileBrowserModal {
|
||||
id: mainWallpaperBrowser
|
||||
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);
|
||||
function openMainWallpaperBrowser() {
|
||||
mainWallpaperBrowserLoader.active = true;
|
||||
if (mainWallpaperBrowserLoader.item)
|
||||
mainWallpaperBrowserLoader.item.open();
|
||||
}
|
||||
|
||||
function openLightWallpaperBrowser() {
|
||||
lightWallpaperBrowserLoader.active = true;
|
||||
if (lightWallpaperBrowserLoader.item)
|
||||
lightWallpaperBrowserLoader.item.open();
|
||||
}
|
||||
|
||||
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 {
|
||||
id: lightWallpaperBrowser
|
||||
parentModal: root.parentModal
|
||||
browserTitle: I18n.tr("Select Wallpaper", "light mode wallpaper file browser title")
|
||||
browserIcon: "light_mode"
|
||||
browserType: "wallpaper"
|
||||
showHiddenFiles: true
|
||||
fileExtensions: ["*.jpg", "*.jpeg", "*.png", "*.bmp", "*.gif", "*.webp"]
|
||||
onFileSelected: path => {
|
||||
SessionData.wallpaperPathLight = path;
|
||||
SessionData.syncWallpaperForCurrentMode();
|
||||
SessionData.saveSettings();
|
||||
close();
|
||||
LazyLoader {
|
||||
id: lightWallpaperBrowserLoader
|
||||
active: false
|
||||
|
||||
FileBrowserModal {
|
||||
parentModal: root.parentModal
|
||||
browserTitle: I18n.tr("Select Wallpaper", "light mode wallpaper file browser title")
|
||||
browserIcon: "light_mode"
|
||||
browserType: "wallpaper"
|
||||
showHiddenFiles: true
|
||||
fileExtensions: ["*.jpg", "*.jpeg", "*.png", "*.bmp", "*.gif", "*.webp"]
|
||||
onFileSelected: path => {
|
||||
SessionData.wallpaperPathLight = path;
|
||||
SessionData.syncWallpaperForCurrentMode();
|
||||
SessionData.saveSettings();
|
||||
close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FileBrowserModal {
|
||||
id: darkWallpaperBrowser
|
||||
parentModal: root.parentModal
|
||||
browserTitle: I18n.tr("Select Wallpaper", "dark mode wallpaper file browser title")
|
||||
browserIcon: "dark_mode"
|
||||
browserType: "wallpaper"
|
||||
showHiddenFiles: true
|
||||
fileExtensions: ["*.jpg", "*.jpeg", "*.png", "*.bmp", "*.gif", "*.webp"]
|
||||
onFileSelected: path => {
|
||||
SessionData.wallpaperPathDark = path;
|
||||
SessionData.syncWallpaperForCurrentMode();
|
||||
SessionData.saveSettings();
|
||||
close();
|
||||
LazyLoader {
|
||||
id: darkWallpaperBrowserLoader
|
||||
active: false
|
||||
|
||||
FileBrowserModal {
|
||||
parentModal: root.parentModal
|
||||
browserTitle: I18n.tr("Select Wallpaper", "dark mode wallpaper file browser title")
|
||||
browserIcon: "dark_mode"
|
||||
browserType: "wallpaper"
|
||||
showHiddenFiles: true
|
||||
fileExtensions: ["*.jpg", "*.jpeg", "*.png", "*.bmp", "*.gif", "*.webp"]
|
||||
onFileSelected: path => {
|
||||
SessionData.wallpaperPathDark = path;
|
||||
SessionData.syncWallpaperForCurrentMode();
|
||||
SessionData.saveSettings();
|
||||
close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import qs.Common
|
||||
import qs.Services
|
||||
import qs.Widgets
|
||||
@@ -916,14 +917,28 @@ Item {
|
||||
});
|
||||
}
|
||||
|
||||
WidgetSelectionPopup {
|
||||
id: widgetSelectionPopup
|
||||
parentModal: widgetsTab.parentModal
|
||||
onWidgetSelected: (widgetId, targetSection) => {
|
||||
widgetsTab.addWidgetToSection(widgetId, targetSection);
|
||||
LazyLoader {
|
||||
id: widgetSelectionPopupLoader
|
||||
active: false
|
||||
|
||||
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 {
|
||||
anchors.fill: parent
|
||||
clip: true
|
||||
@@ -1113,9 +1128,7 @@ Item {
|
||||
widgetsTab.handleItemOrderChanged(sectionId, newOrder);
|
||||
}
|
||||
onAddWidget: sectionId => {
|
||||
widgetSelectionPopup.targetSection = sectionId;
|
||||
widgetSelectionPopup.allWidgets = widgetsTab.getWidgetsForPopup();
|
||||
widgetSelectionPopup.show();
|
||||
showWidgetSelectionPopup(sectionId);
|
||||
}
|
||||
onRemoveWidget: (sectionId, index) => {
|
||||
widgetsTab.removeWidgetFromSection(sectionId, index);
|
||||
@@ -1170,9 +1183,7 @@ Item {
|
||||
widgetsTab.handleItemOrderChanged(sectionId, newOrder);
|
||||
}
|
||||
onAddWidget: sectionId => {
|
||||
widgetSelectionPopup.targetSection = sectionId;
|
||||
widgetSelectionPopup.allWidgets = widgetsTab.getWidgetsForPopup();
|
||||
widgetSelectionPopup.show();
|
||||
showWidgetSelectionPopup(sectionId);
|
||||
}
|
||||
onRemoveWidget: (sectionId, index) => {
|
||||
widgetsTab.removeWidgetFromSection(sectionId, index);
|
||||
@@ -1227,9 +1238,7 @@ Item {
|
||||
widgetsTab.handleItemOrderChanged(sectionId, newOrder);
|
||||
}
|
||||
onAddWidget: sectionId => {
|
||||
widgetSelectionPopup.targetSection = sectionId;
|
||||
widgetSelectionPopup.allWidgets = widgetsTab.getWidgetsForPopup();
|
||||
widgetSelectionPopup.show();
|
||||
showWidgetSelectionPopup(sectionId);
|
||||
}
|
||||
onRemoveWidget: (sectionId, index) => {
|
||||
widgetsTab.removeWidgetFromSection(sectionId, index);
|
||||
|
||||
@@ -27,7 +27,9 @@ Singleton {
|
||||
property var colorPickerModal: null
|
||||
property var notificationModal: null
|
||||
property var wifiPasswordModal: null
|
||||
property var wifiPasswordModalLoader: null
|
||||
property var polkitAuthModal: null
|
||||
property var polkitAuthModalLoader: null
|
||||
property var bluetoothPairingModal: null
|
||||
property var networkInfoModal: null
|
||||
|
||||
@@ -416,11 +418,17 @@ Singleton {
|
||||
}
|
||||
|
||||
function showWifiPasswordModal(ssid) {
|
||||
wifiPasswordModal?.show(ssid);
|
||||
if (wifiPasswordModalLoader)
|
||||
wifiPasswordModalLoader.active = true;
|
||||
if (wifiPasswordModal)
|
||||
wifiPasswordModal.show(ssid);
|
||||
}
|
||||
|
||||
function showHiddenNetworkModal() {
|
||||
wifiPasswordModal?.showHidden();
|
||||
if (wifiPasswordModalLoader)
|
||||
wifiPasswordModalLoader.active = true;
|
||||
if (wifiPasswordModal)
|
||||
wifiPasswordModal.showHidden();
|
||||
}
|
||||
|
||||
function hideWifiPasswordModal() {
|
||||
|
||||
@@ -1 +1 @@
|
||||
v1.2.0
|
||||
v1.2.2
|
||||
|
||||
Reference in New Issue
Block a user