Skip to content

Commit

Permalink
feat(dashboard): sign in using extension. (#11)
Browse files Browse the repository at this point in the history
* feat(dashboard): sign in using extension.

* feat(dashboard): sign in using extension.

* feat(dashboard): sign in using extension.

* feat(dashboard): sign in using extension.
  • Loading branch information
kehiy authored Jan 27, 2025
1 parent 4f51667 commit 26cdbd3
Show file tree
Hide file tree
Showing 21 changed files with 921 additions and 228 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Liniting using Eslint

on:
pull_request_target:
types:
- opened
- edited
- synchronize
pull_request_target:
types:
- opened
- edited
- synchronize

env:
NODE_VERSION: 20.12.0
Expand All @@ -14,7 +14,7 @@ jobs:
linting:
name: Linting
runs-on: ubuntu-latest
steps:
steps:
- name: Install NodeJS
uses: actions/setup-node@v4
with:
Expand All @@ -27,4 +27,4 @@ jobs:
run: npm ci

- name: Code Linting
run: npm run lint
run: npm run lint
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ npm run lint
All kind of contribution is highly welcomed.

You can contribute to source code by checking [open issues](https://github.com/dezh-tech/mongostr/issues?q=is%3Aissue%20state%3Aopen%20). Please make sure you comment on that specific issue and inform everyone that you are working on it.
You can [open an issue](https://github.com/dezh-tech/mongostr/issues/new?template=Blank+issue) to report a bug or suggest a feature.
You can [open an issue](https://github.com/dezh-tech/mongostr/issues/new?template=Blank+issue) to report a bug or suggest a feature.

Also, donations and financial support for the development process are possible using Bitcoin and Lightning:

Expand All @@ -42,7 +42,7 @@ Also, donations and financial support for the development process are possible u
bc1qa0z44j7m0v0rx85q0cag5juhxdshnmnrxnlr32
```

**lightning**:
**lightning**:

```
[email protected]
Expand Down
3 changes: 3 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,8 @@ export default ts.config(
parser: ts.parser
}
}
},
{
ignores: ['src/lib/components/ui']
}
);
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
"vite": "^6.0.0"
},
"dependencies": {
"@nostr-dev-kit/ndk": "^2.11.0",
"@nostr-dev-kit/ndk-cache-nostr": "^0.1.8",
"@nostr-dev-kit/ndk-svelte": "^2.4.0",
"@sveltejs/adapter-static": "^3.0.8",
"all": "^0.0.0",
"mode-watcher": "^0.5.1"
Expand Down
25 changes: 13 additions & 12 deletions src/lib/components/ui/badge/index.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
import { tv } from 'tailwind-variants';
export { default as Badge } from './badge.svelte';
export const badgeVariants = tv({
base: 'focus:ring-ring inline-flex select-none items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2',
variants: {
variant: {
default: 'bg-primary text-primary-foreground hover:bg-primary/80 border-transparent',
secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80 border-transparent',
destructive: 'bg-destructive text-destructive-foreground hover:bg-destructive/80 border-transparent',
outline: 'text-foreground'
}
},
defaultVariants: {
variant: 'default'
}
base: 'focus:ring-ring inline-flex select-none items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2',
variants: {
variant: {
default: 'bg-primary text-primary-foreground hover:bg-primary/80 border-transparent',
secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80 border-transparent',
destructive:
'bg-destructive text-destructive-foreground hover:bg-destructive/80 border-transparent',
outline: 'text-foreground'
}
},
defaultVariants: {
variant: 'default'
}
});
51 changes: 27 additions & 24 deletions src/lib/components/ui/button/index.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@
import { tv } from 'tailwind-variants';
import Root from './button.svelte';
const buttonVariants = tv({
base: 'ring-offset-background focus-visible:ring-ring inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50',
variants: {
variant: {
default: 'bg-primary text-primary-foreground hover:bg-primary/90',
destructive: 'bg-destructive text-destructive-foreground hover:bg-destructive/90',
outline: 'border-input bg-background hover:bg-accent hover:text-accent-foreground border',
secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80',
ghost: 'hover:bg-accent hover:text-accent-foreground',
link: 'text-primary underline-offset-4 hover:underline'
},
size: {
default: 'h-10 px-4 py-2',
sm: 'h-9 rounded-md px-3',
lg: 'h-11 rounded-md px-8',
icon: 'h-10 w-10'
}
},
defaultVariants: {
variant: 'default',
size: 'default'
}
base: 'ring-offset-background focus-visible:ring-ring inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50',
variants: {
variant: {
default: 'bg-primary text-primary-foreground hover:bg-primary/90',
destructive: 'bg-destructive text-destructive-foreground hover:bg-destructive/90',
outline: 'border-input bg-background hover:bg-accent hover:text-accent-foreground border',
secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80',
ghost: 'hover:bg-accent hover:text-accent-foreground',
link: 'text-primary underline-offset-4 hover:underline'
},
size: {
default: 'h-10 px-4 py-2',
sm: 'h-9 rounded-md px-3',
lg: 'h-11 rounded-md px-8',
icon: 'h-10 w-10'
}
},
defaultVariants: {
variant: 'default',
size: 'default'
}
});
export { Root,
//
Root as Button, buttonVariants };
export {
Root,
//
Root as Button,
buttonVariants
};
18 changes: 15 additions & 3 deletions src/lib/components/ui/card/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ import Description from './card-description.svelte';
import Footer from './card-footer.svelte';
import Header from './card-header.svelte';
import Title from './card-title.svelte';
export { Root, Content, Description, Footer, Header, Title,
//
Root as Card, Content as CardContent, Description as CardDescription, Footer as CardFooter, Header as CardHeader, Title as CardTitle };
export {
Root,
Content,
Description,
Footer,
Header,
Title,
//
Root as Card,
Content as CardContent,
Description as CardDescription,
Footer as CardFooter,
Header as CardHeader,
Title as CardTitle
};
34 changes: 31 additions & 3 deletions src/lib/components/ui/dropdown-menu/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,34 @@ const Sub = DropdownMenuPrimitive.Sub;
const Root = DropdownMenuPrimitive.Root;
const Trigger = DropdownMenuPrimitive.Trigger;
const Group = DropdownMenuPrimitive.Group;
export { Sub, Root, Item, Label, Group, Trigger, Content, Shortcut, Separator, RadioItem, SubContent, SubTrigger, RadioGroup, CheckboxItem,
//
Root as DropdownMenu, Sub as DropdownMenuSub, Item as DropdownMenuItem, Label as DropdownMenuLabel, Group as DropdownMenuGroup, Content as DropdownMenuContent, Trigger as DropdownMenuTrigger, Shortcut as DropdownMenuShortcut, RadioItem as DropdownMenuRadioItem, Separator as DropdownMenuSeparator, RadioGroup as DropdownMenuRadioGroup, SubContent as DropdownMenuSubContent, SubTrigger as DropdownMenuSubTrigger, CheckboxItem as DropdownMenuCheckboxItem };
export {
Sub,
Root,
Item,
Label,
Group,
Trigger,
Content,
Shortcut,
Separator,
RadioItem,
SubContent,
SubTrigger,
RadioGroup,
CheckboxItem,
//
Root as DropdownMenu,
Sub as DropdownMenuSub,
Item as DropdownMenuItem,
Label as DropdownMenuLabel,
Group as DropdownMenuGroup,
Content as DropdownMenuContent,
Trigger as DropdownMenuTrigger,
Shortcut as DropdownMenuShortcut,
RadioItem as DropdownMenuRadioItem,
Separator as DropdownMenuSeparator,
RadioGroup as DropdownMenuRadioGroup,
SubContent as DropdownMenuSubContent,
SubTrigger as DropdownMenuSubTrigger,
CheckboxItem as DropdownMenuCheckboxItem
};
8 changes: 5 additions & 3 deletions src/lib/components/ui/input/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import Root from './input.svelte';
export { Root,
//
Root as Input };
export {
Root,
//
Root as Input
};
146 changes: 83 additions & 63 deletions src/lib/components/ui/sheet/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,70 +10,90 @@ import Description from './sheet-description.svelte';
const Root = SheetPrimitive.Root;
const Close = SheetPrimitive.Close;
const Trigger = SheetPrimitive.Trigger;
export { Root, Close, Trigger, Portal, Overlay, Content, Header, Footer, Title, Description,
//
Root as Sheet, Close as SheetClose, Trigger as SheetTrigger, Portal as SheetPortal, Overlay as SheetOverlay, Content as SheetContent, Header as SheetHeader, Footer as SheetFooter, Title as SheetTitle, Description as SheetDescription };
export {
Root,
Close,
Trigger,
Portal,
Overlay,
Content,
Header,
Footer,
Title,
Description,
//
Root as Sheet,
Close as SheetClose,
Trigger as SheetTrigger,
Portal as SheetPortal,
Overlay as SheetOverlay,
Content as SheetContent,
Header as SheetHeader,
Footer as SheetFooter,
Title as SheetTitle,
Description as SheetDescription
};
export const sheetVariants = tv({
base: 'bg-background fixed z-50 gap-4 p-6 shadow-lg',
variants: {
side: {
top: 'inset-x-0 top-0 border-b',
bottom: 'inset-x-0 bottom-0 border-t',
left: 'inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm',
right: 'inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm'
}
},
defaultVariants: {
side: 'right'
}
base: 'bg-background fixed z-50 gap-4 p-6 shadow-lg',
variants: {
side: {
top: 'inset-x-0 top-0 border-b',
bottom: 'inset-x-0 bottom-0 border-t',
left: 'inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm',
right: 'inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm'
}
},
defaultVariants: {
side: 'right'
}
});
export const sheetTransitions = {
top: {
in: {
y: '-100%',
duration: 500,
opacity: 1
},
out: {
y: '-100%',
duration: 300,
opacity: 1
}
},
bottom: {
in: {
y: '100%',
duration: 500,
opacity: 1
},
out: {
y: '100%',
duration: 300,
opacity: 1
}
},
left: {
in: {
x: '-100%',
duration: 500,
opacity: 1
},
out: {
x: '-100%',
duration: 300,
opacity: 1
}
},
right: {
in: {
x: '100%',
duration: 500,
opacity: 1
},
out: {
x: '100%',
duration: 300,
opacity: 1
}
}
top: {
in: {
y: '-100%',
duration: 500,
opacity: 1
},
out: {
y: '-100%',
duration: 300,
opacity: 1
}
},
bottom: {
in: {
y: '100%',
duration: 500,
opacity: 1
},
out: {
y: '100%',
duration: 300,
opacity: 1
}
},
left: {
in: {
x: '-100%',
duration: 500,
opacity: 1
},
out: {
x: '-100%',
duration: 300,
opacity: 1
}
},
right: {
in: {
x: '100%',
duration: 500,
opacity: 1
},
out: {
x: '100%',
duration: 300,
opacity: 1
}
}
};
Loading

0 comments on commit 26cdbd3

Please sign in to comment.