Skip to content

Commit 0ea7f7c

Browse files
committed
Add notice about update checks querying GitHub REST API in general settings
- in settings, add notice what endpoint is queried when checking for updates - 'GitHub REST API' should be linked to https://docs.github.com/en/enterprise-server@3.20/rest/repos/repos?apiVersion=2022-11-28#list-repository-tags ├── apps │ └── editor │ └── src │ └── views │ ├── prompt │ │ └── backend │ │ ├── prompt-view-provider.ts │ │ └── utils │ │ └── check-for-updates.ts │ └── settings │ └── frontend │ ├── Home │ │ ├── Home.tsx │ │ └── sections │ │ ├── ApiSection.tsx │ │ ├── GeneralSection.tsx │ │ └── WebSection.tsx │ └── i18n │ └── translations │ ├── general.ts │ └── index.ts └── packages └── ui └── src └── components └── editor └── settings-view └── Notices ├── Notices.module.scss └── Notices.tsx
1 parent 1d5c29b commit 0ea7f7c

2 files changed

Lines changed: 44 additions & 2 deletions

File tree

‎apps/editor/src/views/settings/frontend/Home/sections/GeneralSection.tsx‎

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ import { Section as UiSection } from '@ui/components/editor/settings-view/Sectio
77
import { TextButton as UiTextButton } from '@ui/components/editor/common/TextButton'
88
import { Input as UiInput } from '@ui/components/editor/common/Input'
99
import { Textarea as UiTextarea } from '@ui/components/editor/common/Textarea'
10-
import { use_translation } from '../../i18n/use-translation'
10+
import { Notices as UiNotices } from '@ui/components/editor/settings-view/Notices'
11+
import { Translation, use_translation } from '../../i18n/use-translation'
1112
import { NavItem } from '../Home'
1213
import {
1314
PromptInstruction,
@@ -153,7 +154,30 @@ export const GeneralSection = forwardRef<HTMLDivElement, Props>(
153154
props.set_section_ref('section:general:group:updates', el)
154155
}
155156
>
156-
<UiGroup title={t('general.updates.title')}>
157+
<UiGroup
158+
title={t('general.updates.title')}
159+
notice_slot={
160+
<UiNotices
161+
notices={[
162+
{
163+
type: 'info',
164+
message: (
165+
<Translation
166+
id="general.updates.notice"
167+
components={{
168+
link: (
169+
<a href="https://docs.github.com/en/enterprise-server@3.20/rest/repos/repos?apiVersion=2022-11-28#list-repository-tags">
170+
GitHub REST API
171+
</a>
172+
)
173+
}}
174+
/>
175+
)
176+
}
177+
]}
178+
/>
179+
}
180+
>
157181
<UiItem
158182
title={t('general.updates.check-frequency.title')}
159183
description={t('general.updates.check-frequency.description')}

‎apps/editor/src/views/settings/frontend/i18n/translations/general.ts‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,24 @@ export const translations = {
1717
hu: 'Állítsa be az élményt.',
1818
bg: 'Конфигурирайте своя опит.'
1919
},
20+
'general.updates.notice': {
21+
en: 'Update checks query the {link}.',
22+
pl: 'Sprawdzanie aktualizacji wysyła zapytania do {link}.',
23+
'zh-cn': '更新检查会查询 {link}。',
24+
ja: '更新チェックは {link} をクエリします。',
25+
'zh-tw': '更新檢查會查詢 {link}。',
26+
de: 'Update-Prüfungen fragen die {link} ab.',
27+
es: 'Las comprobaciones de actualización consultan {link}.',
28+
fr: 'Les vérifications de mise à jour interrogent {link}.',
29+
'pt-br': 'As verificações de atualização consultam {link}.',
30+
ru: 'Проверки обновлений обращаются к {link}.',
31+
ko: '업데이트 확인은 {link}를 쿼리합니다.',
32+
it: 'I controlli degli aggiornamenti interrogano {link}.',
33+
tr: 'Güncelleme kontrolleri {link} sorgular.',
34+
cs: 'Kontroly aktualizací dotazují {link}.',
35+
hu: 'A frissítések ellenőrzése a {link}-t kérdezi le.',
36+
bg: 'Проверките за актуализации отправят заявки към {link}.'
37+
},
2038
'general.updates.title': {
2139
en: 'Updates',
2240
pl: 'Aktualizacje',

0 commit comments

Comments
 (0)