Skip to content

Commit

Permalink
release (#22)
Browse files Browse the repository at this point in the history
* feat: enable more editor settings and editor styling improvements #4 (#19)

* feat: enable more editor settings and editor styling improvements #4

* feat: enable indent unit setting #4

* feat: enable more editor settings #4 (#20)

* fix: wonky scrollbar styles, still need to actually solve this

* feat: add client side validation for editor settings #4 (#21)

* feat: add client side validation for editor settings #4

* feat: enable font family editor setting and refactor editor settings #4

* feat: add ability to save nsec

* show npub

* refactor: remove nostr settings, add profile and relays

* dynamic relay form

* update dialog name

* fix: context menu holding stale state

---------

Co-authored-by: Jason Chiarulli <[email protected]>
  • Loading branch information
ChristianChiarulli and jchiarulli authored Jun 25, 2024
1 parent 16bc457 commit c1d47ad
Show file tree
Hide file tree
Showing 23 changed files with 1,505 additions and 240 deletions.
427 changes: 427 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"@radix-ui/react-dropdown-menu": "^2.0.6",
"@radix-ui/react-icons": "^1.3.0",
"@radix-ui/react-label": "^2.0.2",
"@radix-ui/react-popover": "^1.0.7",
"@radix-ui/react-scroll-area": "^1.0.5",
"@radix-ui/react-select": "^2.0.0",
"@radix-ui/react-separator": "^1.0.3",
Expand All @@ -37,6 +38,7 @@
"@uiw/codemirror-themes": "^4.21.24",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"cmdk": "^1.0.0",
"codemirror": "^6.0.1",
"dayjs": "^1.11.10",
"lucide-react": "^0.372.0",
Expand Down
23 changes: 18 additions & 5 deletions src-tauri/src/db/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,26 @@ pub fn insert_initial_settings(conn: &Connection) -> Result<()> {
// theme
("theme", "dark"),
// editor
("vim", "true"),
("vim", "false"),
("line_numbers", "false"),
("highlight_active_line", "false"),
("line_wrapping", "false"),
// nostr
("public_key", ""),
("private_key", ""),
("line_wrapping", "true"),
("unordered_list_bullet", "*"),
("indent_unit", "4"),
("tab_size", "4"),
("font_size", "16"),
(
"font_family",
r#"SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace"#,
),
("font_weight", "normal"),
("line_height", "1.5"),
// profile
("npub", ""),
("nsec", ""),
// relays
("relays", "[\"relay.damus.io\", \"nos.lol\"]"),

];

for (key, value) in initial_settings {
Expand Down
14 changes: 10 additions & 4 deletions src/components/context/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { GearIcon } from "@radix-ui/react-icons";
import { useAppContext } from "~/store";

export default function Login() {
const { setActivePage } = useAppContext();
const { setActivePage, settings } = useAppContext();

const handleOpenSettings = () => {
setActivePage("settings");
Expand All @@ -12,9 +12,15 @@ export default function Login() {
<div className="flex items-center gap-4 border-t bg-black/10 p-4">
<div className="flex w-full items-center justify-between">
<div className="flex flex-col gap-y-1">
<p className="text-xs font-medium leading-none text-muted-foreground">
Chris Chiarulli
</p>
{settings.npub ? (
<p className="text-xs font-medium leading-none text-muted-foreground">
{settings.npub.slice(0, 8)}...
</p>
) : (
<p className="text-xs font-medium leading-none text-muted-foreground">
Login
</p>
)}
<p className="text-xs text-muted-foreground/90">logged in</p>
</div>
<GearIcon
Expand Down
Loading

0 comments on commit c1d47ad

Please sign in to comment.