mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 17:15:38 +08:00
feat: enhance pre-push hook to include remote URL check and improve format check messaging
This commit is contained in:
@@ -8,12 +8,20 @@ if git diff --cached --name-only | grep -q '^src-tauri/'; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$(git rev-parse --show-toplevel)" == */clash-verge-rev/clash-verge-rev ]]; then
|
remote_name="$1"
|
||||||
|
remote_url=$(git remote get-url "$remote_name")
|
||||||
|
|
||||||
|
if [[ "$remote_url" =~ github\.com[:/]+clash-verge-rev/clash-verge-rev(\.git)?$ ]]; then
|
||||||
|
echo "[pre-push] Detected push to clash-verge-rev/clash-verge-rev ($remote_url)"
|
||||||
|
echo "[pre-push] Running pnpm format:check..."
|
||||||
|
|
||||||
pnpm format:check
|
pnpm format:check
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "Code format check failed. Please fix formatting before pushing."
|
echo "❌ Code format check failed. Please fix formatting before pushing."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
echo "[pre-push] Not pushing to target repo. Skipping format check."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
@@ -165,7 +165,8 @@ export const useCustomTheme = () => {
|
|||||||
|
|
||||||
const rootEle = document.documentElement;
|
const rootEle = document.documentElement;
|
||||||
if (rootEle) {
|
if (rootEle) {
|
||||||
const backgroundColor = mode === "light" ? "#ECECEC" : dt.background_color;
|
const backgroundColor =
|
||||||
|
mode === "light" ? "#ECECEC" : dt.background_color;
|
||||||
const selectColor = mode === "light" ? "#f5f5f5" : "#3E3E3E";
|
const selectColor = mode === "light" ? "#f5f5f5" : "#3E3E3E";
|
||||||
const scrollColor = mode === "light" ? "#90939980" : "#555555";
|
const scrollColor = mode === "light" ? "#90939980" : "#555555";
|
||||||
const dividerColor =
|
const dividerColor =
|
||||||
@@ -184,9 +185,18 @@ export const useCustomTheme = () => {
|
|||||||
alpha(muiTheme.palette.primary.main, 0.1),
|
alpha(muiTheme.palette.primary.main, 0.1),
|
||||||
);
|
);
|
||||||
// 添加CSS变量
|
// 添加CSS变量
|
||||||
rootEle.style.setProperty("--window-border-color", mode === "light" ? "#cccccc" : "#1E1E1E");
|
rootEle.style.setProperty(
|
||||||
rootEle.style.setProperty("--scrollbar-bg", mode === "light" ? "#f1f1f1" : "#2E303D");
|
"--window-border-color",
|
||||||
rootEle.style.setProperty("--scrollbar-thumb", mode === "light" ? "#c1c1c1" : "#555555");
|
mode === "light" ? "#cccccc" : "#1E1E1E",
|
||||||
|
);
|
||||||
|
rootEle.style.setProperty(
|
||||||
|
"--scrollbar-bg",
|
||||||
|
mode === "light" ? "#f1f1f1" : "#2E303D",
|
||||||
|
);
|
||||||
|
rootEle.style.setProperty(
|
||||||
|
"--scrollbar-thumb",
|
||||||
|
mode === "light" ? "#c1c1c1" : "#555555",
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
let styleElement = document.querySelector("style#verge-theme");
|
let styleElement = document.querySelector("style#verge-theme");
|
||||||
|
|||||||
@@ -502,7 +502,7 @@ const Layout = () => {
|
|||||||
className={`${OS} layout`}
|
className={`${OS} layout`}
|
||||||
style={{
|
style={{
|
||||||
borderTopLeftRadius: "0px",
|
borderTopLeftRadius: "0px",
|
||||||
borderTopRightRadius: "0px"
|
borderTopRightRadius: "0px",
|
||||||
}}
|
}}
|
||||||
onContextMenu={(e) => {
|
onContextMenu={(e) => {
|
||||||
if (
|
if (
|
||||||
|
|||||||
Reference in New Issue
Block a user