-
Notifications
You must be signed in to change notification settings - Fork 0
DT-17: Create Preact PlatformsPage with DaisyUI table/cards #56
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
abdotop
merged 4 commits into
master
from
17-create-preact-platformspage-with-daisyui-tablecards
Aug 14, 2025
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
5b2e731
fead(ProjectsPage.tsx): Add projects page with modal and card components
abdotop 8771202
refactor(ProjectsPage.tsx): Revamp project management interface with …
abdotop 09a1d7c
feat(ProjectsPage.tsx): Add reusable components for layout, header, c…
abdotop f5b80f3
feat(env): Add environment setup script to decrypt and write .env.dev…
abdotop 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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| import { decrypt } from 'https://gistcdn.githack.com/kigiri/21df06d173fcdced5281b86ba6ac1382/raw/crypto.js' | ||
|
|
||
| const env = await decrypt( | ||
| '45641083e50bf3bc5b65dd16c16f7455367074d2c8a3ea16845704a7be6f457bde06b40740ae3456874486092d447eeae44341f5f2f53f9ed974d8182709c53a315a7942eb9699d993159aa2710de5e3eb1eaa780c832ad61c7e95e832bbfdf2ea704904c815e45ed901464ef680456f8ca7cdf561d7c4a100dad7d427383fa8ebb125f58ef4ad9c23029bcfd7a86a712dcc19ceec98e0c513cd297d43c547561f012c823790712391a5c186d9f2e52e971e2a71f4920331a00ea5532b3a6b28280c0b955fc90647dd48591ed9f782dac9fcead5709dbc0c27de142de663998040cb862f', | ||
| localStorage.password || (localStorage.password = prompt('password')), | ||
| ) | ||
|
|
||
| await Deno.writeTextFile('./.env.dev', env) |
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,63 @@ | ||
| import type { JSX } from 'preact' | ||
| import { useState } from 'preact/hooks' | ||
|
|
||
| import { navigate, url } from '../lib/router.tsx' | ||
|
|
||
| type DialogProps = { | ||
| id: string | ||
| children: preact.ComponentChildren | ||
| } & JSX.HTMLAttributes<HTMLDialogElement> | ||
|
|
||
| export const Dialog = ({ | ||
| id, | ||
| onClick, | ||
| onClose, | ||
| ...props | ||
| }: DialogProps) => { | ||
| const [dialogElem, setRef] = useState<HTMLDialogElement | null>(null) | ||
|
|
||
| const isOpen = url.params.dialog === id | ||
| if (dialogElem) { | ||
| if (!isOpen && dialogElem.open) { | ||
| dialogElem.close() | ||
| } else if (isOpen && !dialogElem.open) { | ||
| dialogElem.showModal() | ||
| } | ||
| } | ||
|
|
||
| return ( | ||
| <dialog | ||
| {...props} | ||
| id={id} | ||
| onClick={(event) => { | ||
| dialogElem === event.target && dialogElem?.close() | ||
| typeof onClick === 'function' && onClick(event) | ||
| }} | ||
| onClose={(event) => { | ||
| typeof onClose === 'function' && onClose(event) | ||
| if (!isOpen) return | ||
| navigate({ params: { dialog: null } }) | ||
| }} | ||
| ref={setRef} | ||
| > | ||
| </dialog> | ||
| ) | ||
| } | ||
|
|
||
| export const DialogModal = ({ children, ...props }: DialogProps) => { | ||
| return ( | ||
| <Dialog class='modal' {...props}> | ||
| <div class='modal-box w-auto'> | ||
| <form method='dialog'> | ||
| <button | ||
| type='submit' | ||
| class='btn btn-sm btn-circle btn-ghost absolute right-2 top-2' | ||
| > | ||
| ✕ | ||
| </button> | ||
| </form> | ||
| {children} | ||
| </div> | ||
| </Dialog> | ||
| ) | ||
| } |
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
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.
deno run -A https://gistcdn.githack.com/kigiri/21df06d173fcdced5281b86ba6ac1382/raw/mod.ts Past your secret: past your env Input your password: ... > f936ee830f54fb12e8376585c05a9df00ca12c438cb983in code: