Adds view-switching links to ws sidebar

This commit is contained in:
Alicia Sykes 2021-08-27 23:35:31 +01:00
parent 42884a03e7
commit 23a5064d3d
1 changed files with 21 additions and 0 deletions

View File

@ -16,6 +16,14 @@
/> />
</transition> </transition>
</div> </div>
<div class="switch-view-buttons">
<router-link to="/home">
<IconHome class="view-icon" v-tooltip="$t('alternate-views.default')" />
</router-link>
<router-link to="/minimal">
<IconMinimalView class="view-icon" v-tooltip="$t('alternate-views.minimal')" />
</router-link>
</div>
</nav> </nav>
</template> </template>
@ -23,6 +31,8 @@
import SideBarItem from '@/components/Workspace/SideBarItem.vue'; import SideBarItem from '@/components/Workspace/SideBarItem.vue';
import SideBarSection from '@/components/Workspace/SideBarSection.vue'; import SideBarSection from '@/components/Workspace/SideBarSection.vue';
import IconHome from '@/assets/interface-icons/application-home.svg';
import IconMinimalView from '@/assets/interface-icons/application-minimal.svg';
export default { export default {
name: 'SideBar', name: 'SideBar',
@ -38,6 +48,8 @@ export default {
components: { components: {
SideBarItem, SideBarItem,
SideBarSection, SideBarSection,
IconMinimalView,
IconHome,
}, },
methods: { methods: {
/* Toggles the section clicked, and closes all other sections */ /* Toggles the section clicked, and closes all other sections */
@ -87,4 +99,13 @@ nav.side-bar {
transform: translate(0, -80%); transform: translate(0, -80%);
} }
.switch-view-buttons {
margin-top: 0.5rem;
display: flex;
@extend .svg-button;
.view-icon {
border: none;
}
}
</style> </style>