mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
RoutableTabs: defaults to simple card if one tab
This commit is contained in:
parent
3b6b453f43
commit
b2fef109a5
2 changed files with 22 additions and 9 deletions
|
@ -1,13 +1,22 @@
|
|||
<template>
|
||||
<routable-tabs
|
||||
:routes="routes_"
|
||||
v-bind="{ panels, forms, v: $v, ...$attrs }"
|
||||
v-on="$listeners"
|
||||
>
|
||||
<slot name="tab-top" slot="tab-top"></slot>
|
||||
<slot name="tab-before" slot="tab-before"></slot>
|
||||
<slot name="tab-after" slot="tab-after"></slot>
|
||||
</routable-tabs>
|
||||
<div class="config-panel">
|
||||
<routable-tabs
|
||||
v-if="routes_.length > 1"
|
||||
:routes="routes_"
|
||||
v-bind="{ panels, forms, v: $v, ...$attrs }"
|
||||
v-on="$listeners"
|
||||
>
|
||||
<slot name="tab-top" slot="tab-top" />
|
||||
<slot name="tab-before" slot="tab-before" />
|
||||
<slot name="tab-after" slot="tab-after" />
|
||||
</routable-tabs>
|
||||
|
||||
<card v-else :title="routes_[0].text" :icon="routes_[0].icon">
|
||||
<slot name="tab-top" />
|
||||
<slot name="tab-before" />
|
||||
<slot name="tab-after" />
|
||||
</card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
|
|
@ -526,4 +526,8 @@ select {
|
|||
.yuno-alert div div:not(:last-child) {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.config-panel {
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in a new issue