aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/components/chat_panel/chat_panel.js2
-rw-r--r--src/components/post_status_form/post_status_form.js3
-rw-r--r--src/components/timeline/timeline.js3
-rw-r--r--src/main.js8
-rw-r--r--src/modules/statuses.js4
-rw-r--r--static/config.json3
-rw-r--r--test/unit/specs/modules/statuses.spec.js2
7 files changed, 17 insertions, 8 deletions
diff --git a/src/components/chat_panel/chat_panel.js b/src/components/chat_panel/chat_panel.js
index d528d0a1..d8736d17 100644
--- a/src/components/chat_panel/chat_panel.js
+++ b/src/components/chat_panel/chat_panel.js
@@ -3,7 +3,7 @@ const chatPanel = {
return {
currentMessage: '',
channel: null,
- collapsed: false
+ collapsed: true
}
},
computed: {
diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js
index 6c95873c..6bcf1c66 100644
--- a/src/components/post_status_form/post_status_form.js
+++ b/src/components/post_status_form/post_status_form.js
@@ -32,7 +32,8 @@ const PostStatusForm = {
this.resize(this.$refs.textarea)
},
data () {
- let statusText = ''
+ const preset = this.$route.query.message
+ let statusText = preset || ''
if (this.replyTo) {
const currentUser = this.$store.state.users.currentUser
diff --git a/src/components/timeline/timeline.js b/src/components/timeline/timeline.js
index 74ab85d3..f24626f9 100644
--- a/src/components/timeline/timeline.js
+++ b/src/components/timeline/timeline.js
@@ -105,7 +105,8 @@ const Timeline = {
.then((friends) => this.$store.dispatch('addFriends', { friends }))
},
scrollLoad (e) {
- const height = Math.max(document.body.offsetHeight, document.body.scrollHeight)
+ const bodyBRect = document.body.getBoundingClientRect()
+ const height = Math.max(bodyBRect.height, -(bodyBRect.y))
if (this.timeline.loading === false &&
this.$store.state.config.autoLoad &&
this.$el.offsetHeight > 0 &&
diff --git a/src/main.js b/src/main.js
index 6f8c00f0..7ca34adf 100644
--- a/src/main.js
+++ b/src/main.js
@@ -98,7 +98,13 @@ window.fetch('/static/config.json')
}
const routes = [
- { name: 'root', path: '/', redirect: data['defaultPath'] || '/main/all' },
+ { name: 'root',
+ path: '/',
+ redirect: to => {
+ var redirectRootLogin = data['redirectRootLogin']
+ var redirectRootNoLogin = data['redirectRootNoLogin']
+ return (store.state.users.currentUser ? redirectRootLogin : redirectRootNoLogin) || '/main/all'
+ }},
{ path: '/main/all', component: PublicAndExternalTimeline },
{ path: '/main/public', component: PublicTimeline },
{ path: '/main/friends', component: FriendsTimeline },
diff --git a/src/modules/statuses.js b/src/modules/statuses.js
index bd52f161..b493c212 100644
--- a/src/modules/statuses.js
+++ b/src/modules/statuses.js
@@ -45,7 +45,7 @@ export const prepareStatus = (status) => {
if (status.nsfw === undefined) {
status.nsfw = isNsfw(status)
if (status.retweeted_status) {
- status.retweeted_status.nsfw = status.nsfw
+ status.nsfw = status.retweeted_status.nsfw
}
}
@@ -136,7 +136,7 @@ const addNewStatuses = (state, { statuses, showImmediately = false, timeline, us
if (result.new) {
if (statusType(status) === 'retweet' && status.retweeted_status.user.id === user.id) {
- addNotification({ type: 'repeat', status: status.retweeted_status, action: status })
+ addNotification({ type: 'repeat', status: status, action: status })
}
// We are mentioned in a post
diff --git a/static/config.json b/static/config.json
index 9863ec02..5cf4cdec 100644
--- a/static/config.json
+++ b/static/config.json
@@ -2,7 +2,8 @@
"theme": "pleroma-dark",
"background": "/static/aurora_borealis.jpg",
"logo": "/static/logo.png",
- "defaultPath": "/main/all",
+ "redirectRootNoLogin": "/main/all",
+ "redirectRootLogin": "/main/friends",
"chatDisabled": false,
"showInstanceSpecificPanel": false
}
diff --git a/test/unit/specs/modules/statuses.spec.js b/test/unit/specs/modules/statuses.spec.js
index 372d1aaa..f929192b 100644
--- a/test/unit/specs/modules/statuses.spec.js
+++ b/test/unit/specs/modules/statuses.spec.js
@@ -297,7 +297,7 @@ describe('The Statuses module', () => {
mutations.addNewStatuses(state, { statuses: [retweet], user })
expect(state.notifications.length).to.eql(1)
- expect(state.notifications[0].status).to.eql(status)
+ expect(state.notifications[0].status).to.eql(retweet)
expect(state.notifications[0].action).to.eql(retweet)
expect(state.notifications[0].type).to.eql('repeat')
})