2020-04-06 23:48:28 +02:00
|
|
|
<template>
|
|
|
|
|
<div class="ui-header-bar">
|
2020-05-06 21:46:34 +02:00
|
|
|
<div class="ui-header-bar-inner">
|
|
|
|
|
<div class="ui-header-bar-main">
|
2021-01-06 19:29:11 +01:00
|
|
|
<ui-icon-button v-if="false && backButton" type="light onbg" @click="onBack" />
|
2020-09-07 11:42:51 +02:00
|
|
|
<div class="ui-header-bar-main-title">
|
2020-09-02 16:22:02 +02:00
|
|
|
<slot name="title">
|
|
|
|
|
<h2 class="ui-header-bar-title" :class="{'is-empty': !title && titleEmpty}">
|
|
|
|
|
<span v-if="prefix" class="-minor" v-localize:html="prefix"></span>
|
|
|
|
|
<span v-localize="title || titleEmpty"></span>
|
|
|
|
|
<span v-if="suffix" class="-minor" v-localize:html="suffix"></span>
|
2020-10-07 12:37:35 +02:00
|
|
|
<span v-if="count > 0" class="-minor -count">{{count}}</span>
|
2020-09-02 16:22:02 +02:00
|
|
|
</h2>
|
|
|
|
|
</slot>
|
2020-05-06 21:46:34 +02:00
|
|
|
<p v-if="description" class="ui-header-bar-description" v-localize="description"></p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="ui-header-bar-aside">
|
|
|
|
|
<slot></slot>
|
2020-09-08 13:33:30 +02:00
|
|
|
<ui-icon-button class="ui-header-bar-close" v-if="closeButton" @click="onClose" icon="fth-x" title="@ui.close" />
|
2020-04-30 12:04:34 +02:00
|
|
|
</div>
|
2020-04-07 00:11:35 +02:00
|
|
|
</div>
|
2020-04-06 23:48:28 +02:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
2020-11-20 10:32:17 +01:00
|
|
|
import Overlay from 'zero/helpers/overlay.js';
|
2020-04-24 15:13:54 +02:00
|
|
|
|
2020-04-06 23:48:28 +02:00
|
|
|
export default {
|
|
|
|
|
name: 'uiHeaderBar',
|
|
|
|
|
|
|
|
|
|
props: {
|
2020-10-15 14:10:04 +02:00
|
|
|
title: {
|
|
|
|
|
type: String
|
|
|
|
|
},
|
|
|
|
|
titleEmpty: {
|
|
|
|
|
type: String
|
|
|
|
|
},
|
|
|
|
|
prefix: {
|
|
|
|
|
type: String
|
|
|
|
|
},
|
|
|
|
|
suffix: {
|
|
|
|
|
type: String
|
|
|
|
|
},
|
|
|
|
|
count: {
|
|
|
|
|
type: Number,
|
|
|
|
|
default: 0
|
|
|
|
|
},
|
|
|
|
|
description: {
|
|
|
|
|
type: String
|
|
|
|
|
},
|
|
|
|
|
backButton: {
|
|
|
|
|
type: Boolean,
|
|
|
|
|
default: false
|
|
|
|
|
},
|
|
|
|
|
closeButton: {
|
|
|
|
|
type: Boolean,
|
|
|
|
|
default: false
|
|
|
|
|
}
|
2020-04-06 23:48:28 +02:00
|
|
|
},
|
|
|
|
|
|
2020-10-15 14:10:04 +02:00
|
|
|
methods: {
|
|
|
|
|
onBack()
|
|
|
|
|
{
|
|
|
|
|
this.$router.go(-1);
|
|
|
|
|
},
|
|
|
|
|
onClose()
|
|
|
|
|
{
|
|
|
|
|
Overlay.close();
|
|
|
|
|
}
|
2020-04-06 23:48:28 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
|
.ui-header-bar
|
|
|
|
|
{
|
|
|
|
|
width: 100%;
|
2020-05-06 15:49:21 +02:00
|
|
|
height: 100px;
|
2020-09-06 23:36:03 +02:00
|
|
|
padding: 0 var(--padding) 0; //10px;
|
2020-05-06 15:49:21 +02:00
|
|
|
|
|
|
|
|
& + .ui-blank-box, & + .ui-box, & + .ui-view-box
|
|
|
|
|
{
|
|
|
|
|
margin-top: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
& + .ui-view-box
|
|
|
|
|
{
|
|
|
|
|
padding-top: 0;
|
|
|
|
|
}
|
2020-09-06 23:36:03 +02:00
|
|
|
|
|
|
|
|
.app-tree &
|
|
|
|
|
{
|
|
|
|
|
height: 90px;
|
2020-09-18 15:12:51 +02:00
|
|
|
margin-bottom: 8px;
|
2020-09-06 23:36:03 +02:00
|
|
|
}
|
2020-04-07 00:11:35 +02:00
|
|
|
}
|
|
|
|
|
|
2020-05-06 21:46:34 +02:00
|
|
|
.ui-header-bar-inner
|
|
|
|
|
{
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
align-items: center;
|
|
|
|
|
height: 100%;
|
2020-05-07 11:45:28 +02:00
|
|
|
/*max-width: 1104px;*/
|
2020-05-06 21:46:34 +02:00
|
|
|
}
|
|
|
|
|
|
2020-04-07 00:11:35 +02:00
|
|
|
.ui-header-bar-main
|
|
|
|
|
{
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
height: 100%;
|
2020-09-07 11:42:51 +02:00
|
|
|
flex: 1 0 auto;
|
2020-04-07 00:11:35 +02:00
|
|
|
|
|
|
|
|
.ui-icon-button
|
|
|
|
|
{
|
2020-09-09 14:30:56 +02:00
|
|
|
margin-right: var(--padding-s);
|
2020-04-07 00:11:35 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-09-07 11:42:51 +02:00
|
|
|
.ui-header-bar-main-title
|
|
|
|
|
{
|
|
|
|
|
flex: 1 0 auto;
|
|
|
|
|
}
|
|
|
|
|
|
2020-04-07 00:11:35 +02:00
|
|
|
.ui-header-bar-aside
|
|
|
|
|
{
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
height: 100%;
|
2020-09-03 11:57:18 +02:00
|
|
|
flex-shrink: 0;
|
2020-09-09 14:30:56 +02:00
|
|
|
padding-left: var(--padding-s);
|
2020-04-07 12:28:47 +02:00
|
|
|
|
|
|
|
|
> * + *
|
|
|
|
|
{
|
2020-09-09 14:30:56 +02:00
|
|
|
margin-left: var(--padding-s);
|
2020-04-07 12:28:47 +02:00
|
|
|
}
|
2020-04-06 23:48:28 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.ui-header-bar-title
|
|
|
|
|
{
|
2020-04-10 15:47:29 +02:00
|
|
|
font-family: var(--font);
|
2020-09-07 14:55:05 +02:00
|
|
|
color: var(--color-text);
|
2020-04-06 23:48:28 +02:00
|
|
|
margin: 0;
|
2020-08-16 15:51:12 +02:00
|
|
|
font-size: var(--font-size-l);
|
2020-04-06 23:48:28 +02:00
|
|
|
font-weight: 700;
|
2020-10-07 12:37:35 +02:00
|
|
|
//display: flex;
|
|
|
|
|
//align-items: center;
|
2020-04-08 15:16:05 +02:00
|
|
|
|
2020-05-26 16:04:11 +02:00
|
|
|
&.is-empty, .-minor
|
2020-04-08 15:16:05 +02:00
|
|
|
{
|
2020-09-07 14:55:05 +02:00
|
|
|
color: var(--color-text-dim);
|
2020-04-08 15:16:05 +02:00
|
|
|
font-weight: 400;
|
|
|
|
|
}
|
2020-10-07 12:37:35 +02:00
|
|
|
|
|
|
|
|
.-count
|
|
|
|
|
{
|
|
|
|
|
display: inline-block;
|
|
|
|
|
font-size: 11px;
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
text-transform: uppercase;
|
2021-01-07 01:08:09 +01:00
|
|
|
background: var(--color-bg-shade-3);
|
2020-10-07 12:37:35 +02:00
|
|
|
//box-shadow: var(--shadow-short);
|
|
|
|
|
color: var(--color-text);
|
|
|
|
|
height: 22px;
|
|
|
|
|
line-height: 22px;
|
|
|
|
|
padding: 0 10px;
|
|
|
|
|
border-radius: 16px;
|
|
|
|
|
letter-spacing: .5px;
|
|
|
|
|
font-style: normal;
|
|
|
|
|
margin-left: 12px;
|
|
|
|
|
margin-top: 2px;
|
|
|
|
|
position: relative;
|
|
|
|
|
top: -1px;
|
|
|
|
|
}
|
2020-04-06 23:48:28 +02:00
|
|
|
}
|
2020-04-30 12:04:34 +02:00
|
|
|
|
|
|
|
|
.ui-header-bar-description
|
|
|
|
|
{
|
|
|
|
|
font-size: var(--font-size-s);
|
2020-09-07 14:55:05 +02:00
|
|
|
color: var(--color-text-dim);
|
2020-04-30 12:04:34 +02:00
|
|
|
margin: 2px 0 0;
|
|
|
|
|
}
|
2020-09-08 13:33:30 +02:00
|
|
|
|
|
|
|
|
.ui-header-bar-close
|
|
|
|
|
{
|
|
|
|
|
background: transparent !important;
|
|
|
|
|
}
|
2020-04-06 23:48:28 +02:00
|
|
|
</style>
|