diff options
| author | Mark Felder <feld@FreeBSD.org> | 2020-08-03 18:44:35 -0500 |
|---|---|---|
| committer | Mark Felder <feld@feld.me> | 2021-06-01 12:51:20 -0500 |
| commit | 0604b1d5b7b19db41096876d0d911ea95c3c778f (patch) | |
| tree | 44a898b9aa8868a0269c45252cfd3c73bca8fa68 /src/components/chat_panel/chat_panel.js | |
| parent | 7bd18cda64e0a4ca7a61ff2cf69714f23281e9d9 (diff) | |
Rename legacy PleromaFE Chat functionality to "Shout"
Diffstat (limited to 'src/components/chat_panel/chat_panel.js')
| -rw-r--r-- | src/components/chat_panel/chat_panel.js | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/src/components/chat_panel/chat_panel.js b/src/components/chat_panel/chat_panel.js deleted file mode 100644 index 556694ae..00000000 --- a/src/components/chat_panel/chat_panel.js +++ /dev/null @@ -1,53 +0,0 @@ -import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator' -import { library } from '@fortawesome/fontawesome-svg-core' -import { - faBullhorn, - faTimes -} from '@fortawesome/free-solid-svg-icons' - -library.add( - faBullhorn, - faTimes -) - -const chatPanel = { - props: [ 'floating' ], - data () { - return { - currentMessage: '', - channel: null, - collapsed: true - } - }, - computed: { - messages () { - return this.$store.state.chat.messages - } - }, - methods: { - submit (message) { - this.$store.state.chat.channel.push('new_msg', { text: message }, 10000) - this.currentMessage = '' - }, - togglePanel () { - this.collapsed = !this.collapsed - }, - userProfileLink (user) { - return generateProfileLink(user.id, user.username, this.$store.state.instance.restrictedNicknames) - } - }, - watch: { - messages (newVal) { - const scrollEl = this.$el.querySelector('.chat-window') - if (!scrollEl) return - if (scrollEl.scrollTop + scrollEl.offsetHeight + 20 > scrollEl.scrollHeight) { - this.$nextTick(() => { - if (!scrollEl) return - scrollEl.scrollTop = scrollEl.scrollHeight - scrollEl.offsetHeight - }) - } - } - } -} - -export default chatPanel |
