mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-23 00:37:47 +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",
|
"AuthenticatedWithGithubRequired": "Please authorize Github application to act on behind you to perform actions",
|
||||||
"Processing": "Processing authentication/installation",
|
"Processing": "Processing authentication/installation",
|
||||||
"AutoClose": "Processing complete, Tab will be auto-closed in {time} seconds.",
|
"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",
|
"PleaseRetry": "Please retry authentication",
|
||||||
"Updated": "Updated",
|
"Updated": "Updated",
|
||||||
"LinkToProject": "Connect to {title}",
|
"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",
|
"AuthenticatedWithGithubRequired": "Por favor, autorize a aplicação do Github a agir em seu nome para realizar ações",
|
||||||
"Processing": "Processando autenticação/instalação",
|
"Processing": "Processando autenticação/instalação",
|
||||||
"AutoClose": "Processamento concluído, a guia será fechada automaticamente em {time} segundos.",
|
"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",
|
"PleaseRetry": "Por favor, tente novamente a autenticação",
|
||||||
"Updated": "Atualizado",
|
"Updated": "Atualizado",
|
||||||
"LinkToProject": "Conectar ao {title}",
|
"LinkToProject": "Conectar ao {title}",
|
||||||
|
@ -72,6 +72,8 @@
|
|||||||
"AuthenticatedWithGithubRequired": "Пожалуйста авторизуйте Github приложение для действий от вашего имени",
|
"AuthenticatedWithGithubRequired": "Пожалуйста авторизуйте Github приложение для действий от вашего имени",
|
||||||
"Processing": "Происходит авторизация/установка",
|
"Processing": "Происходит авторизация/установка",
|
||||||
"AutoClose": "Процесс завершен, Вкладка будет автоматически закрыта через {time} секунд.",
|
"AutoClose": "Процесс завершен, Вкладка будет автоматически закрыта через {time} секунд.",
|
||||||
|
"RequestFailed": "Запрос не выполнен. Пожалуйста, закройте вкладку и попробуйте снова.",
|
||||||
|
"CloseTab": "Закрыть вкладку",
|
||||||
"PleaseRetry": "Пожалуйста повторите авторизацию",
|
"PleaseRetry": "Пожалуйста повторите авторизацию",
|
||||||
"Updated": "Обновлено",
|
"Updated": "Обновлено",
|
||||||
"LinkToProject": "Подключить к {title}",
|
"LinkToProject": "Подключить к {title}",
|
||||||
|
@ -72,6 +72,8 @@
|
|||||||
"AuthenticatedWithGithubRequired": "Por favor, autoriza la aplicación de Github para actuar en tu nombre y realizar acciones",
|
"AuthenticatedWithGithubRequired": "Por favor, autoriza la aplicación de Github para actuar en tu nombre y realizar acciones",
|
||||||
"Processing": "Procesando autenticación/instalación",
|
"Processing": "Procesando autenticación/instalación",
|
||||||
"AutoClose": "Procesamiento completo, la pestaña se cerrará automáticamente en {time} segundos.",
|
"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",
|
"PleaseRetry": "Por favor, vuelve a intentar la autenticación",
|
||||||
"Updated": "Actualizado",
|
"Updated": "Actualizado",
|
||||||
"LinkToProject": "Conectar a {title}",
|
"LinkToProject": "Conectar a {title}",
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
-->
|
-->
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Account, Ref } from '@hcengineering/core'
|
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 { onDestroy } from 'svelte'
|
||||||
import github from '../plugin'
|
import github from '../plugin'
|
||||||
import { sendGHServiceRequest } from './utils'
|
import { sendGHServiceRequest } from './utils'
|
||||||
@ -111,6 +111,17 @@
|
|||||||
</div>
|
</div>
|
||||||
{:then}
|
{:then}
|
||||||
<Label label={github.string.AutoClose} params={{ time: autoClose }} />
|
<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}
|
{/await}
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
@ -66,6 +66,8 @@ export default mergeIds(githubId, github, {
|
|||||||
|
|
||||||
Processing: '' as IntlString,
|
Processing: '' as IntlString,
|
||||||
AutoClose: '' as IntlString,
|
AutoClose: '' as IntlString,
|
||||||
|
RequestFailed: '' as IntlString,
|
||||||
|
CloseTab: '' as IntlString,
|
||||||
PleaseRetry: '' as IntlString,
|
PleaseRetry: '' as IntlString,
|
||||||
Updated: '' as IntlString,
|
Updated: '' as IntlString,
|
||||||
LinkToProject: '' as IntlString,
|
LinkToProject: '' as IntlString,
|
||||||
|
Loading…
Reference in New Issue
Block a user