added in admin pages to add models and parts

This commit is contained in:
2025-11-24 18:06:26 +00:00
parent f8bb195159
commit 2682308015
30 changed files with 1569 additions and 57 deletions
+42
View File
@@ -0,0 +1,42 @@
#!/bin/zsh
echo "🎨 Depth-aware SCSS variables import patcher starting..."
VARIABLES_FILE="src/app/styles/variables.scss"
if [ ! -f "$VARIABLES_FILE" ]; then
echo "❌ variables.scss not found at: $VARIABLES_FILE"
exit 1
fi
# Normalize absolute path for comparison
VARIABLES_PATH=$(realpath "$VARIABLES_FILE")
# Find all SCSS files under src/app (excluding the variables file itself)
SCSS_FILES=$(find src/app -type f -name "*.scss" ! -path "*variables.scss")
for FILE in $SCSS_FILES; do
echo "🔍 Checking: $FILE"
# Skip if already importing variables
if grep -q 'variables' "$FILE"; then
echo " ✔ Already has variables import"
continue
fi
# Compute relative path from current SCSS file directory to variables.scss
FILE_DIR=$(dirname "$FILE")
REL_PATH=$(realpath --relative-to="$FILE_DIR" "$VARIABLES_PATH")
# Convert absolute to Sass import (remove leading ./ if present)
IMPORT_PATH="${REL_PATH#./}"
echo " Adding import: @import \"$IMPORT_PATH\";"
# Prepend import to file
echo "@import \"$IMPORT_PATH\";" | cat - "$FILE" > "$FILE.tmp"
mv "$FILE.tmp" "$FILE"
done
echo "🎉 Depth-aware SCSS import patching complete!"