diff --git a/package.json b/package.json index 4b49c59..8fd484f 100644 --- a/package.json +++ b/package.json @@ -11,12 +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", - "md-gum-polyfill": "^1.0.0", - "nostr-tools": "^0.5.0", + "nostr-tools": "^0.6.0", "quasar": "^2.0.0", "stream": "^0.0.2", "vuex": "^4.0.1" diff --git a/quasar.conf.js b/quasar.conf.js index cd67c56..9842fc4 100644 --- a/quasar.conf.js +++ b/quasar.conf.js @@ -8,7 +8,7 @@ /* eslint-env node */ const ESLintPlugin = require('eslint-webpack-plugin') -const { configure } = require('quasar/wrappers'); +const {configure} = require('quasar/wrappers') module.exports = configure(function (ctx) { return { @@ -21,13 +21,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: [], // https://quasar.dev/quasar-cli/quasar-conf-js#Property%3A-css - css: [ - 'app.scss' - ], + css: ['app.scss'], // https://github.com/quasarframework/quasar/tree/dev/extras extras: [ @@ -40,15 +37,15 @@ module.exports = configure(function (ctx) { // 'roboto-font-latin-ext', // this or either 'roboto-font', NEVER both! 'roboto-font', // optional, you are not bound to it - 'material-icons', // optional, you are not bound to it + 'material-icons' // optional, you are not bound to it ], // Full list of options: https://quasar.dev/quasar-cli/quasar-conf-js#Property%3A-build build: { - vueRouterMode: 'hash', // available values: 'hash', 'history' + vueRouterMode: 'history', // available values: 'hash', 'history' // transpile: false, - // publicPath: '/', + publicPath: '/', // Add dependencies for transpiling with Babel (Array of string/regex) // (from node_modules, which are by default not transpiled). @@ -66,10 +63,11 @@ module.exports = configure(function (ctx) { // https://quasar.dev/quasar-cli/handling-webpack // "chain" is a webpack-chain object https://github.com/neutrinojs/webpack-chain - chainWebpack (chain) { - chain.plugin('eslint-webpack-plugin') - .use(ESLintPlugin, [{ extensions: [ 'js', 'vue' ] }]) - }, + chainWebpack(chain) { + chain + .plugin('eslint-webpack-plugin') + .use(ESLintPlugin, [{extensions: ['js', 'vue']}]) + } }, // Full list of options: https://quasar.dev/quasar-cli/quasar-conf-js#Property%3A-devServer @@ -111,14 +109,15 @@ module.exports = configure(function (ctx) { // manualPostHydrationTrigger: true, prodPort: 3000, // The default port that the production server should use - // (gets superseded if process.env.PORT is specified at runtime) + // (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) + // 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' ] }]) + chainWebpackWebserver(chain) { + chain + .plugin('eslint-webpack-plugin') + .use(ESLintPlugin, [{extensions: ['js']}]) }, middlewares: [ @@ -134,9 +133,10 @@ module.exports = configure(function (ctx) { // 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' ] }]) + chainWebpackCustomSW(chain) { + chain + .plugin('eslint-webpack-plugin') + .use(ESLintPlugin, [{extensions: ['js']}]) }, manifest: { @@ -193,13 +193,11 @@ module.exports = configure(function (ctx) { 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: { ... } }, @@ -211,16 +209,18 @@ module.exports = configure(function (ctx) { }, // "chain" is a webpack-chain object https://github.com/neutrinojs/webpack-chain - chainWebpackMain (chain) { - chain.plugin('eslint-webpack-plugin') - .use(ESLintPlugin, [{ extensions: [ 'js' ] }]) + 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' ] }]) - }, + chainWebpackPreload(chain) { + chain + .plugin('eslint-webpack-plugin') + .use(ESLintPlugin, [{extensions: ['js']}]) + } } } -}); +}) diff --git a/src/boot/components.js b/src/boot/components.js index 8115a7c..bde83c8 100644 --- a/src/boot/components.js +++ b/src/boot/components.js @@ -1,10 +1,8 @@ -import Generate from '../components/Generate.vue' import Publish from '../components/Publish.vue' import Reply from '../components/Reply.vue' import Post from '../components/Post.vue' export default ({app}) => { - app.component('Generate', Generate) app.component('Publish', Publish) app.component('Reply', Reply) app.component('Post', Post) diff --git a/src/components/Generate.vue b/src/components/Generate.vue deleted file mode 100644 index 3ff0d4d..0000000 --- a/src/components/Generate.vue +++ /dev/null @@ -1,222 +0,0 @@ - - - diff --git a/src/components/Post.vue b/src/components/Post.vue index 4cef9f8..75ec841 100644 --- a/src/components/Post.vue +++ b/src/components/Post.vue @@ -17,7 +17,7 @@ {{ $store.getters.handle(post.pubkey) }} + >{{ $store.getters.displayName(post.pubkey) }} {{ niceDate(post.created_at * 1000) }} @@ -38,29 +38,6 @@ @click="dialogReply = true" > - - - @@ -77,15 +54,6 @@ export default { return { dialogReply: false } - }, - methods: { - postAgain(post) { - this.$store.dispatch('postAgain', post) - }, - - deletePost(post) { - this.$store.dispatch('deletePost', post.id) - } } } diff --git a/src/components/Publish.vue b/src/components/Publish.vue index 4150dad..a2aeff6 100644 --- a/src/components/Publish.vue +++ b/src/components/Publish.vue @@ -3,17 +3,15 @@
@@ -21,7 +19,7 @@
{{ emoji.item }}
@@ -48,7 +46,7 @@ rounded unelevated dense - @click="publishtext = publishtext + emoji.item" + @click="text = text + emoji.item" >{{ emoji.item }} @@ -87,13 +85,13 @@ export default { data() { return { - publishtext: '' + text: '' } }, methods: { sendPost() { - this.$store.dispatch('sendPost', {message: this.publishtext}) - this.publishtext = '' + this.$store.dispatch('sendPost', {message: this.text}) + this.text = '' } } } diff --git a/src/components/Reply.vue b/src/components/Reply.vue index d7e45d3..6e82602 100644 --- a/src/components/Reply.vue +++ b/src/components/Reply.vue @@ -12,7 +12,7 @@ {{ $store.getters.handle(post.pubkey) }} + >{{ $store.getters.displayName(post.pubkey) }} {{ niceDate(post.created_at) }} {{ post.content }} @@ -25,11 +25,11 @@ Coming soon {{ emoji.item }}
@@ -67,7 +67,7 @@ rounded unelevated dense - @click="replytext = replytext + emoji.item" + @click="text = text + emoji.item" >{{ emoji.item }} @@ -109,18 +109,16 @@ export default { props: ['post'], data() { return { - publishtext: '', - replytext: '' + text: '' } }, methods: { sendReply() { - console.log(this.post.id) this.$store.dispatch('sendPost', { - message: this.replytext, + message: this.text, tags: [['e', this.post.id]] }) - this.replytext = '' + this.text = '' } } } diff --git a/src/layouts/MainLayout.vue b/src/layouts/MainLayout.vue index acb6387..a28600d 100644 --- a/src/layouts/MainLayout.vue +++ b/src/layouts/MainLayout.vue @@ -4,10 +4,6 @@ - - - -
Settings - - - - - - - Help - -
Copy public key @@ -203,13 +183,11 @@ - +
Following
- {{ $store.getters.handle(pubkey) }} + {{ $store.getters.displayName(pubkey) }} @@ -234,44 +212,7 @@
- - - INSTALL NOSTR? - - - -
+
@@ -287,85 +228,39 @@ icon="settings" to="/settings" /> - -
+
diff --git a/src/pages/Messages.vue b/src/pages/Messages.vue index 1023424..fa6d8ee 100644 --- a/src/pages/Messages.vue +++ b/src/pages/Messages.vue @@ -1,8 +1,8 @@