mirror of
https://github.com/styppo/hamstr.git
synced 2024-10-18 05:23:28 +00:00
Minor cleanup
This commit is contained in:
parent
1b5033f3d9
commit
4654e36367
@ -5,7 +5,6 @@
|
||||
<script>
|
||||
import {defineComponent} from 'vue'
|
||||
import {useNostrStore} from 'src/nostr/NostrStore'
|
||||
// import TestLayout from 'layouts/TestLayout.vue'
|
||||
import MainLayout from 'layouts/MainLayout.vue'
|
||||
|
||||
export default defineComponent({
|
||||
|
@ -82,7 +82,7 @@ export default {
|
||||
.filter(note => this.filterNote(note, this.feed.hideBots))
|
||||
.map(note => [note]) // TODO Single element thread
|
||||
items.sort(feedOrder)
|
||||
this.visible = items.slice(0, filters.limit)
|
||||
this.visible = items.slice(0, MAX_ITEMS_VISIBLE)
|
||||
this.loading = false
|
||||
|
||||
// Wait a bit before showing the first unreads
|
||||
|
@ -1,49 +0,0 @@
|
||||
<template>
|
||||
<q-layout>
|
||||
Test
|
||||
<div>Pubkey: {{ profile?.name }}</div>
|
||||
<div>Pubkey: {{ profile2?.name }}</div>
|
||||
<div>SignedIn: {{ app.isSignedIn }}</div>
|
||||
</q-layout>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {defineComponent} from 'vue'
|
||||
import {useNostrStore} from 'src/nostr/NostrStore'
|
||||
import {useAppStore} from 'stores/App'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'TestLayout',
|
||||
props: {
|
||||
pubkey: {
|
||||
type: String,
|
||||
default: '6f32dddf2d54f2c5e64e1570abcb9c7a05e8041bac0ee9f4235f694fccb68b5d',
|
||||
},
|
||||
pubkey2: {
|
||||
type: String,
|
||||
default: '6e468422dfb74a5738702a8823b9b28168abab8655faacb6853cd0ee15deee93',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
profile() {
|
||||
console.log('profile')
|
||||
return this.nostr.getProfile(this.pubkey)
|
||||
},
|
||||
profile2() {
|
||||
console.log('profile2')
|
||||
return this.nostr.getProfile(this.pubkey2)
|
||||
}
|
||||
},
|
||||
setup() {
|
||||
return {
|
||||
nostr: useNostrStore(),
|
||||
app: useAppStore(),
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
@ -58,8 +58,8 @@ const Feeds = {
|
||||
let authors = contacts?.map(contact => contact.pubkey)
|
||||
if (!authors || !authors.length) authors = [ZERO_PUBKEY]
|
||||
return {
|
||||
authors,
|
||||
kinds: [EventKind.NOTE],
|
||||
authors,
|
||||
limit: 50,
|
||||
}
|
||||
},
|
||||
@ -104,7 +104,6 @@ export default defineComponent({
|
||||
},
|
||||
watch: {
|
||||
contacts() {
|
||||
console.log('following', this.$refs.following)
|
||||
this.$refs.following?.[0]?.reload()
|
||||
},
|
||||
},
|
||||
|
@ -223,7 +223,6 @@ export default defineComponent({
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
console.log('mounted', this.noteId)
|
||||
this.startStream()
|
||||
this.buildThread()
|
||||
|
||||
@ -232,7 +231,6 @@ export default defineComponent({
|
||||
setTimeout(() => this.resizeObserver.disconnect(), 2000)
|
||||
},
|
||||
unmounted() {
|
||||
console.log('unmounted', this.subId)
|
||||
this.closeStream()
|
||||
this.resizeObserver.disconnect()
|
||||
}
|
||||
|
@ -14,14 +14,14 @@ export const useAppStore = defineStore('app', {
|
||||
},
|
||||
}),
|
||||
getters: {
|
||||
activeAccount(state) {
|
||||
activeAccount() {
|
||||
const settings = useSettingsStore()
|
||||
return settings.activeAccount
|
||||
},
|
||||
isSignedIn(state) {
|
||||
isSignedIn() {
|
||||
return !!this.activeAccount
|
||||
},
|
||||
myPubkey(state) {
|
||||
myPubkey() {
|
||||
return this.activeAccount?.pubkey
|
||||
},
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user