diff --git a/src/App.tsx b/src/App.tsx index b898a14..92e0965 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -3848,8 +3848,8 @@ function App() { }} > = ({ diff --git a/src/components/Apps/AppViewer.tsx b/src/components/Apps/AppViewer.tsx index 38cfe71..75b468b 100644 --- a/src/components/Apps/AppViewer.tsx +++ b/src/components/Apps/AppViewer.tsx @@ -7,7 +7,14 @@ import { useQortalMessageListener } from '../../hooks/useQortalMessageListener'; import { useThemeContext } from '../Theme/ThemeContext'; import { useTranslation } from 'react-i18next'; -export const AppViewer = forwardRef( +type AppViewerProps = { + app: any; + hide: boolean; + isDevMode: boolean; + skipAuth?: boolean; +}; + +export const AppViewer = forwardRef( ({ app, hide, isDevMode, skipAuth }, iframeRef) => { const { window: frameWindow } = useFrame(); const { path, history, changeCurrentIndex, resetHistory } = @@ -54,6 +61,7 @@ export const AppViewer = forwardRef( setUrl(app.url + `&theme=${themeMode}&lang=${currentLang}`); } }, [app?.url, app?.isPreview]); + const defaultUrl = useMemo(() => { return url; }, [url, isDevMode]); diff --git a/src/components/Apps/AppViewerContainer.tsx b/src/components/Apps/AppViewerContainer.tsx index 38c017b..5f6e30d 100644 --- a/src/components/Apps/AppViewerContainer.tsx +++ b/src/components/Apps/AppViewerContainer.tsx @@ -2,15 +2,26 @@ import { forwardRef } from 'react'; import { AppViewer } from './AppViewer'; import Frame from 'react-frame-component'; -const AppViewerContainer = forwardRef( - ({ app, isSelected, hide, isDevMode, customHeight, skipAuth }, ref) => { - return ( - - - - } - style={{ - border: 'none', - height: customHeight || '100vh', - left: (!isSelected || hide) && '-200vw', - overflow: 'hidden', - position: (!isSelected || hide) && 'fixed', - width: '100%', - }} - > - - - ); - } -); + + + } + style={{ + border: 'none', + height: customHeight || '100vh', + left: (!isSelected || hide) && '-200vw', + overflow: 'hidden', + position: (!isSelected || hide) && 'fixed', + width: '100%', + }} + > + + + ); +}); export default AppViewerContainer; diff --git a/src/components/Apps/AppsDesktop.tsx b/src/components/Apps/AppsDesktop.tsx index 98dfe6d..37d7648 100644 --- a/src/components/Apps/AppsDesktop.tsx +++ b/src/components/Apps/AppsDesktop.tsx @@ -524,12 +524,12 @@ export const AppsDesktop = ({ } return ( ); })} @@ -539,20 +539,20 @@ export const AppsDesktop = ({ diff --git a/src/components/Apps/AppsNavBarDesktop.tsx b/src/components/Apps/AppsNavBarDesktop.tsx index 2eeecc6..b26391f 100644 --- a/src/components/Apps/AppsNavBarDesktop.tsx +++ b/src/components/Apps/AppsNavBarDesktop.tsx @@ -67,7 +67,7 @@ export function saveToLocalStorage(key, subKey, newValue) { export const AppsNavBarDesktop = ({ disableBack }) => { const [tabs, setTabs] = useState([]); - const [selectedTab, setSelectedTab] = useState(null); + const [selectedTab, setSelectedTab] = useState(0); const [navigationController, setNavigationController] = useAtom( navigationControllerAtom ); @@ -125,7 +125,7 @@ export const AppsNavBarDesktop = ({ disableBack }) => { const setTabsToNav = (e) => { const { tabs, selectedTab, isNewTabWindow } = e.detail?.data; setTabs([...tabs]); - setSelectedTab(!selectedTab ? null : { ...selectedTab }); + setSelectedTab(!selectedTab ? 0 : { ...selectedTab }); setIsNewTabWindow(isNewTabWindow); }; @@ -190,9 +190,7 @@ export const AppsNavBarDesktop = ({ disableBack }) => { { maxHeight: `275px`, // Ensure the tabs container fits within the available space overflow: 'hidden', // Prevents overflow on small screens }} + value={false} > {tabs?.map((tab) => ( { > { - setSelectedTab(null); + setSelectedTab(0); executeEvent('newTabWindow', {}); }} > @@ -408,7 +407,6 @@ export const AppsNavBarDesktop = ({ disableBack }) => { tabId: selectedTab?.tabId, }); } - handleClose(); }} > @@ -434,7 +432,9 @@ export const AppsNavBarDesktop = ({ disableBack }) => { color: theme.palette.text.primary, }, }} - primary="Refresh" + primary={t('core:action.refresh', { + postProcess: 'capitalizeFirstChar', + })} /> diff --git a/src/components/Apps/AppsPrivate.tsx b/src/components/Apps/AppsPrivate.tsx index 3fe611b..a353b82 100644 --- a/src/components/Apps/AppsPrivate.tsx +++ b/src/components/Apps/AppsPrivate.tsx @@ -575,7 +575,7 @@ export const AppsPrivate = ({ myName }) => { diff --git a/src/components/GlobalActions/JoinGroup.tsx b/src/components/GlobalActions/JoinGroup.tsx index aca7e1f..c28176a 100644 --- a/src/components/GlobalActions/JoinGroup.tsx +++ b/src/components/GlobalActions/JoinGroup.tsx @@ -276,8 +276,8 @@ export const JoinGroup = () => { disabled={isInGroup} > { {directs.map((direct: any) => ( ({ })); interface CustomButtonProps { - bgColor?: string; - color?: string; + customBgColor?: string; + customColor?: string; } -export const CustomButtonAccept = styled(Box)( - ({ bgColor, color, theme }) => ({ +export const CustomButtonAccept = styled(Box)((props) => { + const { customBgColor, customColor, theme } = props; + return { alignItems: 'center', - backgroundColor: bgColor || theme.palette.background.default, + backgroundColor: customBgColor || theme.palette.background.default, borderColor: theme.palette.background.paper, borderRadius: 5, borderStyle: 'solid', borderWidth: '0.5px', boxSizing: 'border-box', - color: color || theme.palette.background.default, + color: customColor || theme.palette.background.default, cursor: 'pointer', display: 'inline-flex', filter: 'drop-shadow(1px 4px 10.5px rgba(0,0,0,0.3))', @@ -163,16 +164,16 @@ export const CustomButtonAccept = styled(Box)( width: 'fit-content', '&:hover': { opacity: 1, - backgroundColor: bgColor || theme.palette.background.default, - color: color || '#fff', + backgroundColor: customBgColor || theme.palette.background.default, + color: customColor || '#fff', svg: { path: { - fill: color || '#fff', + fill: customColor || '#fff', }, }, }, - }) -); + }; +}); export const CustomInput = styled(TextField)(({ theme }) => ({ backgroundColor: theme.palette.background.default,