forked from AkkomaGang/admin-fe
Merge branch 'fix/download-emoji-pack-url' into 'develop'
Fix links for downloading remote emoji packs Closes #91 See merge request pleroma/admin-fe!107
This commit is contained in:
commit
05bc582512
2 changed files with 6 additions and 4 deletions
|
@ -16,6 +16,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||
|
||||
- Fix parsing tuples in Pleroma.Upload.Filter.Mogrify and Pleroma.Emails.Mailer settings
|
||||
- Fix settings submit button position on wide screens when sidebar menu is open
|
||||
- Updates links for downloading remote emoji packs
|
||||
|
||||
## [2.0] - 2020-02-27
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
<el-form-item>
|
||||
<el-link
|
||||
v-if="pack.pack['can-download']"
|
||||
:href="`//${host}/api/pleroma/emoji/packs/${name}/download_shared`"
|
||||
:href="pack.pack['fallback-src']"
|
||||
:underline="false"
|
||||
type="primary"
|
||||
target="_blank">
|
||||
|
@ -92,7 +92,7 @@
|
|||
</p>
|
||||
<div class="download-shared-pack">
|
||||
<el-input v-model="downloadSharedAs" :placeholder=" $t('emoji.downloadAsOptional')"/>
|
||||
<el-button type="primary" class="download-shared-pack-button" @click="downloadFromInstance">
|
||||
<el-button type="primary" class="download-shared-pack-button" @click="downloadFromInstance(pack.pack['homepage'])">
|
||||
{{ isDesktop ? $t('emoji.downloadSharedPack') : $t('emoji.downloadSharedPackMobile') }}
|
||||
</el-button>
|
||||
</div>
|
||||
|
@ -209,10 +209,11 @@ export default {
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
downloadFromInstance() {
|
||||
downloadFromInstance(url) {
|
||||
const instanceAddress = `${new URL(url).protocol}//${new URL(url).hostname}`
|
||||
this.$store.dispatch(
|
||||
'DownloadFrom',
|
||||
{ instanceAddress: this.host, packName: this.name, as: this.downloadSharedAs }
|
||||
{ instanceAddress, packName: this.name, as: this.downloadSharedAs }
|
||||
).then(() => this.$store.dispatch('ReloadEmoji'))
|
||||
.then(() => this.$store.dispatch('SetLocalEmojiPacks'))
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue