Use the API endpoint for emoji completion.
This commit is contained in:
parent
447ec91176
commit
ba9b04a8ba
11
src/main.js
11
src/main.js
|
@ -103,12 +103,11 @@ window.fetch('/static/terms-of-service.html')
|
||||||
store.dispatch('setOption', { name: 'tos', value: html })
|
store.dispatch('setOption', { name: 'tos', value: html })
|
||||||
})
|
})
|
||||||
|
|
||||||
window.fetch('/static/emoji.txt')
|
window.fetch('/api/pleroma/emoji.json')
|
||||||
.then((res) => res.text())
|
.then((res) => res.json())
|
||||||
.then((csv) => {
|
.then((values) => {
|
||||||
const emoji = csv.split('\n').map((row) => {
|
const emoji = Object.keys(values).map((key) => {
|
||||||
const values = row.split(', ')
|
return { shortcode: key, image_url: values[key] }
|
||||||
return { shortcode: values[0], image_url: values[1] }
|
|
||||||
})
|
})
|
||||||
store.dispatch('setOption', { name: 'emoji', value: emoji })
|
store.dispatch('setOption', { name: 'emoji', value: emoji })
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue