2020-07-06 19:08:34 +02:00
|
|
|
<template>
|
2020-07-07 13:48:54 +02:00
|
|
|
<div id="app">
|
2020-07-07 18:56:12 +02:00
|
|
|
<header>
|
|
|
|
<b-navbar>
|
|
|
|
<b-navbar-brand to="/" exact exact-active-class="active"><img alt="Yunohost logo" src="./assets/logo.png"></b-navbar-brand>
|
|
|
|
<b-navbar-nav class="ml-auto">
|
|
|
|
<li class="nav-item">
|
2020-07-08 14:35:22 +02:00
|
|
|
<b-button href="/yunohost/sso" variant="primary" block size="sm">
|
|
|
|
{{ $t('user_interface_link') }} <icon iname="user" class="sm"/>
|
|
|
|
</b-button>
|
2020-07-07 18:56:12 +02:00
|
|
|
</li>
|
2020-07-10 18:42:40 +02:00
|
|
|
<li class="nav-item" v-bind:hidden="!connected">
|
|
|
|
<b-button @click.prevent="logout" to="/logout" variant="outline-dark" block size="sm" >
|
2020-07-08 14:35:22 +02:00
|
|
|
{{ $t('logout') }} <icon iname="sign-out" class="sm"/>
|
|
|
|
</b-button>
|
2020-07-07 18:56:12 +02:00
|
|
|
</li>
|
|
|
|
</b-navbar-nav>
|
|
|
|
</b-navbar>
|
|
|
|
</header>
|
|
|
|
|
2020-07-07 21:59:29 +02:00
|
|
|
<main>
|
|
|
|
<router-view/>
|
|
|
|
</main>
|
2020-07-07 18:56:12 +02:00
|
|
|
|
|
|
|
<footer>
|
|
|
|
<nav>
|
|
|
|
<b-nav>
|
2020-07-08 14:35:22 +02:00
|
|
|
<b-nav-item href="https://yunohost.org/docs" target="_blank" link-classes='text-secondary'>
|
|
|
|
<icon iname="book" class="sm"/> Documentation
|
|
|
|
</b-nav-item>
|
|
|
|
<b-nav-item href="https://yunohost.org/help" target="_blank" link-classes='text-secondary'>
|
|
|
|
<icon iname="life-ring" class="sm"/> Need help?
|
|
|
|
</b-nav-item>
|
|
|
|
<b-nav-item href="https://donate.yunohost.org/" target="_blank" link-classes='text-secondary'>
|
|
|
|
<icon iname="heart" class="sm"/> Donate
|
|
|
|
</b-nav-item>
|
2020-07-07 18:56:12 +02:00
|
|
|
<b-nav-text class="ml-auto" id="yunohost-version">version</b-nav-text>
|
|
|
|
</b-nav>
|
|
|
|
</nav>
|
|
|
|
</footer>
|
2020-07-07 13:48:54 +02:00
|
|
|
</div>
|
2020-07-06 19:08:34 +02:00
|
|
|
</template>
|
2020-07-07 13:54:01 +02:00
|
|
|
|
2020-07-10 18:42:40 +02:00
|
|
|
<script>
|
|
|
|
import api from '@/helpers/api'
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'App',
|
|
|
|
computed: {
|
|
|
|
connected: function () {
|
|
|
|
return this.$store.state.connected
|
|
|
|
}
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
async logout() {
|
|
|
|
const disconnected = await api.logout()
|
|
|
|
if (disconnected) {
|
|
|
|
this.$store.commit('CONNECTED', false);
|
|
|
|
this.$router.push('/login')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
2020-07-07 13:54:01 +02:00
|
|
|
<style lang="scss">
|
|
|
|
@import '@/scss/main.scss';
|
2020-07-07 18:56:12 +02:00
|
|
|
|
|
|
|
header {
|
|
|
|
border-bottom: 1px solid #eee;
|
2020-07-07 21:59:29 +02:00
|
|
|
margin-top: 1rem;
|
|
|
|
margin-bottom: 2rem;
|
2020-07-07 18:56:12 +02:00
|
|
|
|
|
|
|
.navbar {
|
2020-07-10 18:42:40 +02:00
|
|
|
padding: 1rem 0;
|
2020-07-07 18:56:12 +02:00
|
|
|
|
|
|
|
img {
|
|
|
|
width: 70px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.navbar-nav {
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
|
|
li {
|
|
|
|
margin: .2rem 0;
|
|
|
|
}
|
2020-07-08 14:35:22 +02:00
|
|
|
icon {
|
|
|
|
margin-left: .5rem;
|
|
|
|
}
|
2020-07-07 18:56:12 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-07-08 14:35:22 +02:00
|
|
|
|
2020-07-07 18:56:12 +02:00
|
|
|
footer {
|
|
|
|
padding: 1rem 0;
|
|
|
|
border-top: 1px solid #eee;
|
|
|
|
font-size: 0.875rem;
|
2020-07-07 21:59:29 +02:00
|
|
|
margin-top: 2rem;
|
2020-07-07 18:56:12 +02:00
|
|
|
|
|
|
|
li {
|
|
|
|
&:not(:first-child) a::before {
|
|
|
|
content: "•";
|
|
|
|
width: 1rem;
|
|
|
|
display: inline-block;
|
|
|
|
margin-left: -1rem;
|
|
|
|
}
|
|
|
|
&:first-child {
|
|
|
|
margin-left: -1rem;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-07-07 13:54:01 +02:00
|
|
|
</style>
|