fix core
routes
: Ongoing attempts to fix routes on the server-management side on Pterodactyl and fix a bug regarding flags upon extension installation.
This commit is contained in:
parent
1afccdd191
commit
9106ead924
3 changed files with 7 additions and 9 deletions
|
@ -449,10 +449,8 @@ if [[ ( $2 == "-i" ) || ( $2 == "-install" ) ]]; then VCMD="y"
|
|||
fi
|
||||
|
||||
# Assign variables to extension flags.
|
||||
if [[ $flags != "" ]]; then
|
||||
PRINT INFO "Reading and assigning extension flags.."
|
||||
assignflags
|
||||
fi
|
||||
PRINT INFO "Reading and assigning extension flags.."
|
||||
assignflags
|
||||
|
||||
# Force http/https url scheme for extension website urls.
|
||||
if [[ $website != "" ]]; then
|
||||
|
@ -874,7 +872,7 @@ if [[ ( $2 == "-i" ) || ( $2 == "-install" ) ]]; then VCMD="y"
|
|||
elif [[ $COMPONENTS_ROUTE_TYPE == "server" ]]; then
|
||||
# Server routes
|
||||
COMPONENTS_IMPORT="import $COMPONENTS_ROUTE_IDEN from '@/blueprint/extensions/$identifier/$COMPONENTS_ROUTE_COMP';"
|
||||
COMPONENTS_ROUTE="{ path: '$COMPONENTS_ROUTE_PATH', name: '$COMPONENTS_ROUTE_NAME', component: $COMPONENTS_ROUTE_IDEN, permission: null, },"
|
||||
COMPONENTS_ROUTE="{ path: '$COMPONENTS_ROUTE_PATH', permission: null, name: '$COMPONENTS_ROUTE_NAME', component: $COMPONENTS_ROUTE_IDEN, },"
|
||||
|
||||
sed -i "s~/\* \[import] \*/~/* [import] */""$COMPONENTS_IMPORT""~g" $ImportConstructor
|
||||
sed -i "s~/\* \[routes] \*/~/* [routes] */""$COMPONENTS_ROUTE""~g" $ServerRouteConstructor
|
||||
|
|
|
@ -4,7 +4,7 @@ import React from 'react';
|
|||
|
||||
interface ExtendedRouteDefinition { path: string; name: string | undefined; component: React.ComponentType; exact?: boolean; }
|
||||
interface ExtendedServerRouteDefinition extends ExtendedRouteDefinition { permission: string | string[] | null; }
|
||||
interface Routes { account: ExtendedRouteDefinition[]; server: ExtendedServerRouteDefinition[]; }
|
||||
interface ExtendedRoutes { account: ExtendedRouteDefinition[]; server: ExtendedServerRouteDefinition[]; }
|
||||
|
||||
export default {
|
||||
account: [
|
||||
|
@ -13,4 +13,4 @@ export default {
|
|||
server: [
|
||||
/* routes/server */
|
||||
],
|
||||
} as Routes;
|
||||
} as ExtendedRoutes;
|
|
@ -69,8 +69,8 @@ export default () => {
|
|||
<>
|
||||
<CSSTransition timeout={150} classNames={'fade'} appear in>
|
||||
<SubNavigation>
|
||||
<BeforeSubNavigation />
|
||||
<div>
|
||||
<BeforeSubNavigation />
|
||||
<NavigationLinks />
|
||||
<AdditionalServerItems />
|
||||
{rootAdmin && (
|
||||
|
@ -79,8 +79,8 @@ export default () => {
|
|||
<FontAwesomeIcon icon={faExternalLinkAlt} />
|
||||
</a>
|
||||
)}
|
||||
<AfterSubNavigation />
|
||||
</div>
|
||||
<AfterSubNavigation />
|
||||
</SubNavigation>
|
||||
</CSSTransition>
|
||||
<InstallListener />
|
||||
|
|
Loading…
Reference in a new issue