Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Apply filter to all SVGs #46

Merged
merged 1 commit into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion frontend/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@
color: #888;
}

html.dark .svg-display {
html.dark .svg-display svg {
filter: hue-rotate(180deg) invert(80%) saturate(200%);
}

html.dark .icon svg {
filter: none;
}
8 changes: 4 additions & 4 deletions frontend/src/components/InstanceView.jsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Copyright DB InfraGO AG and contributors
// SPDX-License-Identifier: Apache-2.0

import { Printer } from 'lucide-react';
import { useEffect, useRef, useState } from 'react';
import { AppInfo } from './AppInfo';
import { SVGDisplay } from './SVGDisplay';
import { Spinner } from './Spinner';
import { Printer } from 'lucide-react';
import { AppInfo } from './AppInfo';

export const InstanceView = ({ templateName, objectID, endpoint }) => {
const [details, setDetails] = useState([]);
Expand Down Expand Up @@ -72,7 +72,7 @@ export const InstanceView = ({ templateName, objectID, endpoint }) => {
ref={contentRef}
className="html-content scrollbar scrollbar-track-gray-200
scrollbar-thumb-gray-400 dark:scrollbar-track-custom-dark-3
dark:scrollbar-thumb-slate-600 mb-4 rounded-lg border-4
dark:scrollbar-thumb-slate-600 svg-display mb-4 rounded-lg border-4
border-transparent bg-gray-100 p-8 text-gray-700 shadow-lg
hover:border-gray-300 hover:shadow-md dark:bg-custom-dark-2
dark:text-gray-100 dark:shadow-dark md:w-[210mm] print:m-0
Expand All @@ -83,7 +83,7 @@ export const InstanceView = ({ templateName, objectID, endpoint }) => {
<div className="fixed hidden md:-ml-14 md:-mt-6 md:block">
<div
onClick={() => window.print()}
className="flex cursor-pointer items-center justify-center
className="icon flex cursor-pointer items-center justify-center
rounded-full bg-custom-blue p-2 text-white transition-colors
duration-700 ease-in-out hover:bg-custom-blue-hover">
<Printer></Printer>
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/components/Lightbox.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Copyright DB InfraGO AG and contributors
// SPDX-License-Identifier: Apache-2.0

import { useEffect, useState } from 'react';
import { TransformWrapper, TransformComponent } from 'react-zoom-pan-pinch';
import { Printer, XIcon } from 'lucide-react';
import { useEffect, useState } from 'react';
import { TransformComponent, TransformWrapper } from 'react-zoom-pan-pinch';
import { LightboxButton } from './LightboxButton';

export const Lightbox = ({ onClose, imageSource }) => {
Expand Down Expand Up @@ -59,8 +59,8 @@ export const Lightbox = ({ onClose, imageSource }) => {
<div className="z-50 flex flex-col items-center justify-center">
<div
id="control-bar"
className="fixed top-0 z-50 flex w-screen justify-center bg-black
py-4 print:hidden">
className="icon fixed top-0 z-50 flex w-screen justify-center
bg-black py-4 print:hidden">
<LightboxButton onClick={() => window.print()} className="mr-4">
<Printer />
</LightboxButton>
Expand Down
Loading