merge: integrate dev branch (v1.56.0), resolve all conflicts
Resolves 15 conflicted files from dev merge: - Version bumps to v1.56.0, pnpm 10.32.0, turbo 2.8.15 - New integrations: tracearr (from dev) - New widgets: tracearr (from dev) - Updated dependencies: mysql2, typescript-eslint, isomorphic-dompurify - Keeps our custom server changes: esbuild, fastify, cron-job-api deps - Keeps our docker:test scripts and APPROACHES.md Co-authored-by: ajnart <49837342+ajnart@users.noreply.github.com>
This commit is contained in:
1 parent
deb9916d2d
commit
ed249ce7eb
74 files changed
+3449
-611
No files matched your search
@@ -22,6 +22,7 @@ import { IconUpload } from "@tabler/icons-react";
|
||||
|
||||
import { clientApi } from "@homarr/api/client";
|
||||
import { useSession } from "@homarr/auth/client";
|
||||
import { supportedLanguages } from "@homarr/translation";
|
||||
import { useScopedI18n } from "@homarr/translation/client";
|
||||
|
||||
import { UploadMedia } from "../upload-media/upload-media";
|
||||
@@ -137,7 +138,9 @@ export const IconPicker = ({
|
||||
<InputBase
|
||||
flex={1}
|
||||
rightSection={<Combobox.Chevron />}
|
||||
leftSection={previewUrl ? <img src={previewUrl} alt="" style={{ width: 20, height: 20 }} /> : null}
|
||||
leftSection={
|
||||
shouldShowPreview(previewUrl) ? <img src={previewUrl} alt="" style={{ width: 20, height: 20 }} /> : null
|
||||
}
|
||||
value={search}
|
||||
onChange={(event) => {
|
||||
combobox.openDropdown();
|
||||
@@ -204,3 +207,11 @@ export const IconPicker = ({
|
||||
</Combobox>
|
||||
);
|
||||
};
|
||||
|
||||
// This regex is used to prevent loading a preview like en or /en which would trigger a language change
|
||||
// See https://github.com/homarr-labs/homarr/issues/3070
|
||||
const localizationPathRegex = new RegExp(`^/?(${supportedLanguages.join("|")})(/.*)?$`, "i" /* ignore casing */);
|
||||
const shouldShowPreview = (value: string | null): value is string => {
|
||||
if (!value) return false;
|
||||
return !localizationPathRegex.test(value);
|
||||
};
|
||||
Reference in new issue
Block a user