22import { Link } from ' @inertiajs/vue3' ;
33import Head from ' @/pages/layout/Head.vue' ;
44import { Header , Card , Panel , Table , TableRow , TableCell , Badge , Heading , Button , DocsCallout , CommandPaletteItem } from ' @ui' ;
5+ import { computed } from ' vue' ;
56
6- defineProps ([' requestError' , ' statamic' , ' addons' ]);
7+ const props = defineProps ([' requestError' , ' statamic' , ' addons' ]);
8+
9+ const criticalUpdateAvailable = computed (() => props .statamic .critical || props .addons .some (addon => addon .critical ));
710 </script >
811
912<template >
1013 <Head :title =" __('Updates')" />
1114
1215 <div class =" max-w-page mx-auto" >
13- <Header :title =" __('Updates')" icon =" updates" />
16+ <Header :title =" __('Updates')" icon =" updates" >
17+ <template #actions >
18+ <Badge v-if =" criticalUpdateAvailable" :text =" __('Critical update available')" color =" red" size =" lg" icon =" alert-warning-exclamation-mark" />
19+ </template >
20+ </Header >
1421
1522 <Card v-if =" requestError" class =" w-full space-y-4 flex items-center justify-between" >
1623 <Heading size =" lg" class =" mb-0!" :text =" __('statamic::messages.outpost_issue_try_later')" icon =" warning-diamond" />
@@ -38,7 +45,11 @@ defineProps(['requestError', 'statamic', 'addons']);
3845 </TableCell >
3946 <TableCell >{{ statamic.currentVersion }}</TableCell >
4047 <TableCell v-if =" statamic.availableUpdatesCount" class =" text-right" >
41- <Badge size =" sm" color =" amber" >{{ __n('1 update|:count updates', statamic.availableUpdatesCount) }}</Badge >
48+ <Badge
49+ size =" sm"
50+ :text =" __n('1 update|:count updates', statamic.availableUpdatesCount)"
51+ :color =" statamic.critical ? 'red' : 'amber'"
52+ />
4253 </TableCell >
4354 <TableCell v-else class =" text-right" >{{ __('Up to date') }}</TableCell >
4455 </TableRow >
@@ -63,7 +74,11 @@ defineProps(['requestError', 'statamic', 'addons']);
6374 </TableCell >
6475 <TableCell >{{ addon.version }}</TableCell >
6576 <TableCell v-if =" addon.availableUpdatesCount" class =" text-right" >
66- <Badge size =" sm" color =" amber" >{{ __n('1 update|:count updates', addon.availableUpdatesCount) }}</Badge >
77+ <Badge
78+ size =" sm"
79+ :text =" __n('1 update|:count updates', addon.availableUpdatesCount)"
80+ :color =" addon.critical ? 'red' : 'amber'"
81+ />
6782 </TableCell >
6883 <TableCell v-else class =" text-right" >{{ __('Up to date') }}</TableCell >
6984 </TableRow >
0 commit comments