Add new slot scope syntax

This commit is contained in:
philipp lang 2023-05-20 02:38:38 +02:00
parent 641f3a1098
commit d78740d508
13 changed files with 33 additions and 33 deletions

View File

@ -1,11 +1,11 @@
<template>
<div class="h-16 px-6 flex items-center border-b border-solid border-gray-600 group-[.is-bright]:border-gray-500">
<slot name="before-title"></slot>
<div class="flex items-center grow">
<page-title class="mr-2">{{ title }}</page-title>
<div class="h-16 px-6 flex items-center justify-between border-b border-solid border-gray-600 group-[.is-bright]:border-gray-500">
<div class="flex items-center space-x-2">
<slot name="before-title"></slot>
<page-title>{{ title }}</page-title>
<slot name="toolbar"></slot>
</div>
<div class="flex items-center ml-4">
<div class="flex items-center space-x-2 ml-2">
<a href="#" v-if="$listeners.close" @click.prevent="$emit('close')" class="btn label btn-primary-light icon">
<svg-sprite class="w-3 h-3" src="close"></svg-sprite>
</a>

View File

@ -1,17 +1,17 @@
<template>
<div class="grow bg-gray-900 flex flex-col transition-all" :class="{'ml-56': menuStore.visible, 'ml-0': !menuStore.visible}">
<page-header :title="$page.props.title">
<div slot="before-title" class="flex items-center">
<a href="#" @click.prevent="menuStore.toggle()" class="lg:hidden mr-2">
<template #before-title>
<a href="#" @click.prevent="menuStore.toggle()" class="mr-2 lg:hidden">
<svg-sprite src="menu" class="text-gray-100 w-5 h-5"></svg-sprite>
</a>
</div>
<div class="flex" slot="toolbar">
</template>
<template #toolbar>
<slot name="toolbar"></slot>
</div>
<div slot="right">
</template>
<template #right>
<portal-target name="toolbar-right"> </portal-target>
</div>
</template>
</page-header>
<div :class="pageClass" class="grow flex flex-col">

View File

@ -1,5 +1,5 @@
<template>
<i-link :href="href" v-on="$listeners" class="btn label mr-2 last:mr-0" :class="colors[color]" v-tooltip="menuStore.tooltipsVisible ? $slots.default[0].text : ''">
<i-link :href="href" v-on="$listeners" class="btn label" :class="colors[color]" v-tooltip="menuStore.tooltipsVisible ? $slots.default[0].text : ''">
<svg-sprite v-show="icon" class="w-3 h-3 xl:mr-2" :src="icon"></svg-sprite>
<span class="hidden xl:inline"><slot></slot></span>
</i-link>

View File

@ -1,8 +1,8 @@
<template>
<page-layout>
<div class="flex" slot="toolbar">
<template #toolbar>
<page-toolbar-button :href="meta.links.index" color="primary" icon="undo">zurück</page-toolbar-button>
</div>
</template>
<form id="actionform" class="grow p-3" @submit.prevent="submit">
<ui-popup heading="Neue Untertätigkeit" v-if="mode === 'edit' && currentSubactivity !== null" @close="currentSubactivity = null">
<subactivity-form class="mt-4" v-if="currentSubactivity" :value="currentSubactivity" @stored="reloadSubactivities" @updated="mergeSubactivity"></subactivity-form>

View File

@ -1,8 +1,8 @@
<template>
<page-layout page-class="pb-6">
<div class="flex" slot="toolbar">
<template #toolbar>
<page-toolbar-button :href="data.meta.links.create" color="primary" icon="plus">Tätigkeit erstellen</page-toolbar-button>
</div>
</template>
<ui-popup heading="Bitte bestätigen" v-if="deleting !== null">
<div>
<p class="mt-4">Diese Aktivität löschen?</p>

View File

@ -1,10 +1,10 @@
<template>
<div class="sidebar flex flex-col group is-bright">
<page-header @close="$emit('close')" title="Ausbildungen">
<div class="flex" slot="toolbar">
<template #toolbar>
<page-toolbar-button @click.prevent="create" color="primary" icon="plus" v-if="single === null">Neue Ausbildung</page-toolbar-button>
<page-toolbar-button @click.prevent="cancel" color="primary" icon="undo" v-if="single !== null">Zurück</page-toolbar-button>
</div>
</template>
</page-header>
<form v-if="single" class="p-6 grid gap-4 justify-start" @submit.prevent="submit">

