|
@@ -250,10 +250,23 @@ q-layout.fileman(view='hHh lpR lFr', container)
|
|
q-item-section(side)
|
|
q-item-section(side)
|
|
q-icon(name='las la-eye', color='primary')
|
|
q-icon(name='las la-eye', color='primary')
|
|
q-item-section View
|
|
q-item-section View
|
|
|
|
+ template(v-if='item.type === `asset` && item.imageEdit')
|
|
|
|
+ q-item(clickable)
|
|
|
|
+ q-item-section(side)
|
|
|
|
+ q-icon(name='las la-edit', color='orange')
|
|
|
|
+ q-item-section Edit Image...
|
|
|
|
+ q-item(clickable)
|
|
|
|
+ q-item-section(side)
|
|
|
|
+ q-icon(name='las la-crop', color='orange')
|
|
|
|
+ q-item-section Resize Image...
|
|
q-item(clickable, v-if='item.type !== `folder`', @click='copyItemURL(item)')
|
|
q-item(clickable, v-if='item.type !== `folder`', @click='copyItemURL(item)')
|
|
q-item-section(side)
|
|
q-item-section(side)
|
|
q-icon(name='las la-clipboard', color='primary')
|
|
q-icon(name='las la-clipboard', color='primary')
|
|
q-item-section Copy URL
|
|
q-item-section Copy URL
|
|
|
|
+ q-item(clickable, v-if='item.type !== `folder`', @click='')
|
|
|
|
+ q-item-section(side)
|
|
|
|
+ q-icon(name='las la-download', color='primary')
|
|
|
|
+ q-item-section Download
|
|
q-item(clickable)
|
|
q-item(clickable)
|
|
q-item-section(side)
|
|
q-item-section(side)
|
|
q-icon(name='las la-copy', color='teal')
|
|
q-icon(name='las la-copy', color='teal')
|
|
@@ -411,6 +424,7 @@ const files = computed(() => {
|
|
case 'asset': {
|
|
case 'asset': {
|
|
f.icon = fileTypes[f.fileExt]?.icon ?? ''
|
|
f.icon = fileTypes[f.fileExt]?.icon ?? ''
|
|
f.side = filesize(f.fileSize, { round: 0 })
|
|
f.side = filesize(f.fileSize, { round: 0 })
|
|
|
|
+ f.imageEdit = fileTypes[f.fileExt]?.imageEdit
|
|
if (fileTypes[f.fileExt]) {
|
|
if (fileTypes[f.fileExt]) {
|
|
f.caption = t(`fileman.${f.fileExt}FileType`)
|
|
f.caption = t(`fileman.${f.fileExt}FileType`)
|
|
} else {
|
|
} else {
|
|
@@ -489,8 +503,8 @@ function close () {
|
|
siteStore.overlay = null
|
|
siteStore.overlay = null
|
|
}
|
|
}
|
|
|
|
|
|
-async function treeLazyLoad (nodeId, { done, fail }) {
|
|
|
|
- await loadTree({ parentId: nodeId, types: ['folder'] })
|
|
|
|
|
|
+async function treeLazyLoad (nodeId, isCurrent, { done, fail }) {
|
|
|
|
+ await loadTree({ parentId: nodeId, types: isCurrent ? null : ['folder'] })
|
|
done()
|
|
done()
|
|
}
|
|
}
|
|
|
|
|
|
@@ -792,6 +806,7 @@ async function uploadNewFiles () {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
state.uploadPercentage = 100
|
|
state.uploadPercentage = 100
|
|
|
|
+ loadTree({ parentId: state.currentFolderId })
|
|
$q.notify({
|
|
$q.notify({
|
|
type: 'positive',
|
|
type: 'positive',
|
|
message: t('fileman.uploadSuccess')
|
|
message: t('fileman.uploadSuccess')
|
|
@@ -859,7 +874,8 @@ async function copyItemURL (item) {
|
|
break
|
|
break
|
|
}
|
|
}
|
|
case 'asset': {
|
|
case 'asset': {
|
|
- // TODO: Copy asset URL to clibpard
|
|
|
|
|
|
+ const assetPath = item.folderPath ? `${item.folderPath}/${item.fileName}` : item.fileName
|
|
|
|
+ await navigator.clipboard.writeText(`${window.location.origin}/${assetPath}`)
|
|
break
|
|
break
|
|
}
|
|
}
|
|
default: {
|
|
default: {
|