🎨 Improves how modal styles are applied

This commit is contained in:
Alicia Sykes 2021-06-20 17:02:34 +01:00
parent 978064e75a
commit 561c8a7dfb
5 changed files with 21 additions and 22 deletions

View File

@ -3,7 +3,7 @@
<v-jsoneditor
v-model="jsonData"
:options="options"
height="580px"
height="530px"
/>
<button :class="`save-button ${!isValid ? 'err' : ''}`" @click="save()">Save Changes</button>
<p class="errors">

View File

@ -1,5 +1,5 @@
<template>
<button @click="click()">
<button @click="click()" :disabled="disabled">
<slot></slot>
<slot name="text"></slot>
<slot name="icon"></slot>
@ -13,6 +13,7 @@ export default {
props: {
text: String,
click: Function,
disabled: Boolean,
},
};
</script>
@ -45,10 +46,14 @@ button {
background: var(--background);
border: 1px solid var(--primary);
border-radius: var(--curve-factor);
&:hover {
&:hover:not(:disabled) {
color: var(--background);
background: var(--primary);
border-color: var(--background);
}
&:disabled {
cursor: progress;
opacity: var(--dimming-factor);
}
}
</style>

View File

@ -1,5 +1,6 @@
<template>
<modal :name="name" :resizable="true" width="80%" height="80%" @closed="modalClosed()">
<modal :name="name" :resizable="true" width="80%" height="80%" @closed="modalClosed()"
classes="dashy-modal">
<div slot="top-right" @click="hide()">Close</div>
<a @click="hide()" class="close-button" title="Close">x</a>
<iframe v-if="url" :src="url" @keydown.esc="close" class="frame"/>
@ -17,12 +18,12 @@ export default {
url: '#',
}),
methods: {
show: function show(url) {
show(url) {
this.url = url;
this.$modal.show(this.name);
this.$emit('modalChanged', true);
},
hide: function hide() {
hide() {
this.$modal.hide(this.name);
},
modalClosed() {

View File

@ -11,13 +11,13 @@
<!-- Modal containing all the configuration options -->
<modal :name="modalNames.CONF_EDITOR" :resizable="true" width="60%" height="80%"
@closed="$emit('modalChanged', false)">
@closed="$emit('modalChanged', false)" classes="dashy-modal">
<ConfigContainer :config="combineConfig()" />
</modal>
<!-- Modal for cloud backup and restore options -->
<modal :name="modalNames.CLOUD_BACKUP" :resizable="true" width="65%" height="60%"
@closed="$emit('modalChanged', false)">
@closed="$emit('modalChanged', false)" classes="dashy-modal">
<CloudBackupRestore :config="combineConfig()" />
</modal>
</div>
@ -100,14 +100,3 @@ export default {
}
}
</style>
<style lang="scss">
.vm--modal {
box-shadow: 0 40px 70px -2px hsl(0deg 0% 0% / 60%), 1px 1px 6px var(--primary);
min-width: 350px;
min-height: 600px;
}
.vm--overlay {
background: #00000080;
}
</style>

View File

@ -105,15 +105,19 @@ export default {
}
}
.clear-search {
position: absolute;
//position: absolute;
color: var(--settings-text-color);
margin: 0.55rem 0 0 -2.2rem;
padding: 0 0.4rem;
font-style: normal;
font-size: 1.5rem;
font-size: 1rem;
opacity: var(--dimming-factor);
border-radius: 50px;
cursor: pointer;
right: 0.5rem;
top: 1rem;
border: 1px solid var(--settings-text-color);
font-size: 1rem;
margin: 0.5rem;
&:hover {
opacity: 1;
background: var(--background-darker);