Dashboard css is now copied to resources/scripts/css

This commit is contained in:
purple 2023-08-02 13:46:05 +02:00
parent 5b2e62431a
commit 1d07c3a0a9
3 changed files with 6 additions and 7 deletions

View file

@ -412,9 +412,9 @@ if [[ ( $2 == "-i" ) || ( $2 == "-install" ) ]]; then
fi; fi;
if [[ $dashboard_css != "" ]]; then if [[ $dashboard_css != "" ]]; then
YARN="y"; YARN="y";
sed -i "s~@import url(/assets/extensions/$identifier/dashboard.style.css);~~g" resources/scripts/extensions.css; sed -i "s~@import url(/css/$identifier.css);~~g" resources/scripts/css/extensions.css;
sed -i "s~/\* client.css \*/~/\* client.css \*/\n@import url(/assets/extensions/$identifier/dashboard.style.css);~g" resources/scripts/extensions.css; sed -i "s~/\* client.css \*/~/\* client.css \*/\n@import url(/css/$identifier.css);~g" resources/scripts/css/extensions.css;
cp .blueprint/tmp/$n/$dashboard_css public/assets/extensions/$identifier/dashboard.style.css; cp .blueprint/tmp/$n/$dashboard_css resources/scripts/css/$identifier.css;
fi; fi;
if [[ $name == *"~"* ]]; then log_yellow "[WARNING] 'name' contains '~' and may result in an error.";fi; if [[ $name == *"~"* ]]; then log_yellow "[WARNING] 'name' contains '~' and may result in an error.";fi;
@ -534,7 +534,7 @@ if [[ ( $2 == "-i" ) || ( $2 == "-install" ) ]]; then
fi; fi;
chown -R www-data:www-data $FOLDER/data/extensions/$identifier; chown -R www-data:www-data $FOLDER/data/extensions/$identifier;
chmod -R +x .blueprint/data/extensions/$identifier/*; chmod -R +x .blueprint/data/extensions/*;
if [[ ( $flags == *"hasInstallScript,"* ) || ( $flags == *"hasInstallScript" ) ]]; then if [[ ( $flags == *"hasInstallScript,"* ) || ( $flags == *"hasInstallScript" ) ]]; then
log_yellow "[WARNING] This extension uses a custom installation script, proceed with caution."; log_yellow "[WARNING] This extension uses a custom installation script, proceed with caution.";
@ -648,8 +648,7 @@ if [[ ( $2 == "-r" ) || ( $2 == "-remove" ) ]]; then
# Remove dashboard css # Remove dashboard css
if [[ $dashboard_css != "" ]]; then if [[ $dashboard_css != "" ]]; then
log_bright "[INFO] Removing dashboard css.."; log_bright "[INFO] Removing dashboard css..";
sed -i "s~@import url(/assets/extensions/$identifier/dashboard.style.css);~~g" resources/scripts/extensions.css; sed -i "s~@import url(/css/$identifier.css);~~g" resources/scripts/css/extensions.css;
sed -i "s~@import url(/assets/extensions/$identifier/client.style.css);~~g" resources/scripts/extensions.css; #this removes changes made in older versions of blueprint
YARN="y"; YARN="y";
fi; fi;

View file

@ -2,7 +2,7 @@ import React from 'react';
import ReactDOM from 'react-dom'; import ReactDOM from 'react-dom';
import App from '@/components/App'; import App from '@/components/App';
import { setConfig } from 'react-hot-loader'; import { setConfig } from 'react-hot-loader';
import './extensions.css'; import './css/extensions.css';
// Enable language support. // Enable language support.
import './i18n'; import './i18n';