Skip to content

Commit 0939e60

Browse files
committed
Add changelog link to update available notification
- in 'update available', when expanded, show link at the bottom 'Open changelog' leading to https://github.com/robertpiosik/CodeWebChat/releases ├── apps │ └── editor │ └── src │ └── views │ └── prompt │ └── frontend │ ├── Home │ │ └── Home.tsx │ └── i18n │ └── translations │ ├── home.ts │ └── index.ts └── packages └── ui └── src └── components └── editor └── prompt-view └── UpdateAvailable ├── UpdateAvailable.module.scss ├── UpdateAvailable.tsx └── index.ts
1 parent e5e0fb6 commit 0939e60

3 files changed

Lines changed: 29 additions & 1 deletion

File tree

‎apps/editor/src/views/prompt/frontend/Home/Home.tsx‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,15 @@ export const Home: React.FC<Props> = (props) => {
188188
days: update_info.current_version_age_days.toString()
189189
}}
190190
/>
191-
) : undefined
191+
) : undefined,
192+
changelog: (
193+
<a
194+
href="https://github.com/robertpiosik/CodeWebChat/releases"
195+
onClick={(e) => e.stopPropagation()}
196+
>
197+
{t('home.update.changelog')}
198+
</a>
199+
)
192200
}}
193201
/>
194202
</div>

‎apps/editor/src/views/prompt/frontend/i18n/translations/home.ts‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,5 +268,23 @@ export const home = {
268268
cs: 'Vaše verze je stará {days} dní.',
269269
hu: 'Az Ön verziója {days} napos.',
270270
bg: 'Вашата версия е на {days} дни.'
271+
},
272+
'home.update.changelog': {
273+
en: 'Open changelog',
274+
pl: 'Otwórz dziennik zmian',
275+
'zh-cn': '打开更新日志',
276+
ja: '変更履歴を開く',
277+
'zh-tw': '開啟更新日誌',
278+
de: 'Änderungsprotokoll öffnen',
279+
es: 'Abrir registro de cambios',
280+
fr: 'Ouvrir le journal des modifications',
281+
'pt-br': 'Abrir registro de alterações',
282+
ru: 'Открыть список изменений',
283+
ko: '변경 로그 열기',
284+
it: 'Apri log delle modifiche',
285+
tr: 'Değişiklik günlüğünü aç',
286+
cs: 'Otevřít seznam změn',
287+
hu: 'Változásnapló megnyitása',
288+
bg: 'Отвори дневник на промените'
271289
}
272290
} as const

‎packages/ui/src/components/editor/prompt-view/UpdateAvailable/UpdateAvailable.tsx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ type Props = {
1111
installed_version: React.ReactNode
1212
latest_version: React.ReactNode
1313
age?: React.ReactNode
14+
changelog?: React.ReactNode
1415
}
1516
}
1617

@@ -49,6 +50,7 @@ export const UpdateAvailable: React.FC<Props> = (props) => {
4950
<span>{props.translations.installed_version}</span>
5051
<span>{props.translations.latest_version}</span>
5152
{props.translations.age && <span>{props.translations.age}</span>}
53+
{props.translations.changelog && <span>{props.translations.changelog}</span>}
5254
</div>
5355
)}
5456
</div>

0 commit comments

Comments
 (0)