Skip to content

Commit

Permalink
fix: add class "noprint" to elements should not be printed (#1660)
Browse files Browse the repository at this point in the history
* fix: add class "noprint" to elements should not be printed
  • Loading branch information
WaitSpringQW authored Jan 11, 2025
1 parent c275e75 commit 6431f86
Show file tree
Hide file tree
Showing 12 changed files with 47 additions and 42 deletions.
8 changes: 4 additions & 4 deletions dist/EasyArchive/EasyArchive.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions dist/GeoLocationReader/GeoLocationReader.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions dist/MarkRights-Userpage/MarkRights-Userpage.js

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions dist/PagePatroller/PagePatroller.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions dist/QueryContributors/QueryContributors.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions dist/WhoIsActive/WhoIsActive.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions src/EasyArchive/modules/util/react.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ const elementWrap = (id: string, innerElement: ReactElement) => {

if (skin === 'citizen') {
return (
<section id={id} className={[footerNotice, 'page-info__item', 'citizen-footer__pageinfo-item']}>
<section id={id} className={[footerNotice, 'page-info__item', 'citizen-footer__pageinfo-item', 'noprint']}>
{innerElement}
</section>
);
} else if (['vector', 'vector-2022', 'gongbi'].includes(skin) || document.querySelector('ul#footer-info')) {
return (
<li id={id} className={footerNotice}>
<li id={id} className={[footerNotice, 'noprint']}>
{innerElement}
</li>
);
}
return (
<div id={id} className={footerNotice}>
<div id={id} className={[footerNotice, 'noprint']}>
{innerElement}
</div>
);
Expand Down
6 changes: 3 additions & 3 deletions src/GeoLocationReader/modules/util/appendIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ const elementWrap = (spanClass: 'green' | 'orange', innerElement: ReactElement)

if (skin === 'citizen') {
return (
<section className={[...classNames, 'page-info__item', 'citizen-footer__pageinfo-item']}>
<section className={[...classNames, 'page-info__item', 'citizen-footer__pageinfo-item', 'noprint']}>
{innerElement}
</section>
);
} else if (['vector', 'vector-2022', 'gongbi'].includes(skin) || document.querySelector('ul#footer-info')) {
return <li className={classNames}>{innerElement}</li>;
return <li className={[classNames, 'noprint']}>{innerElement}</li>;
}
return <div className={classNames}>{innerElement}</div>;
return <div className={[classNames, 'noprint']}>{innerElement}</div>;
};

const indicator = (icon: 'globe' | 'helpNotice', indicatorText: string) => {
Expand Down
6 changes: 3 additions & 3 deletions src/MarkRights-Userpage/modules/appendIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ const elementWrap = (spanClass: UserRights, innerElement: ReactElement) => {

if (skin === 'citizen') {
return (
<section className={[...classNames, 'page-info__item', 'citizen-footer__pageinfo-item']}>
<section className={[...classNames, 'page-info__item', 'citizen-footer__pageinfo-item', 'noprint']}>
{innerElement}
</section>
);
} else if (['vector', 'vector-2022', 'gongbi'].includes(skin) || document.querySelector('ul#footer-info')) {
return <li className={classNames}>{innerElement}</li>;
return <li className={[classNames, 'noprint']}>{innerElement}</li>;
}
return <div className={classNames}>{innerElement}</div>;
return <div className={[classNames, 'noprint']}>{innerElement}</div>;
};

const indicator = ({
Expand Down
6 changes: 3 additions & 3 deletions src/PagePatroller/modules/elementWrap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ const elementWrap = () => {
return (
<section
id={OPTIONS.elementId}
className={[OPTIONS.elementId, 'page-info__item', 'citizen-footer__pageinfo-item']}
className={[OPTIONS.elementId, 'page-info__item', 'citizen-footer__pageinfo-item', 'noprint']}
/>
);
} else if (['vector', 'vector-2022', 'gongbi'].includes(skin) || document.querySelector('ul#footer-info')) {
return <li id={OPTIONS.elementId} />;
return <li id={OPTIONS.elementId} className={'noprint'} />;
}
return <div id={OPTIONS.elementId} />;
return <div id={OPTIONS.elementId} className={'noprint'} />;
};

const notBeenPatrolledYet = () => (
Expand Down
9 changes: 6 additions & 3 deletions src/QueryContributors/modules/appendElement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,22 @@ const elementWrap = (innerElement: ReactElement) => {

if (skin === 'citizen') {
return (
<section id={className} className={[className, 'page-info__item', 'citizen-footer__pageinfo-item']}>
<section
id={className}
className={[className, 'page-info__item', 'citizen-footer__pageinfo-item', 'noprint']}
>
{innerElement}
</section>
);
} else if (['vector', 'vector-2022', 'gongbi'].includes(skin) || document.querySelector('ul#footer-info')) {
return (
<li id={className} className={className}>
<li id={className} className={[className, 'noprint']}>
{innerElement}
</li>
);
}
return (
<div id={className} className={className}>
<div id={className} className={[className, 'noprint']}>
{innerElement}
</div>
);
Expand Down
6 changes: 3 additions & 3 deletions src/WhoIsActive/modules/getLastActiveMarker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ function Wrapper(props: {timeSpan: TimeSpan; innerElement: React.ReactElement})

if (skin === 'citizen') {
return (
<section className={[...className, 'page-info__item', 'citizen-footer__pageinfo-item']}>
<section className={[...className, 'page-info__item', 'citizen-footer__pageinfo-item', 'noprint']}>
{innerElement}
</section>
);
} else if (['gongbi', 'vector', 'vector-2022'].includes(skin) || document.querySelector('ul#footer-info')) {
return <li className={className}>{innerElement}</li>;
return <li className={[className, 'noprint']}>{innerElement}</li>;
}

return <div className={className}>{innerElement}</div>;
return <div className={[className, 'noprint']}>{innerElement}</div>;
}

function Tag(props: {timeSpan: TimeSpan; indicator: boolean}) {
Expand Down

0 comments on commit 6431f86

Please sign in to comment.