From ac906ca6c9f01c05a1cf117d6168016ee2552e13 Mon Sep 17 00:00:00 2001 From: padreug Date: Tue, 11 Feb 2025 14:43:08 +0100 Subject: [PATCH] big milestone! --- dev-dist/sw.js | 2 +- public/js/nostr.bundle.js | 22 ++ src/components/ChatBox.vue | 278 ++++++++++++++++ src/components/Login.vue | 144 ++++++++ src/components/SupportChat.vue | 124 +++++++ src/components/layout/Navbar.vue | 9 +- src/components/ui/avatar/Avatar.vue | 16 + src/components/ui/avatar/AvatarFallback.vue | 16 + src/components/ui/avatar/AvatarImage.vue | 18 + src/components/ui/avatar/index.ts | 3 + src/components/ui/card/Card.vue | 7 +- src/components/ui/card/CardContent.vue | 6 +- src/components/ui/card/CardDescription.vue | 6 +- src/components/ui/card/CardFooter.vue | 6 +- src/components/ui/card/CardHeader.vue | 6 +- src/components/ui/label/index.ts | 8 + src/components/ui/scroll-area/ScrollArea.vue | 29 ++ src/components/ui/scroll-area/ScrollBar.vue | 42 +++ src/components/ui/scroll-area/index.ts | 1 + src/i18n/locales/en.ts | 3 +- src/i18n/locales/es.ts | 3 +- src/lib/nostr-bundle.ts | 67 ++++ src/lib/nostr.ts | 108 ++++++ src/main.ts | 5 + src/pages/Support.vue | 51 +++ src/router/index.ts | 6 + src/stores/nostr.ts | 325 +++++++++++++++++++ src/types/nostr.ts | 37 +++ 28 files changed, 1332 insertions(+), 16 deletions(-) create mode 100644 public/js/nostr.bundle.js create mode 100644 src/components/ChatBox.vue create mode 100644 src/components/Login.vue create mode 100644 src/components/SupportChat.vue create mode 100644 src/components/ui/avatar/Avatar.vue create mode 100644 src/components/ui/avatar/AvatarFallback.vue create mode 100644 src/components/ui/avatar/AvatarImage.vue create mode 100644 src/components/ui/avatar/index.ts create mode 100644 src/components/ui/label/index.ts create mode 100644 src/components/ui/scroll-area/ScrollArea.vue create mode 100644 src/components/ui/scroll-area/ScrollBar.vue create mode 100644 src/components/ui/scroll-area/index.ts create mode 100644 src/lib/nostr-bundle.ts create mode 100644 src/lib/nostr.ts create mode 100644 src/pages/Support.vue create mode 100644 src/stores/nostr.ts create mode 100644 src/types/nostr.ts diff --git a/dev-dist/sw.js b/dev-dist/sw.js index 7961c04..136c19f 100644 --- a/dev-dist/sw.js +++ b/dev-dist/sw.js @@ -79,7 +79,7 @@ define(['./workbox-54d0af47'], (function (workbox) { 'use strict'; */ workbox.precacheAndRoute([{ "url": "index.html", - "revision": "0.6qk4tc3oa08" + "revision": "0.0k43usmfr4" }], {}); workbox.cleanupOutdatedCaches(); workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), { diff --git a/public/js/nostr.bundle.js b/public/js/nostr.bundle.js new file mode 100644 index 0000000..560e376 --- /dev/null +++ b/public/js/nostr.bundle.js @@ -0,0 +1,22 @@ +import { + getPublicKey, + generatePrivateKey, + nip04, + getEventHash, + getSignature, + verifySignature, + nip19, + relayInit +} from 'nostr-tools'; + +window.NostrTools = { + getPublicKey, + generatePrivateKey, + nip04, + getEventHash, + getSignature, + signEvent: getSignature, + verifySignature, + nip19, + relayInit +}; \ No newline at end of file diff --git a/src/components/ChatBox.vue b/src/components/ChatBox.vue new file mode 100644 index 0000000..792b53c --- /dev/null +++ b/src/components/ChatBox.vue @@ -0,0 +1,278 @@ + + + + + \ No newline at end of file diff --git a/src/components/Login.vue b/src/components/Login.vue new file mode 100644 index 0000000..0469b87 --- /dev/null +++ b/src/components/Login.vue @@ -0,0 +1,144 @@ + + + + + \ No newline at end of file diff --git a/src/components/SupportChat.vue b/src/components/SupportChat.vue new file mode 100644 index 0000000..d9fbda2 --- /dev/null +++ b/src/components/SupportChat.vue @@ -0,0 +1,124 @@ + + + + + \ No newline at end of file diff --git a/src/components/layout/Navbar.vue b/src/components/layout/Navbar.vue index 835dc2c..a153354 100644 --- a/src/components/layout/Navbar.vue +++ b/src/components/layout/Navbar.vue @@ -1,7 +1,7 @@ + + \ No newline at end of file diff --git a/src/components/ui/avatar/AvatarFallback.vue b/src/components/ui/avatar/AvatarFallback.vue new file mode 100644 index 0000000..b20f55f --- /dev/null +++ b/src/components/ui/avatar/AvatarFallback.vue @@ -0,0 +1,16 @@ + + + \ No newline at end of file diff --git a/src/components/ui/avatar/AvatarImage.vue b/src/components/ui/avatar/AvatarImage.vue new file mode 100644 index 0000000..b24e43d --- /dev/null +++ b/src/components/ui/avatar/AvatarImage.vue @@ -0,0 +1,18 @@ + + + \ No newline at end of file diff --git a/src/components/ui/avatar/index.ts b/src/components/ui/avatar/index.ts new file mode 100644 index 0000000..8646f68 --- /dev/null +++ b/src/components/ui/avatar/index.ts @@ -0,0 +1,3 @@ +export { default as Avatar } from './Avatar.vue' +export { default as AvatarImage } from './AvatarImage.vue' +export { default as AvatarFallback } from './AvatarFallback.vue' \ No newline at end of file diff --git a/src/components/ui/card/Card.vue b/src/components/ui/card/Card.vue index 12dd5ec..60e415b 100644 --- a/src/components/ui/card/Card.vue +++ b/src/components/ui/card/Card.vue @@ -9,12 +9,7 @@ const props = defineProps<{