mirror of
https://github.com/umami-software/umami.git
synced 2026-02-13 17:15:37 +01:00
Converted variables to be runtime.
This commit is contained in:
parent
b6862de2be
commit
5b6292dd11
11 changed files with 46 additions and 36 deletions
|
|
@ -13,13 +13,14 @@ export function UpdateNotice({ user, config }) {
|
|||
const { latest, checked, hasUpdate, releaseUrl } = useStore();
|
||||
const pathname = usePathname();
|
||||
const [dismissed, setDismissed] = useState(checked);
|
||||
|
||||
const allowUpdate =
|
||||
process.env.NODE_ENV === 'production' &&
|
||||
user?.isAdmin &&
|
||||
!config?.updatesDisabled &&
|
||||
!config?.privateMode &&
|
||||
!pathname.includes('/share/') &&
|
||||
!process.env.cloudMode &&
|
||||
!process.env.privateMode &&
|
||||
!dismissed;
|
||||
|
||||
const updateCheck = useCallback(() => {
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ export function LanguageSetting() {
|
|||
const [search, setSearch] = useState('');
|
||||
const { formatMessage, labels } = useMessages();
|
||||
const { locale, saveLocale } = useLocale();
|
||||
|
||||
const options = search
|
||||
? Object.keys(languages).filter(n => {
|
||||
return (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue