Fixed styling on update notice. Added private mode.

This commit is contained in:
Mike Cao 2024-03-29 11:48:12 -07:00
parent 314bbee717
commit dd88b1d901
6 changed files with 16 additions and 6 deletions

View file

@ -1,14 +1,17 @@
.notice {
position: absolute;
display: flex;
justify-content: space-between;
width: 100%;
max-width: 800px;
gap: 20px;
margin: 80px auto;
margin: 60px auto;
align-self: center;
background: var(--base50);
padding: 20px;
border: 1px solid var(--base300);
border-radius: var(--border-radius);
z-index: var(--z-index-popup);
z-index: 9999;
box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.1);
}

View file

@ -4,9 +4,9 @@ import { Button } from 'react-basics';
import { setItem } from 'next-basics';
import useStore, { checkVersion } from 'store/version';
import { REPO_URL, VERSION_CHECK } from 'lib/constants';
import styles from './UpdateNotice.module.css';
import { useMessages } from 'components/hooks';
import { usePathname } from 'next/navigation';
import styles from './UpdateNotice.module.css';
export function UpdateNotice({ user, config }) {
const { formatMessage, labels, messages } = useMessages();
@ -16,8 +16,9 @@ export function UpdateNotice({ user, config }) {
const allowUpdate =
user?.isAdmin &&
!config?.updatesDisabled &&
!config?.cloudMode &&
!pathname.includes('/share/') &&
!process.env.cloudMode &&
!process.env.privateMode &&
!dismissed;
const updateCheck = useCallback(() => {