Skip to content

New version #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.png"><title>wapp_web_file_manager_vue</title><link rel="stylesheet" href="styles.css"><script defer="defer" src="js/chunk-vendors.6f72ab13.js"></script><script defer="defer" src="js/app.a10a2ca5.js"></script><link href="css/chunk-vendors.f47697c6.css" rel="stylesheet"><link href="css/app.b2d625b8.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but wapp_web_file_manager_vue doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.png"><title>wapp_web_file_manager_vue</title><link rel="stylesheet" href="styles.css"><script defer="defer" src="js/chunk-vendors.6f72ab13.js"></script><script defer="defer" src="js/app.207c3567.js"></script><link href="css/chunk-vendors.f47697c6.css" rel="stylesheet"><link href="css/app.b2d625b8.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but wapp_web_file_manager_vue doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
2 changes: 2 additions & 0 deletions docs/js/app.207c3567.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/js/app.207c3567.js.map

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions docs/js/app.a10a2ca5.js

This file was deleted.

1 change: 0 additions & 1 deletion docs/js/app.a10a2ca5.js.map

This file was deleted.

34 changes: 25 additions & 9 deletions docs/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,22 @@ body, html {

.account-control-panel {
display: flex;
height: 30px;
align-items: center;
/* height: 30px; */ /* Changed to min-height to allow content to define height */
min-height: 30px;
border-bottom: 1px solid #eee;
padding: 4px 5px; /* Added padding for breathing room */
gap: 5px; /* Added gap for spacing between elements */
}

.files-control-panel {
display: flex;
height: 30px;
align-items: center;
/* height: 30px; */ /* Changed to min-height */
min-height: 30px;
border-bottom: 1px solid #eee;
padding: 4px 5px; /* Added padding */
gap: 5px; /* Added gap */
}

.files-list-wrapper {
Expand Down Expand Up @@ -135,10 +143,16 @@ body, html {
.files-grid-control-panel .path-wrapper {
display: flex;
overflow: hidden;
gap: 5px; /* Added gap for spacing between icon and path segments */
align-items: center; /* Vertically align items in path */
}

.files-grid-control-panel .path-wrapper > * {
/* .files-grid-control-panel .path-wrapper > * {
padding: 5px;
} */ /* Removed generic padding, apply specifically to .path-link */

.files-grid-control-panel .path-wrapper > .path-link {
padding: 5px; /* Keep padding for links */
}

.files-grid-control-panel .path-link {
Expand All @@ -165,9 +179,16 @@ body, html {
.files-list-control-panel .path-wrapper {
display: flex;
overflow: hidden;
gap: 5px; /* Added gap for spacing */
align-items: center; /* Vertically align items */
}

.files-list-control-panel .path-link {
/* .files-list-control-panel .path-wrapper > * {
padding: 5px;
} */ /* Removed generic padding */

.files-list-control-panel .path-wrapper > .path-link {
padding: 5px; /* Keep padding for links */
cursor: pointer;
background: rgba(0,0,0,0.05);
border-radius: 5px !important;
Expand All @@ -177,11 +198,6 @@ body, html {
background: rgba(0,0,0,0.1);
}


.files-list-control-panel .path-wrapper > * {
padding: 5px;
}

.files-list-as-list-wrapper {
height: calc(100% - 60px);
}
Expand Down
34 changes: 25 additions & 9 deletions public/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,22 @@ body, html {

.account-control-panel {
display: flex;
height: 30px;
align-items: center;
/* height: 30px; */ /* Changed to min-height to allow content to define height */
min-height: 30px;
border-bottom: 1px solid #eee;
padding: 4px 5px; /* Added padding for breathing room */
gap: 5px; /* Added gap for spacing between elements */
}

.files-control-panel {
display: flex;
height: 30px;
align-items: center;
/* height: 30px; */ /* Changed to min-height */
min-height: 30px;
border-bottom: 1px solid #eee;
padding: 4px 5px; /* Added padding */
gap: 5px; /* Added gap */
}

.files-list-wrapper {
Expand Down Expand Up @@ -135,10 +143,16 @@ body, html {
.files-grid-control-panel .path-wrapper {
display: flex;
overflow: hidden;
gap: 5px; /* Added gap for spacing between icon and path segments */
align-items: center; /* Vertically align items in path */
}

.files-grid-control-panel .path-wrapper > * {
/* .files-grid-control-panel .path-wrapper > * {
padding: 5px;
} */ /* Removed generic padding, apply specifically to .path-link */

.files-grid-control-panel .path-wrapper > .path-link {
padding: 5px; /* Keep padding for links */
}

.files-grid-control-panel .path-link {
Expand All @@ -165,9 +179,16 @@ body, html {
.files-list-control-panel .path-wrapper {
display: flex;
overflow: hidden;
gap: 5px; /* Added gap for spacing */
align-items: center; /* Vertically align items */
}

.files-list-control-panel .path-link {
/* .files-list-control-panel .path-wrapper > * {
padding: 5px;
} */ /* Removed generic padding */

.files-list-control-panel .path-wrapper > .path-link {
padding: 5px; /* Keep padding for links */
cursor: pointer;
background: rgba(0,0,0,0.05);
border-radius: 5px !important;
Expand All @@ -177,11 +198,6 @@ body, html {
background: rgba(0,0,0,0.1);
}


.files-list-control-panel .path-wrapper > * {
padding: 5px;
}

.files-list-as-list-wrapper {
height: calc(100% - 60px);
}
Expand Down
31 changes: 28 additions & 3 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -316,13 +316,25 @@ export default {
.then((aList) => {
oThis.aFiles = aList
oThis.aFilesColumns.push(aList)
oThis.bShowLoader = false
setTimeout(() => {
if (oThis.$refs.files_list_wrapper) {
oThis.$refs.files_list_wrapper.scrollLeft = 10000;
}
}, 200);
})
.catch(oError => {
console.error("Ошибка при загрузке списка файлов для пути " + oThis.aPath.join("/") + ":", oError);
let detailMessage = String(oError);
if (oError && oError.response && oError.response.data && typeof oError.response.data.message === 'string') {
detailMessage = oError.response.data.message;
} else if (oError instanceof Error && typeof oError.message === 'string') {
detailMessage = oError.message;
}
alert('Ошибка при загрузке списка файлов.\nДетали: ' + detailMessage);
})
.finally(() => {
oThis.bShowLoader = false;
})
},
fnClickFileItem(oFile, iColumnIndex) {
if (oFile.type == 'directory') {
Expand Down Expand Up @@ -376,12 +388,25 @@ export default {
this.bShowLoader = true
FileSystemDriver
.fnReadFile(this.sSelectedFile)
.then((sCode) => {
this.bShowLoader = false
.then(sCode => {
// this.sCode = sCode
this.sCode = hljs.highlightAuto(sCode).value
// hljs.highlightElement(document.querySelector('.code'))
})
.catch(oError => {
console.error("Ошибка при чтении файла " + this.sSelectedFile + ":", oError);
let detailMessage = String(oError);
if (oError && oError.response && oError.response.data && typeof oError.response.data.message === 'string') {
detailMessage = oError.response.data.message;
} else if (oError instanceof Error && typeof oError.message === 'string') {
detailMessage = oError.message;
}
alert('Ошибка при чтении файла.\nДетали: ' + detailMessage);
this.sCode = ""; // Clear preview on error
})
.finally(() => {
this.bShowLoader = false;
})
} else {
this.sPreviewShow = "binary"
}
Expand Down
16 changes: 7 additions & 9 deletions src/FileSystemDriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,9 @@ export class FileSystemDriver {
console.log(aList)
fnResolv(aList)
} catch (oE) {
fnReject(oE)
fnReject(oE);
}
})

}

static fnListWebdav(sPath)
Expand All @@ -220,9 +219,8 @@ export class FileSystemDriver {
})
fnResolv(aList)
} catch (oE) {
console.error(oE)
fnResolv([])
// fnReject(oE)
console.error('WebDAV fnList error for path "' + sPath + '":', oE);
fnReject(oE);
}
})
}
Expand All @@ -239,8 +237,8 @@ export class FileSystemDriver {
var sData = enc.decode(oData)
fnResolv(sData)
} catch (oE) {
console.error(oE)
fnResolv("")
console.error('WebDAV fnReadFile error for path "' + sFileName + '":', oE);
fnReject(oE);
}
})
}
Expand All @@ -258,8 +256,8 @@ export class FileSystemDriver {
var sData = decode(data.content)
fnResolv(sData)
}).catch((oE) => {
console.error(oE)
fnResolv("")
console.error('GitHub fnReadFile error for path "' + sFileName + '":', oE);
fnReject(oE);
})
})
}
Expand Down