feat: add slash to end of dir href
This commit is contained in:
parent
a10150f2f8
commit
68d238d34d
1 changed files with 2 additions and 2 deletions
|
@ -1,7 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @typedef {object} PathItem
|
* @typedef {object} PathItem
|
||||||
* @property {"Dir"|"SymlinkDir"|"File"|"SymlinkFile"} path_type
|
* @property {"Dir"|"SymlinkDir"|"File"|"SymlinkFile"} path_type
|
||||||
* @property {boolean} is_symlink
|
|
||||||
* @property {string} name
|
* @property {string} name
|
||||||
* @property {number} mtime
|
* @property {number} mtime
|
||||||
* @property {number} size
|
* @property {number} size
|
||||||
|
@ -153,10 +152,11 @@ function addBreadcrumb(value) {
|
||||||
* @param {number} index
|
* @param {number} index
|
||||||
*/
|
*/
|
||||||
function addPath(file, index) {
|
function addPath(file, index) {
|
||||||
const url = getUrl(file.name)
|
let url = getUrl(file.name)
|
||||||
let actionDelete = "";
|
let actionDelete = "";
|
||||||
let actionDownload = "";
|
let actionDownload = "";
|
||||||
if (file.path_type.endsWith("Dir")) {
|
if (file.path_type.endsWith("Dir")) {
|
||||||
|
url += "/";
|
||||||
actionDownload = `
|
actionDownload = `
|
||||||
<div class="action-btn">
|
<div class="action-btn">
|
||||||
<a href="${url}?zip" title="Download folder as a .zip file">
|
<a href="${url}?zip" title="Download folder as a .zip file">
|
||||||
|
|
Loading…
Reference in a new issue