mirror of
https://github.com/portainer/portainer.git
synced 2025-07-25 08:19:40 +02:00
feat(ui/sidebar): support custom logos [EE-3753] (#7436)
* feat(ui/sidebar): show right logos
This commit is contained in:
parent
a750259a2c
commit
92b7e64689
16 changed files with 469 additions and 172 deletions
33
app/react/sidebar/Footer/UpdateNotifications.tsx
Normal file
33
app/react/sidebar/Footer/UpdateNotifications.tsx
Normal file
|
@ -0,0 +1,33 @@
|
|||
import { useQuery } from 'react-query';
|
||||
|
||||
import { getVersionStatus } from '@/portainer/services/api/status.service';
|
||||
|
||||
import styles from './UpdateNotifications.module.css';
|
||||
|
||||
export function UpdateNotification() {
|
||||
const query = useUpdateNotification();
|
||||
|
||||
if (!query.data || !query.data.UpdateAvailable) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const { LatestVersion } = query.data;
|
||||
|
||||
return (
|
||||
<div className={styles.updateNotification}>
|
||||
<a
|
||||
target="_blank"
|
||||
href={`https://github.com/portainer/portainer/releases/tag/${LatestVersion}`}
|
||||
style={{ color: '#091e5d' }}
|
||||
rel="noreferrer"
|
||||
>
|
||||
<i className="fa-lg fas fa-cloud-download-alt space-right" />A new
|
||||
version is available
|
||||
</a>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function useUpdateNotification() {
|
||||
return useQuery(['status', 'version'], () => getVersionStatus());
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue