mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-06 17:11:55 +00:00
Don't show tooltip / hover when no update.
This commit is contained in:
@@ -10,6 +10,7 @@ import { ThemeContext } from "../../context/Theme";
|
||||
import IconButton from "../ui/IconButton";
|
||||
|
||||
import { updateSW } from "../../main";
|
||||
import Tooltip from "./Tooltip";
|
||||
|
||||
let pendingUpdate = false;
|
||||
internalSubscribe("PWA", "update", () => (pendingUpdate = true));
|
||||
@@ -30,8 +31,14 @@ export default function UpdateIndicator({ style }: Props) {
|
||||
|
||||
if (style === "titlebar") {
|
||||
return (
|
||||
<div onClick={() => updateSW(true)}>
|
||||
<CloudDownload size={22} color={theme.success} />
|
||||
<div class="actions">
|
||||
<Tooltip
|
||||
content="A new update is available!"
|
||||
placement="bottom">
|
||||
<div onClick={() => updateSW(true)}>
|
||||
<CloudDownload size={22} color={theme.success} />
|
||||
</div>
|
||||
</Tooltip>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -75,13 +75,7 @@ export function Titlebar() {
|
||||
</svg>
|
||||
{window.native.getConfig().build === "dev" && <Wrench />}
|
||||
</div>
|
||||
<div class="actions">
|
||||
<Tooltip
|
||||
content="A new update is available!"
|
||||
placement="bottom">
|
||||
<UpdateIndicator style="titlebar" />
|
||||
</Tooltip>
|
||||
</div>
|
||||
<UpdateIndicator style="titlebar" />
|
||||
<div class="actions">
|
||||
<div onClick={window.native.min}>
|
||||
<Minus size={20} />
|
||||
|
||||
Reference in New Issue
Block a user