Skip to content

Commit

Permalink
Merge pull request #14 from taterboom/feat/help-to-doc
Browse files Browse the repository at this point in the history
Feat/help to doc
  • Loading branch information
taterboom authored Sep 28, 2023
2 parents 8d7925d + 4b046cd commit 331f1e4
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 94 deletions.
5 changes: 5 additions & 0 deletions .changeset/bright-bananas-speak.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"promptsnippets": patch
---

remove helppanel and nav to doc website
79 changes: 0 additions & 79 deletions src/components/HelpPanel.tsx

This file was deleted.

13 changes: 1 addition & 12 deletions src/components/MenuPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { useEffect, useState } from "react"
import { useNew } from "../hooks/useNew"
import { usePageState } from "../store/pageState"
import { snippetsSelectors, useSnippets } from "../store/snippets"
import HelpPanel from "./HelpPanel"
import ImportAndExportPanel from "./ImportAndExportPanel"
import SettingsPanel from "./SettingsPanel"
import SnippetEditor from "./SnippetEditor"
Expand Down Expand Up @@ -128,7 +127,7 @@ function Header(props: { onCreate?: () => void }) {
<button
className="btn btn-icon btn-ghost"
onClick={() => {
usePageState.setState({ helpPanelVisible: true })
window.open("https://www.promptsnippets.top/docs/getting-started?from=extension")
}}
>
<MiCircleHelp />
Expand Down Expand Up @@ -173,7 +172,6 @@ function Header(props: { onCreate?: () => void }) {
export default function MenuPanel() {
const menuPanelVisible = usePageState((state) => state.menuPanelVisible)
const settingsPanelVisible = usePageState((state) => state.settingsPanelVisible)
const helpPanelVisible = usePageState((state) => state.helpPanelVisible)
const importAndExportPanelVisible = usePageState((state) => state.importAndExportPanelVisible)
const [snippetEditorVisible, setSnippetEditorVisible] = useState(false)
return (
Expand Down Expand Up @@ -209,15 +207,6 @@ export default function MenuPanel() {
></SettingsPanel>
)}
</AnimatePresence>
<AnimatePresence>
{helpPanelVisible && (
<HelpPanel
onClose={() => {
usePageState.setState({ helpPanelVisible: false })
}}
></HelpPanel>
)}
</AnimatePresence>
<AnimatePresence>
{importAndExportPanelVisible && (
<ImportAndExportPanel
Expand Down
1 change: 0 additions & 1 deletion src/components/SnippetsPopup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,6 @@ function SnippetsPopupInner() {

useEffect(() => {
const closePanel = (e: KeyboardEvent) => {
console.log(e.key)
if (e.key === "Escape" && document.activeElement === target) {
setVisible(false)
}
Expand Down
2 changes: 0 additions & 2 deletions src/store/pageState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ type PageState = typeof COMMON_SETTINGS & {
snippetsPopupVisible: boolean
menuPanelVisible: boolean
settingsPanelVisible: boolean
helpPanelVisible: boolean
importAndExportPanelVisible: boolean
searchText: string
selectedTags: string[]
Expand All @@ -23,7 +22,6 @@ export const usePageState = create<PageState>()((set) => ({
snippetsPopupVisible: false,
menuPanelVisible: false,
settingsPanelVisible: false,
helpPanelVisible: false,
importAndExportPanelVisible: false,
searchText: "",
selectedTags: [],
Expand Down

0 comments on commit 331f1e4

Please sign in to comment.