diff --git a/packages/ui/src/components/StatusBadge.svelte b/packages/ui/src/components/StatusBadge.svelte new file mode 100644 index 0000000000..c7d534b1a4 --- /dev/null +++ b/packages/ui/src/components/StatusBadge.svelte @@ -0,0 +1,37 @@ + + +
+
+
+ + diff --git a/packages/ui/src/index.ts b/packages/ui/src/index.ts index 031a7dc380..65abd1c7b8 100644 --- a/packages/ui/src/index.ts +++ b/packages/ui/src/index.ts @@ -61,6 +61,7 @@ export { default as ButtonGroup } from './components/ButtonGroup.svelte' export { default as FilterButton } from './components/FilterButton.svelte' export { default as FilterCategoryPopup } from './components/FilterCategoryPopup.svelte' export { default as Status } from './components/Status.svelte' +export { default as StatusBadge } from './components/StatusBadge.svelte' export { default as StateTag } from './components/StateTag.svelte' export { default as Component } from './components/Component.svelte' export { default as Icon } from './components/Icon.svelte' diff --git a/plugins/calendar-assets/lang/cs.json b/plugins/calendar-assets/lang/cs.json index 4c42d36517..925b20506d 100644 --- a/plugins/calendar-assets/lang/cs.json +++ b/plugins/calendar-assets/lang/cs.json @@ -122,7 +122,6 @@ "Last": "Poslední", "Weekday": "Všední den", "WeekendDay": "Víkendový den", - "NotConnectedIntegration": "Účet {email} není integrován s pracovním prostorem", "SynchronizedCalendars": "Synchronizované kalendáře", "Account": "Účet", "NoCalendars": "Kalendáře pro synchronizaci nejsou vybrány" diff --git a/plugins/calendar-assets/lang/de.json b/plugins/calendar-assets/lang/de.json index e88b018ad0..31ca7abbc7 100644 --- a/plugins/calendar-assets/lang/de.json +++ b/plugins/calendar-assets/lang/de.json @@ -122,7 +122,6 @@ "Last": "Letzter", "Weekday": "Wochentag", "WeekendDay": "Wochenendtag", - "NotConnectedIntegration": "Das Konto {email} ist nicht mit dem Arbeitsbereich integriert", "SynchronizedCalendars": "Synchronisierte Kalender", "Account": "Konto", "NoCalendars": "Keine Kalender zur Synchronisation ausgewählt" diff --git a/plugins/calendar-assets/lang/en.json b/plugins/calendar-assets/lang/en.json index 84bb5180b8..b3159ea6bb 100644 --- a/plugins/calendar-assets/lang/en.json +++ b/plugins/calendar-assets/lang/en.json @@ -122,7 +122,6 @@ "Last": "Last", "Weekday": "Weekday", "WeekendDay": "Weekend day", - "NotConnectedIntegration": "The account {email} is not integrated with the workspace", "SynchronizedCalendars": "Synchronized calendars", "Account": "Account", "NoCalendars": "No calendars selected for synchronization" diff --git a/plugins/calendar-assets/lang/es.json b/plugins/calendar-assets/lang/es.json index b017c83f03..b0b72bebcf 100644 --- a/plugins/calendar-assets/lang/es.json +++ b/plugins/calendar-assets/lang/es.json @@ -122,7 +122,6 @@ "Last": "Último", "Weekday": "Día laborable", "WeekendDay": "Día de descanso", - "NotConnectedIntegration": "La cuenta {email} no está integrada con el espacio de trabajo", "SynchronizedCalendars": "Calendarios sincronizados", "Account": "Cuenta", "NoCalendars": "No se seleccionaron calendarios para la sincronización" diff --git a/plugins/calendar-assets/lang/fr.json b/plugins/calendar-assets/lang/fr.json index 0c927a42aa..db757711b1 100644 --- a/plugins/calendar-assets/lang/fr.json +++ b/plugins/calendar-assets/lang/fr.json @@ -122,7 +122,6 @@ "Last": "Dernier", "Weekday": "Jour de la semaine", "WeekendDay": "Jour de congé", - "NotConnectedIntegration": "Le compte {email} n'est pas intégré au workspace", "SynchronizedCalendars": "Calendriers synchronisés", "Account": "Compte", "NoCalendars": "Aucun calendrier sélectionné pour la synchronisation" diff --git a/plugins/calendar-assets/lang/it.json b/plugins/calendar-assets/lang/it.json index bdfd40af3d..df8b8421f9 100644 --- a/plugins/calendar-assets/lang/it.json +++ b/plugins/calendar-assets/lang/it.json @@ -122,7 +122,6 @@ "Last": "Ultimo", "Weekday": "Giorno lavorativo", "WeekendDay": "Giorno libero", - "NotConnectedIntegration": "L'account {email} non è integrato con il workspace", "SynchronizedCalendars": "Calendari sincronizzati", "Account": "Account", "NoCalendars": "Nessun calendario selezionato per la sincronizzazione" diff --git a/plugins/calendar-assets/lang/ja.json b/plugins/calendar-assets/lang/ja.json index 42ddae3d9f..c2f7e11d70 100644 --- a/plugins/calendar-assets/lang/ja.json +++ b/plugins/calendar-assets/lang/ja.json @@ -118,7 +118,6 @@ "Last": "最後", "Weekday": "平日", "WeekendDay": "休日", - "NotConnectedIntegration": "アカウント {email} はワークスペースに統合されていません", "SynchronizedCalendars": "同期されたカレンダー", "Account": "アカウント", "NoCalendars": "同期するカレンダーが選択されていません" diff --git a/plugins/calendar-assets/lang/pt.json b/plugins/calendar-assets/lang/pt.json index 03f7dc0b52..e6adadc4f4 100644 --- a/plugins/calendar-assets/lang/pt.json +++ b/plugins/calendar-assets/lang/pt.json @@ -122,7 +122,6 @@ "Last": "Último", "Weekday": "Dia da semana", "WeekendDay": "Folga", - "NotConnectedIntegration": "A conta {email} não está integrada com o espaço de trabalho", "SynchronizedCalendars": "Calendários sincronizados", "Account": "Conta", "NoCalendars": "Nenhum calendário encontrado" diff --git a/plugins/calendar-assets/lang/ru.json b/plugins/calendar-assets/lang/ru.json index e33f15c3aa..ad6762d11a 100644 --- a/plugins/calendar-assets/lang/ru.json +++ b/plugins/calendar-assets/lang/ru.json @@ -122,7 +122,6 @@ "Last": "Последний", "Weekday": "Будний день", "WeekendDay": "Выходной день", - "NotConnectedIntegration": "Учетная запись {email} не интегрирована с рабочим пространством", "SynchronizedCalendars": "Синхронизированные календари", "Account": "Аккаунт", "NoCalendars": "Календари для синхронизации не выбраны" diff --git a/plugins/calendar-assets/lang/zh.json b/plugins/calendar-assets/lang/zh.json index ae3876e8cc..3384c5d207 100644 --- a/plugins/calendar-assets/lang/zh.json +++ b/plugins/calendar-assets/lang/zh.json @@ -122,7 +122,6 @@ "Last": "最后一个", "Weekday": "工作日", "WeekendDay": "周末日", - "NotConnectedIntegration": "帐户 {email} 未与工作区集成", "SynchronizedCalendars": "已同步的日历", "Account": "帐户", "NoCalendars": "未选择同步日历" diff --git a/plugins/calendar-resources/package.json b/plugins/calendar-resources/package.json index 1cee912ba5..84d1156c88 100644 --- a/plugins/calendar-resources/package.json +++ b/plugins/calendar-resources/package.json @@ -46,6 +46,7 @@ "@hcengineering/presentation": "^0.6.3", "@hcengineering/calendar": "^0.6.24", "@hcengineering/setting": "^0.6.17", + "@hcengineering/setting-resources": "^0.6.0", "@hcengineering/theme": "^0.6.5", "svelte": "^4.2.19", "@hcengineering/text": "^0.6.5", diff --git a/plugins/calendar-resources/src/components/IntegrationState.svelte b/plugins/calendar-resources/src/components/IntegrationState.svelte index bf601338d0..de05d414ef 100644 --- a/plugins/calendar-resources/src/components/IntegrationState.svelte +++ b/plugins/calendar-resources/src/components/IntegrationState.svelte @@ -13,19 +13,20 @@ // limitations under the License. --> -
-
- {#if integration.workspaceUuid == null} -
- - -
- {:else if integration.data?.email !== undefined} -
-
- {integration.data?.email} -
-
- {#if syncedCalendars.length === 0} -
- {calendar.string.NoCalendars} -
- {:else} - {#each syncedCalendars as calendar (calendar._id)} -
- {calendar.name} -
- {/each} - {/if} -
+ + + {#if syncedCalendars.length === 0} + + {:else} + {#each syncedCalendars as calendar (calendar._id)} + + {/each} {/if} -
-
- - + + diff --git a/plugins/calendar/src/index.ts b/plugins/calendar/src/index.ts index 42702d68cd..6d9b32dfa6 100644 --- a/plugins/calendar/src/index.ts +++ b/plugins/calendar/src/index.ts @@ -291,7 +291,6 @@ const calendarPlugin = plugin(calendarId, { MeetingScheduledNotification: '' as IntlString, MeetingRescheduledNotification: '' as IntlString, MeetingCanceledNotification: '' as IntlString, - NotConnectedIntegration: '' as IntlString, SynchronizedCalendars: '' as IntlString, Account: '' as IntlString, NoCalendars: '' as IntlString diff --git a/plugins/gmail-assets/lang/cs.json b/plugins/gmail-assets/lang/cs.json index 1ff2a68a9e..45861eb4c7 100644 --- a/plugins/gmail-assets/lang/cs.json +++ b/plugins/gmail-assets/lang/cs.json @@ -40,8 +40,6 @@ "GooglePrivacy": "Použití a přenos informací získaných z Google API do jakékoli jiné aplikace bude v souladu s zásadami Google API Services User Data Policy, včetně požadavků na omezené použití.", "EmailNotificationsDescription": "Dostávejte osobní oznámení na e-mail.", "FailedToConnect": "Služba Gmail není k dispozici", - "TotalMessages": "Celkový počet zpráv", - "FailedToLoadState": "Nepodařilo se načíst stav Gmailu", - "NotConnectedIntegration": "Účet {email} není integrován s pracovním prostorem" + "TotalMessages": "Celkový počet zpráv:" } } \ No newline at end of file diff --git a/plugins/gmail-assets/lang/de.json b/plugins/gmail-assets/lang/de.json index 746bc1f91f..ff9bd3047a 100644 --- a/plugins/gmail-assets/lang/de.json +++ b/plugins/gmail-assets/lang/de.json @@ -40,8 +40,6 @@ "GooglePrivacy": "Die Nutzung und Übertragung von Informationen, die Huly von Google-APIs erhält, an andere Apps erfolgt gemäß der Google API Services User Data Policy, einschließlich der Anforderungen zur eingeschränkten Nutzung.", "EmailNotificationsDescription": "Erhalten Sie persönliche Benachrichtigungen per E-Mail.", "FailedToConnect": "Gmail-Dienst ist nicht verfügbar", - "TotalMessages": "Gesamtanzahl der Nachrichten", - "FailedToLoadState": "Fehler beim Laden des Gmail-Zustands", - "NotConnectedIntegration": "Das Konto {email} ist nicht mit dem Arbeitsbereich integriert" + "TotalMessages": "Gesamtanzahl der Nachrichten:" } } \ No newline at end of file diff --git a/plugins/gmail-assets/lang/en.json b/plugins/gmail-assets/lang/en.json index e2f4d41976..37382a2abd 100644 --- a/plugins/gmail-assets/lang/en.json +++ b/plugins/gmail-assets/lang/en.json @@ -40,8 +40,6 @@ "GooglePrivacy": "Huly’s use and transfer of information received from Google APIs to any other app will adhere to Google API Services User Data Policy, including the Limited Use requirements.", "EmailNotificationsDescription": "Receive personal notifications on email.", "FailedToConnect": "Gmail service is not available", - "TotalMessages": "Total messages", - "FailedToLoadState": "Failed to load Gmail state", - "NotConnectedIntegration": "The account {email} is not integrated with the workspace" + "TotalMessages": "Total messages:" } } \ No newline at end of file diff --git a/plugins/gmail-assets/lang/es.json b/plugins/gmail-assets/lang/es.json index ca284ba94d..a3c9a08330 100644 --- a/plugins/gmail-assets/lang/es.json +++ b/plugins/gmail-assets/lang/es.json @@ -40,8 +40,6 @@ "GooglePrivacy": "Huly’s use and transfer of information received from Google APIs to any other app will adhere to Google API Services User Data Policy, including the Limited Use requirements.", "EmailNotificationsDescription": "Reciba notificaciones personales por correo electrónico.", "FailedToConnect": "El servicio de Gmail no está disponible", - "TotalMessages": "Total de mensajes", - "FailedToLoadState": "Error al cargar el estado de Gmail", - "NotConnectedIntegration": "La cuenta {email} no está integrada con el espacio de trabajo" + "TotalMessages": "Total de mensajes:" } } \ No newline at end of file diff --git a/plugins/gmail-assets/lang/fr.json b/plugins/gmail-assets/lang/fr.json index f89c08e743..27c38abb13 100644 --- a/plugins/gmail-assets/lang/fr.json +++ b/plugins/gmail-assets/lang/fr.json @@ -40,8 +40,6 @@ "GooglePrivacy": "L'utilisation et le transfert des informations reçues des API Google par Huly à toute autre application respecteront les règles d'utilisation des données utilisateur des services API Google, y compris les exigences d'utilisation limitée.", "EmailNotificationsDescription": "Recevez des notifications personnelles par e-mail.", "FailedToConnect": "Le service Gmail n'est pas disponible", - "TotalMessages": "Total des messages", - "FailedToLoadState": "Échec du chargement de l'état de Gmail", - "NotConnectedIntegration": "Le compte {email} n'est pas intégré à l'espace de travail" + "TotalMessages": "Total des messages:" } } \ No newline at end of file diff --git a/plugins/gmail-assets/lang/it.json b/plugins/gmail-assets/lang/it.json index 5bfedd3ff3..26c80128ac 100644 --- a/plugins/gmail-assets/lang/it.json +++ b/plugins/gmail-assets/lang/it.json @@ -40,8 +40,6 @@ "GooglePrivacy": "L'uso e il trasferimento delle informazioni ricevute dalle API di Google a qualsiasi altra app di Huly adempirà alla Politica sui dati degli utenti dei servizi API di Google, inclusi i requisiti di utilizzo limitato.", "EmailNotificationsDescription": "Ricevi notifiche personali sulle email.", "FailedToConnect": "Il servizio Gmail non è disponibile", - "TotalMessages": "Totale messaggi", - "FailedToLoadState": "Impossibile caricare lo stato di Gmail", - "NotConnectedIntegration": "L'account {email} non è integrato con il workspace" + "TotalMessages": "Totale messaggi:" } } diff --git a/plugins/gmail-assets/lang/ja.json b/plugins/gmail-assets/lang/ja.json index b2cae2a0b2..1cc736b6f5 100644 --- a/plugins/gmail-assets/lang/ja.json +++ b/plugins/gmail-assets/lang/ja.json @@ -40,8 +40,6 @@ "GooglePrivacy": "Huly による Google API から受信した情報の他のアプリへの使用および転送は、Google API Services User Data Policy(限定的な使用の要件を含む)に準拠します。", "EmailNotificationsDescription": "メールで個人通知を受け取る", "FailedToConnect": "Gmail サービスは利用できません", - "TotalMessages": "メッセージの総数", - "FailedToLoadState": "Gmail の状態の読み込みに失敗しました", - "NotConnectedIntegration": "アカウント {email} はワークスペースに統合されていません" + "TotalMessages": "メッセージの総数:" } } diff --git a/plugins/gmail-assets/lang/pt.json b/plugins/gmail-assets/lang/pt.json index 7cc1011187..a9e599a0ef 100644 --- a/plugins/gmail-assets/lang/pt.json +++ b/plugins/gmail-assets/lang/pt.json @@ -40,8 +40,6 @@ "GooglePrivacy": "Huly’s use and transfer of information received from Google APIs to any other app will adhere to Google API Services User Data Policy, including the Limited Use requirements.", "EmailNotificationsDescription": "Receba notificações pessoais por e-mail.", "FailedToConnect": "O serviço Gmail não está disponível", - "TotalMessages": "Total de mensagens", - "FailedToLoadState": "Falha ao carregar o estado do Gmail", - "NotConnectedIntegration": "A conta {email} não está integrada com o espaço de trabalho" + "TotalMessages": "Total de mensagens:" } } \ No newline at end of file diff --git a/plugins/gmail-assets/lang/ru.json b/plugins/gmail-assets/lang/ru.json index d991d812d2..d97c5d1a52 100644 --- a/plugins/gmail-assets/lang/ru.json +++ b/plugins/gmail-assets/lang/ru.json @@ -40,8 +40,6 @@ "GooglePrivacy": "Использование и передача информации, полученной Huly от Google API, будет соответствовать Политике использования данных пользователей Google API, включая требования ограниченного использования.", "EmailNotificationsDescription": "Получайте персональные уведомления на электронную почту.", "FailedToConnect": "Gmail сервис недоступен", - "TotalMessages": "Всего сообщений", - "FailedToLoadState": "Не удалось загрузить состояние Gmail", - "NotConnectedIntegration": "Учетная запись {email} не интегрирована с рабочим пространством" + "TotalMessages": "Всего сообщений:" } } \ No newline at end of file diff --git a/plugins/gmail-assets/lang/zh.json b/plugins/gmail-assets/lang/zh.json index 416f151a2b..ee28973941 100644 --- a/plugins/gmail-assets/lang/zh.json +++ b/plugins/gmail-assets/lang/zh.json @@ -40,8 +40,6 @@ "GooglePrivacy": "Huly 从 Google API 接收的信息的使用和传输将遵守 Google API 服务用户数据政策,包括有限使用要求。", "EmailNotificationsDescription": "透過電子郵件接收個人通知。", "FailedToConnect": "Gmail 服务不可用", - "TotalMessages": "总消息数", - "FailedToLoadState": "无法加载 Gmail 状态", - "NotConnectedIntegration": "帐户 {email} 未与工作区集成" + "TotalMessages": "总消息数:" } } diff --git a/plugins/gmail-resources/package.json b/plugins/gmail-resources/package.json index d8dcc18bd5..467c96cd63 100644 --- a/plugins/gmail-resources/package.json +++ b/plugins/gmail-resources/package.json @@ -61,6 +61,7 @@ "@hcengineering/analytics": "^0.6.0", "@hcengineering/templates": "^0.6.11", "@hcengineering/integration-client": "^0.6.0", - "@hcengineering/account-client": "^0.6.0" + "@hcengineering/account-client": "^0.6.0", + "@hcengineering/setting-resources": "^0.6.0" } } diff --git a/plugins/gmail-resources/src/components/IntegrationState.svelte b/plugins/gmail-resources/src/components/IntegrationState.svelte index 0c09ac017e..f8e83f9021 100644 --- a/plugins/gmail-resources/src/components/IntegrationState.svelte +++ b/plugins/gmail-resources/src/components/IntegrationState.svelte @@ -14,23 +14,22 @@ --> -
-
- {#if isLoading} -
- -
- {:else if integration.workspaceUuid == null} -
- - -
- {:else if errorLabel !== undefined} -
- -
- {:else if error != null} -
- -
- {:else if state != null} -
-
- - {state.email ?? 'N/A'} -
-
- -
- {#if isRefreshing} - - {/if} - {state.totalMessages} -
-
-
+ + + {#if state?.totalMessages != null} + {/if} -
-
- - + + diff --git a/plugins/gmail-resources/src/plugin.ts b/plugins/gmail-resources/src/plugin.ts index c271f564f6..fc52d294e6 100644 --- a/plugins/gmail-resources/src/plugin.ts +++ b/plugins/gmail-resources/src/plugin.ts @@ -45,8 +45,6 @@ export default mergeIds(gmailId, gmail, { NewIncomingMessage: '' as IntlString, GooglePrivacy: '' as IntlString, FailedToConnect: '' as IntlString, - FailedToLoadState: '' as IntlString, - NotConnectedIntegration: '' as IntlString, TotalMessages: '' as IntlString } }) diff --git a/plugins/setting-assets/lang/cs.json b/plugins/setting-assets/lang/cs.json index 6db637f5d3..05955a3d38 100644 --- a/plugins/setting-assets/lang/cs.json +++ b/plugins/setting-assets/lang/cs.json @@ -191,6 +191,8 @@ "ServiceIsUnavailable": "Služba není k dispozici", "Integrated": "Integrované", "Connected": "Připojené", - "Available": "Dostupné" + "Available": "Dostupné", + "NotConnectedIntegration": "Účet {account} není integrován s pracovním prostorem", + "IntegrationIsUnstable": "Služba integrace má problémy. Některé funkce nemusí fungovat správně." } } diff --git a/plugins/setting-assets/lang/de.json b/plugins/setting-assets/lang/de.json index 7171f51fe0..f27162dd75 100644 --- a/plugins/setting-assets/lang/de.json +++ b/plugins/setting-assets/lang/de.json @@ -193,6 +193,8 @@ "ServiceIsUnavailable": "Dienst ist nicht verfügbar", "Integrated": "Integriert", "Connected": "Verbunden", - "Available": "Verfügbar" + "Available": "Verfügbar", + "NotConnectedIntegration": "Das Konto {account} ist nicht mit dem Arbeitsbereich integriert", + "IntegrationIsUnstable": "Der Integrationsdienst hat Probleme. Einige Funktionen funktionieren möglicherweise nicht richtig." } } diff --git a/plugins/setting-assets/lang/en.json b/plugins/setting-assets/lang/en.json index 0944fd937b..ac15970647 100644 --- a/plugins/setting-assets/lang/en.json +++ b/plugins/setting-assets/lang/en.json @@ -193,6 +193,8 @@ "ServiceIsUnavailable": "Service is unavailable", "Integrated": "Integrated", "Connected": "Connected", - "Available": "Available" + "Available": "Available", + "NotConnectedIntegration": "The account {account} is not integrated with the workspace", + "IntegrationIsUnstable": "Integration service is experiencing issues. Some features may not work properly." } } diff --git a/plugins/setting-assets/lang/es.json b/plugins/setting-assets/lang/es.json index 361e72bdc0..2f93471af5 100644 --- a/plugins/setting-assets/lang/es.json +++ b/plugins/setting-assets/lang/es.json @@ -184,6 +184,8 @@ "ServiceIsUnavailable": "El servicio no está disponible", "Integrated": "Integrado", "Connected": "Conectado", - "Available": "Disponible" + "Available": "Disponible", + "NotConnectedIntegration": "La cuenta {account} no está integrada con el espacio de trabajo", + "IntegrationIsUnstable": "El servicio de integración está experimentando problemas. Algunas funciones pueden no funcionar correctamente." } } diff --git a/plugins/setting-assets/lang/fr.json b/plugins/setting-assets/lang/fr.json index ede49e36a6..0ff0ac52c8 100644 --- a/plugins/setting-assets/lang/fr.json +++ b/plugins/setting-assets/lang/fr.json @@ -193,6 +193,8 @@ "ServiceIsUnavailable": "Le service n'est pas disponible", "Integrated": "Intégré", "Connected": "Connecté", - "Available": "Disponible" + "Available": "Disponible", + "NotConnectedIntegration": "Le compte {account} n'est pas intégré au workspace", + "IntegrationIsUnstable": "Le service d'intégration rencontre des problèmes. Certaines fonctionnalités peuvent ne pas fonctionner correctement." } } diff --git a/plugins/setting-assets/lang/it.json b/plugins/setting-assets/lang/it.json index e4967496b7..6bd027ae84 100644 --- a/plugins/setting-assets/lang/it.json +++ b/plugins/setting-assets/lang/it.json @@ -193,6 +193,8 @@ "ServiceIsUnavailable": "Il servizio non è disponibile", "Integrated": "Integrato", "Connected": "Connesso", - "Available": "Disponibile" + "Available": "Disponibile", + "NotConnectedIntegration": "L'account {account} non è integrato con il workspace", + "IntegrationIsUnstable": "Il servizio di integrazione sta riscontrando problemi. Alcune funzionalità potrebbero non funzionare correttamente." } } diff --git a/plugins/setting-assets/lang/ja.json b/plugins/setting-assets/lang/ja.json index 33043c748a..80833d81c5 100644 --- a/plugins/setting-assets/lang/ja.json +++ b/plugins/setting-assets/lang/ja.json @@ -193,6 +193,8 @@ "ServiceIsUnavailable": "サービスは利用できません", "Integrated": "統合済み", "Connected": "接続済み", - "Available": "利用可能" + "Available": "利用可能", + "NotConnectedIntegration": "アカウント {account} はワークスペースに統合されていません", + "IntegrationIsUnstable": "統合サービスに問題が発生しています。一部の機能が正しく動作しない可能性があります。" } } diff --git a/plugins/setting-assets/lang/pt.json b/plugins/setting-assets/lang/pt.json index f6f9a92394..ee572f5e4f 100644 --- a/plugins/setting-assets/lang/pt.json +++ b/plugins/setting-assets/lang/pt.json @@ -184,6 +184,8 @@ "ServiceIsUnavailable": "Serviço indisponível", "Integrated": "Integrado", "Connected": "Conectado", - "Available": "Disponível" + "Available": "Disponível", + "NotConnectedIntegration": "A conta {account} não está integrada com o espaço de trabalho", + "IntegrationIsUnstable": "O serviço de integração está enfrentando problemas. Algumas funcionalidades podem não funcionar corretamente." } } diff --git a/plugins/setting-assets/lang/ru.json b/plugins/setting-assets/lang/ru.json index 57d3e120ad..5fff07ce24 100644 --- a/plugins/setting-assets/lang/ru.json +++ b/plugins/setting-assets/lang/ru.json @@ -193,6 +193,8 @@ "ServiceIsUnavailable": "Сервис недоступен", "Integrated": "Интегрировано", "Connected": "Подключено", - "Available": "Доступно" + "Available": "Доступно", + "NotConnectedIntegration": "Учетная запись {account} не интегрирована с рабочим пространством", + "IntegrationIsUnstable": "Сервис интеграции испытывает проблемы. Некоторые функции могут работать некорректно." } } diff --git a/plugins/setting-assets/lang/zh.json b/plugins/setting-assets/lang/zh.json index a64a239ef7..1c9e77bde4 100644 --- a/plugins/setting-assets/lang/zh.json +++ b/plugins/setting-assets/lang/zh.json @@ -193,6 +193,8 @@ "ServiceIsUnavailable": "服务不可用", "Integrated": "已集成", "Connected": "已连接", - "Available": "可用" + "Available": "可用", + "NotConnectedIntegration": "帐户 {account} 未与工作区集成", + "IntegrationIsUnstable": "集成服务出现问题。某些功能可能无法正常工作。" } } diff --git a/plugins/setting-resources/src/components/integrations/BaseIntegrationState.svelte b/plugins/setting-resources/src/components/integrations/BaseIntegrationState.svelte new file mode 100644 index 0000000000..49b158f74c --- /dev/null +++ b/plugins/setting-resources/src/components/integrations/BaseIntegrationState.svelte @@ -0,0 +1,114 @@ + + + +
+
+ {#if isLoading && value == null} +
+ +
+ {:else if integration.workspaceUuid == null} +
+ + +
+ {:else} +
+ {#if value != null && value !== ''} +
+
+ {#if status != null} + + {:else if isLoading} + + {/if} +
+ {value} +
+ {/if} + +
+ {/if} +
+
+ + diff --git a/plugins/setting-resources/src/components/integrations/IntegrationCard.svelte b/plugins/setting-resources/src/components/integrations/IntegrationCard.svelte index 8d52793d03..0b85bd1b76 100644 --- a/plugins/setting-resources/src/components/integrations/IntegrationCard.svelte +++ b/plugins/setting-resources/src/components/integrations/IntegrationCard.svelte @@ -249,7 +249,6 @@ column-gap: 1rem; padding: 0.75rem 1rem 0.75rem; overflow: hidden; - border-radius: 0 0 1.25rem 1.25rem; background-color: var(--theme-button-default); } diff --git a/plugins/setting-resources/src/components/integrations/IntegrationStateRow.svelte b/plugins/setting-resources/src/components/integrations/IntegrationStateRow.svelte new file mode 100644 index 0000000000..61d0c4a444 --- /dev/null +++ b/plugins/setting-resources/src/components/integrations/IntegrationStateRow.svelte @@ -0,0 +1,49 @@ + + + +
+ + {#if label !== undefined} + + {#if value !== undefined} +
+ {value} +
+ {/if} +
+ + diff --git a/plugins/setting-resources/src/components/integrations/Integrations.svelte b/plugins/setting-resources/src/components/integrations/Integrations.svelte index bc55b5ac36..460634a900 100644 --- a/plugins/setting-resources/src/components/integrations/Integrations.svelte +++ b/plugins/setting-resources/src/components/integrations/Integrations.svelte @@ -152,7 +152,6 @@ lastEventTime = Date.now() // Update last event time after successful refresh } catch (err) { console.error('Error refreshing integrations:', err) - showErrorNotification(err instanceof Error ? err.message : 'Unknown error') } })() diff --git a/plugins/setting-resources/src/index.ts b/plugins/setting-resources/src/index.ts index f07f16c79e..8151e4b97a 100644 --- a/plugins/setting-resources/src/index.ts +++ b/plugins/setting-resources/src/index.ts @@ -67,6 +67,8 @@ import EditRelation from './components/EditRelation.svelte' import AddSocialId from './components/socialIds/AddSocialId.svelte' import AddEmailSocialId from './components/socialIds/AddEmailSocialId.svelte' import Mailboxes from './components/Mailboxes.svelte' +import BaseIntegrationState from './components/integrations/BaseIntegrationState.svelte' +import IntegrationStateRow from './components/integrations/IntegrationStateRow.svelte' import setting from './plugin' import { filterDescendants, getOwnerFirstName, getOwnerLastName, getOwnerPosition, getValue } from './utils' @@ -79,7 +81,9 @@ export { SpaceTypeGeneralSectionEditor, ClassHierarchy, RelationSetting, - CreateRelation + CreateRelation, + BaseIntegrationState, + IntegrationStateRow } async function DeleteMixin (object: Mixin>): Promise { diff --git a/plugins/setting/src/index.ts b/plugins/setting/src/index.ts index dfad064cd3..87fa5f55c9 100644 --- a/plugins/setting/src/index.ts +++ b/plugins/setting/src/index.ts @@ -285,7 +285,9 @@ export default plugin(settingId, { ServiceIsUnavailable: '' as IntlString, Integrated: '' as IntlString, Connected: '' as IntlString, - Available: '' as IntlString + Available: '' as IntlString, + NotConnectedIntegration: '' as IntlString, + IntegrationIsUnstable: '' as IntlString }, icon: { AccountSettings: '' as Asset, diff --git a/plugins/telegram-assets/lang/cs.json b/plugins/telegram-assets/lang/cs.json index bd2e906783..c7af0cc500 100644 --- a/plugins/telegram-assets/lang/cs.json +++ b/plugins/telegram-assets/lang/cs.json @@ -62,7 +62,7 @@ "SyncStarredChannels": "Synchronizovat označené kanály", "Public": "Veřejný", "Private": "Soukromý", - "TotalChannels": "Celkem kanálů", + "TotalChannels": "Celkem kanálů:", "SyncEnabled": "Synchronizace povolena", "SyncDisabled": "Synchronizace zakázána", "SelectAll": "Vybrat vše", @@ -72,9 +72,7 @@ "SelectAccess": "Vybrat přístup", "ConfigureIntegration": "Konfigurovat integraci", "Apply": "Použít", - "SyncedChannels": "Synchronizované kanály", - "NotConnectedIntegration": "Účet {phone} není integrován s pracovním prostorem", - "FailedToLoadState": "Nepodařilo se načíst stav integrace", + "SyncedChannels": "Synchronizované kanály:", "Type": "Typ", "SyncMode": "Režim synchronizace", "Access": "Přístup", diff --git a/plugins/telegram-assets/lang/de.json b/plugins/telegram-assets/lang/de.json index 4c538f4799..82de3af352 100644 --- a/plugins/telegram-assets/lang/de.json +++ b/plugins/telegram-assets/lang/de.json @@ -62,7 +62,7 @@ "SyncStarredChannels": "Markierte Kanäle synchronisieren", "Public": "Öffentlich", "Private": "Privat", - "TotalChannels": "Insgesamt Kanäle", + "TotalChannels": "Insgesamt Kanäle:", "SyncEnabled": "Synchronisierung aktiviert", "SyncDisabled": "Synchronisierung deaktiviert", "SelectAll": "Alle auswählen", @@ -72,9 +72,7 @@ "SelectAccess": "Zugriff auswählen", "ConfigureIntegration": "Integration konfigurieren", "Apply": "Anwenden", - "SyncedChannels": "Synchronisierte Kanäle", - "NotConnectedIntegration": "Das Konto {phone} ist nicht mit dem Arbeitsbereich integriert", - "FailedToLoadState": "Fehler beim Laden des Integrationsstatus", + "SyncedChannels": "Synchronisierte Kanäle:", "Type": "Typ", "SyncMode": "Synchronisationsmodus", "Access": "Zugriff", diff --git a/plugins/telegram-assets/lang/en.json b/plugins/telegram-assets/lang/en.json index d4ac1d7b36..0c2ff6399a 100644 --- a/plugins/telegram-assets/lang/en.json +++ b/plugins/telegram-assets/lang/en.json @@ -62,7 +62,7 @@ "SyncStarredChannels": "Sync starred channels", "Public": "Public", "Private": "Private", - "TotalChannels": "Total Channels", + "TotalChannels": "Total Channels:", "SyncEnabled": "Sync enabled", "SyncDisabled": "Sync disabled", "SelectAll": "Select all", @@ -72,9 +72,7 @@ "SelectAccess": "Select access", "ConfigureIntegration": "Configure integration", "Apply": "Apply", - "SyncedChannels": "Synchronized channels", - "NotConnectedIntegration": "The account {phone} is not integrated with the workspace", - "FailedToLoadState": "Failed to load integration state", + "SyncedChannels": "Synchronized channels:", "Type": "Type", "SyncMode": "Sync Mode", "Access": "Access", diff --git a/plugins/telegram-assets/lang/es.json b/plugins/telegram-assets/lang/es.json index 50053e10ec..8dfa1cacf8 100644 --- a/plugins/telegram-assets/lang/es.json +++ b/plugins/telegram-assets/lang/es.json @@ -62,7 +62,7 @@ "SyncStarredChannels": "Sincronizar canales marcados", "Public": "Público", "Private": "Privado", - "TotalChannels": "Total de canales", + "TotalChannels": "Total de canales:", "SyncEnabled": "Sincronización habilitada", "SyncDisabled": "Sincronización deshabilitada", "SelectAll": "Seleccionar todo", @@ -72,9 +72,7 @@ "SelectAccess": "Seleccionar acceso", "ConfigureIntegration": "Configurar integración", "Apply": "Aplicar", - "SyncedChannels": "Canales sincronizados", - "NotConnectedIntegration": "La cuenta {phone} no está integrada con el espacio de trabajo", - "FailedToLoadState": "Error al cargar el estado de la integración", + "SyncedChannels": "Canales sincronizados:", "Type": "Tipo", "SyncMode": "Modo de Sincronización", "Access": "Acceso", diff --git a/plugins/telegram-assets/lang/fr.json b/plugins/telegram-assets/lang/fr.json index 50aae58140..79f9b0cb83 100644 --- a/plugins/telegram-assets/lang/fr.json +++ b/plugins/telegram-assets/lang/fr.json @@ -62,7 +62,7 @@ "SyncStarredChannels": "Synchroniser les chaînes marquées", "Public": "Public", "Private": "Privé", - "TotalChannels": "Total des canaux", + "TotalChannels": "Total des canaux:", "SyncEnabled": "Synchronisation activée", "SyncDisabled": "Synchronisation désactivée", "SelectAll": "Sélectionner tout", @@ -72,9 +72,7 @@ "SelectAccess": "Sélectionner l'accès", "ConfigureIntegration": "Configurer l'intégration", "Apply": "Appliquer", - "SyncedChannels": "Canaux synchronisés", - "NotConnectedIntegration": "Le compte {phone} n'est pas intégré avec l'espace de travail", - "FailedToLoadState": "Échec du chargement de l'état d'intégration", + "SyncedChannels": "Canaux synchronisés:", "Type": "Type", "SyncMode": "Mode de Synchronisation", "Access": "Accès", diff --git a/plugins/telegram-assets/lang/it.json b/plugins/telegram-assets/lang/it.json index 3f06d1b296..2e495e3866 100644 --- a/plugins/telegram-assets/lang/it.json +++ b/plugins/telegram-assets/lang/it.json @@ -62,7 +62,7 @@ "SyncStarredChannels": "Sincronizza canali preferiti", "Public": "Pubblico", "Private": "Privato", - "TotalChannels": "Totale canali", + "TotalChannels": "Totale canali:", "SyncEnabled": "Sincronizzazione attivata", "SyncDisabled": "Sincronizzazione disattivata", "SelectAll": "Seleziona tutto", @@ -72,9 +72,7 @@ "SelectAccess": "Seleziona accesso", "ConfigureIntegration": "Configura integrazione", "Apply": "Applica", - "SyncedChannels": "Canali sincronizzati", - "NotConnectedIntegration": "L'account {phone} non è integrato con lo spazio di lavoro", - "FailedToLoadState": "Impossibile caricare lo stato dell'integrazione", + "SyncedChannels": "Canali sincronizzati:", "Type": "Tipo", "SyncMode": "Modalità di Sincronizzazione", "Access": "Accesso", diff --git a/plugins/telegram-assets/lang/ja.json b/plugins/telegram-assets/lang/ja.json index 51669ca895..48bcd490e9 100644 --- a/plugins/telegram-assets/lang/ja.json +++ b/plugins/telegram-assets/lang/ja.json @@ -62,7 +62,7 @@ "SyncStarredChannels": "スター付きチャンネルを同期", "Public": "公開", "Private": "非公開", - "TotalChannels": "総チャンネル数", + "TotalChannels": "総チャンネル数:", "SyncEnabled": "同期が有効", "SyncDisabled": "同期が無効", "SelectAll": "すべて選択", @@ -72,9 +72,7 @@ "SelectAccess": "アクセスを選択", "ConfigureIntegration": "統合を構成", "Apply": "適用", - "SyncedChannels": "同期されたチャンネル", - "NotConnectedIntegration": "アカウント {phone} はワークスペースと統合されていません", - "FailedToLoadState": "統合の状態を読み込めませんでした", + "SyncedChannels": "同期されたチャンネル:", "Type": "タイプ", "SyncMode": "同期モード", "Access": "アクセス", diff --git a/plugins/telegram-assets/lang/pt.json b/plugins/telegram-assets/lang/pt.json index 83edce4b4b..894a229b7c 100644 --- a/plugins/telegram-assets/lang/pt.json +++ b/plugins/telegram-assets/lang/pt.json @@ -62,7 +62,7 @@ "SyncStarredChannels": "Sincronizar canais marcados", "Public": "Público", "Private": "Privado", - "TotalChannels": "Total de canais", + "TotalChannels": "Total de canais:", "SyncEnabled": "Sincronização ativada", "SyncDisabled": "Sincronização desativada", "SelectAll": "Selecionar tudo", @@ -72,9 +72,7 @@ "SelectAccess": "Selecionar acesso", "ConfigureIntegration": "Configurar integração", "Apply": "Aplicar", - "SyncedChannels": "Canais sincronizados", - "NotConnectedIntegration": "A conta {phone} não está integrada com o espaço de trabalho", - "FailedToLoadState": "Falha ao carregar o estado da integração", + "SyncedChannels": "Canais sincronizados:", "Type": "Tipo", "SyncMode": "Modo de Sincronização", "Access": "Acesso", diff --git a/plugins/telegram-assets/lang/ru.json b/plugins/telegram-assets/lang/ru.json index 2593257b36..fa79df57f7 100644 --- a/plugins/telegram-assets/lang/ru.json +++ b/plugins/telegram-assets/lang/ru.json @@ -62,7 +62,7 @@ "SyncStarredChannels": "Синхронизировать избранные каналы", "Public": "Публичный", "Private": "Приватный", - "TotalChannels": "Всего каналов", + "TotalChannels": "Всего каналов:", "SyncEnabled": "Синхронизация включена", "SyncDisabled": "Синхронизация отключена", "SelectAll": "Выбрать все", @@ -72,9 +72,7 @@ "SelectAccess": "Выберите доступ", "ConfigureIntegration": "Настроить интеграцию", "Apply": "Применить", - "SyncedChannels": "Синхронизированные каналы", - "NotConnectedIntegration": "Аккаунт {phone} не интегрирован с пространством", - "FailedToLoadState": "Не удалось загрузить состояние интеграции", + "SyncedChannels": "Синхронизированные каналы:", "Type": "Тип", "SyncMode": "Режим синхронизации", "Access": "Доступ", diff --git a/plugins/telegram-assets/lang/zh.json b/plugins/telegram-assets/lang/zh.json index 4ef5878e80..986068a256 100644 --- a/plugins/telegram-assets/lang/zh.json +++ b/plugins/telegram-assets/lang/zh.json @@ -62,7 +62,7 @@ "SyncStarredChannels": "同步标记的频道", "Public": "公开", "Private": "私有", - "TotalChannels": "频道总数", + "TotalChannels": "频道总数:", "SyncEnabled": "同步已启用", "SyncDisabled": "同步已禁用", "SelectAll": "全选", @@ -72,9 +72,7 @@ "SelectAccess": "选择访问权限", "ConfigureIntegration": "配置集成", "Apply": "应用", - "SyncedChannels": "已同步的频道", - "NotConnectedIntegration": "帐户 {phone} 未与工作区集成", - "FailedToLoadState": "加载集成状态失败", + "SyncedChannels": "已同步的频道:", "Type": "类型", "SyncMode": "同步模式", "Access": "访问权限", diff --git a/plugins/telegram-resources/package.json b/plugins/telegram-resources/package.json index f5e9370af1..0d631732bd 100644 --- a/plugins/telegram-resources/package.json +++ b/plugins/telegram-resources/package.json @@ -53,6 +53,7 @@ "@hcengineering/platform": "^0.6.11", "@hcengineering/presentation": "^0.6.3", "@hcengineering/setting": "^0.6.17", + "@hcengineering/setting-resources": "^0.6.0", "@hcengineering/telegram": "^0.6.21", "@hcengineering/templates": "^0.6.11", "@hcengineering/text": "^0.6.5", diff --git a/plugins/telegram-resources/src/api.ts b/plugins/telegram-resources/src/api.ts index df5357a5fd..b5a06db899 100644 --- a/plugins/telegram-resources/src/api.ts +++ b/plugins/telegram-resources/src/api.ts @@ -43,6 +43,12 @@ export interface TelegramChannelConfig extends TelegramChannel { readonlyAccess?: boolean // access update is not supported for existing channels } +export interface TelegramChannelData { + telegramId: number + access?: 'public' | 'private' + enabled: boolean +} + const url = getMetadata(telegram.metadata.TelegramURL) ?? '' async function _request (method: 'GET' | 'POST' | 'DELETE', path?: string, body?: any): Promise { diff --git a/plugins/telegram-resources/src/components/Configure.svelte b/plugins/telegram-resources/src/components/Configure.svelte index 0d27314871..6551e7d4b2 100644 --- a/plugins/telegram-resources/src/components/Configure.svelte +++ b/plugins/telegram-resources/src/components/Configure.svelte @@ -418,7 +418,7 @@
-
{:else if filteredChannels.length === 0} diff --git a/plugins/telegram-resources/src/components/IntegrationState.svelte b/plugins/telegram-resources/src/components/IntegrationState.svelte index 02f4f181f9..3456f23741 100644 --- a/plugins/telegram-resources/src/components/IntegrationState.svelte +++ b/plugins/telegram-resources/src/components/IntegrationState.svelte @@ -14,13 +14,13 @@ --> -
-
- {#if isLoading} -
- -
- {:else if error} -
- -
- {:else if integration.workspaceUuid == null} -
- - -
- {:else} -
-
- - {connection?.data?.phone ?? 'N/A'} -
-
- -
- {#if isRefreshing} - - {/if} - {syncEnabledChannels} -
-
-
- - {totalChannels} -
-
+ + + {#if !isLoading} + + {/if} -
-
- - + + diff --git a/plugins/telegram-resources/src/plugin.ts b/plugins/telegram-resources/src/plugin.ts index 5d428e8c86..816d95ee20 100644 --- a/plugins/telegram-resources/src/plugin.ts +++ b/plugins/telegram-resources/src/plugin.ts @@ -58,8 +58,6 @@ export default mergeIds(telegramId, telegram, { SelectAccess: '' as IntlString, ConfigureIntegration: '' as IntlString, Apply: '' as IntlString, - NotConnectedIntegration: '' as IntlString, - FailedToLoadState: '' as IntlString, // Filter categories Type: '' as IntlString, diff --git a/services/github/github-resources/src/components/IntegrationState.svelte b/services/github/github-resources/src/components/IntegrationState.svelte index 2d0471377c..06f4a65dd7 100644 --- a/services/github/github-resources/src/components/IntegrationState.svelte +++ b/services/github/github-resources/src/components/IntegrationState.svelte @@ -13,17 +13,21 @@ // limitations under the License. --> -
-
+ + {#if githubIntegration !== undefined} -
-
- {githubIntegration.name} -
-
- {#if githubIntegration.$lookup?.repositories != null} - {#each asRepos(githubIntegration.$lookup?.repositories) as repository} -
- -
- {/each} - {/if} -
+
+ {#if githubIntegration.$lookup?.repositories != null} + {#each asRepos(githubIntegration.$lookup?.repositories) as repository} +
+ +
+ {/each} + {/if} {/if} -
-
+
+