From 4859e63a89e641d5eb9b3afb2d328fd6adb4a9b3 Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Fri, 12 Feb 2021 18:14:54 +0200 Subject: [PATCH 01/38] Remove body scrollbar in chat layout, keep nav bar still on scroll lock, add tiny fade for media modal --- src/App.scss | 6 ++++++ src/components/media_modal/media_modal.vue | 11 +++++++++++ 2 files changed, 17 insertions(+) diff --git a/src/App.scss b/src/App.scss index 8b91f3de..90d083bb 100644 --- a/src/App.scss +++ b/src/App.scss @@ -586,6 +586,7 @@ nav { color: var(--faint, $fallback--faint); box-shadow: 0px 0px 4px rgba(0,0,0,.6); box-shadow: var(--topBarShadow); + box-sizing: border-box; } .fade-enter-active, .fade-leave-active { @@ -878,6 +879,11 @@ nav { overflow: hidden; height: 100%; + // Get rid of scrollbar on body as scrolling happens on different element + body { + overflow: hidden; + } + // Ensures the fixed position of the mobile browser bars on scroll up / down events. // Prevents the mobile browser bars from overlapping or hiding the message posting form. @media all and (max-width: 800px) { diff --git a/src/components/media_modal/media_modal.vue b/src/components/media_modal/media_modal.vue index ea7f7a7f..34394e7e 100644 --- a/src/components/media_modal/media_modal.vue +++ b/src/components/media_modal/media_modal.vue @@ -73,11 +73,22 @@ } } +@keyframes media-fadein { + from { + opacity: 0; + } + to { + opacity: 1; + } +} + .modal-image { max-width: 90%; max-height: 90%; box-shadow: 0px 5px 15px 0 rgba(0, 0, 0, 0.5); image-orientation: from-image; // NOTE: only FF supports this + opacity: 1; + animation: 0.1s cubic-bezier(0.7, 0, 1, 0.6) media-fadein; } .modal-view-button-arrow { From 398aac65585cf7f743f323aa75d05646470da1d5 Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Fri, 12 Feb 2021 18:47:10 +0200 Subject: [PATCH 02/38] remove redundant opacity2 --- src/components/media_modal/media_modal.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/media_modal/media_modal.vue b/src/components/media_modal/media_modal.vue index 34394e7e..54bc5335 100644 --- a/src/components/media_modal/media_modal.vue +++ b/src/components/media_modal/media_modal.vue @@ -87,7 +87,6 @@ max-height: 90%; box-shadow: 0px 5px 15px 0 rgba(0, 0, 0, 0.5); image-orientation: from-image; // NOTE: only FF supports this - opacity: 1; animation: 0.1s cubic-bezier(0.7, 0, 1, 0.6) media-fadein; } From c7018057f1df52edd2f02c4cf101e5dccf8d633c Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Fri, 12 Feb 2021 18:49:57 +0200 Subject: [PATCH 03/38] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 66072979..94b45a82 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Fixed - Button to remove uploaded media in post status form is now properly placed and sized. - Fixed shoutbox not working in mobile layout +- Fixed some UI jumpiness when opening images particularly in chat view ## [2.2.3] - 2021-01-18 From c3b267f2b9f6e36bc727708198de2bae705f85e0 Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Mon, 15 Feb 2021 08:30:41 +0200 Subject: [PATCH 04/38] add padding to poll type to not have arrow icon overlap text --- src/components/poll/poll_form.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/poll/poll_form.vue b/src/components/poll/poll_form.vue index 09496105..c4403210 100644 --- a/src/components/poll/poll_form.vue +++ b/src/components/poll/poll_form.vue @@ -151,6 +151,7 @@ border: none; box-shadow: none; background-color: transparent; + padding-right: 0.75em; } } From a636e5340426f8c9b40811bd01c8710f438a2cf2 Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Mon, 15 Feb 2021 11:10:09 +0200 Subject: [PATCH 05/38] add reason field when approval is required --- src/boot/after_store.js | 1 + src/components/registration/registration.js | 17 +++++++++++++---- src/components/registration/registration.vue | 17 +++++++++++++++++ src/i18n/en.json | 2 ++ 4 files changed, 33 insertions(+), 4 deletions(-) diff --git a/src/boot/after_store.js b/src/boot/after_store.js index b472fcf6..45090e5d 100644 --- a/src/boot/after_store.js +++ b/src/boot/after_store.js @@ -51,6 +51,7 @@ const getInstanceConfig = async ({ store }) => { const vapidPublicKey = data.pleroma.vapid_public_key store.dispatch('setInstanceOption', { name: 'textlimit', value: textlimit }) + store.dispatch('setInstanceOption', { name: 'accountApprovalRequired', value: data.approval_required }) if (vapidPublicKey) { store.dispatch('setInstanceOption', { name: 'vapidPublicKey', value: vapidPublicKey }) diff --git a/src/components/registration/registration.js b/src/components/registration/registration.js index dab06e1e..1ac8e8be 100644 --- a/src/components/registration/registration.js +++ b/src/components/registration/registration.js @@ -10,7 +10,8 @@ const registration = { fullname: '', username: '', password: '', - confirm: '' + confirm: '', + reason: '' }, captcha: {} }), @@ -24,7 +25,8 @@ const registration = { confirm: { required, sameAsPassword: sameAs('password') - } + }, + reason: { required: requiredIf(() => this.accountApprovalRequired) } } } }, @@ -38,7 +40,10 @@ const registration = { computed: { token () { return this.$route.params.token }, bioPlaceholder () { - return this.$t('registration.bio_placeholder').replace(/\s*\n\s*/g, ' \n') + return this.replaceNewlines(this.$t('registration.bio_placeholder')) + }, + reasonPlaceholder () { + return this.replaceNewlines(this.$t('registration.reason_placeholder')) }, ...mapState({ registrationOpen: (state) => state.instance.registrationOpen, @@ -46,7 +51,8 @@ const registration = { isPending: (state) => state.users.signUpPending, serverValidationErrors: (state) => state.users.signUpErrors, termsOfService: (state) => state.instance.tos, - accountActivationRequired: (state) => state.instance.accountActivationRequired + accountActivationRequired: (state) => state.instance.accountActivationRequired, + accountApprovalRequired: (state) => state.instance.accountApprovalRequired }) }, methods: { @@ -73,6 +79,9 @@ const registration = { }, setCaptcha () { this.getCaptcha().then(cpt => { this.captcha = cpt }) + }, + replaceNewlines (str) { + return str.replace(/\s*\n\s*/g, ' \n') } } } diff --git a/src/components/registration/registration.vue b/src/components/registration/registration.vue index 100df0d6..062d4121 100644 --- a/src/components/registration/registration.vue +++ b/src/components/registration/registration.vue @@ -162,6 +162,23 @@ +
+ +