feat(react, core): restructure some files and make hopefully something work

This commit is contained in:
purple 2023-12-28 21:45:00 +01:00
parent be8b72c637
commit ba00d57dc2
4 changed files with 10 additions and 7 deletions

View file

@ -592,8 +592,9 @@ if [[ ( $2 == "-i" ) || ( $2 == "-install" ) ]]; then VCMD="y"
eval "$(parse_yaml .blueprint/tmp/"$n"/"$dashboard_components"/components.yml comp_)"
# assign variables to component items
extendNavigationBar="@/blueprint/extensions/${identifier}/${comp_extendNavigationBar}"
echo "${extendNavigationBar}"
extendNavigationBarItems="@/blueprint/extensions/${identifier}/${comp_extendNavigationBarItems}"
sed -i "s~""/* blueprint/import */""~""/* blueprint/import */import ${identifier}Component from '$extendNavigationBarItems';""~g"
else
# warn about missing components.yml file
@ -814,11 +815,11 @@ if [[ ( $2 == "-i" ) || ( $2 == "-install" ) ]]; then VCMD="y"
fi
if [[ $YARN == "y" ]]; then
if [[ ( ! $F_developerIgnoreRebuild ) || ( $dev != true ) ]]; then
if [[ ( $F_developerIgnoreRebuild ) && ( $dev == true ) ]]; then
log_yellow "[WARNING] Rebuilding skipped due to 'developerIgnoreRebuild' flag being present."
else
log_bright "[INFO] Rebuilding panel.."
yarn run build:production
else
log_yellow "[WARNING] Rebuilding skipped due to 'developerIgnoreRebuild' flag being present."
fi
fi

View file

@ -2,6 +2,7 @@ import React from 'react';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faPuzzlePiece } from '@fortawesome/free-solid-svg-icons';
import Tooltip from '@/components/elements/tooltip/Tooltip';
/* blueprint/import */
export default () => {
return (
@ -11,6 +12,7 @@ export default () => {
<FontAwesomeIcon icon={faPuzzlePiece} />
</div>
</Tooltip>
{/* blueprint/react */}
</>
);
};

View file

@ -12,7 +12,7 @@ import http from '@/api/http';
import SpinnerOverlay from '@/components/elements/SpinnerOverlay';
import Tooltip from '@/components/elements/tooltip/Tooltip';
import Avatar from '@/components/Avatar';
import ExtendedNavigation from '@/blueprint/components/ExtendedNavigation'; // blueprint/ExtendedNavigation
import BlueprintNavigationItems from '@/blueprint/components/NavigationBar/Items';
const RightNavigation = styled.div`
& > a,
@ -74,7 +74,7 @@ export default () => {
</a>
</Tooltip>
)}
<ExtendedNavigation />
<BlueprintNavigationItems />
<Tooltip placement={'bottom'} content={'Account Settings'}>
<NavLink to={'/account'}>
<span className={'flex items-center w-5 h-5'}>