Files
2024-12-24 10:33:18 +01:00

184 lines
6.4 KiB
Plaintext

Hey Bagou450 Thanks for your purchase
First upload content of panel files folder.
2.1 - In resources/scripts/routers/ServerRouter.tsx after "import { useLocation } from 'react-router';
" add :
import McPluginsContainer from '@/components/server/mcplugins/McPluginsContainer';
2.2 - In same file above " const rootAdmin = useStoreState(state => state.user.data!.rootAdmin);" add :
const nestId = ServerContext.useStoreState(state => state.server.data?.nestId);
2.3 - In same file after :
"
<Can action={'user.*'}>
<NavLink to={`${match.url}/users`}>Users</NavLink>
</Can>
"
Add :
{nestId === 1 &&
<Can action={'mcplugins.*'}>
<NavLink to={`${match.url}/plugins/Spigot/1/4`}>Plugins</NavLink>
</Can>
}
2.4 - In same file adter :
"
<Route path={`${match.path}/schedules/:id`} exact>
<ScheduleEditContainer/>
</Route>
"
add :
{nestId === 1 &&
<Route path={`${match.path}/plugins/:name/:type/:category`} exact>
<RequireServerPermission permissions={'plugins.*'}>
<McPluginsContainer/>
</RequireServerPermission>
</Route>
}
5.1 - In resources/scripts/api/server/getServer.ts under allocations: Allocation[]; add :
nestId: number;
5.2 - In same file after "allocations: ((data.relationships?.allocations as FractalResponseList | undefined)?.data || []).map(rawDataToServerAllocation)," add
nestId: data.nest_id,
6 - In resources/views/layouts/admin.blade.php above "<li class="header">MANAGEMENT</li>" add :
<li class="{{ ! starts_with(Route::currentRouteName(), 'admin.bagoulicense') ?: 'active' }}">
<a href="{{ route('admin.bagoulicense')}}">
<i class="fa fa-paint-brush"></i> <span>Bagou license</span>
</a>
</li>
7 -
8.1 - In resources/scripts/components/elements/Pagination.tsx after "showGoToFirst?: boolean;" add :
customcss?: TwStyle;
8.2 - In same file remplace "<div css={tw`mt-4 flex justify-center`}>" by :
<div css={customcss ? customcss : tw`mt-4 flex justify-center`}>
8.3 - In same file replace "import tw from 'twin.macro';" by :
import tw, { TwStyle } from 'twin.macro';
8.4 - In same file replace "function Pagination<T>({ data: { items, pagination }, onPageSelect, children }: Props<T>) {" by:
function Pagination<T>({ data: { items, pagination }, onPageSelect, customcss, children }: Props<T>) {
9 - In app/Transformers/Api/Client/ServerTransformer.php under "'is_transferring' => !is_null($server->transfer)" add :
'nest_id' => $server->nest_id,
10 - In app/Models/Permission.php above "// Controls permissions for editing or viewing a server's startup parameters." add :
'plugins' => [
'description' => 'This part is about the plugins tab (Minecraft only). ',
'keys' => [
'version' => 'Allows the user to install plugins through the plugins tab (Minecraft only).',
],
],
11 - In routes/api-client.php above "Route::group(['prefix' => '/settings'], function () {" add :
Route::group(['prefix' => '/plugins'], function () {
Route::get('/', 'Servers\McPluginsController@plugins');
Route::post('/install', 'Servers\McPluginsController@install');
Route::post('/uninstall', 'Servers\McPluginsController@uninstall');
});
Route::group(['prefix' => '/plugins'], function () {
Route::get('/', 'Servers\McPluginsController@plugins');
Route::get('/getVersions', 'Servers\McPluginsController@getVersions');
Route::get('/getMcVersions', 'Servers\McPluginsController@getMcVersions');
Route::post('/install', 'Servers\McPluginsController@install');
Route::post('/uninstall', 'Servers\McPluginsController@uninstall');
});
12 - In routes/admin.php at end of file add :
/*
|--------------------------------------------------------------------------
| Bagou License Center Routes
|--------------------------------------------------------------------------
|
| Endpoint: /admin/bagoucenter
|
*/
Route::group(['prefix' => 'bagoucenter'], function () {
Route::get('/', 'Bagou\BagouCenterController@index')->name('admin.bagoucenter');
Route::get('/license/', 'Bagou\BagouLicenseController@index')->name('admin.bagoucenter.license');
Route::get('/license/{addon}', 'Bagou\BagouLicenseController@license')->name('admin.bagoucenter.license.addon');
Route::get('/versions/', 'Bagou\BagouVersionsController@index')->name('admin.bagoucenter.versions');
Route::get('/settings', 'Bagou\BagouSettingsController@index')->name('admin.bagoucenter.settings');
Route::get('/settings/{addon}', 'Bagou\BagouSettingsController@settings')->name('admin.bagoucenter.settings.addon');
Route::get('/support/', 'Bagou\BagouCenterController@settings')->name('admin.bagoucenter.support');
Route::post('/license/{addon}', 'Bagou\BagouLicenseController@setlicense');
Route::post('/versions', 'Bagou\BagouVersionsController@refresh');
Route::delete('/license/{addon}', 'Bagou\BagouLicenseController@removelicense');
});
If you don't have yarn install it :
apt -y install curl dirmngr apt-transport-https lsb-release ca-certificates
curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -
apt -y install nodejs
cd /var/www/pterodactyl
npm i -g yarn
yarn install
And build the panel assets :
yarn build:production
chown -R www-data:www-data * #or chown -R nginx:nginx * if you use last nginx version
Add database changement:
php artisan migrate --force
After activate your addon trough bagou license tab in admin panel.
YOUR LICENSE :
FOR PTERODACTYLMARKET USERS : SELLER_DOWNLOADED
FOR A URGENT SUPPORT PLEASE CONTACT ME DIRECTLY BY SMS OR EMAIL
If you need help contact me on discord : http://discord.bagou450.com/ (or https://discord.gg/bagou450)
You don't have discord ? Send me a SMS to +33 7 56 89 00 36 (Unsurcharged number, No call)
You prefer emails? Send a email to contact@bagou450.com