More consistent color scheme and usage
Only show search by click on search icon (desktop as well) Improved color scheme Keep search open search page
This commit is contained in:
parent
3fb9c8523a
commit
13d4f035df
@ -12,6 +12,7 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<button
|
<button
|
||||||
|
v-if="!onSearchPage"
|
||||||
class="search"
|
class="search"
|
||||||
type="button"
|
type="button"
|
||||||
aria-label="Search messages in this channel"
|
aria-label="Search messages in this channel"
|
||||||
@ -29,27 +30,22 @@ form.message-search .input-wrapper {
|
|||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
form.message-search button {
|
|
||||||
display: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
form.message-search input {
|
form.message-search input {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: auto !important;
|
height: auto !important;
|
||||||
margin: 7px 0;
|
margin: 7px 0;
|
||||||
border: 0;
|
border: 0;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
background-color: rgba(128, 128, 128, 0.15);
|
background-color: #fafafa;
|
||||||
}
|
}
|
||||||
|
|
||||||
form.message-search input::placeholder {
|
form.message-search input::placeholder {
|
||||||
color: rgba(128, 128, 128, 0.4);
|
color: rgba(0, 0, 0, 0.35);
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 480px) {
|
@media (min-width: 480px) {
|
||||||
form.message-search input {
|
form.message-search input {
|
||||||
min-width: 140px;
|
min-width: 140px;
|
||||||
transition: min-width 0.2s;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
form.message-search input:focus {
|
form.message-search input:focus {
|
||||||
@ -57,7 +53,6 @@ form.message-search input::placeholder {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
|
||||||
form.message-search .input-wrapper {
|
form.message-search .input-wrapper {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 45px;
|
top: 45px;
|
||||||
@ -65,7 +60,6 @@ form.message-search input::placeholder {
|
|||||||
right: 0;
|
right: 0;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
height: 0;
|
height: 0;
|
||||||
transition: height 0.2s;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background: var(--window-bg-color);
|
background: var(--window-bg-color);
|
||||||
}
|
}
|
||||||
@ -78,9 +72,9 @@ form.message-search input::placeholder {
|
|||||||
height: 50px;
|
height: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
form.message-search button {
|
#chat form.message-search button {
|
||||||
display: flex !important;
|
display: flex;
|
||||||
}
|
color: #607992;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
@ -97,6 +91,11 @@ export default {
|
|||||||
searchInput: "",
|
searchInput: "",
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
onSearchPage() {
|
||||||
|
return this.$route.name === "SearchResults";
|
||||||
|
},
|
||||||
|
},
|
||||||
watch: {
|
watch: {
|
||||||
"$route.query.q"() {
|
"$route.query.q"() {
|
||||||
this.searchInput = this.$route.query.q;
|
this.searchInput = this.$route.query.q;
|
||||||
@ -104,10 +103,13 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.searchInput = this.$route.query.q;
|
this.searchInput = this.$route.query.q;
|
||||||
|
this.searchOpened = this.onSearchPage;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
closeSearch() {
|
closeSearch() {
|
||||||
|
if (!this.onSearchPage) {
|
||||||
this.searchOpened = false;
|
this.searchOpened = false;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
toggleSearch() {
|
toggleSearch() {
|
||||||
if (this.searchOpened) {
|
if (this.searchOpened) {
|
||||||
@ -125,8 +127,6 @@ export default {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.searchOpened = false;
|
|
||||||
|
|
||||||
this.$router
|
this.$router
|
||||||
.push({
|
.push({
|
||||||
name: "SearchResults",
|
name: "SearchResults",
|
||||||
|
@ -118,6 +118,15 @@ body {
|
|||||||
color: #b7c5d1;
|
color: #b7c5d1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Search Form */
|
||||||
|
form.message-search input {
|
||||||
|
background-color: #28333d;
|
||||||
|
}
|
||||||
|
|
||||||
|
#chat form.message-search button {
|
||||||
|
color: #b7c5d1;
|
||||||
|
}
|
||||||
|
|
||||||
/* Setup text colors */
|
/* Setup text colors */
|
||||||
#chat .msg[data-type="error"],
|
#chat .msg[data-type="error"],
|
||||||
#chat .msg[data-type="error"] .from {
|
#chat .msg[data-type="error"] .from {
|
||||||
|
Loading…
Reference in New Issue
Block a user