-
Notifications
You must be signed in to change notification settings - Fork 536
Pdf upgrade #1374
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
Merged
Merged
Pdf upgrade #1374
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
2a6e434
pdf download path changed
duckduckhero 42908cd
kind of a working version
duckduckhero e7569d2
applied pdf themes
duckduckhero 932e2d5
stablized a bit
duckduckhero 3257042
ran tests
duckduckhero b69776e
Merge branch 'main' of https://github.com/fastrepl/hyprnote into pdf-…
duckduckhero 2b4b90c
ran tests
duckduckhero d3bf8f2
commented out
duckduckhero b1469c7
ran tests
duckduckhero 050d3d7
Merge branch 'main' of https://github.com/fastrepl/hyprnote into pdf-…
duckduckhero ac1e79c
moved share button
duckduckhero 53dc10d
ran tests
duckduckhero 0f26db6
refined pdf
duckduckhero 546cac7
coderabbit
duckduckhero File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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
61 changes: 61 additions & 0 deletions
61
apps/desktop/src/components/editor-area/note-header/chips/share-chip.tsx
This file contains hidden or 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,61 @@ | ||
| import { Popover, PopoverContent, PopoverTrigger } from "@hypr/ui/components/ui/popover"; | ||
| import { Share2, TextSelect } from "lucide-react"; | ||
| import { useState } from "react"; | ||
| import { SharePopoverContent, useShareLogic } from "../share-button-header"; | ||
|
|
||
| interface ShareChipProps { | ||
| isVeryNarrow?: boolean; | ||
| } | ||
|
|
||
| export function ShareChip({ isVeryNarrow = false }: ShareChipProps) { | ||
| const [open, setOpen] = useState(false); | ||
| const { hasEnhancedNote, handleOpenStateChange } = useShareLogic(); | ||
|
|
||
| const handleOpenChange = (newOpen: boolean) => { | ||
| setOpen(newOpen); | ||
| if (hasEnhancedNote) { | ||
| handleOpenStateChange(newOpen); | ||
| } | ||
| }; | ||
|
|
||
| return ( | ||
| <Popover open={open} onOpenChange={handleOpenChange}> | ||
| <PopoverTrigger asChild> | ||
| <button | ||
| className={`flex flex-row items-center gap-1 rounded-md px-2 py-1.5 hover:bg-neutral-100 flex-shrink-0 text-xs transition-colors ${ | ||
| open ? "bg-neutral-100" : "" | ||
| }`} | ||
| > | ||
| <Share2 size={14} className="flex-shrink-0" /> | ||
| {!isVeryNarrow && <span className="truncate">Share</span>} | ||
| </button> | ||
| </PopoverTrigger> | ||
| <PopoverContent | ||
| className="w-80 p-3 focus:outline-none focus:ring-0 focus:ring-offset-0" | ||
| align="start" | ||
| sideOffset={7} | ||
| > | ||
| {hasEnhancedNote ? <SharePopoverContent /> : <SharePlaceholderContent />} | ||
| </PopoverContent> | ||
| </Popover> | ||
| ); | ||
| } | ||
|
|
||
| function SharePlaceholderContent() { | ||
| return ( | ||
| <div className="flex flex-col gap-3"> | ||
| <div className="text-sm font-medium text-neutral-700">Share Enhanced Note</div> | ||
| <div className="flex flex-col items-center justify-center py-8 px-4 text-center"> | ||
| <div className="w-12 h-12 rounded-full bg-neutral-100 flex items-center justify-center mb-4"> | ||
| <TextSelect size={24} className="text-neutral-400" /> | ||
| </div> | ||
| <h3 className="text-sm font-medium text-neutral-900 mb-2"> | ||
| Enhanced Note Required | ||
| </h3> | ||
| <p className="text-xs text-neutral-500 leading-relaxed"> | ||
| Complete your meeting to generate an enhanced note, then share it via PDF, email, Obsidian, and more. | ||
| </p> | ||
| </div> | ||
| </div> | ||
| ); | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Allowing unrestricted write-file access to the entire Downloads directory is overly permissive and could let a compromised app modify or remove any user download
Prompt for AI agents