Did a lot. Tested SSE & started on socket.io, should prob kill s.io replace w/ ws

This commit is contained in:
2021-11-26 20:05:42 +01:00
parent 2f88516326
commit b8a61d1a0e
25 changed files with 1200 additions and 47 deletions

View File

@@ -97,7 +97,7 @@ export default {
this.socket = null;
},
mounted() {
this.socket = io(window.location.origin);
this.socket = io('/chat');
this.socket.on("chat", msg => {
this.chatHistory.push(msg);
});

22
frontend/ui/Chevron.vue Normal file
View File

@@ -0,0 +1,22 @@
<template>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-down" :class="{rotate}"><polyline points="6 9 12 15 18 9"></polyline></svg>
</template>
<script>
export default {
props: {
rotate: false,
}
}
</script>
<style lang="scss" scoped>
.feather-chevron-down {
transition: all .3s ease;
transform-origin: 12px;
&.rotate {
transform: rotate(-180deg);
}
}
</style>