Merge branch 'master' of https://github.com/inventree/InvenTree into bump-pythoner

This commit is contained in:
Matthias Mair 2026-06-24 01:45:22 +02:00
commit 306258c422
No known key found for this signature in database
GPG Key ID: A593429DDA23B66A
3 changed files with 16 additions and 9 deletions

View File

@ -222,7 +222,7 @@ jobs:
echo "Downloaded api.yaml"
- name: Running OpenAPI Spec diff action
id: breaking_changes
uses: oasdiff/oasdiff-action/diff@3530478ec30f84adedbfeb28f0d9527a290f50a9 # pin@main
uses: oasdiff/oasdiff-action/diff@5fbe96ede8d0c53aeadef122d7a0abb79152d493 # pin@main
with:
base: "api.yaml"
revision: "src/backend/InvenTree/schema.yml"
@ -363,7 +363,7 @@ jobs:
pip install .
if: needs.paths-filter.outputs.submit-performance == 'true'
- name: Performance Reporting
uses: CodSpeedHQ/action@9d332c4d90b43981c3e55ae8e38e68709996240f # pin@v4.17.0
uses: CodSpeedHQ/action@c145068895e045cc725ee76fcd2307624b65c3af # pin@v4.17.5
# check if we are in inventree/inventree - reporting only works in that OIDC context
if: github.repository == 'inventree/InvenTree' && needs.paths-filter.outputs.submit-performance == 'true'
with:
@ -454,7 +454,7 @@ jobs:
env:
node_version: '>=24'
- name: Performance Reporting
uses: CodSpeedHQ/action@9d332c4d90b43981c3e55ae8e38e68709996240f # pin@v4.17.0
uses: CodSpeedHQ/action@c145068895e045cc725ee76fcd2307624b65c3af # pin@v4.17.5
with:
mode: walltime
run: inv dev.test --pytest

View File

@ -56,7 +56,7 @@ jobs:
echo "Resetting to HEAD~"
git reset HEAD~ || true
- name: crowdin action
uses: crowdin/github-action@8868a33591d21088edfc398968173a3b98d51706 # pin@v2
uses: crowdin/github-action@52aa776766211d83d975df51f3b9c53c2f8ba35f # pin@v2
with:
upload_sources: true
upload_translations: false

View File

@ -1,5 +1,4 @@
import {
type MantineColorScheme,
type MantineColorSchemeManager,
isMantineColorScheme
} from '@mantine/core';
@ -21,10 +20,18 @@ export function localStorageColorSchemeManager({
}
try {
return (
(window.localStorage.getItem(key) as MantineColorScheme) ||
defaultValue
);
const storedValue = window.localStorage.getItem(key);
// If a value exists in storage, return it
if (storedValue && isMantineColorScheme(storedValue)) {
return storedValue;
}
// If no value, check the system preference
const systemPrefersDark = window.matchMedia(
'(prefers-color-scheme: dark)'
).matches;
return systemPrefersDark ? 'dark' : 'light';
} catch {
return defaultValue;
}