|
28 | 28 | import ChevronUp from '$lib/components/icons/ChevronUp.svelte'; |
29 | 29 | import ChevronDown from '$lib/components/icons/ChevronDown.svelte'; |
30 | 30 | import About from '$lib/components/chat/Settings/About.svelte'; |
| 31 | + import Banner from '$lib/components/common/Banner.svelte'; |
31 | 32 |
|
32 | 33 | const i18n = getContext('i18n'); |
33 | 34 |
|
|
124 | 125 | /> |
125 | 126 | <UserChatsModal bind:show={showUserChatsModal} user={selectedUser} /> |
126 | 127 |
|
| 128 | +{#if ($config?.license_metadata?.seats ?? null) !== null && users.length > $config?.license_metadata?.seats} |
| 129 | + <div class=" mt-1 mb-2 text-xs text-red-500"> |
| 130 | + <Banner |
| 131 | + className="mx-0" |
| 132 | + banner={{ |
| 133 | + type: 'error', |
| 134 | + title: 'License Error', |
| 135 | + content: |
| 136 | + 'Exceeded the number of seats in your license. Please contact support to increase the number of seats.', |
| 137 | + dismissable: true |
| 138 | + }} |
| 139 | + /> |
| 140 | + </div> |
| 141 | +{/if} |
| 142 | + |
127 | 143 | <div class="mt-0.5 mb-2 gap-1 flex flex-col md:flex-row justify-between"> |
128 | 144 | <div class="flex md:self-center text-lg font-medium px-0.5"> |
129 | | - {$i18n.t('Users')} |
| 145 | + <div class="flex-shrink-0"> |
| 146 | + {$i18n.t('Users')} |
| 147 | + </div> |
130 | 148 | <div class="flex self-center w-[1px] h-6 mx-2.5 bg-gray-50 dark:bg-gray-850" /> |
131 | 149 |
|
132 | | - <span class="text-lg font-medium text-gray-500 dark:text-gray-300">{users.length}</span> |
| 150 | + {#if ($config?.license_metadata?.seats ?? null) !== null} |
| 151 | + {#if users.length > $config?.license_metadata?.seats} |
| 152 | + <span class="text-lg font-medium text-red-500" |
| 153 | + >{users.length} of {$config?.license_metadata?.seats} |
| 154 | + <span class="text-sm font-normal">available users</span></span |
| 155 | + > |
| 156 | + {:else} |
| 157 | + <span class="text-lg font-medium text-gray-500 dark:text-gray-300" |
| 158 | + >{users.length} of {$config?.license_metadata?.seats} |
| 159 | + <span class="text-sm font-normal">available users</span></span |
| 160 | + > |
| 161 | + {/if} |
| 162 | + {:else} |
| 163 | + <span class="text-lg font-medium text-gray-500 dark:text-gray-300">{users.length}</span> |
| 164 | + {/if} |
133 | 165 | </div> |
134 | 166 |
|
135 | 167 | <div class="flex gap-1"> |
|
0 commit comments