-
Notifications
You must be signed in to change notification settings - Fork 744
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
release-app: breaking change dialog + cli telemetry install
- Loading branch information
1 parent
971eb2b
commit a250d71
Showing
8 changed files
with
134 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ resolver = "2" | |
|
||
|
||
[workspace.package] | ||
version = "0.2.23" | ||
version = "0.2.24" | ||
authors = ["louis030195 <[email protected]>"] | ||
description = "" | ||
repository = "https://github.com/mediar-ai/screenpipe" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72 changes: 72 additions & 0 deletions
72
screenpipe-app-tauri/components/breaking-changes-instructions-dialog.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
import React, { useEffect, useState } from "react"; | ||
import { | ||
Dialog, | ||
DialogContent, | ||
DialogDescription, | ||
DialogHeader, | ||
DialogTitle, | ||
} from "@/components/ui/dialog"; | ||
import { Button } from "@/components/ui/button"; | ||
import { Trash2 } from "lucide-react"; | ||
import localforage from "localforage"; | ||
|
||
export function BreakingChangesInstructionsDialog() { | ||
const [open, setOpen] = useState(false); | ||
const [hasShownDialog, setHasShownDialog] = useState(false); | ||
const [hasPipes, setHasPipes] = useState(false); | ||
|
||
useEffect(() => { | ||
const init = async () => { | ||
const shown = await localforage.getItem("has-shown-delete-pipes-dialog"); | ||
setHasShownDialog(!!shown); | ||
}; | ||
init(); | ||
}, []); | ||
|
||
useEffect(() => { | ||
const checkPipes = async () => { | ||
try { | ||
const response = await fetch("http://localhost:3030/pipes/list"); | ||
const data = await response.json(); | ||
setHasPipes(data.data.length > 0); | ||
} catch (error) { | ||
console.error("failed to check pipes:", error); | ||
} | ||
}; | ||
|
||
checkPipes(); | ||
}, []); | ||
|
||
useEffect(() => { | ||
if (!hasShownDialog && hasPipes) { | ||
setOpen(true); | ||
localforage.setItem("has-shown-delete-pipes-dialog", true); | ||
} | ||
}, [hasShownDialog, hasPipes]); | ||
|
||
if (!hasPipes) return null; | ||
|
||
return ( | ||
<Dialog open={open} onOpenChange={setOpen}> | ||
<DialogContent className="sm:max-w-[425px]"> | ||
<DialogHeader> | ||
<DialogTitle className="flex gap-2 items-center"> | ||
<Trash2 className="h-5 w-5" /> | ||
major update: please reinstall all pipes | ||
</DialogTitle> | ||
<DialogDescription> | ||
we've made significant changes to the pipe system. to ensure | ||
everything works correctly, please delete all your existing pipes | ||
and reinstall them. you can do this by clicking the trash icon in | ||
the pipe store. | ||
</DialogDescription> | ||
</DialogHeader> | ||
<div className="flex justify-end"> | ||
<Button variant="outline" onClick={() => setOpen(false)}> | ||
got it | ||
</Button> | ||
</div> | ||
</DialogContent> | ||
</Dialog> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters