mirror of
https://github.com/revoltchat/revite.git
synced 2024-12-26 07:22:10 -05:00
Don't show tooltip / hover when no update.
This commit is contained in:
parent
796dc467b8
commit
60d09ce747
2 changed files with 10 additions and 9 deletions
|
@ -10,6 +10,7 @@ import { ThemeContext } from "../../context/Theme";
|
||||||
import IconButton from "../ui/IconButton";
|
import IconButton from "../ui/IconButton";
|
||||||
|
|
||||||
import { updateSW } from "../../main";
|
import { updateSW } from "../../main";
|
||||||
|
import Tooltip from "./Tooltip";
|
||||||
|
|
||||||
let pendingUpdate = false;
|
let pendingUpdate = false;
|
||||||
internalSubscribe("PWA", "update", () => (pendingUpdate = true));
|
internalSubscribe("PWA", "update", () => (pendingUpdate = true));
|
||||||
|
@ -30,8 +31,14 @@ export default function UpdateIndicator({ style }: Props) {
|
||||||
|
|
||||||
if (style === "titlebar") {
|
if (style === "titlebar") {
|
||||||
return (
|
return (
|
||||||
<div onClick={() => updateSW(true)}>
|
<div class="actions">
|
||||||
<CloudDownload size={22} color={theme.success} />
|
<Tooltip
|
||||||
|
content="A new update is available!"
|
||||||
|
placement="bottom">
|
||||||
|
<div onClick={() => updateSW(true)}>
|
||||||
|
<CloudDownload size={22} color={theme.success} />
|
||||||
|
</div>
|
||||||
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,13 +75,7 @@ export function Titlebar() {
|
||||||
</svg>
|
</svg>
|
||||||
{window.native.getConfig().build === "dev" && <Wrench />}
|
{window.native.getConfig().build === "dev" && <Wrench />}
|
||||||
</div>
|
</div>
|
||||||
<div class="actions">
|
<UpdateIndicator style="titlebar" />
|
||||||
<Tooltip
|
|
||||||
content="A new update is available!"
|
|
||||||
placement="bottom">
|
|
||||||
<UpdateIndicator style="titlebar" />
|
|
||||||
</Tooltip>
|
|
||||||
</div>
|
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<div onClick={window.native.min}>
|
<div onClick={window.native.min}>
|
||||||
<Minus size={20} />
|
<Minus size={20} />
|
||||||
|
|
Loading…
Reference in a new issue