From 4274bff9f00d8937fd4a1e1ba008645fadd7f135 Mon Sep 17 00:00:00 2001 From: Pigbibi <20649888+Pigbibi@users.noreply.github.com> Date: Fri, 12 Jun 2026 02:23:44 +0800 Subject: [PATCH] Stabilize design color and style checks --- GdeiAssistant-iOS/Core/DesignSystem/DSColor.swift | 2 +- Tools/check_style.sh | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/GdeiAssistant-iOS/Core/DesignSystem/DSColor.swift b/GdeiAssistant-iOS/Core/DesignSystem/DSColor.swift index db9c2b3..26f9406 100644 --- a/GdeiAssistant-iOS/Core/DesignSystem/DSColor.swift +++ b/GdeiAssistant-iOS/Core/DesignSystem/DSColor.swift @@ -21,7 +21,7 @@ enum DSColor { static let background = Color(.systemGroupedBackground) static let cardBackground = Color(.secondarySystemGroupedBackground) - static let primary = Color.accentColor + static let primary = Color(dsLight: 0x006D44, dark: 0x75DAA3) static let onPrimary = Color.white static let secondary = Color(dsLight: 0x5AC8FA, dark: 0x64D2FF) diff --git a/Tools/check_style.sh b/Tools/check_style.sh index 8b839fd..2aad103 100755 --- a/Tools/check_style.sh +++ b/Tools/check_style.sh @@ -6,7 +6,11 @@ ROOT_DIR="$(cd "$(dirname "$0")/.." && pwd)" cd "$ROOT_DIR" status=0 -swift_files="$(git ls-files | grep -E '\.swift$' || true)" +if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then + swift_files="$(git ls-files | grep -E '\.swift$' || true)" +else + swift_files="$(find . -type f -name '*.swift' | sed 's#^\./##' | sort)" +fi if [[ -z "$swift_files" ]]; then echo "No Swift files found."