-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from Lissy93/feature_workspace-view
Feature workspace view
- Loading branch information
Showing
27 changed files
with
588 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
<template> | ||
<nav class="side-bar"> | ||
<div v-for="(section, index) in sections" :key="index"> | ||
<div @click="openSection(index)" class="side-bar-item-container"> | ||
<SideBarItem | ||
class="item" | ||
:icon="section.icon" | ||
:title="section.name" | ||
/> | ||
</div> | ||
<transition name="slide"> | ||
<SideBarSection | ||
v-if="isOpen[index]" | ||
:items="section.items" | ||
@launch-app="launchApp" | ||
/> | ||
</transition> | ||
</div> | ||
</nav> | ||
</template> | ||
|
||
<script> | ||
import SideBarItem from '@/components/Workspace/SideBarItem.vue'; | ||
import SideBarSection from '@/components/Workspace/SideBarSection.vue'; | ||
export default { | ||
name: 'SideBar', | ||
inject: ['config'], | ||
props: { | ||
sections: Array, | ||
}, | ||
data() { | ||
return { | ||
isOpen: new Array(this.sections.length).fill(false), | ||
}; | ||
}, | ||
components: { | ||
SideBarItem, | ||
SideBarSection, | ||
}, | ||
methods: { | ||
/* Toggles the section clicked, and closes all other sections */ | ||
openSection(index) { | ||
this.isOpen = this.isOpen.map((val, ind) => (ind !== index ? false : !val)); | ||
}, | ||
launchApp(url) { | ||
this.$emit('launch-app', url); | ||
}, | ||
}, | ||
}; | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
@import '@/styles/media-queries.scss'; | ||
@import '@/styles/style-helpers.scss'; | ||
nav.side-bar { | ||
position: fixed; | ||
display: flex; | ||
flex-direction: column; | ||
background: var(--side-bar-background); | ||
color: var(--side-bar-color); | ||
height: 100%; | ||
width: var(--side-bar-width); | ||
text-align: center; | ||
overflow: auto; | ||
@extend .scroll-bar; | ||
.side-bar-item-container { | ||
z-index: 5; | ||
} | ||
.item:not(:last-child) { | ||
border-bottom: 1px dashed var(--side-bar-color); | ||
z-index: 5; | ||
} | ||
} | ||
.slide-leave-active, | ||
.slide-enter-active { | ||
transition: all 0.1s ease-in-out; | ||
} | ||
.slide-enter { | ||
transform: translate(0, -80%); | ||
} | ||
.slide-leave-to { | ||
transform: translate(0, -80%); | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<template> | ||
<div @click="itemClicked()" | ||
:class="`side-bar-item ${icon ? 'w-icon' : 'text-only'}`" v-tooltip="tooltip"> | ||
<Icon v-if="icon" :icon="icon" size="small" :url="url" /> | ||
<p class="small-title" v-else>{{ title }}</p> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import Icon from '@/components/LinkItems/ItemIcon.vue'; | ||
export default { | ||
name: 'SideBarItem', | ||
inject: ['config'], | ||
props: { | ||
icon: String, | ||
title: String, | ||
url: String, | ||
click: Function, | ||
}, | ||
components: { | ||
Icon, | ||
}, | ||
methods: { | ||
itemClicked() { | ||
if (this.url) this.$emit('launch-app', this.url); | ||
}, | ||
}, | ||
data() { | ||
return { | ||
tooltip: { | ||
disabled: !this.title, | ||
content: this.title, | ||
trigger: 'hover focus', | ||
hideOnTargetClick: true, | ||
html: false, | ||
placement: 'right-start', | ||
delay: { show: 800, hide: 1000 }, | ||
}, | ||
}; | ||
}, | ||
}; | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
@import '@/styles/media-queries.scss'; | ||
@import '@/styles/style-helpers.scss'; | ||
div.side-bar-item { | ||
color: var(--side-bar-color); | ||
background: var(--side-bar-background); | ||
text-align: center; | ||
&.text-only { | ||
background: none; | ||
border: none; | ||
box-shadow: none; | ||
p.small-title { | ||
margin: 0.1rem auto; | ||
font-size: 0.6rem; | ||
} | ||
} | ||
} | ||
</style> |
Oops, something went wrong.
b5f8c85
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: