mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-28 15:32:50 -05:00
filebrowser: bug fixes
This commit is contained in:
@@ -95,12 +95,13 @@ DankModal {
|
|||||||
var lastSlash = path.lastIndexOf('/');
|
var lastSlash = path.lastIndexOf('/');
|
||||||
if (lastSlash > 0) {
|
if (lastSlash > 0) {
|
||||||
var newPath = path.substring(0, lastSlash);
|
var newPath = path.substring(0, lastSlash);
|
||||||
if (newPath.startsWith(homeDir)) {
|
// Don't go above home directory
|
||||||
currentPath = newPath;
|
if (newPath.length < homeDir.length) {
|
||||||
saveLastPath(newPath);
|
|
||||||
} else {
|
|
||||||
currentPath = homeDir;
|
currentPath = homeDir;
|
||||||
saveLastPath(homeDir);
|
saveLastPath(homeDir);
|
||||||
|
} else {
|
||||||
|
currentPath = newPath;
|
||||||
|
saveLastPath(newPath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -184,9 +185,10 @@ DankModal {
|
|||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: "Current folder: " + fileBrowserModal.currentPath
|
text: fileBrowserModal.currentPath.replace("file://", "")
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.fontSizeMedium
|
||||||
color: Theme.surfaceVariantText
|
color: Theme.surfaceText
|
||||||
|
font.weight: Font.Medium
|
||||||
width: parent.width - 40 - Theme.spacingS
|
width: parent.width - 40 - Theme.spacingS
|
||||||
elide: Text.ElideMiddle
|
elide: Text.ElideMiddle
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|||||||
Reference in New Issue
Block a user