Toggle favorite working

This commit is contained in:
isUnknown 2024-09-11 07:32:34 +02:00
parent 5e3f4ec621
commit 4ea2871c6d
13 changed files with 300 additions and 169 deletions

View file

@ -1,7 +1,9 @@
<script>
<?php if ($kirby->user()): ?>
const kirbyData = {
user: {
role: '<?= $kirby->user()->role() ?>',
uuid: '<?= $kirby->user()->uuid() ?>',
<?php if ($kirby->user()->role() == 'client'): ?>
client: {
name: '<?= $kirby->user()->client()->toPage()->title() ?>',
@ -10,6 +12,7 @@
<?php endif ?>
}
}
<?php endif ?>
</script>
</body>
</html>