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>
|
||||||
|
|
||||||
<div class="row row-cols-5">
|
<div class="row row-cols-5">
|
||||||
<div class="card text-center" v-for="(path, name) in fileList" key="name">
|
<div class="card text-center" v-for="name in fileKeys" key="name">
|
||||||
<img :src="path" class="card-img-top mx-auto d-block" :alt="name" style="max-width: 100px">
|
<img :src="fileList[name]" class="card-img-top mx-auto d-block" :alt="name" style="max-width: 100px">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h5 class="card-title">{{name}}</h5>
|
<h5 class="card-title">{{name}}</h5>
|
||||||
</div>
|
</div>
|
||||||
|
@ -62,6 +62,7 @@
|
||||||
view: '',
|
view: '',
|
||||||
nav: [],
|
nav: [],
|
||||||
results: [],
|
results: [],
|
||||||
|
fileKeys: [],
|
||||||
fileList: {},
|
fileList: {},
|
||||||
image: null,
|
image: null,
|
||||||
password: ''
|
password: ''
|
||||||
|
@ -90,6 +91,8 @@
|
||||||
.catch(err => (this.err = err))
|
.catch(err => (this.err = err))
|
||||||
axios.get('/emojy/allFiles')
|
axios.get('/emojy/allFiles')
|
||||||
.then(resp => {
|
.then(resp => {
|
||||||
|
// stole this somewhere or other as a quick hack
|
||||||
|
this.fileKeys = Object.keys(resp.data).sort()
|
||||||
this.fileList = resp.data
|
this.fileList = resp.data
|
||||||
this.err = ''
|
this.err = ''
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue