Compare commits

..

No commits in common. 'master' and 'matrix-chat-native' have entirely different histories.

@ -19,7 +19,6 @@
"sass": "^1.29.0", "sass": "^1.29.0",
"superagent": "^6.1.0", "superagent": "^6.1.0",
"v-emoji-picker": "^2.3.1", "v-emoji-picker": "^2.3.1",
"viewerjs": "*",
"vue": "^2.6.11", "vue": "^2.6.11",
"ws": "^7.3.1" "ws": "^7.3.1"
}, },

@ -1,6 +1,6 @@
<template> <template>
<div id="app"> <div id="app">
<div id="appContent"> <div class="content">
<router-view /> <router-view />
<error /> <error />
</div> </div>
@ -8,7 +8,7 @@
</template> </template>
<script> <script>
import error from '@/components/layout/error.vue'; import error from "@/components/error.vue";
export default { export default {
name: 'App', name: 'App',
@ -18,12 +18,27 @@ export default {
} }
</script> </script>
<style lang="scss"> <style>
@import "main.scss";
body{ body{
margin: 0; margin: 0;
} }
input{
padding: 0 2rem 0 2rem;
height: 2.5rem;
color: #fff;
background-color: #1d1d1d;
border-radius: 1.25rem;
border: 0.1rem solid #fff;
text-align: center;
font-size: 1.1rem;
margin: 0.5rem;
appearance: none;
outline: none;
}
input:focus{
color: #000;
background-color: #fff;
}
a{ a{
color: #00BCD4; color: #00BCD4;
} }
@ -50,7 +65,7 @@ a{
min-height: 100%; min-height: 100%;
width: 100%; width: 100%;
} }
#appContent{ .content{
position: absolute; position: absolute;
top: 0; top: 0;
left: calc(50% - 35rem); left: calc(50% - 35rem);
@ -62,7 +77,7 @@ a{
box-shadow: 3px 3px 10px #111; box-shadow: 3px 3px 10px #111;
} }
@media (max-width: 75rem){ @media (max-width: 75rem){
#appContent{ .content{
width: 100%; width: 100%;
left: 0; left: 0;
} }

