mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-13 11:50:56 +00: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:
parent
e41a6fee14
commit
b7c0701b5f
@ -72,6 +72,8 @@
|
||||
"AuthenticatedWithGithubRequired": "Please authorize Github application to act on behind you to perform actions",
|
||||
"Processing": "Processing authentication/installation",
|
||||
"AutoClose": "Processing complete, Tab will be auto-closed in {time} seconds.",
|
||||
"RequestFailed": "Request failed. Please close the tab and try again.",
|
||||
"CloseTab": "Close Tab",
|
||||
"PleaseRetry": "Please retry authentication",
|
||||
"Updated": "Updated",
|
||||
"LinkToProject": "Connect to {title}",
|
||||
|
@ -72,6 +72,8 @@
|
||||
"AuthenticatedWithGithubRequired": "Por favor, autorize a aplicação do Github a agir em seu nome para realizar ações",
|
||||
"Processing": "Processando autenticação/instalação",
|
||||
"AutoClose": "Processamento concluído, a guia será fechada automaticamente em {time} segundos.",
|
||||
"RequestFailed": "Solicitação falhou. Por favor, feche a aba e tente novamente.",
|
||||
"CloseTab": "Fechar aba",
|
||||
"PleaseRetry": "Por favor, tente novamente a autenticação",
|
||||
"Updated": "Atualizado",
|
||||
"LinkToProject": "Conectar ao {title}",
|
||||
|
@ -72,6 +72,8 @@
|
||||
"AuthenticatedWithGithubRequired": "Пожалуйста авторизуйте Github приложение для действий от вашего имени",
|
||||
"Processing": "Происходит авторизация/установка",
|
||||
"AutoClose": "Процесс завершен, Вкладка будет автоматически закрыта через {time} секунд.",
|
||||
"RequestFailed": "Запрос не выполнен. Пожалуйста, закройте вкладку и попробуйте снова.",
|
||||
"CloseTab": "Закрыть вкладку",
|
||||
"PleaseRetry": "Пожалуйста повторите авторизацию",
|
||||
"Updated": "Обновлено",
|
||||
"LinkToProject": "Подключить к {title}",
|
||||
|
@ -72,6 +72,8 @@
|
||||
"AuthenticatedWithGithubRequired": "Por favor, autoriza la aplicación de Github para actuar en tu nombre y realizar acciones",
|
||||
"Processing": "Procesando autenticación/instalación",
|
||||
"AutoClose": "Procesamiento completo, la pestaña se cerrará automáticamente en {time} segundos.",
|
||||
"RequestFailed": "Solicitud fallida. Por favor, cierre la pestaña e intente nuevamente.",
|
||||
"CloseTab": "Cerrar pestaña",
|
||||
"PleaseRetry": "Por favor, vuelve a intentar la autenticación",
|
||||
"Updated": "Actualizado",
|
||||
"LinkToProject": "Conectar a {title}",
|
||||
|
@ -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}
|
||||
|
@ -66,6 +66,8 @@ export default mergeIds(githubId, github, {
|
||||
|
||||
Processing: '' as IntlString,
|
||||
AutoClose: '' as IntlString,
|
||||
RequestFailed: '' as IntlString,
|
||||
CloseTab: '' as IntlString,
|
||||
PleaseRetry: '' as IntlString,
|
||||
Updated: '' as IntlString,
|
||||
LinkToProject: '' as IntlString,
|
||||
|
Loading…
Reference in New Issue
Block a user