mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-26 11:34:58 +02:00
31 lines
1.1 KiB
Svelte
31 lines
1.1 KiB
Svelte
<script lang="ts">
|
|
import { Button, navigate, Notification, NotificationToast } from '@hcengineering/ui'
|
|
import view from '@hcengineering/view'
|
|
import { getCurrentWorkspaceUrl } from '@hcengineering/presentation'
|
|
import { allowGuestSignUpStore } from '../utils'
|
|
|
|
export let onRemove: () => void
|
|
export let notification: Notification
|
|
|
|
function joinWorkspace (e: MouseEvent): void {
|
|
navigate({ path: ['login', 'join'], query: { workspace: getCurrentWorkspaceUrl() } })
|
|
}
|
|
</script>
|
|
|
|
<NotificationToast title={notification.title} severity={notification.severity} onClose={onRemove}>
|
|
<svelte:fragment slot="content">
|
|
{notification.subTitle}
|
|
</svelte:fragment>
|
|
<svelte:fragment slot="buttons">
|
|
<div style="width: auto" />
|
|
<div class="flex-between gap-2">
|
|
{#if $allowGuestSignUpStore}
|
|
<Button label={view.string.ReadOnlyJoinWorkspace} stopPropagation={false} on:click={joinWorkspace} />
|
|
{/if}
|
|
<a href="https://huly.io/signup" target="_blank">
|
|
<Button label={view.string.ReadOnlySignUp} stopPropagation={false} kind="primary" />
|
|
</a>
|
|
</div>
|
|
</svelte:fragment>
|
|
</NotificationToast>
|