main
html 42 lines 1.54 KB
Raw
1 <html>
2
3 <head>
4 <title>Example component or modal</title>
5
6 <!-- Import the alpine store -->
7 <script type="module">
8 import { store } from "/components/chat/top-section/chat-top-store.js";
9 import { store as preferencesStore } from "/components/sidebar/bottom/preferences/preferences-store.js";
10 </script>
11 </head>
12
13 <body>
14
15 <!-- This construct of x-data + x-if is used to ensure the component is only rendered when the store is available -->
16 <div x-data>
17 <template x-if="$store.chatTop">
18 <!-- Time and Date -->
19 <div id="time-date-container">
20 <x-extension id="chat-top-start"></x-extension>
21 <div id="time-date" x-show="$store.preferences.isUiControlVisible('time')"></div>
22 <div x-show="$store.preferences.isUiControlVisible('connectionStatus')">
23 <x-component path="sync/sync-status.html"></x-component>
24 </div>
25 <!-- Notification Toggle positioned next to time-date -->
26 <x-component path="notifications/notification-icons.html"></x-component>
27 <!-- Project Selector -->
28 <div x-show="$store.preferences.isUiControlVisible('projectSelector')">
29 <x-component path="projects/project-selector.html"></x-component>
30 </div>
31 <x-extension id="chat-top-end"></x-extension>
32 </div>
33 </template>
34 </div>
35
36 <style>
37 #time-date-container > x-extension { display: contents; }
38 </style>
39
40 </body>
41
42 </html>