fix up modal

This commit is contained in:
Mutasem 2021-07-01 16:32:02 +02:00
parent df32a7bbb6
commit 60cd7c2a50
5 changed files with 39 additions and 42 deletions

View file

@ -1,36 +0,0 @@
<template>
<SlideTransition>
<div>
<slot></slot>
</div>
</SlideTransition>
</template>
<script lang="ts">
import Vue from "vue";
import SlideTransition from "./transitions/SlideTransition.vue";
export default Vue.extend({
name: "Modal",
props: ['name'],
components: {
SlideTransition,
},
computed: {
},
});
</script>
<style lang="scss" scoped>
/deep/ *, *:before, *:after {
box-sizing: border-box;
}
div {
position: fixed;
width: 480px;
height: 100%;
background-color: $--drawer-background-color;
z-index: 200;
}
</style>

View file

@ -3,6 +3,7 @@
<el-drawer <el-drawer
v-if="drawer" v-if="drawer"
:direction="drawerDirection" :direction="drawerDirection"
:before-close="closeDialog"
:visible="dialogVisible" :visible="dialogVisible"
:size="drawerWidth" :size="drawerWidth"
> >
@ -37,7 +38,6 @@
<script lang="ts"> <script lang="ts">
import Vue from "vue"; import Vue from "vue";
import Drawer from "./Drawer.vue";
const sizeMap: {[size: string]: string} = { const sizeMap: {[size: string]: string} = {
xl: '80%', xl: '80%',
@ -47,9 +47,6 @@ const sizeMap: {[size: string]: string} = {
export default Vue.extend({ export default Vue.extend({
name: "Modal", name: "Modal",
components: {
Drawer,
},
props: ['name', 'title', 'eventBus', 'size', 'drawer', 'drawerDirection', 'drawerWidth'], props: ['name', 'title', 'eventBus', 'size', 'drawer', 'drawerDirection', 'drawerWidth'],
mounted() { mounted() {
window.addEventListener('keydown', this.onWindowKeydown); window.addEventListener('keydown', this.onWindowKeydown);
@ -107,6 +104,10 @@ export default Vue.extend({
padding: 30px 30px 0 30px;; //todo padding: 30px 30px 0 30px;; //todo
} }
.el-drawer__body {
overflow: hidden;
}
.dialog-wrapper { .dialog-wrapper {
* { * {
box-sizing: border-box; box-sizing: border-box;

View file

@ -1,5 +1,5 @@
<template> <template>
<a :href="version.documentationUrl" :class="$style.card"> <a :href="version.documentationUrl" target="_blank" :class="$style.card">
<div :class="$style.header"> <div :class="$style.header">
<div :class="$style.name"> <div :class="$style.name">
Version {{version.name}} Version {{version.name}}
@ -47,6 +47,7 @@ export default Vue.extend({
border-radius: 8px; border-radius: 8px;
display: block; display: block;
padding: 15px; padding: 15px;
text-decoration: none;
} }
.header { .header {

View file

@ -11,7 +11,11 @@
<template slot="content"> <template slot="content">
<section :class="$style['header-content']"> <section :class="$style['header-content']">
<p>Youre on {{ currentVersion.name }}, which is <strong>{{currentReleaseDate}}</strong> and {{ nextVersions.length }} version{{nextVersions.length > 1 ? 's' : ''}} behind the latest and greatest n8n</p> <p>Youre on {{ currentVersion.name }}, which is <strong>{{currentReleaseDate}}</strong> and {{ nextVersions.length }} version{{nextVersions.length > 1 ? 's' : ''}} behind the latest and greatest n8n</p>
<a><font-awesome-icon icon="info-circle"></font-awesome-icon>How to update your n8n version</a>
<a :class="$style.update" :href="UPDATE_INFO_URL" v-if="UPDATE_INFO_URL" target="_blank">
<font-awesome-icon icon="info-circle"></font-awesome-icon>
<span>How to update your n8n version</span>
</a>
</section> </section>
<section :class="$style.versions"> <section :class="$style.versions">
<VersionCard <VersionCard
@ -32,6 +36,7 @@ import { format } from 'timeago.js';
import Modal from './Modal.vue'; import Modal from './Modal.vue';
import VersionCard from './VersionCard.vue'; import VersionCard from './VersionCard.vue';
import { UPDATE_INFO_URL } from '@/constants';
export default Vue.extend({ export default Vue.extend({
name: 'VersionsModal', name: 'VersionsModal',
@ -40,6 +45,11 @@ export default Vue.extend({
VersionCard, VersionCard,
}, },
props: ['modalName'], props: ['modalName'],
data() {
return {
UPDATE_INFO_URL,
};
},
computed: { computed: {
...mapGetters('versions', [ ...mapGetters('versions', [
'nextVersions', 'nextVersions',
@ -76,14 +86,34 @@ export default Vue.extend({
font-weight: 400; font-weight: 400;
} }
.content {
overflow: hidden;
}
.versions { .versions {
background-color: #F8F9FB; background-color: #F8F9FB;
border-top: 1px #DBDFE7 solid; border-top: 1px #DBDFE7 solid;
height: 100%; height: 100%;
padding: 30px; padding: 30px;
overflow-y: scroll;
padding-bottom: 140px;
} }
.versions-card { .versions-card {
margin-bottom: 15px; margin-bottom: 15px;
} }
.update {
text-decoration: none;
svg {
color: #909399;
margin-right: 5px;
}
span {
color: $--color-primary;
font-weight: 600;
}
}
</style> </style>

View file

@ -52,3 +52,4 @@ export const REQUEST_NODE_FORM_URL = 'https://n8n-community.typeform.com/to/K1fB
// versions // versions
export const VERSIONS_BASE_URL = `https://api-staging.n8n.io/versions/`; export const VERSIONS_BASE_URL = `https://api-staging.n8n.io/versions/`;
export const UPDATE_INFO_URL = 'https://docs.n8n.io/';