mirror of
https://github.com/hcengineering/platform.git
synced 2026-08-24 13:22:23 +02:00
fix(github integration): handle request failed gracefully with option to close tab (#7387)
Signed-off-by: Dakshesh Jain <dakshesh.jain14@gmail.com>
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
-->
|
||||
<script lang="ts">
|
||||
import { Account, Ref } from '@hcengineering/core'
|
||||
import ui, { Label, Location, Spinner, location } from '@hcengineering/ui'
|
||||
import ui, { Label, Location, Spinner, Button, location } from '@hcengineering/ui'
|
||||
import { onDestroy } from 'svelte'
|
||||
import github from '../plugin'
|
||||
import { sendGHServiceRequest } from './utils'
|
||||
@@ -111,6 +111,17 @@
|
||||
</div>
|
||||
{:then}
|
||||
<Label label={github.string.AutoClose} params={{ time: autoClose }} />
|
||||
{:catch}
|
||||
<div class="flex flex-col flex-center flex-gap-4">
|
||||
<Label label={github.string.RequestFailed} />
|
||||
<Button
|
||||
label={github.string.CloseTab}
|
||||
kind="primary"
|
||||
on:click={() => {
|
||||
window.close()
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
{/await}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user