global color and better message style

This commit is contained in:
grimhilt 2023-04-05 18:17:09 +02:00
parent 6d9d67905c
commit b14a0ca586
13 changed files with 54 additions and 33 deletions

View File

@ -0,0 +1,12 @@
:root {
--primary-text: #ffffff;
--secondary-text: #a9b2bc;
/* 9fa9ba */
--primary-background: #1d1d23;
--secondary-background: #24242b;
/* 1d1d23 */
--tertiary-background: #2a2a33;
--quaternary-background: #303a46;
--selected: #41474f;
}
/* .badge-primary { */

View File

@ -37,7 +37,7 @@ export default {
} }
.badge-primary { .badge-primary {
color: #fff; color: var(--primary-text);
background-color: #007bff; background-color: #007bff;
} }

View File

@ -2,6 +2,7 @@ import { createApp } from "vue";
import router from "./router"; import router from "./router";
import App from "./App.vue"; import App from "./App.vue";
import store from "./store/store"; import store from "./store/store";
import "@/assets/css/main.css";
const app = createApp(App); const app = createApp(App);
app.use(router); app.use(router);

View File

@ -174,6 +174,8 @@ fieldset {
margin-top: 5px; margin-top: 5px;
border-radius: 5px; border-radius: 5px;
display: grid; display: grid;
border-color: var(--primary-text);
color: var(--primary-text);
} }
.config { .config {
@ -193,7 +195,7 @@ button {
padding: 5px; padding: 5px;
padding: 7px 18px; padding: 7px 18px;
background-color: #09a35b; background-color: #09a35b;
color: white; color: var(--primary-text);
border-radius: 5px; border-radius: 5px;
border: none; border: none;
text-decoration: none; text-decoration: none;
@ -207,10 +209,10 @@ button:hover {
input { input {
-webkit-box-flex: 1; -webkit-box-flex: 1;
background-color: #303a46; background-color: var(--quaternary-background);
border: none; border: none;
border-radius: 4px; border-radius: 4px;
color: #fff; color: var(--primary-text);
-ms-flex: 1; -ms-flex: 1;
flex: 1; flex: 1;
font-family: inherit; font-family: inherit;
@ -220,6 +222,10 @@ input {
padding: 8px 9px; padding: 8px 9px;
} }
label {
color: var(--secondary-text);
}
input:focus { input:focus {
outline: none; outline: none;
} }

View File

@ -45,8 +45,8 @@ function close() {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
border-radius: 5px; border-radius: 5px;
color: white; color: var(--primary-text);
background-color: #1d1d23; background-color: var(--secondary-background);
padding: 20px; padding: 20px;
} }
@ -61,7 +61,7 @@ h2 {
} }
.close-button { .close-button {
background-color: #9fa9ba; background-color: var(--secondary-text);
cursor: pointer; cursor: pointer;
height: 18px; height: 18px;
mask: url(../../assets/close.svg); mask: url(../../assets/close.svg);

View File

@ -6,7 +6,7 @@ import { RoomType } from "@/store/models/model";
const props = defineProps({ id: Number }); const props = defineProps({ id: Number });
const room = ref(store.getters.room(props.id)); const room = ref(store.getters.room(props.id));
// todo auto load
watch( watch(
() => props.id, () => props.id,
(newId) => { (newId) => {

View File

@ -90,15 +90,17 @@ const displayAddresses = (addressesId) => {
<style scoped> <style scoped>
.message { .message {
width: auto; width: auto;
border: white 1px solid; /* border: white 1px solid; */
padding: 10px; margin: 10px 5px 0px 5px;
margin: 5px;
} }
#context { #context {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: space-between; justify-content: space-between;
background-color: blue;
padding: 3px;
margin-bottom: 6px;
} }
iframe { iframe {

View File

@ -53,8 +53,8 @@ const shouldDisplayComposer = () => {
<style scoped> <style scoped>
#main { #main {
background-color: #1d1d23; background-color: var(--primary-background);
color: white; color: var(--primary-text);
width: 100%; width: 100%;
} }

View File

@ -36,11 +36,11 @@ export default {
} }
.container:hover { .container:hover {
background-color: aqua !important; background-color: var(--selected);
} }
.active { .active {
border: 2px solid white; border: 2px solid var(--primary-text);
opacity: 0.9; opacity: 0.9;
} }
</style> </style>

View File

@ -38,8 +38,8 @@ export default {
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
padding: 5px; padding: 5px;
background-color: #2a2a33; background-color: var(--tertiary-background);
color: white; color: var(--primary-text);
} }
#userMenu { #userMenu {
@ -48,7 +48,7 @@ export default {
background-color: yellow !important; background-color: yellow !important;
} }
.divider { .divider {
border-top: 1px solid #bbb; border-top: 1px solid var(--secondary-text);
margin: 5px 0; margin: 5px 0;
width: 90%; width: 90%;
} }

View File

@ -30,9 +30,9 @@ const router = useRouter();
v-bind:class="store.state.activeRoom == props.data.id ? 'selected' : ''" v-bind:class="store.state.activeRoom == props.data.id ? 'selected' : ''"
> >
<BaseAvatar url="vue.png" /> <BaseAvatar url="vue.png" />
<div id="content"> <div class="content">
<div id="sender">{{ props.data.user }}</div> <div class="sender">{{ props.data.user }}</div>
<div id="object">{{ props.data.roomName }}</div> <div class="object">{{ props.data.roomName }}</div>
</div> </div>
<Badge class="badge" v-if="props.data.unseen > 0" <Badge class="badge" v-if="props.data.unseen > 0"
><template v-slot:body>{{ props.data.unseen }}</template> ><template v-slot:body>{{ props.data.unseen }}</template>
@ -57,11 +57,11 @@ const router = useRouter();
.room:hover, .room:hover,
.selected { .selected {
background-color: #41474f; background-color: var(--selected);
border-radius: 8px; border-radius: 8px;
} }
#content { .content {
display: flex; display: flex;
flex-grow: 1; flex-grow: 1;
flex-direction: column; flex-direction: column;
@ -71,18 +71,18 @@ const router = useRouter();
min-width: 0; min-width: 0;
} }
#sender { .sender {
font-size: 1.4rem; font-size: 1.4rem;
line-height: 1.8rem; line-height: 1.8rem;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
width: 100%; width: 100%;
color: white; color: var(--primary-text);
} }
#object { .object {
color: #a9b2bc; color: var(--secondary-text);
line-height: 1.8rem; line-height: 1.8rem;
font-size: 1.3rem; font-size: 1.3rem;
text-overflow: ellipsis; text-overflow: ellipsis;

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="test"> <div class="content">
<Room v-for="(room, index) in rooms()" :key="index" :data="room" /> <Room v-for="(room, index) in rooms()" :key="index" :data="room" />
</div> </div>
</template> </template>
@ -21,10 +21,10 @@ export default {
</script> </script>
<style scoped> <style scoped>
.test { .content {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
background-color: #24242b; background-color: var(--secondary-background);
overflow: auto; overflow: auto;
} }
</style> </style>

View File

@ -29,17 +29,17 @@ const router = useRouter();
margin: -4px 4px 1px 4px; margin: -4px 4px 1px 4px;
padding: 4px; padding: 4px;
cursor: pointer; cursor: pointer;
color: #a9b2bc; color: var(--secondary-text);
} }
.room:hover, .room:hover,
.selected { .selected {
background-color: #41474f; background-color: var(--selected);
border-radius: 8px; border-radius: 8px;
} }
.room::before { .room::before {
border-right: 1px solid white; border-right: 1px solid var(--secondary-text);
margin: 0 10px; margin: 0 10px;
content: ""; content: "";
} }