1
0
Fork 0
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:
Chaim Lev-Ari 2022-08-12 04:27:30 +03:00 committed by GitHub
parent a750259a2c
commit 92b7e64689
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 469 additions and 172 deletions

View 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());
}