View File

@ -1,10 +1,10 @@
<template>
<div class="sidebar flex flex-col group is-bright">
<page-header @close="$emit('close')" title="Mitgliedschaften">
<div class="flex" slot="toolbar">
<template #toolbar>
<page-toolbar-button @click.prevent="create" color="primary" icon="plus" v-if="single === null">Neue Mitgliedschaft</page-toolbar-button>
<page-toolbar-button @click.prevent="cancel" color="primary" icon="undo" v-if="single !== null">Zurück</page-toolbar-button>
</div>
</template>
</page-header>
<form v-if="single" class="p-6 grid gap-4 justify-start" @submit.prevent="submit">

View File

@ -1,10 +1,10 @@
<template>
<div class="sidebar flex flex-col group is-bright">
<page-header @close="$emit('close')" title="Zahlungen">
<div class="flex" slot="toolbar">
<template #toolbar>
<page-toolbar-button @click.prevent="create" color="primary" icon="plus" v-if="single === null">Neue Zahlung</page-toolbar-button>
<page-toolbar-button @click.prevent="cancel" color="primary" icon="undo" v-if="single !== null">Zurück</page-toolbar-button>
</div>
</template>
</page-header>
<form v-if="single" class="p-6 grid gap-4 justify-start" @submit.prevent="submit">

View File

@ -1,9 +1,9 @@
<template>
<page-layout>
<div class="flex" slot="toolbar">
<template #toolbar>
<page-toolbar-button :href="meta.links.index" color="primary" icon="undo">zurück</page-toolbar-button>
<page-toolbar-button :href="data.links.edit" color="warning" icon="pencil">bearbeiten</page-toolbar-button>
</div>
</template>
<div class="p-3 grid gap-3 this-grid grow">
<ui-box heading="Stammdaten" class="area-stamm hidden xl:block">
<stamm :inner="inner"></stamm>

View File

@ -1,9 +1,9 @@
<template>
<page-layout>
<div class="flex" slot="toolbar">
<template #toolbar>
<page-toolbar-button :href="meta.links.index" color="primary" icon="undo">zurück</page-toolbar-button>
<page-toolbar-button v-if="mode === 'edit'" :href="data.links.show" color="primary" icon="eye">anschauen</page-toolbar-button>
</div>
</template>
<form class="flex grow relative" id="memberedit" @submit.prevent="submit">
<f-save-button form="memberedit"></f-save-button>
<ui-popup heading="Ein Konflikt ist aufgetreten" v-if="conflict === true">

View File

@ -1,10 +1,10 @@
<template>
<page-layout page-class="pb-6">
<div class="flex" slot="toolbar">
<template #toolbar>
<page-toolbar-button :href="data.meta.links.create" color="primary" icon="plus">Mitglied anlegen</page-toolbar-button>
<page-toolbar-button :href="data.meta.links.allpayment" color="primary" icon="invoice" v-if="hasModule('bill')">Rechnungen erstellen</page-toolbar-button>
<page-toolbar-button :href="data.meta.links.sendpayment" color="info" icon="envelope" v-if="hasModule('bill')">Rechnungen versenden</page-toolbar-button>
</div>
</template>
<ui-popup heading="Mitglied löschen?" v-if="deleting !== null" @close="deleting.reject()">
<div>
<p class="mt-4">Das Mitglied "{{ deleting.member.fullname }}" löschen?</p>

View File

@ -1,8 +1,8 @@
<template>
<page-layout>
<div class="flex" slot="toolbar">
<template #toolbar>
<page-toolbar-button :href="meta.links.index" color="primary" icon="undo">zurück</page-toolbar-button>
</div>
</template>
<form id="subedit" class="p-3 grid gap-3" @submit.prevent="submit">
<f-save-button form="subedit"></f-save-button>
<ui-box heading="Beitrag">

View File

@ -1,8 +1,8 @@
<template>
<page-layout>
<div class="flex" slot="toolbar">
<template #toolbar>
<page-toolbar-button :href="data.meta.links.create" color="primary" icon="plus">Beitrag hinzufügen</page-toolbar-button>
</div>
</template>
<table cellspacing="0" cellpadding="0" border="0" class="custom-table custom-table-sm">
<thead>
<th>Name</th>