diff --git a/.gitignore b/.gitignore index bbce83d..19de473 100644 --- a/.gitignore +++ b/.gitignore @@ -192,3 +192,4 @@ tests/pagerank/index_map_99bb5591c9116600f845107d31f9b59e2f7c7e09a1ff802e84f1d43 tests/pagerank/network_graph_99bb5591c9116600f845107d31f9b59e2f7c7e09a1ff802e84f1d43da557ca64.json tests/test_data/wallet_mint_api/wallet.sqlite3 .env_bkp2 +/ui/noogle/dev-dist diff --git a/ui/noogle/index.html b/ui/noogle/index.html index b64a870..7890890 100644 --- a/ui/noogle/index.html +++ b/ui/noogle/index.html @@ -5,6 +5,7 @@ Nostr decentralized search and other stuff +
diff --git a/ui/noogle/package.json b/ui/noogle/package.json index a4b00b3..075cb58 100644 --- a/ui/noogle/package.json +++ b/ui/noogle/package.json @@ -5,7 +5,7 @@ "type": "module", "scripts": { "dev": "vite", - "build": "vue-tsc --build --force && vite build", + "build": "vite build", "preview": "vite preview", "build-only": "vite build", "type-check": "vue-tsc --build --force" @@ -38,8 +38,10 @@ "tailwindcss": "^3.4.1", "typescript": "~5.3.0", "vite": "^5.0.10", + "vite-plugin-pwa": "^0.20.5", "vue-router": "^4.2.5", - "vue-tsc": "^2.0.29" + "vue-tsc": "^2.0.29", + "workbox-window": "^7.1.0" }, "optionalDependencies": { "@rollup/rollup-linux-x64-gnu": "4.6.1" diff --git a/ui/noogle/public/pwa-192x192.png b/ui/noogle/public/pwa-192x192.png new file mode 100644 index 0000000..ee1912b Binary files /dev/null and b/ui/noogle/public/pwa-192x192.png differ diff --git a/ui/noogle/public/pwa-512x512.png b/ui/noogle/public/pwa-512x512.png new file mode 100644 index 0000000..52c6c55 Binary files /dev/null and b/ui/noogle/public/pwa-512x512.png differ diff --git a/ui/noogle/src/components/Login.vue b/ui/noogle/src/components/Login.vue index d6cef89..fb01f3f 100644 --- a/ui/noogle/src/components/Login.vue +++ b/ui/noogle/src/components/Login.vue @@ -147,23 +147,23 @@ - - - - - - - + + + + diff --git a/ui/noogle/src/components/Nip89view.vue b/ui/noogle/src/components/Nip89view.vue index 774ac0e..a892518 100644 --- a/ui/noogle/src/components/Nip89view.vue +++ b/ui/noogle/src/components/Nip89view.vue @@ -13,7 +13,7 @@

-
+
What is this?
@@ -46,7 +46,7 @@

-
+
@@ -85,7 +85,7 @@
- +
@@ -98,9 +98,9 @@ {{dvm.amount/1000}}

{{ dvm.name }}

-

Kind: {{ dvm.kind }}

+

Kind: {{ dvm.kind }}

-

+

diff --git a/ui/noogle/src/layouts/ThreeColumnLayout.vue b/ui/noogle/src/layouts/ThreeColumnLayout.vue index cf97447..607968e 100644 --- a/ui/noogle/src/layouts/ThreeColumnLayout.vue +++ b/ui/noogle/src/layouts/ThreeColumnLayout.vue @@ -81,7 +81,7 @@ import {isVisible} from "bootstrap/js/src/util/index.js"; position: fixed; bottom:0; - background: rgba(0, 0, 0, 0.5);; + background: rgba(0, 0, 0, 0);; grid-area: footer; width: 100vw; height: 32px; diff --git a/ui/noogle/src/main.js b/ui/noogle/src/main.js index 75f9ed7..be34c94 100644 --- a/ui/noogle/src/main.js +++ b/ui/noogle/src/main.js @@ -22,6 +22,9 @@ import '@vuepic/vue-datepicker/dist/main.css' //This is all for notifications import VueNotifications from "vue-notifications"; import miniToastr from 'mini-toastr' +import { registerSW } from 'virtual:pwa-register' + +registerSW({ immediate: true }) miniToastr.init() diff --git a/ui/noogle/vite.config.ts b/ui/noogle/vite.config.ts index f31604e..c9248df 100644 --- a/ui/noogle/vite.config.ts +++ b/ui/noogle/vite.config.ts @@ -1,11 +1,39 @@ import { fileURLToPath, URL } from 'node:url' - import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' +import { VitePWA } from 'vite-plugin-pwa' // https://vitejs.dev/config/ export default defineConfig({ plugins: [ - vue() + vue(), + VitePWA({ + + registerType: 'autoUpdate', + manifest: { + name: 'Noogle', + short_name: 'Noogle', + description: 'Other Stuff on Nostr', + theme_color: '#ffffff', + icons: [ + { + src: 'pwa-192x192.png', + sizes: '192x192', + type: 'image/png' + }, + { + src: 'pwa-512x512.png', + sizes: '512x512', + type: 'image/png' + } + ] + }, + devOptions: { + enabled: true, + }, + workbox: { + maximumFileSizeToCacheInBytes: 8000000, + }, + }) ], resolve: { alias: {