diff --git a/changelog.d/chat_vew.add b/changelog.d/chat_vew.add
deleted file mode 100644
index 7e649d454..000000000
--- a/changelog.d/chat_vew.add
+++ /dev/null
@@ -1 +0,0 @@
-Chat view for threads
diff --git a/src/App.js b/src/App.js
index 4ce6f1abc..f3f3872bf 100644
--- a/src/App.js
+++ b/src/App.js
@@ -186,11 +186,7 @@ export default {
return useShoutStore().joined
},
isChats() {
- return (
- this.$route.name === 'chat' ||
- this.$route.name === 'chats' ||
- this.$route.name === 'conversation2'
- )
+ return this.$route.name === 'chat' || this.$route.name === 'chats' || this.$route.name === 'conversation2'
},
isListEdit() {
return this.$route.name === 'lists-edit'
diff --git a/src/components/chat_view/chat_view.js b/src/components/chat_view/chat_view.js
index f48b75c65..33485aebe 100644
--- a/src/components/chat_view/chat_view.js
+++ b/src/components/chat_view/chat_view.js
@@ -367,6 +367,7 @@ const Chat = {
}
},
async startFetching() {
+ console.log(this.statusId, this.chatUserId)
if (!this.isConversation) {
try {
const { data } = await getOrCreateChat({
diff --git a/src/components/chat_view/chat_view.vue b/src/components/chat_view/chat_view.vue
index e6bef0f84..146d7d043 100644
--- a/src/components/chat_view/chat_view.vue
+++ b/src/components/chat_view/chat_view.vue
@@ -21,9 +21,8 @@
{{ $t('timeline.conversation') }}
diff --git a/src/components/conversation/conversation.vue b/src/components/conversation/conversation.vue
index 170ab41d6..945be9749 100644
--- a/src/components/conversation/conversation.vue
+++ b/src/components/conversation/conversation.vue
@@ -11,9 +11,8 @@
>
{{ $t('timeline.conversation') }}
diff --git a/src/components/draft/draft.js b/src/components/draft/draft.js
index 49e186eae..b048782f1 100644
--- a/src/components/draft/draft.js
+++ b/src/components/draft/draft.js
@@ -43,7 +43,7 @@ const Draft = {
return { statusId: this.draft.refId }
} else if (this.draft.type === 'reply') {
return {
- repliedStatus: this.refStatus,
+ repliedStatus: this.refStatus
}
} else {
return {}
diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js
index 02a70e388..162540c08 100644
--- a/src/components/post_status_form/post_status_form.js
+++ b/src/components/post_status_form/post_status_form.js
@@ -351,14 +351,17 @@ const PostStatusForm = {
return this.newStatus.quote !== null
},
quotable() {
- if (!this.quotingAvailable || !this.isReply) {
+ if (
+ !this.quotingAvailable ||
+ !this.isReply
+ ) {
return false
}
if (
this.repliedStatus.visibility === 'public' ||
- this.repliedStatus.visibility === 'unlisted' ||
- this.repliedStatus.visibility === 'local'
+ this.repliedStatus.visibility === 'unlisted' ||
+ this.repliedStatus.visibility === 'local'
) {
return true
} else if (this.repliedStatus.visibility === 'private') {
@@ -700,6 +703,7 @@ const PostStatusForm = {
this.previewLoading = false
return
}
+ const newStatus = this.newStatus
this.previewLoading = true
statusPoster
@@ -957,8 +961,7 @@ const PostStatusForm = {
},
// Quote
- toggleQuoteForm() {
- // This is for the "attach quote" button
+ toggleQuoteForm() { // This is for the "attach quote" button
if (!this.hasQuote) {
this.newStatus.quote = {}
this.newStatus.quote.thread = false
@@ -980,13 +983,14 @@ const PostStatusForm = {
saveDraft() {
if (!this.disableDraft && !this.saveInhibited) {
if (this.safeToSaveDraft) {
- return this.$store
+ return this
+ .$store
.dispatch('addOrSaveDraft', {
draft: {
type: this.statusType,
refId: this.refId,
- ...this.newStatus,
- },
+ ...this.newStatus
+ }
})
.then((id) => {
if (this.newStatus.id !== id) {
diff --git a/src/components/status/status.js b/src/components/status/status.js
index fb37a7faf..b87acc3d7 100644
--- a/src/components/status/status.js
+++ b/src/components/status/status.js
@@ -200,6 +200,7 @@ const Status = {
)
},
status() {
+ console.log('s', this.statusoid)
if (this.retweet) {
return this.statusoid.retweeted_status
} else {
diff --git a/src/components/status_action_buttons/action_button.js b/src/components/status_action_buttons/action_button.js
index 2434820db..edc969b5b 100644
--- a/src/components/status_action_buttons/action_button.js
+++ b/src/components/status_action_buttons/action_button.js
@@ -18,11 +18,11 @@ import {
faChevronDown,
faChevronRight,
faComments,
+ faList,
faExternalLinkAlt,
faEye,
faEyeSlash,
faHistory,
- faList,
faMinus,
faPencil,
faPlus,
diff --git a/src/components/status_action_buttons/action_button_container.js b/src/components/status_action_buttons/action_button_container.js
index d031bd6e9..fa4a529c6 100644
--- a/src/components/status_action_buttons/action_button_container.js
+++ b/src/components/status_action_buttons/action_button_container.js
@@ -5,8 +5,6 @@ import ActionButton from './action_button.vue'
import { useAdminSettingsStore } from 'src/stores/admin_settings.js'
-import genRandomSeed from 'src/services/random_seed/random_seed.service.js'
-
import { library } from '@fortawesome/fontawesome-svg-core'
import {
faEnvelope,
@@ -51,11 +49,6 @@ export default {
this.$store.dispatch('fetchDomainMutes')
}
},
- data() {
- return {
- randomSeed: genRandomSeed(),
- }
- },
computed: {
buttonClass() {
return [
diff --git a/src/stores/interface.js b/src/stores/interface.js
index 275d6893d..48d7cb061 100644
--- a/src/stores/interface.js
+++ b/src/stores/interface.js
@@ -188,6 +188,7 @@ export const useInterfaceStore = defineStore('interface', {
this.globalNotices = this.globalNotices.filter((n) => n !== notice)
},
setGlobalError({ error, instance, info }) {
+ console.log(info)
switch (info) {
case 'https://vuejs.org/error-reference/#runtime-13': {
this.globalError = {
@@ -205,6 +206,7 @@ export const useInterfaceStore = defineStore('interface', {
break
}
}
+ console.log(this.globalError)
},
clearGlobalError() {
this.globalError = null
diff --git a/test/unit/specs/components/chat_view.spec.js b/test/unit/specs/components/chat_view.spec.js
index c308e4fbc..59b46908b 100644
--- a/test/unit/specs/components/chat_view.spec.js
+++ b/test/unit/specs/components/chat_view.spec.js
@@ -34,7 +34,8 @@ const global = {
api: {},
users: {},
statuses: {
- allStatusesObject: {},
+ allStatusesObject: {
+ },
},
},
},
diff --git a/test/unit/specs/components/post_status_form.spec.js b/test/unit/specs/components/post_status_form.spec.js
index 03c0ec8b9..0f8a07677 100644
--- a/test/unit/specs/components/post_status_form.spec.js
+++ b/test/unit/specs/components/post_status_form.spec.js
@@ -1,6 +1,9 @@
-import { mount } from '@vue/test-utils'
import { vi } from 'vitest'
+import { createTestingPinia } from '@pinia/testing'
+import { mount } from '@vue/test-utils'
+import { setActivePinia } from 'pinia'
+
import PostStatusForm from 'src/components/post_status_form/post_status_form.vue'
import { mountOpts } from '../../../fixtures/setup_test'
@@ -66,12 +69,9 @@ describe('PostStatusForm', () => {
})
it('Initializes a reply form', () => {
- const wrapper = mount(
- PostStatusForm,
- replyMountOpts({
- repliedStatus: repliedStatus,
- }),
- )
+ const wrapper = mount(PostStatusForm, replyMountOpts({
+ repliedStatus: repliedStatus,
+ }))
useInstanceCapabilitiesStore().quotingAvailable = true
@@ -89,12 +89,9 @@ describe('PostStatusForm', () => {
})
it('Copies scope and subject line, disables quoting for locked posts', () => {
- const wrapper = mount(
- PostStatusForm,
- replyMountOpts({
- repliedStatus: repliedStatus2,
- }),
- )
+ const wrapper = mount(PostStatusForm, replyMountOpts({
+ repliedStatus: repliedStatus2,
+ }))
useInstanceCapabilitiesStore().quotingAvailable = true
@@ -128,7 +125,7 @@ describe('PostStatusForm', () => {
// ...set our settings...
useMergedConfigStore().mergedConfig = {
...useMergedConfigStore().mergedConfig,
- subjectLineBehavior: 'masto',
+ subjectLineBehavior: 'masto'
}
// ...and only then mount our component
@@ -148,14 +145,11 @@ describe('PostStatusForm', () => {
})
it('Sets status to statusText without mentions if mentions line is enabled', () => {
- const wrapper = mount(
- PostStatusForm,
- replyMountOpts({
- repliedStatus: repliedStatus2,
- statusText: 'testing',
- mentionsLine: true,
- }),
- )
+ const wrapper = mount(PostStatusForm, replyMountOpts({
+ repliedStatus: repliedStatus2,
+ statusText: 'testing',
+ mentionsLine: true,
+ }))
expect(wrapper.vm.statusType).to.equal('reply')
expect(wrapper.vm.isReply).to.equal(true)
@@ -164,12 +158,9 @@ describe('PostStatusForm', () => {
})
it('Sets mention when asked for it', () => {
- const wrapper = mount(
- PostStatusForm,
- replyMountOpts({
- profileMention: repliedUser,
- }),
- )
+ const wrapper = mount(PostStatusForm, replyMountOpts({
+ profileMention: repliedUser,
+ }))
expect(wrapper.vm.statusType).to.equal('mention')
expect(wrapper.vm.isReply).to.equal(false)
@@ -178,12 +169,9 @@ describe('PostStatusForm', () => {
})
it('Initializes quote when reply/quote toggled to quote', () => {
- const wrapper = mount(
- PostStatusForm,
- replyMountOpts({
- repliedStatus: repliedStatus2,
- }),
- )
+ const wrapper = mount(PostStatusForm, replyMountOpts({
+ repliedStatus: repliedStatus2,
+ }))
expect(wrapper.vm.statusType).to.equal('reply')
expect(wrapper.vm.isReply).to.equal(true)
@@ -194,12 +182,9 @@ describe('PostStatusForm', () => {
})
it('Resets quote when reply/quote toggled to reply', () => {
- const wrapper = mount(
- PostStatusForm,
- replyMountOpts({
- repliedStatus: repliedStatus2,
- }),
- )
+ const wrapper = mount(PostStatusForm, replyMountOpts({
+ repliedStatus: repliedStatus2,
+ }))
expect(wrapper.vm.statusType).to.equal('reply')
expect(wrapper.vm.isReply).to.equal(true)
@@ -211,42 +196,32 @@ describe('PostStatusForm', () => {
})
it('Initializes and reset quote when toggling quote attachment', () => {
- const wrapper = mount(
- PostStatusForm,
- replyMountOpts({
- repliedStatus: repliedStatus2,
- }),
- )
+ const wrapper = mount(PostStatusForm, replyMountOpts({
+ repliedStatus: repliedStatus2,
+ }))
expect(wrapper.vm.statusType).to.equal('reply')
expect(wrapper.vm.isReply).to.equal(true)
wrapper.vm.toggleQuoteForm()
- expect(wrapper.vm.newStatus.quote).to.eql({
- thread: false,
- id: null,
- url: '',
- })
+ expect(wrapper.vm.newStatus.quote).to.eql({ thread: false, id: null, url: '' })
wrapper.vm.toggleQuoteForm()
expect(wrapper.vm.newStatus.quote).to.eql(null)
})
it('Status editing', () => {
- const wrapper = mount(
- PostStatusForm,
- replyMountOpts({
- statusId: 'edited',
- statusText: 'text',
- statusSubject: 'heading',
- statusIsSensitive: true,
- statusPoll: {},
- statusQuote: {},
- statusFiles: [],
- statusMediaDescriptions: {},
- statusVisibility: 'unlisted',
- statusContentType: 'text/markdown',
- }),
- )
+ const wrapper = mount(PostStatusForm, replyMountOpts({
+ statusId: 'edited',
+ statusText: 'text',
+ statusSubject: 'heading',
+ statusIsSensitive: true,
+ statusPoll: {},
+ statusQuote: {},
+ statusFiles: [],
+ statusMediaDescriptions: {},
+ statusVisibility: 'unlisted',
+ statusContentType: 'text/markdown',
+ }))
expect(wrapper.vm.statusType).to.equal('edit')
expect(wrapper.vm.isReply).to.equal(false) // edits don't support changing reply-to so it's pretty much ignored