mirror of https://github.com/velour/catbase.git
emojy: sort the emojy list page
This commit is contained in:
parent
4c1a02e9fb
commit
668b0dcb7b
|
@ -44,8 +44,8 @@
|
|||
</div>
|
||||
|
||||
<div class="row row-cols-5">
|
||||
<div class="card text-center" v-for="(path, name) in fileList" key="name">
|
||||
<img :src="path" class="card-img-top mx-auto d-block" :alt="name" style="max-width: 100px">
|
||||
<div class="card text-center" v-for="name in fileKeys" key="name">
|
||||
<img :src="fileList[name]" class="card-img-top mx-auto d-block" :alt="name" style="max-width: 100px">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">{{name}}</h5>
|
||||
</div>
|
||||
|
@ -62,6 +62,7 @@
|
|||
view: '',
|
||||
nav: [],
|
||||
results: [],
|
||||
fileKeys: [],
|
||||
fileList: {},
|
||||
image: null,
|
||||
password: ''
|
||||
|
@ -90,6 +91,8 @@
|
|||
.catch(err => (this.err = err))
|
||||
axios.get('/emojy/allFiles')
|
||||
.then(resp => {
|
||||
// stole this somewhere or other as a quick hack
|
||||
this.fileKeys = Object.keys(resp.data).sort()
|
||||
this.fileList = resp.data
|
||||
this.err = ''
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue