From 982c799b6fde804018656212aea6128a6f0df928 Mon Sep 17 00:00:00 2001
From: Henry Jameson <me@hjkos.com>
Date: Mon, 1 Feb 2021 21:07:09 +0200
Subject: fix a bunch of <button>s acting as submit buttons breaking enter key

---
 src/components/mfa_form/recovery_form.vue | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'src/components/mfa_form/recovery_form.vue')

diff --git a/src/components/mfa_form/recovery_form.vue b/src/components/mfa_form/recovery_form.vue
index 0bf68e27..8457ec5d 100644
--- a/src/components/mfa_form/recovery_form.vue
+++ b/src/components/mfa_form/recovery_form.vue
@@ -26,6 +26,7 @@
               <button
                 class="button-unstyled -link"
                 @click.prevent="requireTOTP"
+                type="button"
               >
                 {{ $t('login.enter_two_factor_code') }}
               </button>
@@ -33,6 +34,7 @@
               <button
                 class="button-unstyled -link"
                 @click.prevent="abortMFA"
+                type="button"
               >
                 {{ $t('general.cancel') }}
               </button>
-- 
cgit v1.2.3-70-g09d2


From 59aaade7fc796ce43f5fd035fa5f1375d5e3dc75 Mon Sep 17 00:00:00 2001
From: Shpuld Shpuldson <shp@cock.li>
Date: Thu, 25 Feb 2021 14:32:21 +0200
Subject: fix vue warnings

---
 src/components/emoji_input/emoji_input.vue           |  2 +-
 src/components/mfa_form/recovery_form.vue            |  4 ++--
 src/components/mfa_form/totp_form.vue                |  4 ++--
 src/components/popover/popover.vue                   |  2 +-
 src/components/scope_selector/scope_selector.vue     |  8 ++++----
 src/components/search/search.vue                     |  2 +-
 src/components/search_bar/search_bar.vue             |  6 +++---
 .../settings_modal/helpers/boolean_setting.vue       | 12 ++++++------
 .../settings_modal/helpers/modified_indicator.vue    | 20 ++++++++++----------
 src/components/settings_modal/tabs/filtering_tab.vue |  2 +-
 10 files changed, 31 insertions(+), 31 deletions(-)

(limited to 'src/components/mfa_form/recovery_form.vue')

diff --git a/src/components/emoji_input/emoji_input.vue b/src/components/emoji_input/emoji_input.vue
index 1d6c760e..ad62484d 100644
--- a/src/components/emoji_input/emoji_input.vue
+++ b/src/components/emoji_input/emoji_input.vue
@@ -9,8 +9,8 @@
       <button
         v-if="!hideEmojiButton"
         class="button-unstyled emoji-picker-icon"
-        @click.prevent="togglePicker"
         type="button"
+        @click.prevent="togglePicker"
       >
         <FAIcon :icon="['far', 'smile-beam']" />
       </button>
diff --git a/src/components/mfa_form/recovery_form.vue b/src/components/mfa_form/recovery_form.vue
index 8457ec5d..7c594228 100644
--- a/src/components/mfa_form/recovery_form.vue
+++ b/src/components/mfa_form/recovery_form.vue
@@ -25,16 +25,16 @@
             <div>
               <button
                 class="button-unstyled -link"
-                @click.prevent="requireTOTP"
                 type="button"
+                @click.prevent="requireTOTP"
               >
                 {{ $t('login.enter_two_factor_code') }}
               </button>
               <br>
               <button
                 class="button-unstyled -link"
-                @click.prevent="abortMFA"
                 type="button"
+                @click.prevent="abortMFA"
               >
                 {{ $t('general.cancel') }}
               </button>
diff --git a/src/components/mfa_form/totp_form.vue b/src/components/mfa_form/totp_form.vue
index 5d80e185..4ee13992 100644
--- a/src/components/mfa_form/totp_form.vue
+++ b/src/components/mfa_form/totp_form.vue
@@ -27,16 +27,16 @@
             <div>
               <button
                 class="button-unstyled -link"
-                @click.prevent="requireRecovery"
                 type="button"
+                @click.prevent="requireRecovery"
               >
                 {{ $t('login.enter_recovery_code') }}
               </button>
               <br>
               <button
                 class="button-unstyled -link"
-                @click.prevent="abortMFA"
                 type="button"
+                @click.prevent="abortMFA"
               >
                 {{ $t('general.cancel') }}
               </button>
diff --git a/src/components/popover/popover.vue b/src/components/popover/popover.vue
index 876dd61d..bacbc590 100644
--- a/src/components/popover/popover.vue
+++ b/src/components/popover/popover.vue
@@ -6,8 +6,8 @@
     <button
       ref="trigger"
       class="button-unstyled -fullwidth popover-trigger-button"
-      @click="onClick"
       type="button"
+      @click="onClick"
     >
       <slot name="trigger" />
     </button>
diff --git a/src/components/scope_selector/scope_selector.vue b/src/components/scope_selector/scope_selector.vue
index 60e8c3ba..a01242fc 100644
--- a/src/components/scope_selector/scope_selector.vue
+++ b/src/components/scope_selector/scope_selector.vue
@@ -8,8 +8,8 @@
       class="button-unstyled scope"
       :class="css.direct"
       :title="$t('post_status.scope.direct')"
-      @click="changeVis('direct')"
       type="button"
