Merge branch 'develop' into feature/normal-emoji-completion
This commit is contained in:
commit
36e68fba96
13 changed files with 105 additions and 29 deletions
|
@ -1,4 +1,4 @@
|
|||
const chat = {
|
||||
const chatPanel = {
|
||||
data () {
|
||||
return {
|
||||
currentMessage: '',
|
||||
|
@ -18,4 +18,4 @@ const chat = {
|
|||
}
|
||||
}
|
||||
|
||||
export default chat
|
||||
export default chatPanel
|
|
@ -1,12 +1,12 @@
|
|||
<template>
|
||||
<div class="chat-panel panel panel-default">
|
||||
<div class="panel-heading timeline-heading base02-background base04">
|
||||
<div class="title">
|
||||
{{$t('chat.title')}}
|
||||
<div class="chat-panel">
|
||||
<div class="panel panel-default base01-background">
|
||||
<div class="panel-heading timeline-heading base02-background base04">
|
||||
<div class="title">
|
||||
{{$t('chat.title')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body base01-background">
|
||||
<div class="chat-window">
|
||||
<div class="chat-window" v-chat-scroll>
|
||||
<div class="chat-message" v-for="message in messages" :key="message.id">
|
||||
<span class="chat-avatar">
|
||||
<img :src="message.author.avatar" />
|
||||
|
@ -26,12 +26,11 @@
|
|||
</div>
|
||||
</template>
|
||||
|
||||
<script src="./chat.js"></script>
|
||||
|
||||
<script src="./chat_panel.js"></script>
|
||||
|
||||
<style lang="scss">
|
||||
.chat-window {
|
||||
max-height: 80vh;
|
||||
max-height: 200px;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
}
|
|
@ -7,11 +7,6 @@
|
|||
{{ $t("nav.timeline") }}
|
||||
</router-link>
|
||||
</li>
|
||||
<li v-if='chat && currentUser'>
|
||||
<router-link class="base00-background" to='/chat'>
|
||||
{{ $t("nav.chat") }}
|
||||
</router-link>
|
||||
</li>
|
||||
<li v-if='currentUser'>
|
||||
<router-link class="base00-background" :to="{ name: 'mentions', params: { username: currentUser.screen_name } }">
|
||||
{{ $t("nav.mentions") }}
|
||||
|
|
|
@ -5,7 +5,10 @@ const UserSettings = {
|
|||
return {
|
||||
newname: this.$store.state.users.currentUser.name,
|
||||
newbio: this.$store.state.users.currentUser.description,
|
||||
uploading: [ false, false, false ],
|
||||
followList: null,
|
||||
followImportError: false,
|
||||
followsImported: false,
|
||||
uploading: [ false, false, false, false ],
|
||||
previews: [ null, null, null ]
|
||||
}
|
||||
},
|
||||
|
@ -15,6 +18,9 @@ const UserSettings = {
|
|||
computed: {
|
||||
user () {
|
||||
return this.$store.state.users.currentUser
|
||||
},
|
||||
pleromaBackend () {
|
||||
return this.$store.state.config.pleromaBackend
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
@ -117,6 +123,29 @@ const UserSettings = {
|
|||
}
|
||||
this.uploading[2] = false
|
||||
})
|
||||
},
|
||||
importFollows () {
|
||||
this.uploading[3] = true
|
||||
const followList = this.followList
|
||||
this.$store.state.api.backendInteractor.followImport({params: followList})
|
||||
.then((status) => {
|
||||
if (status) {
|
||||
this.followsImported = true
|
||||
} else {
|
||||
this.followImportError = true
|
||||
}
|
||||
this.uploading[3] = false
|
||||
})
|
||||
},
|
||||
followListChange () {
|
||||
// eslint-disable-next-line no-undef
|
||||
let formData = new FormData()
|
||||
formData.append('list', this.$refs.followlist.files[0])
|
||||
this.followList = formData
|
||||
},
|
||||
dismissImported () {
|
||||
this.followsImported = false
|
||||
this.followImportError = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,6 +49,23 @@
|
|||
<i class="base09 icon-spin4 animate-spin uploading" v-if="uploading[2]"></i>
|
||||
<button class="btn btn-default base05 base02-background" v-else-if="previews[2]" @click="submitBg">{{$t('general.submit')}}</button>
|
||||
</div>
|
||||
<div class="setting-item" v-if="pleromaBackend">
|
||||
<h3>{{$t('settings.follow_import')}}</h3>
|
||||
<p>{{$t('settings.import_followers_from_a_csv_file')}}</p>
|
||||
<form v-model="followImportForm">
|
||||
<input type="file" ref="followlist" v-on:change="followListChange"></input>
|
||||
</form>
|
||||
<i class="base09 icon-spin4 animate-spin uploading" v-if="uploading[3]"></i>
|
||||
<button class="btn btn-default base05 base02-background" v-else @click="importFollows">{{$t('general.submit')}}</button>
|
||||
<div v-if="followsImported">
|
||||
<i class="icon-cross" @click="dismissImported"></i>
|
||||
<p>{{$t('settings.follows_imported')}}</p>
|
||||
</div>
|
||||
<div v-else-if="followImportError">
|
||||
<i class="icon-cross" @click="dismissImported"</i>
|
||||
<p>{{$t('settings.follow_import_error')}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue