many more fixes until this is actually kinda working. also changed the logo and colors.

This commit is contained in:
fiatjaf 2021-12-11 20:52:43 -03:00
parent c6ab720af2
commit 29129879e9
31 changed files with 65 additions and 544 deletions

View File

@ -2,7 +2,7 @@
"name": "noves",
"version": "0.0.1",
"description": "a twitter-like nostr client",
"productName": "Noves",
"productName": "noves",
"author": "fiatjaf <fiatjaf@gmail.com>",
"private": true,
"scripts": {
@ -11,13 +11,12 @@
},
"dependencies": {
"@quasar/extras": "^1.0.0",
"bip32": "^3.0.1",
"bip39": "^3.0.4",
"core-js": "^3.6.5",
"crypto": "^1.0.1",
"identicon.js": "^2.3.3",
"nostr-tools": "^0.6.5",
"nostr-tools": "^0.7.1",
"quasar": "^2.0.0",
"readable-stream": "^3.6.0",
"stream": "^0.0.2",
"vuex": "^4.0.1"
},

BIN
public/bird-colors.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
public/bird-outline.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
public/bird.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 859 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

View File

@ -7,6 +7,7 @@
// https://quasar.dev/quasar-cli/quasar-conf-js
/* eslint-env node */
const webpack = require('webpack')
const ESLintPlugin = require('eslint-webpack-plugin')
const {configure} = require('quasar/wrappers')
@ -21,10 +22,10 @@ module.exports = configure(function (ctx) {
// app boot file (/src/boot)
// --> boot files are part of "main.js"
// https://quasar.dev/quasar-cli/boot-files
boot: [],
boot: ['global-components'],
// https://quasar.dev/quasar-cli/quasar-conf-js#Property%3A-css
css: ['app.scss'],
css: [],
// https://github.com/quasarframework/quasar/tree/dev/extras
extras: [
@ -67,6 +68,24 @@ module.exports = configure(function (ctx) {
chain
.plugin('eslint-webpack-plugin')
.use(ESLintPlugin, [{extensions: ['js', 'vue']}])
},
// blergh
extendWebpack(cfg) {
cfg.plugins.push(
new webpack.ProvidePlugin({Buffer: ['buffer', 'Buffer']})
)
cfg.plugins.push(
new webpack.IgnorePlugin({
resourceRegExp: /^\.\/wordlists\/(?!english)/,
contextRegExp: /bip39\/src$/
})
)
cfg.resolve.alias = cfg.resolve.alias || {}
cfg.resolve.alias.stream = 'readable-stream'
cfg.resolve.fallback = cfg.resolve.fallback || {}
cfg.resolve.fallback.buffer = require.resolve('buffer/')
cfg.resolve.fallback.stream = require.resolve('readable-stream')
}
},
@ -95,132 +114,6 @@ module.exports = configure(function (ctx) {
// Quasar plugins
plugins: []
},
// animations: 'all', // --- includes all animations
// https://quasar.dev/options/animations
animations: [],
// https://quasar.dev/quasar-cli/developing-ssr/configuring-ssr
ssr: {
pwa: false,
// manualStoreHydration: true,
// manualPostHydrationTrigger: true,
prodPort: 3000, // The default port that the production server should use
// (gets superseded if process.env.PORT is specified at runtime)
maxAge: 1000 * 60 * 60 * 24 * 30,
// Tell browser when a file from the server should expire from cache (in ms)
chainWebpackWebserver(chain) {
chain
.plugin('eslint-webpack-plugin')
.use(ESLintPlugin, [{extensions: ['js']}])
},
middlewares: [
ctx.prod ? 'compression' : '',
'render' // keep this as last one
]
},
// https://quasar.dev/quasar-cli/developing-pwa/configuring-pwa
pwa: {
workboxPluginMode: 'GenerateSW', // 'GenerateSW' or 'InjectManifest'
workboxOptions: {}, // only for GenerateSW
// for the custom service worker ONLY (/src-pwa/custom-service-worker.[js|ts])
// if using workbox in InjectManifest mode
chainWebpackCustomSW(chain) {
chain
.plugin('eslint-webpack-plugin')
.use(ESLintPlugin, [{extensions: ['js']}])
},
manifest: {
name: `Noves`,
short_name: `Noves`,
description: `a twitter-like nostr client`,
display: 'standalone',
orientation: 'portrait',
background_color: '#ffffff',
theme_color: '#027be3',
icons: [
{
src: 'icons/icon-128x128.png',
sizes: '128x128',
type: 'image/png'
},
{
src: 'icons/icon-192x192.png',
sizes: '192x192',
type: 'image/png'
},
{
src: 'icons/icon-256x256.png',
sizes: '256x256',
type: 'image/png'
},
{
src: 'icons/icon-384x384.png',
sizes: '384x384',
type: 'image/png'
},
{
src: 'icons/icon-512x512.png',
sizes: '512x512',
type: 'image/png'
}
]
}
},
// Full list of options: https://quasar.dev/quasar-cli/developing-cordova-apps/configuring-cordova
cordova: {
// noIosLegacyBuildFlag: true, // uncomment only if you know what you are doing
},
// Full list of options: https://quasar.dev/quasar-cli/developing-capacitor-apps/configuring-capacitor
capacitor: {
hideSplashscreen: true
},
// Full list of options: https://quasar.dev/quasar-cli/developing-electron-apps/configuring-electron
electron: {
bundler: 'packager', // 'packager' or 'builder'
packager: {
// https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#options
// OS X / Mac App Store
// appBundleId: '',
// appCategoryType: '',
// osxSign: '',
// protocol: 'myapp://path',
// Windows only
// win32metadata: { ... }
},
builder: {
// https://www.electron.build/configuration/configuration
appId: 'noves'
},
// "chain" is a webpack-chain object https://github.com/neutrinojs/webpack-chain
chainWebpackMain(chain) {
chain
.plugin('eslint-webpack-plugin')
.use(ESLintPlugin, [{extensions: ['js']}])
},
// "chain" is a webpack-chain object https://github.com/neutrinojs/webpack-chain
chainWebpackPreload(chain) {
chain
.plugin('eslint-webpack-plugin')
.use(ESLintPlugin, [{extensions: ['js']}])
}
}
}
})

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

View File

@ -1,191 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="67.407623mm"
height="62.908276mm"
viewBox="0 0 238.84591 222.90334"
id="svg3570"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="quasar-logo-full.svg">
<defs
id="defs3572" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.979899"
inkscape:cx="-39.753589"
inkscape:cy="27.706388"
inkscape:document-units="px"
inkscape:current-layer="g4895-4-4"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:window-width="1920"
inkscape:window-height="1056"
inkscape:window-x="0"
inkscape:window-y="24"
inkscape:window-maximized="1" />
<metadata
id="metadata3575">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-277.71988,-312.33911)">
<g
id="g4895-4-4"
transform="translate(1419.0442,398.9018)">
<g
transform="translate(-29.620665,-4)"
id="g4579-2-20">
<g
id="g4445-2-0"
transform="translate(12.499948,7.809312)">
<g
inkscape:export-ydpi="44.860481"
inkscape:export-xdpi="44.860481"
inkscape:export-filename="/home/emanuele/Desktop/logo1.png"
transform="translate(-712.85583,-503.26814)"
id="g4561-6-7-0">
<g
transform="translate(16.233481,0)"
style="font-style:normal;font-weight:normal;font-size:50.25774765px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#263238;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="flowRoot4513-6-6-08">
<path
d="m -402.73125,631.46823 q -0.6125,0.0438 -1.3125,0.0875 -0.65625,0 -1.4,0 l -9.31875,0 q -12.81875,0 -12.81875,-8.44375 l 0,-13.475 q 0,-8.26875 12.6,-8.26875 l 9.75625,0 q 12.6,0 12.6,8.26875 l 0,13.475 q 0,5.03125 -4.4625,7.04375 l 3.10625,2.14375 q 1.35625,0.83125 1.35625,1.70625 0,0.875 -0.7,1.3125 -0.65625,0.48125 -1.88125,0.48125 -0.30625,0 -0.7875,-0.13125 -0.4375,-0.0875 -1.05,-0.48125 l -5.6875,-3.71875 z m 5.38125,-21.74375 q 0,-4.76875 -7.9625,-4.76875 l -9.58125,0 q -7.9625,0 -7.9625,4.76875 l 0,13.3875 q 0,4.94375 8.3125,4.94375 l 8.88125,0 q 8.3125,0 8.3125,-4.94375 l 0,-13.3875 z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:43.75px;font-family:'Neuropol X';-inkscape-font-specification:'Neuropol X';text-align:start;letter-spacing:5px;word-spacing:0px;text-anchor:start;fill:#263238;fill-opacity:1"
id="path3428" />
<path
d="m -368.0585,631.64323 q -11.2875,0 -11.2875,-6.9125 l 0,-12.73125 q 0,-1.8375 2.31875,-1.8375 2.31875,0 2.31875,1.8375 l 0,12.775 q 0,3.325 6.475,3.325 l 8.3125,0 q 6.475,0 6.475,-3.325 l 0,-12.775 q 0,-1.8375 2.31875,-1.8375 2.3625,0 2.3625,1.8375 l 0,12.73125 q 0,6.9125 -11.2875,6.9125 l -8.00625,0 z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:43.75px;font-family:'Neuropol X';-inkscape-font-specification:'Neuropol X';text-align:start;letter-spacing:5px;word-spacing:0px;text-anchor:start;fill:#263238;fill-opacity:1"
id="path3430" />
<path
d="m -327.2833,631.64323 q -9.3625,0 -9.3625,-5.81875 l 0,-2.49375 q 0,-5.775 9.3625,-5.775 l 18.59375,0 0,-0.65625 q 0,-3.0625 -5.38125,-3.0625 l -6.16875,0 q -2.1875,0 -2.1875,-1.70625 0,-1.75 2.1875,-1.75 l 6.16875,0 q 9.93125,0 9.93125,6.51875 l 0,8.575 q 0,6.16875 -9.5375,6.16875 l -13.60625,0 z m 13.34375,-3.4125 q 5.25,0 5.25,-2.8875 l 0,-4.76875 -18.24375,0 q -5.11875,0 -5.11875,2.66875 l 0,2.275 q 0,2.7125 5.11875,2.7125 l 12.99375,0 z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:43.75px;font-family:'Neuropol X';-inkscape-font-specification:'Neuropol X';text-align:start;letter-spacing:5px;word-spacing:0px;text-anchor:start;fill:#263238;fill-opacity:1"
id="path3432" />
<path
d="m -262.77031,626.74323 q 0,4.9 -9.975,4.9 l -17.0625,0 q -2.1875,0 -2.1875,-1.70625 0,-1.70625 2.1875,-1.70625 l 17.0625,0 q 5.38125,0 5.38125,-1.4875 l 0,-2.45 q 0,-1.4875 -5.38125,-1.4875 l -9.0125,0 q -9.975,0 -9.975,-4.76875 l 0,-2.05625 q 0,-5.6 10.28125,-5.6 l 5.99375,0 q 2.23125,0 2.23125,1.75 0,0.875 -0.6125,1.3125 -0.56875,0.39375 -1.61875,0.39375 l -5.99375,0 q -5.73125,0 -5.73125,2.14375 l 0,1.925 q 0,1.79375 5.6875,1.79375 l 9.0125,0 q 9.7125,0 9.7125,4.4625 l 0,2.58125 z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:43.75px;font-family:'Neuropol X';-inkscape-font-specification:'Neuropol X';text-align:start;letter-spacing:5px;word-spacing:0px;text-anchor:start;fill:#263238;fill-opacity:1"
id="path3434" />
<path
d="m -241.91709,631.64323 q -9.3625,0 -9.3625,-5.81875 l 0,-2.49375 q 0,-5.775 9.3625,-5.775 l 18.59375,0 0,-0.65625 q 0,-3.0625 -5.38125,-3.0625 l -6.16875,0 q -2.1875,0 -2.1875,-1.70625 0,-1.75 2.1875,-1.75 l 6.16875,0 q 9.93125,0 9.93125,6.51875 l 0,8.575 q 0,6.16875 -9.5375,6.16875 l -13.60625,0 z m 13.34375,-3.4125 q 5.25,0 5.25,-2.8875 l 0,-4.76875 -18.24375,0 q -5.11875,0 -5.11875,2.66875 l 0,2.275 q 0,2.7125 5.11875,2.7125 l 12.99375,0 z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:43.75px;font-family:'Neuropol X';-inkscape-font-specification:'Neuropol X';text-align:start;letter-spacing:5px;word-spacing:0px;text-anchor:start;fill:#263238;fill-opacity:1"
id="path3436" />
<path
d="m -205.62285,617.33698 q 0,-6.95625 11.2875,-6.95625 l 3.36875,0 q 2.23125,0 2.23125,1.79375 0,1.79375 -2.23125,1.79375 l -3.54375,0 q -6.475,0 -6.475,3.28125 l 0,12.775 q 0,1.8375 -2.31875,1.8375 -2.31875,0 -2.31875,-1.8375 l 0,-12.6875 z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:43.75px;font-family:'Neuropol X';-inkscape-font-specification:'Neuropol X';text-align:start;letter-spacing:5px;word-spacing:0px;text-anchor:start;fill:#263238;fill-opacity:1"
id="path3438" />
</g>
</g>
</g>
</g>
<g
id="g5443-0-1-5-1-9"
transform="matrix(0.55595317,0,0,0.55595317,-521.93484,-328.66104)"
inkscape:export-filename="/home/emanuele/Desktop/logo1.png"
inkscape:export-xdpi="44.860481"
inkscape:export-ydpi="44.860481">
<g
inkscape:export-ydpi="3.4165223"
inkscape:export-xdpi="3.4165223"
transform="matrix(0.09527033,0,0,0.09527033,-1695.2716,706.62921)"
id="g8856-6-1-1-9-0-1-9">
<circle
r="1485"
cy="-1361.2571"
cx="8317.3574"
id="circle8858-1-3-7-6-5-3-0"
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:50;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:export-xdpi="10.031387"
inkscape:export-ydpi="10.031387" />
<path
inkscape:export-ydpi="10.031387"
inkscape:export-xdpi="10.031387"
style="opacity:1;fill:#263238;fill-opacity:1;stroke:none;stroke-width:10;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 8560.3823,-1361.3029 a 242.947,242.947 0 0 1 -242.947,242.948 242.947,242.947 0 0 1 -242.947,-242.948 242.947,242.947 0 0 1 242.947,-242.946 242.947,242.947 0 0 1 242.947,242.946 z"
id="path8860-5-4-8-2-9-0-9"
inkscape:connector-curvature="0" />
<path
id="path8862-5-5-9-1-3-6-3"
d="m 9395.8755,-1984.028 a 1245.372,1245.372 0 0 0 -190.8415,-249.4971 l -280.8618,162.1556 c -87.542,-74.7796 -187.0349,-132.0588 -293.2407,-169.9527 -95.8868,97.1766 -172.0602,205.7604 -226.9672,323.8487 312.6411,-21.2772 635.5313,91.8725 935.2898,326.0721 l 176.7612,-102.0532 a 1245.372,1245.372 0 0 0 -120.1398,-290.5734 z"
clip-path="none"
mask="none"
style="fill:#1976d2;fill-opacity:1"
inkscape:connector-curvature="0"
inkscape:transform-center-x="-514.04855"
inkscape:transform-center-y="-444.04649" />
<path
inkscape:transform-center-y="265.80217"
inkscape:transform-center-x="-689.63727"
inkscape:connector-curvature="0"
style="fill:#42a5f5;fill-opacity:1"
mask="none"
clip-path="none"
d="m 9395.9474,-738.70387 a 1245.372,1245.372 0 0 0 120.6501,-290.02213 l -280.8618,-162.1557 c 20.99,-113.2034 20.8488,-228.0063 0.563,-338.9302 -132.1008,-34.4521 -264.2238,-46.1283 -393.9448,-34.635 174.7471,260.1165 238.2017,596.32248 185.2582,973.02076 l 176.7612,102.05309 a 1245.372,1245.372 0 0 0 191.5741,-249.33082 z"
id="path8864-4-8-1-2-4-4-4" />
<path
id="path8866-7-5-5-0-6-4-7"
d="m 8317.501,-115.97954 a 1245.372,1245.372 0 0 0 311.4916,-40.52501 l 0,-324.31131 c 108.5321,-38.42382 207.8837,-95.94755 293.8037,-168.97752 -36.214,-131.6287 -92.1636,-251.88868 -166.9776,-358.48372 -137.894,281.39369 -397.3296,504.44998 -750.0316,646.9487 l 0,204.10623 a 1245.372,1245.372 0 0 0 311.7139,41.24263 z"
clip-path="none"
mask="none"
style="fill:#1976d2;fill-opacity:1"
inkscape:connector-curvature="0"
inkscape:transform-center-x="-117.49007"
inkscape:transform-center-y="639.34029" />
<path
inkscape:transform-center-y="444.04652"
inkscape:transform-center-x="514.04857"
inkscape:connector-curvature="0"
style="fill:#42a5f5;fill-opacity:1"
mask="none"
clip-path="none"
d="m 7238.9827,-738.57936 a 1245.372,1245.372 0 0 0 190.8415,249.49714 l 280.8618,-162.15566 c 87.5421,74.77965 187.0349,132.05879 293.2407,169.95271 95.8868,-97.17659 172.0602,-205.76036 226.9672,-323.8487 -312.6411,21.27714 -635.5313,-91.87254 -935.2898,-326.07203 l -176.7612,102.0531 a 1245.372,1245.372 0 0 0 120.1398,290.57344 z"
id="path8868-6-7-4-7-2-7-3" />
<path
id="path8870-5-3-9-3-5-5-1"
d="m 7238.9108,-1983.9035 a 1245.372,1245.372 0 0 0 -120.6501,290.0221 l 280.8618,162.1557 c -20.99,113.2035 -20.8488,228.0063 -0.563,338.9302 132.1008,34.4521 264.2238,46.1283 393.9448,34.635 -174.7471,-260.1165 -238.2017,-596.3225 -185.2582,-973.0207 l -176.7612,-102.0532 a 1245.372,1245.372 0 0 0 -191.5741,249.3309 z"
clip-path="none"
mask="none"
style="fill:#1976d2;fill-opacity:1"
inkscape:connector-curvature="0"
inkscape:transform-center-x="689.63729"
inkscape:transform-center-y="-265.80221" />
<path
inkscape:transform-center-y="-639.34032"
inkscape:transform-center-x="117.49005"
inkscape:connector-curvature="0"
style="fill:#42a5f5;fill-opacity:1"
mask="none"
clip-path="none"
d="m 8317.3572,-2606.6279 a 1245.372,1245.372 0 0 0 -311.4915,40.525 l -1e-4,324.3113 c -108.5321,38.4239 -207.8837,95.9476 -293.8037,168.9776 36.214,131.6287 92.1637,251.8886 166.9776,358.4837 137.894,-281.3937 397.3296,-504.45 750.0316,-646.9487 l 1e-4,-204.1063 a 1245.372,1245.372 0 0 0 -311.714,-41.2426 z"
id="path8872-6-3-2-1-3-3-7" />
</g>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 13 KiB

View File

@ -1,11 +0,0 @@
// app global css in Sass form
.small-screen-only
@media (max-width: $breakpoint-xs-max)
display: block
@media (min-width: $breakpoint-sm-min)
display: none
.large-screen-only
@media (max-width: $breakpoint-xs-max)
display: none
@media (min-width: $breakpoint-sm-min)
display: block

View File

@ -1 +0,0 @@
// app global css in SCSS form

View File

@ -1,24 +0,0 @@
// Quasar Sass (& SCSS) Variables
// --------------------------------------------------
// To customize the look and feel of this app, you can override
// the Sass/SCSS variables found in Quasar's source Sass/SCSS files.
// Check documentation for full list of Quasar variables
// Your own variables (that are declared here) and Quasar's own
// ones will be available out of the box in your .vue/.scss/.sass files
// It's highly recommended to change the default colors
// to match your app's branding.
// Tip: Use the "Theme Builder" on Quasar's documentation website.
$primary : #26A69A
$secondary : #00d6c2
$accent : #ccffff
$dark : #1d2d2d
$positive : #21BA45
$negative : #f1948a
$info : #31CCEC
$warning : #F2C037

View File

@ -12,11 +12,11 @@
// to match your app's branding.
// Tip: Use the "Theme Builder" on Quasar's documentation website.
$primary: #1976d2;
$secondary: #26a69a;
$primary: #DB4655;
$secondary: blue;
$accent: #ccffff;
$dark: #1d1d1d;
$dark: #111;
$positive: #21ba45;
$negative: #c10015;

View File

@ -6,37 +6,11 @@
<meta charset="utf-8" />
<meta name="description" content="<%= productDescription %>" />
<meta name="format-detection" content="telephone=no" />
<meta name="msapplication-tap-highlight" content="no" />
<meta
name="viewport"
content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width<% if (ctx.mode.cordova || ctx.mode.capacitor) { %>, viewport-fit=cover<% } %>"
content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width"
/>
<link
rel="icon"
type="image/png"
sizes="128x128"
href="icons/favicon-128x128.png"
/>
<link
rel="icon"
type="image/png"
sizes="96x96"
href="icons/favicon-96x96.png"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="icons/favicon-32x32.png"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="icons/favicon-16x16.png"
/>
<link rel="icon" type="image/ico" href="favicon.ico" />
<link rel="icon" sizes="512x512" type="image/png" href="bird.png" />
</head>
<body>
<!-- DO NOT touch the following DIV -->

View File

@ -18,14 +18,10 @@
style="font-size: 20px"
>
<q-card-section>
<img src="~/assets/nostr-logo.png" />
<q-img src="/bird.png" fit="scale-down" />
</q-card-section>
<q-list class="text-secondary">
<q-item
v-if="$store.getters.disabled"
:disabled="$store.getters.disabled"
style="padding: 15px"
>
<q-item style="padding: 15px">
<q-item-section avatar>
<q-icon name="home"></q-icon>
</q-item-section>
@ -33,7 +29,6 @@
<q-item-section>Home</q-item-section>
</q-item>
<q-item
v-else
v-ripple
clickable
:active="$route.name === 'home'"
@ -48,11 +43,7 @@
<q-item-section>Home</q-item-section>
</q-item>
<q-item
v-if="$store.getters.disabled"
:disabled="$store.getters.disabled"
style="padding: 15px"
>
<q-item style="padding: 15px">
<q-item-section avatar>
<q-icon name="email"></q-icon>
</q-item-section>
@ -61,7 +52,6 @@
</q-item>
<q-item
v-else
v-ripple
clickable
:active="$route.name === 'messages'"
@ -104,7 +94,6 @@
</q-item>
</q-list>
<q-btn
v-if="!$store.getters.disabled"
rounded
unelevated
style="width: 140px !important; height: 41px !important"
@ -113,20 +102,8 @@
label="Publish"
@click="dialogPublish = true"
></q-btn>
<q-btn
v-else
rounded
unelevated
style="width: 200px !important; height: 82px !important"
color="primary"
size="md"
label="Generate or Restore User Account"
@click="dialogGenerate = true"
></q-btn>
<br /><br />
<q-btn
v-if="!$store.getters.disabled"
flat
color="primary"
size="md"
@ -166,23 +143,6 @@
<div class="col-4 large-screen-only">
<q-card class="float-left no-shadow">
<q-card-section>
<q-form @submit="addPubFollow">
<q-input v-model="addPubKey" dense rounded outlined>
<template #append>
<q-btn
round
dense
flat
icon="add"
:disabled="$store.getters.disabled"
@click="addPubFollow"
/>
</template>
<q-tooltip> Add public key to follow </q-tooltip>
</q-input>
</q-form>
</q-card-section>
<q-card-section v-if="$store.state.following.length">
<h6 class="q-ma-none">Following</h6>
<q-list>
@ -267,10 +227,6 @@ export default {
</script>
<style lang="sass">
.my-menu-link
color: primary
body.body--dark
background: #1d2d2d
.small-screen-only
@media (max-width: $breakpoint-xs-max)
display: block

View File

@ -23,7 +23,7 @@
ref="chatScroll"
:thumb-style="{
left: '102%',
backgroundColor: '#26A69A',
backgroundColor: 'red',
width: '10px',
opacity: 0.35
}"