@ -1,34 +1,39 @@
<template> <template>
<popup :on-close="closeChatInfo" class="popup"> <div class="chatInfo">
<div class="topContainer"> <div class="box">
<avatar <div class="scrollContainer">
class="roomImage" <div class="topContainer">
:mxcURL="getMxcFromChat(room)" <avatar
:fallback="room.roomId" class="roomImage"
:size="5" :mxcURL="getMxcFromRoom(room)"
/> :fallback="room.roomId"
<div class="info"> :size="5"
<div class="roomName">{{room.name}}</div> />
<div class="users">{{members.length}} members</div> <div class="info">
<div class="roomName">{{room.name}}</div>
<div class="users">{{members.length}} members</div>
</div>
</div>
<user-list-element v-for="member in members.slice(0,20)" :key="member" :user="getUser(member)"/>
<p v-if="members.length>20">and {{members.length-20}} other members</p>
</div> </div>
</div> </div>
<user-list-element v-for="member in members.slice(0,20)" :key="member" :user="getUser(member)"/> <icon class="closeBtn" @click.native="closeChatInfo()" ic="./sym/ic_close_white.svg" />
<p v-if="members.length>20">and {{members.length-20}} other members</p> </div>
</popup>
</template> </template>
<script> <script>
import UserListElement from '@/components/matrix/userListElement'; import icon from './icon.vue';
import avatar from '@/components/matrix/avatar'; import UserListElement from "@/components/userListElement";
import {getMxcFromChat} from '@/lib/getMxc'; import avatar from "@/components/avatar";
import {getUser} from '@/lib/matrixUtils'; import {getMxcFromRoom} from "@/lib/getMxc";
import popup from '@/components/layout/popup'; import {getUser} from "@/lib/matrixUtils";
export default { export default {
name: 'chatInformation', name: "chatInformation",
components:{ components:{
avatar, avatar,
UserListElement, UserListElement,
popup icon,
}, },
props:{ props:{
room: {}, room: {},
@ -39,7 +44,7 @@ export default {
return Object.keys(this.room.currentState.members) return Object.keys(this.room.currentState.members)
}, },
getUser, getUser,
getMxcFromChat getMxcFromRoom
}, },
data(){ data(){
return{ return{
@ -79,9 +84,6 @@ export default {
height: 100%; height: 100%;
} }
} }
.popup{
min-height: calc(100% - 10rem);
}
.closeBtn{ .closeBtn{
position: absolute; position: absolute;
top: 0; top: 0;

@ -5,9 +5,9 @@
<event-content :content="event.content"/> <event-content :content="event.content"/>
<div class="time">{{getTime(event.origin_server_ts)}}</div> <div class="time">{{getTime(event.origin_server_ts)}}</div>
</div> </div>
<div v-else :class="type==='send'?'info send':'info receive'"> <div v-else class="info">
<span v-if="event.type==='m.room.member'">{{membershipEvents[event.content.membership](event)}}</span> <span v-if="event.type==='m.room.member'">{{membershipEvents[event.content.membership](event)}}</span>
<span v-else>unsupported event: {{event.type}}</span> <span v-else>unsupported event</span>
<span class="time"> {{getTime(event.origin_server_ts)}}</span> <span class="time"> {{getTime(event.origin_server_ts)}}</span>
</div> </div>
</div> </div>
@ -19,8 +19,8 @@ import {calcUserName} from '@/lib/matrixUtils';
import {parseMessage} from '@/lib/eventUtils'; import {parseMessage} from '@/lib/eventUtils';
import {getTime} from '@/lib/getTimeStrings'; import {getTime} from '@/lib/getTimeStrings';
import {getMediaUrl} from '@/lib/getMxc'; import {getMediaUrl} from '@/lib/getMxc';
import ReplyEvent from '@/components/chat/replyEvent'; import ReplyEvent from '@/components/replyEvent';
import EventContent from '@/components/chat/eventContent'; import EventContent from '@/components/eventContent';
export default { export default {
name: 'message', name: 'message',
@ -49,18 +49,12 @@ export default {
return{ return{
replyEvent: undefined, replyEvent: undefined,
membershipEvents:{ membershipEvents:{
invite(event){ return `invited ${event.target?calcUserName(event.target.userId):event.content.displayname||event.state_key}` }, invite(event){ return `invited ${calcUserName(event.target.userId)}` },
join(event){ join(event){
if (!event.unsigned.prev_content) return 'joined the room'; if (event.content.displayname !== null) return `changed username to ${event.content.displayname}`
if (event.unsigned.prev_content.membership === 'invite') return 'accepted invite'; return 'joined the room'
if (event.unsigned.prev_content.displayname !== event.content.displayname)
return `changed displayname from ${event.unsigned.prev_content.displayname} to ${event.content.displayname}`;
return 'updated their account';
},
leave(event){
if (event.unsigned.prev_content && event.unsigned.prev_content.membership === 'invite') return 'rejected invite';
return 'left the room'
}, },
leave(){ return 'left the room' },
ban(event){return `banned ${calcUserName(event.target.userId)}` } ban(event){return `banned ${calcUserName(event.target.userId)}` }
} }
} }
@ -85,9 +79,6 @@ export default {
font-size: 0.7rem; font-size: 0.7rem;
} }
} }
.info.send{
text-align: right;
}
.message{ .message{
position: relative; position: relative;
width: max-content; width: max-content;

@ -1,18 +1,26 @@
<template> <template>
<div v-if="content.msgtype==='m.text'" v-html="parseMessage(content.body)" :class="getEmojiClass(content)"/> <div v-if="content.msgtype==='m.text'" v-html="parseMessage(content.body)"/>
<div v-else-if="content.msgtype==='m.notice'" class="notice" v-html="parseMessage(content.body)"/> <div v-else-if="content.msgtype==='m.notice'" class="notice" v-html="parseMessage(content.body)"/>
<image-viewer v-else-if="content.msgtype==='m.image'" :alt="content.body" class="image" :class="compact?'compact':''"> <div v-else-if="content.msgtype==='m.image'" class="image">
<img :src="getSource(content.url)" :alt="content.body" :class="compact?'compact':''"/><br> <img :src="getSource(content.url)" :alt="content.body" :class="`${compact?'compact':''}`"/><br>
{{content.body}} {{content.body}}
</image-viewer> </div>
<div v-else-if="content.msgtype==='m.file'" :class="`file ${compact?'compact':''}`"> <div v-else-if="content.msgtype==='m.file'" :class="`file ${compact?'compact':''}`">
<a :href="getSource(content.url)" target="_blank"> <a :href="getSource(content.url)" target="_blank">
<div class="fileContent"> <div class="fileContent">
<icon title="file" ic="./sym/ic_attach_file_white.svg" class="download"/> <icon
<div class="filename">{{content.filename || getSource(content.url)}}</div> title="file"
ic="./sym/ic_attach_file_white.svg"
class="download"
/>
<div class="filename">
{{content.filename || getSource(content.url)}}
</div> </div>
</div>
</a> </a>
<div class="text">{{content.body}}</div> <div class="text">
{{content.body}}
</div>
</div> </div>
<div v-else-if="content.msgtype==='m.audio'" :class="`audio ${compact?'compact':''}`"> <div v-else-if="content.msgtype==='m.audio'" :class="`audio ${compact?'compact':''}`">
<audio controls :class="`${compact?'compact':''}`"> <audio controls :class="`${compact?'compact':''}`">
@ -28,63 +36,34 @@
</video><br> </video><br>
{{content.body}} {{content.body}}
</div> </div>
<div v-else-if="content.msgtype" class="italic">unsupported message type: {{content.msgtype}}</div> <div v-else class="italic">unsupported message type {{content.msgtype}}</div>
<div v-else class="italic">deleted message</div>
</template> </template>
<script> <script>
import {getMediaUrl} from '@/lib/getMxc'; import {getMediaUrl} from '@/lib/getMxc';
import {parseMessage} from '@/lib/eventUtils'; import {parseMessage} from '@/lib/eventUtils';
import Icon from '@/components/layout/icon'; import Icon from '@/components/icon';
import imageViewer from '@/components/layout/imageViewer';
export default { export default {
name: 'eventContent', name: 'eventContent',
components: { components: {Icon},
Icon,
imageViewer
},
props: { props: {
content: Object, content: Object,
compact: { compact: {
type: Boolean, type: Boolean,
default: false default: false
},
onUpdate: {
type: Function,
default: ()=>{}
} }
}, },
methods: { methods: {
getSource(url){ getSource(url){
return url.includes('mxc')?getMediaUrl(url):url; return url.includes('mxc')?getMediaUrl(url):url;
}, },
getEmojiContentLength(content){
return content.body.match(/^(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])+$/)
&& content.body.match(/\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff]/g).length
|| 0;
},
getEmojiClass(content){
let emojiLength = this.getEmojiContentLength(content);
if (emojiLength > 1) return 'emoji';
if (emojiLength === 1) return 'bigEmoji';
return '';
},
parseMessage parseMessage
},
updated() {
this.onUpdate();
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.emoji{
font-size: 2rem;
}
.bigEmoji{
font-size: 3rem;
}
.file{ .file{
max-width: 30rem; max-width: 30rem;
.fileContent{ .fileContent{

@ -14,8 +14,7 @@
</template> </template>
<script> <script>
import icon from '@/components/layout/icon'; import icon from '@/components/icon';
import {readFileBlob} from '@/lib/readFileBlob';
export default { export default {
name: 'soundRecorder', name: 'soundRecorder',
@ -27,11 +26,21 @@ export default {
}, },
methods: { methods: {
setFile({file}){ setFile({file}){
readFileBlob(file).then(blob => { this.readFile(file).then(blob => {
blob.name = file.name; blob.name = file.name;
this.onChange({blob}) this.onChange({blob})
}); });
} },
readFile(file){
return new Promise(resolve => {
let reader = new FileReader();
reader.onerror = console.error;
reader.onload = async event => {
resolve(await (await fetch(event.target.result)).blob());
}
reader.readAsDataURL(file);
});
},
} }
} }
</script> </script>

@ -1,41 +0,0 @@
<template>
<div class="viewer" ref="images">
<slot></slot>
</div>
</template>
<script>
import Viewer from 'viewerjs';
import 'viewerjs/dist/viewer.css';
export default {
name: 'imageViewer',
props: {
options: Object
},
mounted() {
new Viewer(this.$refs.images, this.options||{
inline: false,
navbar: false,
button: true,
toolbar: {
reset: {show: 1, size: 'large'},
zoomIn: {show: 1, size: 'large'},
zoomOut: {show: 1, size: 'large'},
rotateLeft: {show: 1, size: 'large'},
rotateRight: {show: 1, size: 'large'}
},
zoomRatio: 0.25,
minZoomRatio: 0.5,
maxZoomRatio: 10,
toggleOnDblclick: true,
});
}
}
</script>
<style scoped lang="scss">
.viewer{
cursor: pointer;
}
</style>

@ -1,24 +0,0 @@
<template>
<div v-if="this.$slots.default" class="overlay">
<slot></slot>
</div>
</template>
<script>
export default {
name: 'overlay'
}
</script>
<style scoped>
.overlay{
position: fixed;
top: 0;
left: 0;
height: 100%;
width: 100%;
background-color: #111d;
user-select: none;
z-index: 50;
}
</style>

@ -1,91 +0,0 @@
<template>
<div class="popup">
<div class="scrollContainer" ref="scrollContainer">
<div class="content">
<slot></slot>
</div>
<icon v-if="onClose" class="closeBtn" @click.native="onClose(false)" ic="./sym/ic_close_white.svg" />
</div>
</div>
</template>
<script>
import icon from '@/components/layout/icon';
export default {
name: 'popup',
components: {
icon
},
props: {
onClose: Function
},
methods: {
calcMaxHeight(){
this.$refs.scrollContainer.style.maxHeight = `calc(${this.$el.parentElement.clientHeight}px - 4rem`;
}
},
mounted() {
this.calcMaxHeight();
}
}
</script>
<style scoped>
.popup{
position: relative;
top: 5rem;
width: calc(100% - 4rem);
max-width: 30rem;
min-height: 10rem;
background-color: #1d1d1d;
box-shadow: 6px 6px 20px #111;
border-radius: 1rem;
z-index: 30;
overflow: hidden;
}
.scrollContainer{
position: relative;
max-height: 30rem;
top: 0;
width: calc(100% - 2rem);
padding: 0 1rem 0 1rem;
overflow-y: auto;
overflow-x: hidden;
}
@media (max-width: 30rem) {
.popup{
transform: unset;
top: 0;
left: 0;
width: 100%;
height: 100%;
border-radius: 0;
}
.scrollContainer{
max-height: 100% !important;
}
}
@media (max-height: 40rem) {
.popup{
top: 0;
height: 100%;
}
.scrollContainer{
max-height: 100% !important;
}
}
.closeBtn{
position: fixed;
top: 0;
right: 0;
background-color: #0000;
box-shadow: none;
}
.content{
position: relative;
padding: 1rem 0 1rem 0;
width: 100%;
height: auto;
}
</style>

@ -1,33 +0,0 @@
<template>
<popup :on-close="callback">
<h2>{{title}}</h2>
<p>{{question}}</p>
<textbtn :text="action" @click.native="callback(true)"/>
<textbtn text="Cancel" @click.native="callback(false)" class="outline"/>
</popup>
</template>
<script>
import textbtn from '@/components/layout/textbtn';
import popup from '@/components/layout/popup';
export default {
name: 'popupQuestion',
components: {
textbtn,
popup
},
props:{
title: String,
question: String,
callback: Function,
action: {
type: String,
default: 'Apply'
}
}
}
</script>
<style scoped lang="scss">
</style>

@ -1,55 +0,0 @@
<template>
<button class="btn">
<div class="btnText">{{text}}</div>
</button>
</template>
<script>
export default {
name: "textbtn",
props:{
text: String,
}
}
</script>
<style scoped>
.btn{
cursor: pointer;
border: none;
height: 2.5rem;
padding-left: 1.5rem;
padding-right: 1.5rem;
background-color: var(--primary);
box-shadow: var(--shadow100);
border-radius: 1rem;
margin: 0.2rem;
}
.btn.primary{
background-color: var(--primary);
}
.btn.underline{
background-color: unset;
text-decoration: underline;
color: #fff;
box-shadow: none;
}
.btn.rounded{
border-radius: 1.25rem;
}
.btn.outline{
background-color: unset;
box-shadow: none;
text-decoration: underline;
border: #fff solid 1px;
}
.btn.squared{
border-radius: 0;
}
.btnText {
position: relative;
font-size: 1rem;
color:#fff;
font-family:Arial, "lucida console", sans-serif;
}
</style>

@ -1,86 +0,0 @@
<template>
<popup :on-close="callback">
<h2>New room</h2>
<input v-model="name" type="text" placeholder="Room name">
<select v-model="access">
<option>private</option>
<option>public</option>
</select><br>
<textarea v-model="description" placeholder="Room description"></textarea><br>
<h3>Add User</h3>
<user-search :filter="prop=>!users.find(temp=>temp===prop)" :callback="addUser" class="userSearch"/>
<h3 v-if="users.length">User</h3>
<div>
<user-list-element
v-for="user in users"
:user="user" :key="user.userId"
@click.native="removeUser(user)"
/>
</div>
<textbtn :text="action" @click.native="createRoom({name, users, description, access}).then(callback)"/>
<textbtn text="Cancel" @click.native="callback(false)" class="outline"/>
<overlay v-if="loading"><throbber text="loading"/></overlay>
</popup>
</template>
<script>
import textbtn from '@/components/layout/textbtn';
import popup from '@/components/layout/popup';
import userListElement from '@/components/matrix/userListElement';
import UserSearch from '@/components/matrix/userSearch';
import overlay from '@/components/layout/overlay';
import throbber from '@/components/layout/throbber';
import {createRoom} from '@/lib/matrixUtils';
export default {
name: 'popupQuestion',
components: {
UserSearch,
textbtn,
popup,
userListElement,
overlay,
throbber
},
props:{
props: Object,
callback: Function,
action: {
type: String,
default: 'Apply'
}
},
data(){
return{
name: this.props.name,
description: this.props.description,
users: [],
loading: false,
access: 'private'
}
},
methods:{
addUser(user){
if (this.users.find(tmp => tmp === user)) return;
this.users.push(user);
this.userSearch = '';
},
removeUser(user){
this.users = this.users.filter(tmp => tmp !== user);
},
async createRoom(props){
this.loading = true;
return await createRoom(props);
}
}
}
</script>
<style scoped lang="scss">
textarea{
width: 100%;
}
.userSearch{
}
</style>

@ -1,78 +0,0 @@
<template>
<div class="userSearch">
<div v-if="userSearch" class="box">
<div class="results">
<user-list-element
v-for="user in matrix.client.getUsers()
.filter(prop=>matchResults(prop.displayName, userSearch)||matchResults(prop.userId, userSearch))
.filter(filter)
.slice(0,16)"
:user="user" :key="user.userId"
@click.native="callback(user); userSearch='';"
:compact="true"
/>
</div>
<div class="filler"></div>
</div>
<input v-model="userSearch" type="text" placeholder="search" class="input">
</div>
</template>
<script>
import userListElement from '@/components/matrix/userListElement';
import {matrix} from '@/main';
export default {
name: 'userSearch',
components:{
userListElement
},
props:{
callback: Function,
filter: Function
},
methods:{
matchResults(prop, search){
return prop.toLowerCase().includes(search.toLowerCase().trim());
}
},
data(){
return {
matrix,
userSearch: ''
}
}
}
</script>
<style scoped>
.userSearch{
position: relative;
background-color: #1d1d1d;
height: 2.2rem;
width: 14rem;
margin: 0.2rem;
}
.input{
position: absolute;
width: 13rem;
margin: 0;
}
.filler{
height: 2.5rem;
}
.box{
position: absolute;
bottom: -0.4rem;
left: -0.4rem;
background-color: var(--grey500);
box-shadow: var(--shadow200);
width: calc(100% + 0.8rem);
border-radius: 0.6rem;
}
.results{
max-height: 10.5rem;
overflow-y: auto;
overflow-x: hidden;
}
</style>

@ -2,7 +2,7 @@
<div class="newMessageBanner" ref="newMessageBanner"> <div class="newMessageBanner" ref="newMessageBanner">
<reply-event v-if="replyTo" :event="replyTo" @click.native="resetReplyTo()"/> <reply-event v-if="replyTo" :event="replyTo" @click.native="resetReplyTo()"/>
<div v-if="attachment" class="attachment"> <div v-if="attachment" class="attachment">
<event-content :content="attachment" class="attachmentContent" :compact="true" :onUpdate="resizeMessageBanner()"/> <event-content :content="attachment" class="attachmentContent" :compact="true"/>
<icon <icon
title="remove" title="remove"
class="remove" class="remove"
@ -13,7 +13,6 @@
<textarea <textarea
@keyup.enter.exact="onSubmit(event)" @keyup.enter.exact="onSubmit(event)"
@input="resizeMessageBanner(); sendTyping(2000);" @input="resizeMessageBanner(); sendTyping(2000);"
@paste="onPaste"
v-model="event.content.body" v-model="event.content.body"
ref="newMessageInput" class="newMessageInput" ref="newMessageInput" class="newMessageInput"
rows="1" placeholder="type a message ..." rows="1" placeholder="type a message ..."
@ -47,16 +46,15 @@
</template> </template>
<script> <script>
import icon from '@/components/layout/icon.vue'; import icon from '@/components/icon.vue';
import {matrix} from '@/main.js'; import {matrix} from '@/main.js';
import {parseMessage} from '@/lib/eventUtils'; import {parseMessage} from '@/lib/eventUtils';
import {calcUserName} from '@/lib/matrixUtils'; import {calcUserName} from '@/lib/matrixUtils';
import ReplyEvent from '@/components/chat/replyEvent'; import ReplyEvent from '@/components/replyEvent';
import {VEmojiPicker} from 'v-emoji-picker'; import {VEmojiPicker} from 'v-emoji-picker';
import EventContent from '@/components/chat/eventContent'; import EventContent from '@/components/eventContent';
import SoundRecorder from '@/components/layout/soundRecorder'; import SoundRecorder from '@/components/soundRecorder';
import FileUpload from '@/components/layout/fileUpload'; import FileUpload from '@/components/fileUpload';
import {readFileBlob} from '@/lib/readFileBlob';
export default { export default {
name: 'newMessage', name: 'newMessage',
@ -159,12 +157,6 @@ export default {
'video': 'm.video' 'video': 'm.video'
}[fileType.split('/', 1)[0]] || 'm.file'; }[fileType.split('/', 1)[0]] || 'm.file';
}, },
onPaste(event){
let item = (event.clipboardData || event.originalEvent.clipboardData).items[0];
if (item.kind !== 'file') return false;
let file = item.getAsFile();
return readFileBlob(file).then(blob => this.setAttachment({blob, file}));
},
parseMessage, parseMessage,
calcUserName calcUserName
}, },

@ -0,0 +1,34 @@
<template>
<div class="questionBox">
<p class="text">{{question}}</p>
<textbtn text="yes" @click.native="callback(true)"/>
<textbtn text="no" @click.native="callback(false)"/>
</div>
</template>
<script>
import textbtn from '@/components/textbtn';
export default {
name: 'popupQuestion',
components: {textbtn},
props:{
question: String,
callback: Function
}
}
</script>
<style scoped lang="scss">
.questionBox{
position: absolute;
width: auto;
background-color: #1d1d1d;
box-shadow: 6px 6px 10px #111;
border-radius: 1.5rem;
.text{
position: relative;
width: 100%;
text-align: center;
}
}
</style>

@ -2,20 +2,20 @@
<div class="roomListElement" :title="room.name"> <div class="roomListElement" :title="room.name">
<div class="imageContainer"> <div class="imageContainer">
<avatar <avatar
class="roomImage" class="roomImage"
:mxcURL="getMxcFromChat(room)" :mxcURL="getMxcFromRoom(room)"
:fallback="room.roomId" :fallback="room.roomId"
:size="3" :size="3"
/> />
</div> </div>
<div class="roomListName">{{room.name}}</div> <div class="roomListName">{{room.name}}</div>
<div class="status">{{previewString}}</div> <div class="status">{{getPreviewString(room)}}</div>
</div> </div>
</template> </template>
<script> <script>
import avatar from '@/components/matrix/avatar'; import avatar from '@/components/avatar';
import {getMxcFromChat} from '@/lib/getMxc'; import {getMxcFromRoom} from '@/lib/getMxc';
import {getTime} from '@/lib/getTimeStrings'; import {getTime} from '@/lib/getTimeStrings';
import {calcUserName} from '@/lib/matrixUtils'; import {calcUserName} from '@/lib/matrixUtils';
@ -37,16 +37,8 @@ export default {
return room.timeline[room.timeline.length-1] return room.timeline[room.timeline.length-1]
&& room.timeline[room.timeline.length-1].event; && room.timeline[room.timeline.length-1].event;
}, },
getMxcFromChat,
calcUserName, calcUserName,
}, getMxcFromRoom
data(){
return {
previewString: 'loading'
}
},
created() {
this.previewString = this.getPreviewString(this.room);
} }
} }
</script> </script>

@ -22,7 +22,7 @@
</template> </template>
<script> <script>
import icon from '@/components/layout/icon'; import icon from '@/components/icon';
import Recorder from 'recorder-js'; import Recorder from 'recorder-js';
const audioContext = new (window.AudioContext || window.webkitAudioContext)(); const audioContext = new (window.AudioContext || window.webkitAudioContext)();
@ -46,7 +46,6 @@ export default {
this.onStart(); this.onStart();
navigator.mediaDevices.getUserMedia({audio: true}) navigator.mediaDevices.getUserMedia({audio: true})
.then(stream => { .then(stream => {
this.stream = stream;
this.recorder.init(stream); this.recorder.init(stream);
this.recorder.start().then(()=>this.isRecording=true); this.recorder.start().then(()=>this.isRecording=true);
}) })
@ -57,7 +56,6 @@ export default {
.then(({blob}) => { .then(({blob}) => {
blob.name = `Recording-${new Date().toISOString()}.${blob.type.split('/')[1]}`; blob.name = `Recording-${new Date().toISOString()}.${blob.type.split('/')[1]}`;
this.onStop({blob}); this.onStop({blob});
this.stream.getTracks().map(track => track.stop());
this.isRecording=false; this.isRecording=false;
}); });
}, },
@ -70,11 +68,8 @@ export default {
data(){ data(){
return{ return{
recorder: new Recorder(audioContext, { recorder: new Recorder(audioContext, {
onAnalysed: data => { onAnalysed: data => this.setVoiceMeter(data.lineTo)
this.setVoiceMeter(data.lineTo);
}
}), }),
stream: undefined,
isRecording: false isRecording: false
} }
} }

@ -0,0 +1,34 @@
<template>
<button class="btn">
<div class="btnText">{{text}}</div>
</button>
</template>
<script>
export default {
name: "textbtn",
props:{
text: String
}
}
</script>
<style scoped>
.btn{
cursor: pointer;
border: none;
height: 2.5rem;
padding-left: 2rem;
padding-right: 2rem;
background-color: #00BCD4;
box-shadow: 3px 3px 10px #222;
border-radius: 1.25rem;
margin: 1rem;
}
.btnText {
position: relative;
font-size: 1.4rem;
color:#fff;
font-family:Arial, "lucida console", sans-serif;
}
</style>

@ -17,9 +17,6 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
.box{ .box{
position: absolute; position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
height: 8rem; height: 8rem;
width: 8rem; width: 8rem;
background-color: #1d1d1d; background-color: #1d1d1d;

@ -0,0 +1,36 @@
<template>
<div class="overlay">
<throbber :text="text" class="throbber"/>
</div>
</template>
<script>
import throbber from "@/components/throbber";
export default {
name: "throbberOverlay",
components:{
throbber
},
props: {
text: String
}
}
</script>
<style scoped>
.throbber{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.overlay{
position: fixed;
top: 0;
left: 0;
height: 100%;
width: 100%;
background-color: #111d;
user-select: none;
}
</style>

@ -40,8 +40,8 @@
</template> </template>
<script> <script>
import event from '@/components/chat/event'; import event from '@/components/event';
import avatar from '@/components/matrix/avatar'; import avatar from '@/components/avatar';
import splitArray from '@/lib/splitArray'; import splitArray from '@/lib/splitArray';
import {getDate, getTime} from '@/lib/getTimeStrings'; import {getDate, getTime} from '@/lib/getTimeStrings';
import {getUser, calcUserName} from '@/lib/matrixUtils'; import {getUser, calcUserName} from '@/lib/matrixUtils';

@ -3,7 +3,7 @@
<div> <div>
<icon @click.native="closeChat()" class="topIcon" ic="./sym/ic_arrow_back_white.svg" /> <icon @click.native="closeChat()" class="topIcon" ic="./sym/ic_arrow_back_white.svg" />
<div @click="openChatInfo()" class="container"> <div @click="openChatInfo()" class="container">
<avatar class="topIcon avatar" :mxcURL="getMxcFromChat(room)" :fallback="room.roomId" :size="3"/> <avatar class="topIcon avatar" :mxcURL="getMxcFromRoom(room)" :fallback="room.roomId" :size="3"/>
<div class="chatName">{{room.name}}</div> <div class="chatName">{{room.name}}</div>
<div class="info">{{Object.keys(room.currentState.members).length}} members</div> <div class="info">{{Object.keys(room.currentState.members).length}} members</div>
</div> </div>
@ -11,12 +11,13 @@
</div> </div>
</template> </template>
<script> <script>
import icon from '@/components/layout/icon.vue'; import icon from '@/components/icon.vue';
import avatar from '@/components/matrix/avatar'; import avatar from "@/components/avatar";
import {getMxcFromChat} from '@/lib/getMxc'; import {getMxcFromRoom} from "@/lib/getMxc";
export default { export default {
name: 'topBanner', name: "topBanner",
components:{ components:{
icon, icon,
avatar avatar
@ -27,7 +28,7 @@ export default {
openChatInfo: Function openChatInfo: Function
}, },
methods: { methods: {
getMxcFromChat getMxcFromRoom
} }
} }
</script> </script>
@ -39,7 +40,6 @@ export default {
width: 100%; width: 100%;
height: 3.5rem; height: 3.5rem;
background-color: #1d1d1d; background-color: #1d1d1d;
cursor: pointer;
} }
.topIcon{ .topIcon{
position: absolute; position: absolute;

@ -1,21 +1,21 @@
<template> <template>
<div :class="compact?'userListElement compact':'userListElement'" :title="user.userId"> <div class="userListElement" :title="user.userId">
<div :class="compact?'imageContainer compact':'imageContainer'"> <div class="imageContainer">
<avatar <avatar
:class="compact?'userImage compact':'userImage'" class="userImage"
:mxcURL="user.avatarUrl" :mxcURL="user.avatarUrl"
:fallback="user.userId" :fallback="user.userId"
:size="compact?1.5:3" :size="3"
/> />
<div v-if="user.currentlyActive" class="online"></div> <div v-if="user.currentlyActive" class="online"></div>
</div> </div>
<div :class="compact?'userListName compact':'userListName'">{{user.displayName || user.userId}}</div> <div class="userListName">{{user.displayName || user.userId}}</div>
<div v-if="!compact" class="status">{{user.presence}}</div> <div class="status">{{user.presence}}</div>
</div> </div>
</template> </template>
<script> <script>
import avatar from '@/components/matrix/avatar'; import avatar from '@/components/avatar';
export default { export default {
name: 'userListElement', name: 'userListElement',
@ -23,11 +23,7 @@ export default {
avatar avatar
}, },
props:{ props:{
user: Object, user: Object
compact: {
type: Boolean,
default: false
}
} }
} }
</script> </script>
@ -54,11 +50,11 @@ export default {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
right: 0; right: 0;
height: 0.5rem; height: 0.6rem;
width: 0.5rem; width: 0.6rem;
background-color: #42b983; background-color: #42b983;
border-radius: 50%; border-radius: 50%;
border: 2px solid #222; border: 0.2rem solid #222;
} }
} }
.userListName{ .userListName{
@ -85,15 +81,4 @@ export default {
.userListElement:hover{ .userListElement:hover{
background-color: #4444; background-color: #4444;
} }
.userListElement.compact{
height: 1.5rem;
}
.imageContainer.compact{
height: 1.5rem;
width: 1.5rem;
}
.userListName.compact{
left: 2.5rem;
font-size: 1rem;
}
</style> </style>

@ -18,12 +18,6 @@ export function getMxcFromRoomId(roomId){
return getMxcFromRoom(matrix.client.getRoom(roomId)); return getMxcFromRoom(matrix.client.getRoom(roomId));
} }
export function getMxcFromChat(room){
return Object.keys(room.currentState.members).length===2
?getMxcFromUserId(Object.keys(room.currentState.members).filter(tmp=>tmp!==matrix.user)[0])
:getMxcFromRoom(room);
}
export function getPreviewUrl(mxcUrl, size = 64, resizeMethod = 'crop'){ export function getPreviewUrl(mxcUrl, size = 64, resizeMethod = 'crop'){
return matrix.client.mxcUrlToHttp(mxcUrl, size, size, resizeMethod); return matrix.client.mxcUrlToHttp(mxcUrl, size, size, resizeMethod);
} }

@ -15,16 +15,4 @@ export function isValidUserId(id){
} }
export function isValidRoomId(id){ export function isValidRoomId(id){
return id.match(/^(#|!)[a-zA-Z0-9_.+-]+:[a-z0-9.-]+\.[a-z]+$/); return id.match(/^(#|!)[a-zA-Z0-9_.+-]+:[a-z0-9.-]+\.[a-z]+$/);
}
export async function createRoom({name = '', users = [], description = undefined, access = 'private'}){
if (users.length === 0) return;
return matrix.client.createRoom({name}).then(async room => {
await Promise.all(users.map(async user => await matrix.client.invite(room.room_id, user.userId)));
if (description) await matrix.client.setRoomTopic(room.room_id, description);
await matrix.client.setGuestAccess(room.room_id, access === 'public'
?{allowJoin: true, allowRead: true}
:{allowJoin: false, allowRead: false}
);
return matrix.client.getRoom(room.room_id);
});
} }

@ -1,8 +0,0 @@
export function readFileBlob(file){
return new Promise(resolve => {
let reader = new FileReader();
reader.onerror = console.error;
reader.onload = async event => resolve(await (await fetch(event.target.result)).blob());
reader.readAsDataURL(file);
});
}

@ -1,50 +0,0 @@
:root {
--primary: #2196f3;
--secondary: #2196f3;
--red: #e53935;
--green: #4caf50;
--blue: #03a9f4;
--teal: #009688;
--white: #fff;
--black: #000;
--grey100: #fff;
--grey200: #414141;
--grey300: #313131;
--grey400: #2d2d2d;
--grey500: #222222;
--grey600: #1d1d1d;
--grey700: #111111;
--grey800: #050505;
--grey900: #000;
--shadow100: 2px 2px 5px #111;
--shadow200: 3px 3px 10px #111;
--shadow300: 6px 6px 20px #111;
}
input, textarea, select {
background-color: var(--grey400);
border-radius: 0.7rem;
border: none;
padding: 0.5rem;
color: var(--grey100);
outline: none;
margin: 0.2rem;
}
input:focus, textarea:focus {
background-color: var(--grey300);
}
textarea {
width: 20rem;
min-width: 10rem;
min-height: 3rem;
max-width: calc(100% - 1.2rem);
}
.viewer-backdrop{
background-color: #000e !important;
}

@ -1,5 +1,6 @@
import VueRouter from 'vue-router'; import VueRouter from 'vue-router';
import login from '@/views/login'; import login from '@/views/login';
import chat from '@/views/chat';
import rooms from '@/views/rooms'; import rooms from '@/views/rooms';
import admin from '@/views/admin'; import admin from '@/views/admin';
@ -15,6 +16,11 @@ export const router = new VueRouter({
name: 'login', name: 'login',
component: login component: login
}, },
{
path: '/chat/*',
name: 'chat',
component: chat
},
{ {
path: '/rooms/*', path: '/rooms/*',
name: 'room', name: 'room',

@ -33,25 +33,23 @@
</div> </div>
<textbtn @click.native="updateUser()" text="update user"/> <textbtn @click.native="updateUser()" text="update user"/>
</div> </div>
<overlay v-if="loading"><throbber :text="loading"/></overlay> <throbber-overlay v-if="loading" :text="loading"/>
</div> </div>
</template> </template>
<script> <script>
import {matrix} from '@/main'; import {matrix} from "@/main";
import {AdminAPI} from '@/lib/AdminAPI'; import {AdminAPI} from "@/lib/AdminAPI";
import icon from '@/components/layout/icon'; import icon from "@/components/icon";
import textbtn from '@/components/layout/textbtn'; import textbtn from "@/components/textbtn";
import overlay from '@/components/layout/overlay'; import ThrobberOverlay from "@/components/throbberOverlay";
import throbber from '@/components/layout/throbber';
export default { export default {
name: 'admin', name: "admin",
components:{ components:{
ThrobberOverlay,
icon, icon,
textbtn, textbtn
overlay,
throbber
}, },
data(){ data(){
return{ return{

@ -22,14 +22,14 @@
</template> </template>
<script> <script>
import newMessage from '@/components/chat/newMessage.vue'; import newMessage from '@/components/newMessage.vue';
import topBanner from '@/components/chat/topBanner.vue'; import topBanner from '@/components/topBanner.vue';
import Icon from '@/components/layout/icon'; import Icon from '@/components/icon';
import {matrix} from '@/main.js'; import {matrix} from '@/main';
import splitArray from '@/lib/splitArray.js' import splitArray from '@/lib/splitArray.js'
import timeline from '@/components/chat/timeline'; import timeline from '@/components/timeline';
import scrollHandler from '@/lib/scrollHandler'; import scrollHandler from '@/lib/scrollHandler';
import {getUser} from '@/lib/matrixUtils'; import {getUser} from "@/lib/matrixUtils";
export default { export default {
name: 'chat', name: 'chat',

@ -7,32 +7,30 @@
<input v-model="password" class="input" name="password" type="password" maxlength="30" placeholder="password"><br> <input v-model="password" class="input" name="password" type="password" maxlength="30" placeholder="password"><br>
<input v-model="homeServer" class="input" name="homeserver" placeholder="https://matrix.org"><br> <input v-model="homeServer" class="input" name="homeserver" placeholder="https://matrix.org"><br>
<div v-if="loginError" class="info">{{loginError}}</div> <div v-if="loginError" class="info">{{loginError}}</div>
<textbtn type="submit" text="login" class="rounded"/> <textbtn type="submit" text="login" />
</form> </form>
<div v-else> <div v-else>
<p>you are already logged in</p> <p>you are already logged in</p>
<textbtn @click.native="$router.push('rooms')" text="chat" /> <textbtn @click.native="$router.push('rooms')" text="chat" />
<textbtn @click.native="logout()" text="logout" class="outline"/> <textbtn @click.native="logout()" text="logout" />
</div> </div>
</div> </div>
<overlay v-if="loading"><throbber :text="loading"/></overlay> <throbber-overlay v-if="loading" :text="loading" class="throbber"/>
</div> </div>
</template> </template>
<script> <script>
import textbtn from '@/components/layout/textbtn'; import textbtn from '@/components/textbtn';
import {matrix} from '@/main.js'; import {matrix} from '@/main.js';
import ThrobberOverlay from '@/components/throbberOverlay';
import {isValidUserId} from '@/lib/matrixUtils'; import {isValidUserId} from '@/lib/matrixUtils';
import {DataStore} from '@/lib/DataStore'; import {DataStore} from '@/lib/DataStore';
import Overlay from '@/components/layout/overlay';
import Throbber from '@/components/layout/throbber';
const store = new DataStore(); const store = new DataStore();
export default { export default {
name: 'login.vue', name: 'login.vue',
components: { components: {
Throbber, ThrobberOverlay,
Overlay,
textbtn textbtn
}, },
methods: { methods: {
@ -85,23 +83,6 @@ export default {
</script> </script>
<style scoped> <style scoped>
input{
padding: 0 2rem 0 2rem;
height: 2.5rem;
color: #fff;
background-color: #1d1d1d;
border-radius: 1.25rem;
border: 0.1rem solid #fff;
text-align: center;
font-size: 1.1rem;
margin: 0.5rem;
appearance: none;
outline: none;
}
input:focus{
color: #000;
background-color: #fff;
}
.login{ .login{
width: 100%; width: 100%;
height: 100%; height: 100%;
@ -115,6 +96,12 @@ input:focus{
height: min-content; height: min-content;
width: 100%; width: 100%;
} }
.throbber{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
@media (max-width: 35rem) { @media (max-width: 35rem) {
input { input {

@ -1,44 +1,37 @@
<template> <template>
<overlay v-if="matrix.loading"><throbber text="loading" class="center"/></overlay> <div v-if="matrix.loading">
<throbber-overlay text="loading"/>
</div>
<div v-else> <div v-else>
<div id="roomList" class="roomList"> <div id="roomList" class="roomList">
<h1 class="wideElement">[chat]</h1><h1 class="smallElement">[c]</h1> <h1 class="wideElement">[chat]</h1><h1 class="smallElement">[c]</h1>
<input v-model="search" class="input wideElement" type="text" maxlength="50" placeholder="search"> <input v-model="search" class="input wideElement" type="text" maxlength="50" placeholder="search">
<p class="wideElement">- rooms -</p> <p class="wideElement">rooms </p>
<room-list-element <room-list-element
v-for="room in matrix.client.getRooms() v-for="room in Object.assign([], matrix.client.getRooms())
.sort(obj => obj.timeline[obj.timeline.length-1].event.origin_server_ts)
.filter(prop=>matchResults(prop.name, search)||prop.roomId===search)" .filter(prop=>matchResults(prop.name, search)||prop.roomId===search)"
:key="room.roomId" @click.native="openChat(room)" :key="room.roomId" @click.native="openChat(room)"
:room="room" :room="room"
class="roomListElement" class="roomListElement"
/> />
<div v-if="search"> <div v-if="search">
<p class="wideElement">- users -</p><p class="smallElement"></p> <p class="wideElement">users </p><p class="smallElement"></p>
<user-list-element <user-list-element
v-for="user in matrix.client.getUsers() v-for="user in matrix.client.getUsers()
.filter(prop=>matchResults(prop.displayName, search)||matchResults(prop.userId, search)) .filter(prop=>matchResults(prop.displayName, search)||matchResults(prop.userId, search))
.slice(0,10)" .slice(0,10)"
:user="user" :key="user.userId" :user="user" :key="user.userId"
@click.native="setQuestion({ @click.native="setQuestion(`create private chat with '${user.displayName}'?`,()=>createRoom({user}))"
title:'New Chat',
question:`Create private chat with '${user.displayName}'?`,
callback:()=>createRoom({users:[user], access: 'private'}).then(openChat)
})"
/> />
<p class="wideElement">- suggestions -</p><p class="smallElement"></p> <p class="wideElement">suggestions </p><p class="smallElement"></p>
<div class="wideElement"> <div class="wideElement">
<p v-if="isValidUserId(search)" class="suggestion">create chat: {{search}} </p> <p v-if="isValidUserId(search)">create chat: {{search}} </p>
<p v-if="isValidRoomId(search)" <p v-if="isValidRoomId(search)"
class="suggestion" @click="setQuestion(`join room '${search}'?`, ()=>joinRoom(search))"
@click="setQuestion({
title:'Join room',
question:`Join '${search}'?`,
callback:()=>joinRoom(search)
})"
>join room: {{search}} </p> >join room: {{search}} </p>
<p v-if="search.match(/^[a-zA-Z0-9_.+-]+$/)" <p v-if="search.match(/^[a-zA-Z0-9_.+-]+$/)"
@click="setShowCreateRoom({name: search}, openChat)" @click="setQuestion(`create room '${search}'?`,()=>createRoom({name: search}))"
class="suggestion"
>create room: {{search}} </p> >create room: {{search}} </p>
</div> </div>
</div> </div>
@ -52,40 +45,32 @@
:open-chat-info="()=>showChatInfo=true" :open-chat-info="()=>showChatInfo=true"
/> />
<div class="noRoomSelected" v-else>Please select a room to be displayed.</div> <div class="noRoomSelected" v-else>Please select a room to be displayed.</div>
<overlay> <chatInformation v-if="showRoom && showChatInfo" :room="getCurrentRoom()" :close-chat-info="()=>showChatInfo=false"/>
<chatInformation v-if="showRoom && showChatInfo" :room="getCurrentRoom()" :close-chat-info="()=>showChatInfo=false" class="center"/> <popup-question v-if="popup.question" :callback="popup.callback" :question="popup.question" class="center"/>
<new-room v-if="showCreateRoom.props" :callback="showCreateRoom.callback" :props="showCreateRoom.props" class="center"/>
<popup-question v-if="popup.question" :callback="popup.callback" :question="popup.question" :title="popup.title" class="center"/>
</overlay>
</div> </div>
</template> </template>
<script> <script>
import chat from '@/components/chat/chat.vue'; import chat from '@/views/chat.vue';
import chatInformation from '@/components/chat/chatInformation'; import chatInformation from '@/components/chatInformation';
import {matrix} from '@/main'; import {matrix} from '@/main';
import ThrobberOverlay from '@/components/throbberOverlay';
import {getMxcFromRoom} from '@/lib/getMxc'; import {getMxcFromRoom} from '@/lib/getMxc';
import roomListElement from '@/components/matrix/roomListElement'; import roomListElement from '@/components/roomListElement';
import {getRoom, getUser} from '@/lib/matrixUtils'; import {getRoom, getUser} from '@/lib/matrixUtils';
import {isValidUserId, isValidRoomId} from '@/lib/matrixUtils'; import {isValidUserId, isValidRoomId} from '@/lib/matrixUtils';
import userListElement from '@/components/matrix/userListElement'; import userListElement from '@/components/userListElement';
import PopupQuestion from '@/components/layout/popupQuestion'; import PopupQuestion from '@/components/popupQuestion';
import newRoom from '@/components/matrix/newRoom';
import Overlay from '@/components/layout/overlay';
import Throbber from '@/components/layout/throbber';
import {createRoom} from '@/lib/matrixUtils';
export default { export default {
name: 'rooms', name: 'rooms',
components:{ components:{
Throbber,
Overlay,
PopupQuestion, PopupQuestion,
userListElement, userListElement,
ThrobberOverlay,
chat, chat,
chatInformation, chatInformation,
roomListElement, roomListElement
newRoom
}, },
methods:{ methods:{
openChat(room){ openChat(room){
@ -104,12 +89,11 @@ export default {
matchResults(prop, search){ matchResults(prop, search){
return prop.toLowerCase().includes(search.toLowerCase().trim()); return prop.toLowerCase().includes(search.toLowerCase().trim());
}, },
setQuestion({title, question, callback}){ setQuestion(question, callback){
this.popup = { this.popup = {
question, question,
title,
callback:(res)=>{ callback:(res)=>{
this.popup = {}; this.popup = false;
if (res) callback(); if (res) callback();
} }
} }
@ -119,21 +103,18 @@ export default {
this.openChat(getRoom(room.room_id)); this.openChat(getRoom(room.room_id));
}); });
}, },
setShowCreateRoom(props, callback=()=>{}){ async createRoom({name = '', user = undefined}){
this.showCreateRoom = { return this.matrix.client.createRoom({name}).then(room => {
props, if (user) this.matrix.client.invite(room.room_id, user.userId);
callback:(res)=>{ this.openChat(getRoom(room.room_id));
this.showCreateRoom = {}; return room;
if (res) callback(res); });
}
}
}, },
getMxcFromRoom, getMxcFromRoom,
getRoom, getRoom,
getUser, getUser,
isValidUserId, isValidUserId,
isValidRoomId, isValidRoomId
createRoom
}, },
data(){ data(){
return { return {
@ -141,8 +122,10 @@ export default {
showChatInfo: false, showChatInfo: false,
showRoom: true, showRoom: true,
search: '', search: '',
popup:{}, popup:{
showCreateRoom:{} question: '',
callback: ()=>{}
}
} }
}, },
mounted() { mounted() {
@ -188,10 +171,7 @@ export default {
text-align: center; text-align: center;
} }
input{ input{
position: relative; width: calc(100% - 5.2rem);
margin-left: auto;
margin-right: auto;
width: calc(100% - 4rem);
} }
.wideElement{ .wideElement{
display: block; display: block;
@ -200,17 +180,11 @@ input{
display: none; display: none;
} }
.center{ .center{
position: absolute; position: fixed;
top: 50%; top: 50%;
left: 50%; left: 50%;
transform: translate(-50%,-50%); transform: translate(-50%,-50%);
} z-index: 50;
.suggestion{
cursor: pointer;
text-decoration: underline;
}
.suggestion:hover{
background-color: #4444;
} }
@media (max-width: 48rem) and (min-width: 30rem) { @media (max-width: 48rem) and (min-width: 30rem) {

Loading…
Cancel
Save