diff --git a/tests/gui/vuejs/noogle/README.md b/tests/gui/vuejs/noogle/README.md new file mode 100644 index 0000000..7f19539 --- /dev/null +++ b/tests/gui/vuejs/noogle/README.md @@ -0,0 +1,29 @@ +# vue + +This template should help get you started developing with Vue 3 in Vite. + +## Recommended IDE Setup + +[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin). + +## Customize configuration + +See [Vite Configuration Reference](https://vitejs.dev/config/). + +## Project Setup + +```sh +npm install +``` + +### Compile and Hot-Reload for Development + +```sh +npm run dev +``` + +### Compile and Minify for Production + +```sh +npm run build +``` diff --git a/tests/gui/vuejs/noogle/index.html b/tests/gui/vuejs/noogle/index.html new file mode 100644 index 0000000..99f583a --- /dev/null +++ b/tests/gui/vuejs/noogle/index.html @@ -0,0 +1,13 @@ + + + + + + + Vite App + + +
+ + + diff --git a/tests/gui/vuejs/noogle/jsconfig.json b/tests/gui/vuejs/noogle/jsconfig.json new file mode 100644 index 0000000..5a1f2d2 --- /dev/null +++ b/tests/gui/vuejs/noogle/jsconfig.json @@ -0,0 +1,8 @@ +{ + "compilerOptions": { + "paths": { + "@/*": ["./src/*"] + } + }, + "exclude": ["node_modules", "dist"] +} diff --git a/tests/gui/vuejs/noogle/package.json b/tests/gui/vuejs/noogle/package.json new file mode 100644 index 0000000..c495fa3 --- /dev/null +++ b/tests/gui/vuejs/noogle/package.json @@ -0,0 +1,26 @@ +{ + "name": "vue", + "version": "0.0.0", + "private": true, + "type": "module", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview" + }, + "dependencies": { + "@rust-nostr/nostr-sdk": "^0.7.0", + "mini-toastr": "^0.8.1", + "vue": "^3.3.11", + "vue-notifications": "^1.0.2", + "vue3-easy-data-table": "^1.5.47", + "vuex": "^4.1.0" + }, + "devDependencies": { + "@vitejs/plugin-vue": "^4.5.2", + "vite": "^5.0.10" + }, + "optionalDependencies": { + "@rollup/rollup-linux-x64-gnu": "4.6.1" + } +} diff --git a/tests/gui/vuejs/noogle/public/favicon.ico b/tests/gui/vuejs/noogle/public/favicon.ico new file mode 100644 index 0000000..df36fcf Binary files /dev/null and b/tests/gui/vuejs/noogle/public/favicon.ico differ diff --git a/tests/gui/vuejs/noogle/src/App.vue b/tests/gui/vuejs/noogle/src/App.vue new file mode 100644 index 0000000..89c08bd --- /dev/null +++ b/tests/gui/vuejs/noogle/src/App.vue @@ -0,0 +1,49 @@ + + + + + diff --git a/tests/gui/vuejs/noogle/src/assets/base.css b/tests/gui/vuejs/noogle/src/assets/base.css new file mode 100644 index 0000000..8816868 --- /dev/null +++ b/tests/gui/vuejs/noogle/src/assets/base.css @@ -0,0 +1,86 @@ +/* color palette from */ +:root { + --vt-c-white: #ffffff; + --vt-c-white-soft: #f8f8f8; + --vt-c-white-mute: #f2f2f2; + + --vt-c-black: #181818; + --vt-c-black-soft: #222222; + --vt-c-black-mute: #282828; + + --vt-c-indigo: #2c3e50; + + --vt-c-divider-light-1: rgba(60, 60, 60, 0.29); + --vt-c-divider-light-2: rgba(60, 60, 60, 0.12); + --vt-c-divider-dark-1: rgba(84, 84, 84, 0.65); + --vt-c-divider-dark-2: rgba(84, 84, 84, 0.48); + + --vt-c-text-light-1: var(--vt-c-indigo); + --vt-c-text-light-2: rgba(60, 60, 60, 0.66); + --vt-c-text-dark-1: var(--vt-c-white); + --vt-c-text-dark-2: rgba(235, 235, 235, 0.64); +} + +/* semantic color variables for this project */ +:root { + --color-background: var(--vt-c-white); + --color-background-soft: var(--vt-c-white-soft); + --color-background-mute: var(--vt-c-white-mute); + + --color-border: var(--vt-c-divider-light-2); + --color-border-hover: var(--vt-c-divider-light-1); + + --color-heading: var(--vt-c-text-light-1); + --color-text: var(--vt-c-text-light-1); + + --section-gap: 160px; +} + +@media (prefers-color-scheme: dark) { + :root { + --color-background: var(--vt-c-black); + --color-background-soft: var(--vt-c-black-soft); + --color-background-mute: var(--vt-c-black-mute); + + --color-border: var(--vt-c-divider-dark-2); + --color-border-hover: var(--vt-c-divider-dark-1); + + --color-heading: var(--vt-c-text-dark-1); + --color-text: var(--vt-c-text-dark-2); + } +} + +*, +*::before, +*::after { + box-sizing: border-box; + margin: 0; + font-weight: normal; +} + +body { + min-height: 100vh; + color: var(--color-text); + background: var(--color-background); + transition: + color 0.5s, + background-color 0.5s; + line-height: 1.6; + font-family: + Inter, + -apple-system, + BlinkMacSystemFont, + 'Segoe UI', + Roboto, + Oxygen, + Ubuntu, + Cantarell, + 'Fira Sans', + 'Droid Sans', + 'Helvetica Neue', + sans-serif; + font-size: 15px; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} diff --git a/tests/gui/vuejs/noogle/src/assets/delete.png b/tests/gui/vuejs/noogle/src/assets/delete.png new file mode 100644 index 0000000..b935912 Binary files /dev/null and b/tests/gui/vuejs/noogle/src/assets/delete.png differ diff --git a/tests/gui/vuejs/noogle/src/assets/edit.png b/tests/gui/vuejs/noogle/src/assets/edit.png new file mode 100644 index 0000000..32dcd6c Binary files /dev/null and b/tests/gui/vuejs/noogle/src/assets/edit.png differ diff --git a/tests/gui/vuejs/noogle/src/assets/load.gif b/tests/gui/vuejs/noogle/src/assets/load.gif new file mode 100644 index 0000000..af3c292 Binary files /dev/null and b/tests/gui/vuejs/noogle/src/assets/load.gif differ diff --git a/tests/gui/vuejs/noogle/src/assets/main.css b/tests/gui/vuejs/noogle/src/assets/main.css new file mode 100644 index 0000000..36fb845 --- /dev/null +++ b/tests/gui/vuejs/noogle/src/assets/main.css @@ -0,0 +1,35 @@ +@import './base.css'; + +#app { + max-width: 1280px; + margin: 0 auto; + padding: 2rem; + font-weight: normal; +} + +a, +.green { + text-decoration: none; + color: hsla(160, 100%, 37%, 1); + transition: 0.4s; + padding: 3px; +} + +@media (hover: hover) { + a:hover { + background-color: hsla(160, 100%, 37%, 0.2); + } +} + +@media (min-width: 1024px) { + body { + display: flex; + place-items: center; + } + + #app { + display: grid; + grid-template-columns: 1fr 1fr; + padding: 0 2rem; + } +} diff --git a/tests/gui/vuejs/noogle/src/assets/nostr-purple.svg b/tests/gui/vuejs/noogle/src/assets/nostr-purple.svg new file mode 100644 index 0000000..254dca8 --- /dev/null +++ b/tests/gui/vuejs/noogle/src/assets/nostr-purple.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/tests/gui/vuejs/noogle/src/components/Nip07.vue b/tests/gui/vuejs/noogle/src/components/Nip07.vue new file mode 100644 index 0000000..e216602 --- /dev/null +++ b/tests/gui/vuejs/noogle/src/components/Nip07.vue @@ -0,0 +1,174 @@ + + + + + \ No newline at end of file diff --git a/tests/gui/vuejs/noogle/src/components/NoteRender.vue b/tests/gui/vuejs/noogle/src/components/NoteRender.vue new file mode 100644 index 0000000..9f9cab1 --- /dev/null +++ b/tests/gui/vuejs/noogle/src/components/NoteRender.vue @@ -0,0 +1,142 @@ + + + + + diff --git a/tests/gui/vuejs/noogle/src/components/ResultTable.vue b/tests/gui/vuejs/noogle/src/components/ResultTable.vue new file mode 100644 index 0000000..f0fc16f --- /dev/null +++ b/tests/gui/vuejs/noogle/src/components/ResultTable.vue @@ -0,0 +1,70 @@ + + + + + \ No newline at end of file diff --git a/tests/gui/vuejs/noogle/src/components/Search.vue b/tests/gui/vuejs/noogle/src/components/Search.vue new file mode 100644 index 0000000..787bfff --- /dev/null +++ b/tests/gui/vuejs/noogle/src/components/Search.vue @@ -0,0 +1,203 @@ + + + + + + diff --git a/tests/gui/vuejs/noogle/src/components/icons/IconCommunity.vue b/tests/gui/vuejs/noogle/src/components/icons/IconCommunity.vue new file mode 100644 index 0000000..2dc8b05 --- /dev/null +++ b/tests/gui/vuejs/noogle/src/components/icons/IconCommunity.vue @@ -0,0 +1,7 @@ + diff --git a/tests/gui/vuejs/noogle/src/components/icons/IconDocumentation.vue b/tests/gui/vuejs/noogle/src/components/icons/IconDocumentation.vue new file mode 100644 index 0000000..6d4791c --- /dev/null +++ b/tests/gui/vuejs/noogle/src/components/icons/IconDocumentation.vue @@ -0,0 +1,7 @@ + diff --git a/tests/gui/vuejs/noogle/src/components/icons/IconEcosystem.vue b/tests/gui/vuejs/noogle/src/components/icons/IconEcosystem.vue new file mode 100644 index 0000000..c3a4f07 --- /dev/null +++ b/tests/gui/vuejs/noogle/src/components/icons/IconEcosystem.vue @@ -0,0 +1,7 @@ + diff --git a/tests/gui/vuejs/noogle/src/components/icons/IconSupport.vue b/tests/gui/vuejs/noogle/src/components/icons/IconSupport.vue new file mode 100644 index 0000000..7452834 --- /dev/null +++ b/tests/gui/vuejs/noogle/src/components/icons/IconSupport.vue @@ -0,0 +1,7 @@ + diff --git a/tests/gui/vuejs/noogle/src/components/icons/IconTooling.vue b/tests/gui/vuejs/noogle/src/components/icons/IconTooling.vue new file mode 100644 index 0000000..660598d --- /dev/null +++ b/tests/gui/vuejs/noogle/src/components/icons/IconTooling.vue @@ -0,0 +1,19 @@ + + diff --git a/tests/gui/vuejs/noogle/src/main.js b/tests/gui/vuejs/noogle/src/main.js new file mode 100644 index 0000000..41efcf0 --- /dev/null +++ b/tests/gui/vuejs/noogle/src/main.js @@ -0,0 +1,30 @@ +import './assets/main.css' +import { createApp } from 'vue' + +import App from './App.vue' +import store from './store'; + +import Vue3EasyDataTable from 'vue3-easy-data-table'; +import 'vue3-easy-data-table/dist/style.css'; + +//This is all for notifications +import VueNotifications from 'vue-notifications' +import miniToastr from 'mini-toastr' +miniToastr.init() + +function toast ({title, message, type, timeout, cb}) { + return miniToastr[type](message, title, timeout, cb) +} + +const options = { + success: toast, + error: toast, + info: toast, + warn: toast +} +//This is all for notifications end + + + + +createApp(App).use(VueNotifications, options).use(store).component('EasyDataTable', Vue3EasyDataTable).mount('#app') diff --git a/tests/gui/vuejs/noogle/src/store.js b/tests/gui/vuejs/noogle/src/store.js new file mode 100644 index 0000000..1ee5e97 --- /dev/null +++ b/tests/gui/vuejs/noogle/src/store.js @@ -0,0 +1,28 @@ +import {createStore} from "vuex"; +import {Client} from "@rust-nostr/nostr-sdk"; + +const store = createStore({ + state () { + return { + count: 0, + test: "hello", + client: Client, + results: [] + } + }, + mutations: { + increment (state) { + state.count++ + }, + set_client (state, client) { + state.client = client + }, + set_search_results(state, results){ + state.results = results + console.log(state.results) + } + + } +}) + +export default store; \ No newline at end of file diff --git a/tests/gui/vuejs/noogle/vite.config.js b/tests/gui/vuejs/noogle/vite.config.js new file mode 100644 index 0000000..5c45e1d --- /dev/null +++ b/tests/gui/vuejs/noogle/vite.config.js @@ -0,0 +1,16 @@ +import { fileURLToPath, URL } from 'node:url' + +import { defineConfig } from 'vite' +import vue from '@vitejs/plugin-vue' + +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [ + vue(), + ], + resolve: { + alias: { + '@': fileURLToPath(new URL('./src', import.meta.url)) + } + } +})