diff --git a/src/App.scss b/src/App.scss index f830a33bc..2426b9982 100644 --- a/src/App.scss +++ b/src/App.scss @@ -168,6 +168,13 @@ input, textarea, .select { } } +option { + color: $fallback--fg; + color: var(--fg, $fallback--fg); + background-color: $fallback--bg; + background-color: var(--bg, $fallback--bg); +} + i[class*=icon-] { color: $fallback--icon; color: var(--icon, $fallback--icon) diff --git a/src/components/notification/notification.vue b/src/components/notification/notification.vue index 97673752a..bb76ddf88 100644 --- a/src/components/notification/notification.vue +++ b/src/components/notification/notification.vue @@ -10,7 +10,8 @@
- {{ notification.action.user.name }} + + {{ notification.action.user.name }} {{$t('notifications.favorited_you')}} diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index 4f4c6aca4..61f2ac0a0 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -31,6 +31,10 @@ const PostStatusForm = { }, mounted () { this.resize(this.$refs.textarea) + + if (this.replyTo) { + this.$refs.textarea.focus() + } }, data () { const preset = this.$route.query.message @@ -87,11 +91,11 @@ const PostStatusForm = { return false } return map(take(matchedEmoji, 5), ({shortcode, image_url, utf}, index) => ({ - // eslint-disable-next-line camelcase screen_name: `:${shortcode}:`, name: '', utf: utf || '', - img: image_url, + // eslint-disable-next-line camelcase + img: utf ? '' : this.$store.state.config.server + image_url, highlighted: index === this.highlighted })) } else { diff --git a/src/components/registration/registration.js b/src/components/registration/registration.js index 771b3b275..738406082 100644 --- a/src/components/registration/registration.js +++ b/src/components/registration/registration.js @@ -5,17 +5,23 @@ const registration = { registering: false }), created () { - if (!this.$store.state.config.registrationOpen || !!this.$store.state.users.currentUser) { + if ((!this.$store.state.config.registrationOpen && !this.token) || !!this.$store.state.users.currentUser) { this.$router.push('/main/all') } + // Seems like this doesn't work at first page open for some reason + if (this.$store.state.config.registrationOpen && this.token) { + this.$router.push('/registration') + } }, computed: { - termsofservice () { return this.$store.state.config.tos } + termsofservice () { return this.$store.state.config.tos }, + token () { return this.$route.params.token } }, methods: { submit () { this.registering = true this.user.nickname = this.user.username + this.user.token = this.token this.$store.state.api.backendInteractor.register(this.user).then( (response) => { if (response.ok) { diff --git a/src/components/registration/registration.vue b/src/components/registration/registration.vue index 00f665af3..087cab6bf 100644 --- a/src/components/registration/registration.vue +++ b/src/components/registration/registration.vue @@ -38,6 +38,10 @@
--> +
+ + +
diff --git a/src/components/retweet_button/retweet_button.js b/src/components/retweet_button/retweet_button.js index 9833e8b25..cafa9cbcf 100644 --- a/src/components/retweet_button/retweet_button.js +++ b/src/components/retweet_button/retweet_button.js @@ -1,5 +1,5 @@ const RetweetButton = { - props: ['status', 'loggedIn'], + props: ['status', 'loggedIn', 'visibility'], data () { return { animated: false diff --git a/src/components/retweet_button/retweet_button.vue b/src/components/retweet_button/retweet_button.vue index 1bee3d08f..f5b005994 100644 --- a/src/components/retweet_button/retweet_button.vue +++ b/src/components/retweet_button/retweet_button.vue @@ -1,9 +1,9 @@ diff --git a/src/i18n/messages.js b/src/i18n/messages.js index e9d6e1768..003df68cd 100644 --- a/src/i18n/messages.js +++ b/src/i18n/messages.js @@ -354,7 +354,8 @@ const en = { fullname: 'Display name', email: 'Email', bio: 'Bio', - password_confirm: 'Password confirmation' + password_confirm: 'Password confirmation', + token: 'Invite token' }, post_status: { posting: 'Posting', @@ -1643,7 +1644,8 @@ const ru = { fullname: 'Отображаемое имя', email: 'Email', bio: 'Описание', - password_confirm: 'Подтверждение пароля' + password_confirm: 'Подтверждение пароля', + token: 'Код приглашения' }, post_status: { posting: 'Отправляется', diff --git a/src/main.js b/src/main.js index 37a187c76..cb53edd3c 100644 --- a/src/main.js +++ b/src/main.js @@ -80,11 +80,12 @@ const i18n = new VueI18n({ window.fetch('/api/statusnet/config.json') .then((res) => res.json()) .then((data) => { - const {name, closed: registrationClosed, textlimit} = data.site + const {name, closed: registrationClosed, textlimit, server} = data.site store.dispatch('setOption', { name: 'name', value: name }) store.dispatch('setOption', { name: 'registrationOpen', value: (registrationClosed === '0') }) store.dispatch('setOption', { name: 'textlimit', value: parseInt(textlimit) }) + store.dispatch('setOption', { name: 'server', value: server }) }) window.fetch('/static/config.json') @@ -120,6 +121,7 @@ window.fetch('/static/config.json') { name: 'mentions', path: '/:username/mentions', component: Mentions }, { name: 'settings', path: '/settings', component: Settings }, { name: 'registration', path: '/registration', component: Registration }, + { name: 'registration', path: '/registration/:token', component: Registration }, { name: 'friend-requests', path: '/friend-requests', component: FollowRequests }, { name: 'user-settings', path: '/user-settings', component: UserSettings } ] diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js index adf598b74..13cc47960 100644 --- a/src/services/api/api.service.js +++ b/src/services/api/api.service.js @@ -159,6 +159,7 @@ const updateProfile = ({credentials, params}) => { // bio // homepage // location +// token const register = (params) => { const form = new FormData()