+      @click="changeVis('direct')"
     >
       <FAIcon
         icon="envelope"
@@ -21,8 +21,8 @@
       class="button-unstyled scope"
       :class="css.private"
       :title="$t('post_status.scope.private')"
-      @click="changeVis('private')"
       type="button"
+      @click="changeVis('private')"
     >
       <FAIcon
         icon="lock"
@@ -34,8 +34,8 @@
       class="button-unstyled scope"
       :class="css.unlisted"
       :title="$t('post_status.scope.unlisted')"
-      @click="changeVis('unlisted')"
       type="button"
+      @click="changeVis('unlisted')"
     >
       <FAIcon
         icon="lock-open"
@@ -47,8 +47,8 @@
       class="button-unstyled scope"
       :class="css.public"
       :title="$t('post_status.scope.public')"
-      @click="changeVis('public')"
       type="button"
+      @click="changeVis('public')"
     >
       <FAIcon
         icon="globe"
diff --git a/src/components/search/search.vue b/src/components/search/search.vue
index fa648365..b7bfc1f3 100644
--- a/src/components/search/search.vue
+++ b/src/components/search/search.vue
@@ -15,8 +15,8 @@
       >
       <button
         class="btn button-default search-button"
-        @click="newQuery(searchTerm)"
         type="submit"
+        @click="newQuery(searchTerm)"
       >
         <FAIcon icon="search" />
       </button>
diff --git a/src/components/search_bar/search_bar.vue b/src/components/search_bar/search_bar.vue
index a7432dcb..222f57ba 100644
--- a/src/components/search_bar/search_bar.vue
+++ b/src/components/search_bar/search_bar.vue
@@ -7,8 +7,8 @@
       v-if="hidden"
       class="button-unstyled nav-icon"
       :title="$t('nav.search')"
-      @click.prevent.stop="toggleHidden"
       type="button"
+      @click.prevent.stop="toggleHidden"
     >
       <FAIcon
         fixed-width
@@ -28,8 +28,8 @@
       >
       <button
         class="button-default search-button"
-        @click="find(searchTerm)"
         type="submit"
+        @click="find(searchTerm)"
       >
         <FAIcon
           fixed-width
@@ -38,8 +38,8 @@
       </button>
       <button
         class="button-unstyled cancel-search"
-        @click.prevent.stop="toggleHidden"
         type="button"
+        @click.prevent.stop="toggleHidden"
       >
         <FAIcon
           fixed-width
diff --git a/src/components/settings_modal/helpers/boolean_setting.vue b/src/components/settings_modal/helpers/boolean_setting.vue
index b600b63b..146ad6c1 100644
--- a/src/components/settings_modal/helpers/boolean_setting.vue
+++ b/src/components/settings_modal/helpers/boolean_setting.vue
@@ -4,13 +4,13 @@
   >
     <Checkbox
       :checked="state"
-      @change="update"
       :disabled="disabled"
+      @change="update"
     >
       <span
         v-if="!!$slots.default"
         class="label"
-        >
+      >
         <slot />
       </span>
       <ModifiedIndicator :changed="isChanged" />
@@ -23,14 +23,14 @@ import { get, set } from 'lodash'
 import Checkbox from 'src/components/checkbox/checkbox.vue'
 import ModifiedIndicator from './modified_indicator.vue'
 export default {
-  props: [
-    'path',
-    'disabled'
-  ],
   components: {
     Checkbox,
     ModifiedIndicator
   },
+  props: [
+    'path',
+    'disabled'
+  ],
   computed: {
     pathDefault () {
       const [firstSegment, ...rest] = this.path.split('.')
diff --git a/src/components/settings_modal/helpers/modified_indicator.vue b/src/components/settings_modal/helpers/modified_indicator.vue
index b75a2811..9f4e81fe 100644
--- a/src/components/settings_modal/helpers/modified_indicator.vue
+++ b/src/components/settings_modal/helpers/modified_indicator.vue
@@ -2,21 +2,21 @@
   <span
     v-if="changed"
     class="ModifiedIndicator"
-    >
+  >
     <Popover
       trigger="hover"
-      >
+    >
       <span slot="trigger">
         &nbsp;
-          <FAIcon
-            icon="wrench"
-          />
+        <FAIcon
+          icon="wrench"
+        />
       </span>
       <div
-        class="modified-tooltip"
         slot="content"
-        >
-      {{ $t('settings.setting_changed') }}
+        class="modified-tooltip"
+      >
+        {{ $t('settings.setting_changed') }}
       </div>
     </Popover>
   </span>
@@ -32,8 +32,8 @@ library.add(
 )
 
 export default {
-  props: ['changed'],
-  components: { Popover }
+  components: { Popover },
+  props: ['changed']
 }
 </script>
 
diff --git a/src/components/settings_modal/tabs/filtering_tab.vue b/src/components/settings_modal/tabs/filtering_tab.vue
index 18dd4be9..402c2a4a 100644
--- a/src/components/settings_modal/tabs/filtering_tab.vue
+++ b/src/components/settings_modal/tabs/filtering_tab.vue
@@ -75,8 +75,8 @@
         <p>{{ $t('settings.filtering_explanation') }}</p>
         <textarea
           id="muteWords"
-          class="resize-height"
           v-model="muteWordsString"
+          class="resize-height"
         />
       </div>
       <div>
-- 
cgit v1.2.3-70-g09d2

