mirror of
https://github.com/m1k1o/neko.git
synced 2025-05-25 15:07:25 +02:00
listing of files on connect
This commit is contained in:
parent
1505abb703
commit
70e84c5840
12 changed files with 160 additions and 26 deletions
|
@ -8,7 +8,8 @@
|
|||
<div v-for="item in files" :key="item.name" class="files-list-item">
|
||||
<i :class="fileIcon(item)" />
|
||||
<p>{{ item.name }}</p>
|
||||
<i class="fas fa-download download" @click="() => download(item)" />
|
||||
<i v-if="item.type !== 'dir'" class="fas fa-download download"
|
||||
@click="() => download(item)" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="files-transfer" @dragover.prevent @drop.prevent="onFileDrop">
|
||||
|
@ -111,7 +112,6 @@
|
|||
<script lang="ts">
|
||||
|
||||
import { Component, Vue } from 'vue-property-decorator'
|
||||
import { onMounted, onUnmounted } from 'vue'
|
||||
|
||||
import Markdown from './markdown'
|
||||
import Content from './context.vue'
|
||||
|
@ -125,28 +125,12 @@
|
|||
})
|
||||
export default class extends Vue {
|
||||
|
||||
data() {
|
||||
return {
|
||||
cwd: '~/Downloads',
|
||||
files: [
|
||||
{
|
||||
name: 'a.txt',
|
||||
type: 'file'
|
||||
},
|
||||
{
|
||||
name: 'b',
|
||||
type: 'dir'
|
||||
},
|
||||
{
|
||||
name: 'c.mkv',
|
||||
type: 'file'
|
||||
},
|
||||
{
|
||||
name: 'd.mp3',
|
||||
type: 'file'
|
||||
}
|
||||
]
|
||||
}
|
||||
get cwd() {
|
||||
return this.$accessor.files.cwd
|
||||
}
|
||||
|
||||
get files() {
|
||||
return this.$accessor.files.files
|
||||
}
|
||||
|
||||
refresh() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue