Multiple fixes for CSS, added proper auth checking

This commit is contained in:
Henry Jameson 2020-05-24 02:06:55 +03:00
parent bcebec478e
commit ab74cd4972
8 changed files with 263 additions and 193 deletions

View file

@ -69,7 +69,6 @@ export default Vue.component('tab-switcher', {
if (!slot.tag) return
const classesTab = ['tab']
const classesWrapper = ['tab-wrapper']
if (this.activeIndex === index) {
classesTab.push('active')
classesWrapper.push('active')
@ -101,12 +100,17 @@ export default Vue.component('tab-switcher', {
const contents = this.$slots.default.map((slot, index) => {
if (!slot.tag) return
const active = this.activeIndex === index
const classes = [ active ? 'active' : 'hidden' ]
if (slot.data.attrs.fullHeight) {
classes.push('full-height')
}
if (this.renderOnlyFocused) {
return active
? <div class="active">{slot}</div>
: <div class="hidden"></div>
? <div class={classes.join(' ')}>{slot}</div>
: <div class={classes.join(' ')}></div>
}
return <div class={active ? 'active' : 'hidden' }>{slot}</div>
return <div class={classes.join(' ')}>{slot}</div>
})
return (

View file

@ -59,7 +59,6 @@
flex: 1 0 auto;
overflow-y: auto;
overflow-x: hidden;
padding-top: 5px;
flex-direction: column;
&::after {
content: '';
@ -78,6 +77,9 @@
border-right-color: $fallback--border;
border-right-color: var(--border, $fallback--border);
}
&:last-child .tab {
margin-bottom: 0;
}
}
.tab {
box-sizing: content-box;
@ -87,8 +89,8 @@
min-width: 1px;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
// padding-right: 200px;
// margin-right: 6px - 200px;
padding-right: calc(1em + 200px);
margin-right: 6px - 200px;
margin-left: 6px;
}