View File

@ -1,6 +1,6 @@
<template>
<q-page>
<Publish v-if="!$store.getters.disabled" />
<Publish />
<Post
v-for="event in $store.state.events.kind1"
:key="event.id"

View File

@ -15,33 +15,6 @@
<br /><br />
<div class="q-mx-auto q-px-md">
<q-form class="q-gutter-md" @submit="addPubFollow">
<div class="row">
<div class="col-9">
<q-input
v-model="addPubKey"
filled
type="textarea"
autogrow
hint="Add a public key to follow"
/>
</div>
<div class="col-3">
<q-btn
unelevated
label="Add"
type="submit"
color="primary"
class="q-ml-md q-pa-sm"
/>
</div>
</div>
</q-form>
<br />
<q-separator />
<br />
<q-form class="q-gutter-md" @submit="setProfile">
<p>
If your desired handle is available our relay will use open-timestamps

View File

@ -5,8 +5,8 @@ import {LocalStorage, Notify} from 'quasar'
import {pool} from '../global'
export function launch(store) {
if (!!store.state.keys.pub) {
store.commit('setKey') // passing no arguments will cause a new seed to be generated
if (!store.state.keys.pub) {
store.commit('setKeys') // passing no arguments will cause a new seed to be generated
}
// now we already have a key

View File

@ -1,12 +1,8 @@
import Identicon from 'identicon.js'
export function disabled(state) {
return !state.keys.pub
}
export function displayName(state) {
return pubkey => {
let {metadata = {}} = state.events.kind0[pubkey]
let {metadata = {}} = state.events.kind0[pubkey] || {}
if (metadata.name) return metadata.name
return pubkey.slice(0, 3) + '...' + pubkey.slice(-4)
}
@ -14,7 +10,7 @@ export function displayName(state) {
export function avatar(state) {
return pubkey => {
let {metadata = {}} = state.events.kind0[pubkey]
let {metadata = {}} = state.events.kind0[pubkey] || {}
if (metadata.picture) return metadata.picture
let data = new Identicon(pubkey, 40).toString()
return 'data:image/png;base64,' + data

View File

@ -1,26 +1,27 @@
import {Buffer} from 'buffer'
import {LocalStorage} from 'quasar'
import {getPublicKey} from 'nostr-tools'
import bip32 from 'bip32'
import * as bip39 from 'bip39'
import {
generateSeedWords,
seedFromWords,
privateKeyFromSeed
} from 'nostr-tools/nip06'
export function setKey(state, {seed, priv, pub} = {}) {
if (!seed && !priv && !pub) {
// generate
let randomBytes = crypto.randomBytes(16)
let mnemonic = bip39.entropyToMnemonic(randomBytes.toString('hex'))
seed = bip39.mnemonicToSeedSync(mnemonic)
export function setKeys(state, {mnemonic, priv, pub} = {}) {
if (!mnemonic && !priv && !pub) {
mnemonic = generateSeedWords()
}
if (seed) {
let root = bip32.fromSeed(seed)
priv = root.privateKey.toString('hex')
if (mnemonic) {
let seed = seedFromWords(mnemonic)
priv = privateKeyFromSeed(seed)
}
if (priv) {
pub = getPublicKey(priv)
}
state.keys = {seed, priv, pub}
state.keys = {mnemonic, priv, pub}
}
export function setMetadata(state, {name, picture, about}) {

View File

@ -3,7 +3,7 @@ import {LocalStorage} from 'quasar'
export default function () {
return {
me: LocalStorage.getItem('me') || {}, // { name, picture, about, ... }
keys: LocalStorage.getItem('keys') || {}, // { seed, priv, pub }
keys: LocalStorage.getItem('keys') || {}, // { mnemonic, priv, pub }
relays: LocalStorage.getItem('relays') || {}, // { [url]: {} }
following: LocalStorage.getItem('following') || [], // [ pubkeys... ]
events: {

View File

@ -3,8 +3,12 @@ import {LocalStorage} from 'quasar'
export default function (store) {
store.subscribe(({type, payload}, state) => {
switch (type) {
case 'setKeys':
LocalStorage.set('keys', state.keys)
break
case 'setProfile':
LocalStorage.set('me', state.me)
break
case 'addRelay':
case 'removeRelay':
LocalStorage.set('relays', state.relays)
@ -12,6 +16,7 @@ export default function (store) {
case 'follow':
case 'unfollow':
LocalStorage.set('following', state.following)
break
case 'addEvent':
LocalStorage.set(
`events.${payload.kind}`,

View File

@ -1275,11 +1275,6 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.12.tgz#ac7fb693ac587ee182c3780c26eb65546a1a3c10"
integrity sha512-+2Iggwg7PxoO5Kyhvsq9VarmPbIelXP070HMImEpbtGCoyWNINQj4wzjbQCXzdHTRXnqufutJb5KAURZANNBAw==
"@types/node@10.12.18":
version "10.12.18"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.18.tgz#1d3ca764718915584fcd9f6344621b7672665c67"
integrity sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ==
"@types/node@11.11.6":
version "11.11.6"
resolved "https://registry.yarnpkg.com/@types/node/-/node-11.11.6.tgz#df929d1bb2eee5afdda598a41930fe50b43eaa6a"
@ -1860,13 +1855,6 @@ balanced-match@^1.0.0:
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==
base-x@^3.0.2:
version "3.0.9"
resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.9.tgz#6349aaabb58526332de9f60995e548a53fe21320"
integrity sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==
dependencies:
safe-buffer "^5.0.1"
base64-js@^1.3.1:
version "1.5.1"
resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a"
@ -1887,18 +1875,6 @@ binary-extensions@^2.0.0:
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d"
integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==
bip32@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/bip32/-/bip32-3.0.1.tgz#1d1121469cce6e910e0ec3a5a1990dd62687e2a3"
integrity sha512-Uhpp9aEx3iyiO7CpbNGFxv9WcMIVdGoHG04doQ5Ln0u60uwDah7jUSc3QMV/fSZGm/Oo01/OeAmYevXV+Gz5jQ==
dependencies:
"@types/node" "10.12.18"
bs58check "^2.1.1"
create-hash "^1.2.0"
create-hmac "^1.1.7"
typeforce "^1.11.5"
wif "^2.0.6"
bip39@^3.0.4:
version "3.0.4"
resolved "https://registry.yarnpkg.com/bip39/-/bip39-3.0.4.tgz#5b11fed966840b5e1b8539f0f54ab6392969b2a0"
@ -1977,22 +1953,6 @@ browserslist@^4.0.0, browserslist@^4.12.0, browserslist@^4.14.5, browserslist@^4
node-releases "^2.0.1"
picocolors "^1.0.0"
bs58@^4.0.0:
version "4.0.1"
resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a"
integrity sha1-vhYedsNU9veIrkBx9j806MTwpCo=
dependencies:
base-x "^3.0.2"
bs58check@<3.0.0, bs58check@^2.1.1:
version "2.1.2"
resolved "https://registry.yarnpkg.com/bs58check/-/bs58check-2.1.2.tgz#53b018291228d82a5aa08e7d796fdafda54aebfc"
integrity sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==
dependencies:
bs58 "^4.0.0"
create-hash "^1.1.0"
safe-buffer "^5.1.2"
buffer-crc32@^0.2.1, buffer-crc32@^0.2.13:
version "0.2.13"
resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242"
@ -2389,7 +2349,7 @@ crc32-stream@^4.0.2:
crc-32 "^1.2.0"
readable-stream "^3.4.0"
create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0:
create-hash@^1.1.0, create-hash@^1.1.2:
version "1.2.0"
resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196"
integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==
@ -4450,14 +4410,17 @@ normalize-url@^6.0.1:
resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-6.1.0.tgz#40d0885b535deffe3f3147bec877d05fe4c5668a"
integrity sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==
nostr-tools@^0.6.5:
version "0.6.5"
resolved "https://registry.yarnpkg.com/nostr-tools/-/nostr-tools-0.6.5.tgz#0724f32e674e633bfe3916ee469f3c62ae691bd7"
integrity sha512-Yj1P34TbVSw+3MqHsfSpt1kCsS9p/VM/rr9WxebfvQliKztCPbXG+I6Wq0bTlI4kDkKXx8VNSy30xDMpdOeyww==
nostr-tools@^0.7.1:
version "0.7.1"
resolved "https://registry.yarnpkg.com/nostr-tools/-/nostr-tools-0.7.1.tgz#0f194d4a7331d08b52024e854b4d13bde3c39997"
integrity sha512-b9fcYZgvalmuR5uFAkqtHu5GCt9CF/Zh3w0OMl2Qn1i/hheaJP1GdYzTQdx4BAkDe0wJFIUCaQ/6gB6Oq+PEGA==
dependencies:
"@noble/secp256k1" "^1.3.0"
bip39 "^3.0.4"
buffer "^6.0.3"
create-hmac "^1.1.7"
dns-packet "^5.2.4"
randombytes "^2.1.0"
websocket-polyfill "^0.0.3"
npm-run-path@^4.0.1:
@ -5955,11 +5918,6 @@ typedarray-to-buffer@^3.1.5:
dependencies:
is-typedarray "^1.0.0"
typeforce@^1.11.5:
version "1.18.0"
resolved "https://registry.yarnpkg.com/typeforce/-/typeforce-1.18.0.tgz#d7416a2c5845e085034d70fcc5b6cc4a90edbfdc"
integrity sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g==
typescript@4.4.2:
version "4.4.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.2.tgz#6d618640d430e3569a1dfb44f7d7e600ced3ee86"
@ -6308,13 +6266,6 @@ which@^2.0.1:
dependencies:
isexe "^2.0.0"
wif@^2.0.6:
version "2.0.6"
resolved "https://registry.yarnpkg.com/wif/-/wif-2.0.6.tgz#08d3f52056c66679299726fade0d432ae74b4704"
integrity sha1-CNP1IFbGZnkplyb63g1DKudLRwQ=
dependencies:
bs58check "<3.0.0"
wildcard@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.0.tgz#a77d20e5200c6faaac979e4b3aadc7b3dd7f8fec"