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

appviews: compat fixes for catalina 2.5.0 ui changes #413

Merged
merged 1 commit into from
Nov 15, 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
2 changes: 1 addition & 1 deletion appviews/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@
"x-exec": "^1.2.0"
},
"browserslist": [
"Safari > 14"
"Safari > 13"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this fixed the background-clip: text issue by producing -webkit-background-clip css

]
}
10 changes: 9 additions & 1 deletion appviews/src/MenuBar/states/connected/Buttons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,23 @@ interface WhiteBtnProps {
icon?: string;
onClick(): void;
pinging?: boolean;
className?: string;
}

export const White: React.FC<WhiteBtnProps> = ({ children, icon, onClick, pinging }) => (
export const White: React.FC<WhiteBtnProps> = ({
children,
icon,
onClick,
pinging,
className,
}) => (
<button
onClick={onClick}
className={cx(
`group bg-gradient-to-b from-white dark:from-black/50 to-white/70 dark:to-black font-medium rounded-xl group transition-[background-color,transform] active:bg-white/60 duration-100 shadow active:scale-95 cursor-default dark:text-white dark:shadow-black/50 dark:border-t dark:border-white/40 flex justify-center items-center relative`,
children && `px-4 py-1`,
icon && !children && `w-8 h-8`,
className,
)}
>
{pinging && (
Expand Down
9 changes: 6 additions & 3 deletions appviews/src/MenuBar/states/connected/PauseDowntimeModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const PauseDowntimeModal: React.FC<Props> = ({ open, emit, dispatch }) => (
<>
<div
className={cx(
`bg-white/50 dark:bg-white/10 backdrop-blur shadow-lg absolute z-20 px-3 py-2 rounded-xl w-80 transition-[opacity,transform] duration-300`,
`bg-white/50 dark:bg-white/10 shadow-lg absolute z-20 px-3 py-2 rounded-xl w-80 transition-[opacity,transform] duration-300`,
Copy link
Collaborator Author

@jaredh159 jaredh159 Nov 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this class was causing the bug shown here in catalina. i couldn't see any visible effect from removing it either, so hopefully it's ok.

Screenshot 2024-11-14 at 12 48 58 PM

!open && `pointer-events-none opacity-0 translate-y-32 scale-0 -translate-x-32`,
)}
>
Expand All @@ -26,18 +26,21 @@ const PauseDowntimeModal: React.FC<Props> = ({ open, emit, dispatch }) => (
<i className="fa fa-times text-black/40 dark:text-white/70 text-sm bg-black/10 dark:bg-white/10 w-5 h-5 rounded-full flex justify-center items-center hover:bg-black/20 dark:hover:bg-white/20 hover:scale-110 active:bg-black/30 dark:active:bg-white/30 active:scale-95 transition-[background-color,transform] duration-200" />
</button>
</header>
<div className="flex flex-wrap justify-center gap-2 py-4">
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here's the gap i had to replace

<div className="flex flex-wrap justify-center py-4">
<Btn.White
className="mx-1 mb-2"
onClick={() => emit({ case: `pauseDowntimeClicked`, duration: `tenMinutes` })}
>
10 minutes
</Btn.White>
<Btn.White
className="mx-1 mb-2"
onClick={() => emit({ case: `pauseDowntimeClicked`, duration: `oneHour` })}
>
1 hour
</Btn.White>
<Btn.White
className="mx-1 mb-2"
onClick={() => emit({ case: `pauseDowntimeClicked`, duration: `oneDay` })}
>
Until next downtime
Expand All @@ -46,7 +49,7 @@ const PauseDowntimeModal: React.FC<Props> = ({ open, emit, dispatch }) => (
</div>
<div
className={cx(
`absolute w-full h-full top-0 left-0 z-10 transition-colors, duration-300`,
`absolute w-full h-full top-0 left-0 bottom-0 right-0 z-10 transition-colors, duration-300`,
open ? `bg-black/[15%]` : `bg-transparent pointer-events-none`,
)}
onClick={() => dispatch({ type: `toggleShowingDowntimePauseDuration` })}
Expand Down