From 7bb28bb23c61e2d648eecf5d59969d32631f78e8 Mon Sep 17 00:00:00 2001
From: Henry Jameson <me@hjkos.com>
Date: Wed, 29 Mar 2023 00:58:07 +0300
Subject: frontends tab initial implementation, now you can (re)install
 frontends! yay!

---
 .../settings_modal/admin_tabs/frontends_tab.vue    | 72 ++++++++++++++++++++++
 1 file changed, 72 insertions(+)
 create mode 100644 src/components/settings_modal/admin_tabs/frontends_tab.vue

(limited to 'src/components/settings_modal/admin_tabs/frontends_tab.vue')

diff --git a/src/components/settings_modal/admin_tabs/frontends_tab.vue b/src/components/settings_modal/admin_tabs/frontends_tab.vue
new file mode 100644
index 00000000..48649dfb
--- /dev/null
+++ b/src/components/settings_modal/admin_tabs/frontends_tab.vue
@@ -0,0 +1,72 @@
+<template>
+  <div class="frontends-tab" :label="$t('admin_dash.tabs.frontends')">
+    <div class="setting-item">
+      <h2>{{ $t('admin_dash.tabs.frontends') }}</h2>
+      <ul class="setting-list cards-list">
+        <li v-for="frontend in frontends" :key="frontend.name">
+          <strong>{{ frontend.name }}</strong>
+          <dl>
+            <dt>{{ $t('admin_dash.frontend.repository') }}</dt>
+            <dd><a :href="frontend.git">{{ frontend.git }}</a></dd>
+            <dt v-if="expertLevel">{{ $t('admin_dash.frontend.versions') }}</dt>
+            <dd v-if="expertLevel">{{ frontend.refs }}</dd>
+            <dt v-if="expertLevel">{{ $t('admin_dash.frontend.build_url') }}</dt>
+            <dd v-if="expertLevel">{{ frontend.build_url }}</dd>
+          </dl>
+          <div>
+            <span class="btn-group">
+              <button
+                class="button button-default btn"
+                type="button"
+                :title="$t('admin_dash.frontend.update')"
+                @click="update(frontend)"
+              >
+                {{
+                    frontend.installed
+                    ? $t('admin_dash.frontend.reinstall')
+                    : $t('admin_dash.frontend.install')
+                }}
+              </button>
+              <Popover
+                v-if="frontend.refs.length > 1"
+                trigger="click"
+                class="button-dropdown"
+                placement="bottom"
+              >
+                <template #content>
+                  <div class="dropdown-menu">
+                    <button
+                      v-for="ref in frontend.refs"
+                      :key="ref"
+                      class="button-default dropdown-item"
+                      @click="update(frontend, ref)"
+                    >
+                      <i18n-t keypath="admin_dash.frontend.install_version">
+                        <template #version>
+                          <code>{{ ref }}</code>
+                        </template>
+                      </i18n-t>
+                    </button>
+                  </div>
+                </template>
+                <template #trigger>
+                  <button
+                    class="button button-default btn"
+                    type="button"
+                    :title="$t('admin_dash.frontend.update')"
+                  >
+                    <FAIcon icon="chevron-down" />
+                  </button>
+                </template>
+              </Popover>
+            </span>
+          </div>
+        </li>
+      </ul>
+    </div>
+  </div>
+</template>
+
+<script src="./frontends_tab.js"></script>
+
+<style lang="scss" src="./frontends_tab.scss"></style>
-- 
cgit v1.2.3-70-g09d2


From ac75d051b720da2c47393de6b35663afe50d37cc Mon Sep 17 00:00:00 2001
From: Henry Jameson <me@hjkos.com>
Date: Wed, 29 Mar 2023 23:26:57 +0300
Subject: better frontends tab, now you can set default frontend

---
 src/App.scss                                       |   1 +
 .../settings_modal/admin_tabs/frontends_tab.js     |   6 +
 .../settings_modal/admin_tabs/frontends_tab.scss   |   2 +-
 .../settings_modal/admin_tabs/frontends_tab.vue    | 204 +++++++++++++++------
 .../settings_modal/helpers/group_setting.js        |   1 -
 src/components/settings_modal/helpers/setting.js   |   4 +-
 .../helpers/shared_computed_object.js              |   3 +
 src/components/settings_modal/settings_modal.scss  |   3 +
 .../settings_modal/settings_modal_admin_content.js |   3 +
 .../settings_modal_admin_content.vue               |   1 +
 src/i18n/en.json                                   |  11 +-
 11 files changed, 177 insertions(+), 62 deletions(-)

(limited to 'src/components/settings_modal/admin_tabs/frontends_tab.vue')

diff --git a/src/App.scss b/src/App.scss
index 149d640f..ef68ac50 100644
--- a/src/App.scss
+++ b/src/App.scss
@@ -646,6 +646,7 @@ option {
 }
 
 .cards-list {
+  list-style: none;
   display: grid;
   grid-auto-flow: row dense;
   grid-template-columns: 1fr 1fr;
diff --git a/src/components/settings_modal/admin_tabs/frontends_tab.js b/src/components/settings_modal/admin_tabs/frontends_tab.js
index a5d33cbe..a2c27c2a 100644
--- a/src/components/settings_modal/admin_tabs/frontends_tab.js
+++ b/src/components/settings_modal/admin_tabs/frontends_tab.js
@@ -51,6 +51,12 @@ const FrontendsTab = {
         .then((externalUser) => {
           this.$store.dispatch('loadFrontendsStuff')
         })
+    },
+    setDefault (frontend, suggestRef) {
+      const ref = suggestRef || frontend.refs[0]
+      const { name } = frontend
+
+      this.$store.commit('updateAdminDraft', { path: [':pleroma', ':frontends', ':primary'], value: { name, ref } })
     }
   }
 }
diff --git a/src/components/settings_modal/admin_tabs/frontends_tab.scss b/src/components/settings_modal/admin_tabs/frontends_tab.scss
index 1e1881ff..e3e04bc6 100644
--- a/src/components/settings_modal/admin_tabs/frontends_tab.scss
+++ b/src/components/settings_modal/admin_tabs/frontends_tab.scss
@@ -8,6 +8,6 @@
     word-wrap: nowrap;
     white-space: nowrap;
     overflow-x: hidden;
-    max-width: 80%;
+    max-width: 10em;
   }
 }
diff --git a/src/components/settings_modal/admin_tabs/frontends_tab.vue b/src/components/settings_modal/admin_tabs/frontends_tab.vue
index 48649dfb..71bbfa69 100644
--- a/src/components/settings_modal/admin_tabs/frontends_tab.vue
+++ b/src/components/settings_modal/admin_tabs/frontends_tab.vue
@@ -2,67 +2,157 @@
   <div class="frontends-tab" :label="$t('admin_dash.tabs.frontends')">
     <div class="setting-item">
       <h2>{{ $t('admin_dash.tabs.frontends') }}</h2>
-      <ul class="setting-list cards-list">
-        <li v-for="frontend in frontends" :key="frontend.name">
-          <strong>{{ frontend.name }}</strong>
-          <dl>
-            <dt>{{ $t('admin_dash.frontend.repository') }}</dt>
-            <dd><a :href="frontend.git">{{ frontend.git }}</a></dd>
-            <dt v-if="expertLevel">{{ $t('admin_dash.frontend.versions') }}</dt>
-            <dd v-if="expertLevel">{{ frontend.refs }}</dd>
-            <dt v-if="expertLevel">{{ $t('admin_dash.frontend.build_url') }}</dt>
-            <dd v-if="expertLevel">{{ frontend.build_url }}</dd>
-          </dl>
-          <div>
-            <span class="btn-group">
-              <button
-                class="button button-default btn"
-                type="button"
-                :title="$t('admin_dash.frontend.update')"
-                @click="update(frontend)"
-              >
-                {{
-                    frontend.installed
-                    ? $t('admin_dash.frontend.reinstall')
-                    : $t('admin_dash.frontend.install')
-                }}
-              </button>
-              <Popover
-                v-if="frontend.refs.length > 1"
-                trigger="click"
-                class="button-dropdown"
-                placement="bottom"
+      <p>{{ $t('admin_dash.frontend.wip_notice') }}</p>
+      <ul class="setting-list">
+        <li>
+          <h3>{{ $t('admin_dash.frontend.default_frontend') }}</h3>
+          <p>{{ $t('admin_dash.frontend.default_frontend_tip') }}</p>
+          <p>{{ $t('admin_dash.frontend.default_frontend_tip2') }}</p>
+        </li>
+        <li>
+          <StringSetting path=":pleroma.:frontends.:primary.name">
+            NAME
+          </StringSetting>
+        </li>
+        <li>
+          <StringSetting path=":pleroma.:frontends.:primary.ref">
+            REF
+          </StringSetting>
+        </li>
+        <li>
+          <GroupSetting path=":pleroma.:frontends.:primary"/>
+        </li>
+      </ul>
+      <div class="setting-list">
+        <h3>{{ $t('admin_dash.frontend.available_frontends') }}</h3>
+        <ul class="cards-list">
+          <li v-for="frontend in frontends" :key="frontend.name">
+            <strong>{{ frontend.name }}</strong>
+            {{ ' ' }}
+            <span v-if="adminDraft[':pleroma'][':frontends'][':primary'].name === frontend.name">
+              <i18n-t
+                keypath="admin_dash.frontend.is_default"
+                v-if="adminDraft[':pleroma'][':frontends'][':primary'].ref === frontend.refs[0]"
+              />
+              <i18n-t
+                keypath="admin_dash.frontend.is_default_custom"
+                v-else
               >
-                <template #content>
-                  <div class="dropdown-menu">
+                <template #version>
+                  <code>{{ adminDraft[':pleroma'][':frontends'][':primary'].ref }}</code>
+                </template>
+              </i18n-t>
+            </span>
+            <dl>
+              <dt>{{ $t('admin_dash.frontend.repository') }}</dt>
+              <dd><a :href="frontend.git" target="_blank">{{ frontend.git }}</a></dd>
+              <template v-if="expertLevel">
+                <dt>{{ $t('admin_dash.frontend.versions') }}</dt>
+                <dd v-for="ref in frontend.refs" :key="ref"><code>{{ ref }}</code></dd>
+              </template>
+              <dt v-if="expertLevel">{{ $t('admin_dash.frontend.build_url') }}</dt>
+              <dd v-if="expertLevel"><a :href="frontend.build_url" target="_blank">{{ frontend.build_url }}</a></dd>
+            </dl>
+            <div>
+              <span class="btn-group">
+                <button
+                  class="button button-default btn"
+                  type="button"
+                  :title="$t('admin_dash.frontend.update')"
+                  @click="update(frontend)"
+                >
+                  {{
+                      frontend.installed
+                      ? $t('admin_dash.frontend.reinstall')
+                      : $t('admin_dash.frontend.install')
+                  }}
+                </button>
+                <Popover
+                  v-if="frontend.refs.length > 1"
+                  trigger="click"
+                  class="button-dropdown"
+                  placement="bottom"
+                >
+                  <template #content>
+                    <div class="dropdown-menu">
+                      <button
+                        v-for="ref in frontend.refs"
+                        :key="ref"
+                        class="button-default dropdown-item"
+                        @click="update(frontend, ref)"
+                      >
+                        <i18n-t keypath="admin_dash.frontend.install_version">
+                          <template #version>
+                            <code>{{ ref }}</code>
+                          </template>
+                        </i18n-t>
+                      </button>
+                    </div>
+                  </template>
+                  <template #trigger>
                     <button
-                      v-for="ref in frontend.refs"
-                      :key="ref"
-                      class="button-default dropdown-item"
-                      @click="update(frontend, ref)"
+                      class="button button-default btn dropdown-button"
+                      type="button"
+                      :title="$t('admin_dash.frontend.update')"
                     >
-                      <i18n-t keypath="admin_dash.frontend.install_version">
-                        <template #version>
-                          <code>{{ ref }}</code>
-                        </template>
-                      </i18n-t>
+                      <FAIcon icon="chevron-down" />
                     </button>
-                  </div>
-                </template>
-                <template #trigger>
-                  <button
-                    class="button button-default btn"
-                    type="button"
-                    :title="$t('admin_dash.frontend.update')"
-                  >
-                    <FAIcon icon="chevron-down" />
-                  </button>
-                </template>
-              </Popover>
-            </span>
-          </div>
-        </li>
-      </ul>
+                  </template>
+                </Popover>
+              </span>
+              <span class="btn-group" v-if="frontend.name !== 'admin-fe'">
+                <button
+                  class="button button-default btn"
+                  type="button"
+                  :disabled="
+                             adminDraft[':pleroma'][':frontends'][':primary'].name === frontend.name &&
+                             adminDraft[':pleroma'][':frontends'][':primary'].ref === frontend.refs[0]
+                             "
+                  :title="$t('admin_dash.frontend.update')"
+                  @click="setDefault(frontend)"
+                >
+                  {{
+                      $t('admin_dash.frontend.set_default')
+                  }}
+                </button>
+                {{ ' ' }}
+                <Popover
+                  v-if="frontend.refs.length > 1"
+                  trigger="click"
+                  class="button-dropdown"
+                  placement="bottom"
+                >
+                  <template #content>
+                    <div class="dropdown-menu">
+                      <button
+                        v-for="ref in frontend.refs.slice(1)"
+                        :key="ref"
+                        class="button-default dropdown-item"
+                        @click="setDefault(frontend, ref)"
+                      >
+                        <i18n-t keypath="admin_dash.frontend.set_default_version">
+                          <template #version>
+                            <code>{{ ref }}</code>
+                          </template>
+                        </i18n-t>
+                      </button>
+                    </div>
+                  </template>
+                  <template #trigger>
+                    <button
+                      class="button button-default btn dropdown-button"
+                      type="button"
+                      :title="$t('admin_dash.frontend.update')"
+                    >
+                      <FAIcon icon="chevron-down" />
+                    </button>
+                  </template>
+                </Popover>
+              </span>
+            </div>
+          </li>
+        </ul>
+      </div>
     </div>
   </div>
 </template>
diff --git a/src/components/settings_modal/helpers/group_setting.js b/src/components/settings_modal/helpers/group_setting.js
index 12a49000..23a2a202 100644
--- a/src/components/settings_modal/helpers/group_setting.js
+++ b/src/components/settings_modal/helpers/group_setting.js
@@ -7,7 +7,6 @@ export default {
   computed: {
     ...Setting.computed,
     isDirty () {
-      console.log(this.state, this.draft)
       return !isEqual(this.state, this.draft)
     }
   }
diff --git a/src/components/settings_modal/helpers/setting.js b/src/components/settings_modal/helpers/setting.js
index d2e1a6f4..4f0be448 100644
--- a/src/components/settings_modal/helpers/setting.js
+++ b/src/components/settings_modal/helpers/setting.js
@@ -61,7 +61,7 @@ export default {
       // TODO allow passing shared draft object?
       get () {
         if (this.realSource === 'admin') {
-          return get(this.$store.state.adminSettings.draft, this.path)
+          return get(this.$store.state.adminSettings.draft, this.canonPath)
         } else {
           return this.localDraft
         }
@@ -75,7 +75,7 @@ export default {
       }
     },
     state () {
-      const value = get(this.configSource, this.path)
+      const value = get(this.configSource, this.canonPath)
       if (value === undefined) {
         return this.defaultState
       } else {
diff --git a/src/components/settings_modal/helpers/shared_computed_object.js b/src/components/settings_modal/helpers/shared_computed_object.js
index d02db542..bb3d36ac 100644
--- a/src/components/settings_modal/helpers/shared_computed_object.js
+++ b/src/components/settings_modal/helpers/shared_computed_object.js
@@ -10,6 +10,9 @@ const SharedComputedObject = () => ({
   },
   adminConfig () {
     return this.$store.state.adminSettings.config
+  },
+  adminDraft () {
+    return this.$store.state.adminSettings.draft
   }
 })
 
diff --git a/src/components/settings_modal/settings_modal.scss b/src/components/settings_modal/settings_modal.scss
index 98de736b..49ef83e0 100644
--- a/src/components/settings_modal/settings_modal.scss
+++ b/src/components/settings_modal/settings_modal.scss
@@ -43,6 +43,9 @@
 
       .btn {
         min-height: 2em;
+      }
+
+      .btn:not(.dropdown-button) {
         padding: 0 2em;
       }
     }
diff --git a/src/components/settings_modal/settings_modal_admin_content.js b/src/components/settings_modal/settings_modal_admin_content.js
index b7c0de57..f94721ec 100644
--- a/src/components/settings_modal/settings_modal_admin_content.js
+++ b/src/components/settings_modal/settings_modal_admin_content.js
@@ -51,6 +51,9 @@ const SettingsModalAdminContent = {
     adminDbLoaded () {
       return this.$store.state.adminSettings.loaded
     },
+    adminDescriptionsLoaded () {
+      return this.$store.state.adminSettings.descriptions !== null
+    },
     noDb () {
       return this.$store.state.adminSettings.dbConfigEnabled === false
     }
diff --git a/src/components/settings_modal/settings_modal_admin_content.vue b/src/components/settings_modal/settings_modal_admin_content.vue
index ae670a90..a7a2ac9a 100644
--- a/src/components/settings_modal/settings_modal_admin_content.vue
+++ b/src/components/settings_modal/settings_modal_admin_content.vue
@@ -1,5 +1,6 @@
 <template>
   <tab-switcher
+    v-if="adminDescriptionsLoaded && (noDb || adminDbLoaded)"
     ref="tabSwitcher"
     class="settings_tab-switcher"
     :side-tab-bar="true"
diff --git a/src/i18n/en.json b/src/i18n/en.json
index ede5d494..6ae31ee8 100644
--- a/src/i18n/en.json
+++ b/src/i18n/en.json
@@ -879,8 +879,17 @@
       "versions": "Available versions",
       "build_url": "Build URL",
       "reinstall": "Reinstall",
+      "is_default": "(Default)",
+      "is_default_custom": "(Default, version: {version})",
       "install": "Install",
-      "install_version": "Install version {version}"
+      "install_version": "Install version {version}",
+      "set_default": "Set default",
+      "set_default_version": "Set version {version} as default",
+      "wip_notice": "Please note that this section is a WIP and lacks certain features as backend implementation of front-end management is incomplete.",
+      "default_frontend": "Default front-end",
+      "default_frontend_tip": "Default front-end will be shown to all users. Currently there's no way to for a user to select personal front-end. If you switch away from PleromaFE you'll most likely have to use old and buggy AdminFE to do instance configuration until we replace it.",
+      "default_frontend_tip2": "WIP: Since Pleroma backend doesn't properly list all installed frontends you'll have to enter name and reference manually. List below provides shortcuts to fill the values.",
+      "available_frontends": "Available for install"
     }
   },
   "time": {
-- 
cgit v1.2.3-70-g09d2


From 1492937a7e8e27a31699879dc710d3e36c67b953 Mon Sep 17 00:00:00 2001
From: Henry Jameson <me@hjkos.com>
Date: Mon, 24 Apr 2023 23:01:29 +0300
Subject: lint

---
 src/components/media_upload/media_upload.vue       |  6 +--
 .../settings_modal/admin_tabs/frontends_tab.vue    | 56 ++++++++++++++++------
 .../settings_modal/helpers/attachment_setting.vue  |  9 ++--
 .../settings_modal/helpers/number_setting.vue      |  5 +-
 .../settings_modal/helpers/string_setting.vue      |  5 +-
 src/components/settings_modal/settings_modal.vue   | 13 +++--
 6 files changed, 66 insertions(+), 28 deletions(-)

(limited to 'src/components/settings_modal/admin_tabs/frontends_tab.vue')

diff --git a/src/components/media_upload/media_upload.vue b/src/components/media_upload/media_upload.vue
index c761b94f..993c01a4 100644
--- a/src/components/media_upload/media_upload.vue
+++ b/src/components/media_upload/media_upload.vue
@@ -1,7 +1,7 @@
 <template>
   <component
-    class="media-upload"
     :is="normalButton ? 'button' : 'label'"
+    class="media-upload"
     :class="{ disabled: disabled, ['media-upload button-default btn']: normalButton }"
     :title="$t('tool_tip.media_upload')"
     @click="onClick"
@@ -23,13 +23,13 @@
     </template>
     <input
       v-if="uploadReady"
+      ref="input"
       class="hidden-input-file"
       :disabled="disabled"
       type="file"
       multiple="true"
-      @change="change"
-      ref="input"
       :accept="acceptTypes"
+      @change="change"
     >
   </component>
 </template>
diff --git a/src/components/settings_modal/admin_tabs/frontends_tab.vue b/src/components/settings_modal/admin_tabs/frontends_tab.vue
index 71bbfa69..e108a963 100644
--- a/src/components/settings_modal/admin_tabs/frontends_tab.vue
+++ b/src/components/settings_modal/admin_tabs/frontends_tab.vue
@@ -1,5 +1,8 @@
 <template>
-  <div class="frontends-tab" :label="$t('admin_dash.tabs.frontends')">
+  <div
+    class="frontends-tab"
+    :label="$t('admin_dash.tabs.frontends')"
+  >
     <div class="setting-item">
       <h2>{{ $t('admin_dash.tabs.frontends') }}</h2>
       <p>{{ $t('admin_dash.frontend.wip_notice') }}</p>
@@ -20,23 +23,26 @@
           </StringSetting>
         </li>
         <li>
-          <GroupSetting path=":pleroma.:frontends.:primary"/>
+          <GroupSetting path=":pleroma.:frontends.:primary" />
         </li>
       </ul>
       <div class="setting-list">
         <h3>{{ $t('admin_dash.frontend.available_frontends') }}</h3>
         <ul class="cards-list">
-          <li v-for="frontend in frontends" :key="frontend.name">
+          <li
+            v-for="frontend in frontends"
+            :key="frontend.name"
+          >
             <strong>{{ frontend.name }}</strong>
             {{ ' ' }}
             <span v-if="adminDraft[':pleroma'][':frontends'][':primary'].name === frontend.name">
               <i18n-t
-                keypath="admin_dash.frontend.is_default"
                 v-if="adminDraft[':pleroma'][':frontends'][':primary'].ref === frontend.refs[0]"
+                keypath="admin_dash.frontend.is_default"
               />
               <i18n-t
-                keypath="admin_dash.frontend.is_default_custom"
                 v-else
+                keypath="admin_dash.frontend.is_default_custom"
               >
                 <template #version>
                   <code>{{ adminDraft[':pleroma'][':frontends'][':primary'].ref }}</code>
@@ -45,13 +51,30 @@
             </span>
             <dl>
               <dt>{{ $t('admin_dash.frontend.repository') }}</dt>
-              <dd><a :href="frontend.git" target="_blank">{{ frontend.git }}</a></dd>
+              <dd>
+                <a
+                  :href="frontend.git"
+                  target="_blank"
+                >{{ frontend.git }}</a>
+              </dd>
               <template v-if="expertLevel">
                 <dt>{{ $t('admin_dash.frontend.versions') }}</dt>
-                <dd v-for="ref in frontend.refs" :key="ref"><code>{{ ref }}</code></dd>
+                <dd
+                  v-for="ref in frontend.refs"
+                  :key="ref"
+                >
+                  <code>{{ ref }}</code>
+                </dd>
               </template>
-              <dt v-if="expertLevel">{{ $t('admin_dash.frontend.build_url') }}</dt>
-              <dd v-if="expertLevel"><a :href="frontend.build_url" target="_blank">{{ frontend.build_url }}</a></dd>
+              <dt v-if="expertLevel">
+                {{ $t('admin_dash.frontend.build_url') }}
+              </dt>
+              <dd v-if="expertLevel">
+                <a
+                  :href="frontend.build_url"
+                  target="_blank"
+                >{{ frontend.build_url }}</a>
+              </dd>
             </dl>
             <div>
               <span class="btn-group">
@@ -62,7 +85,7 @@
                   @click="update(frontend)"
                 >
                   {{
-                      frontend.installed
+                    frontend.installed
                       ? $t('admin_dash.frontend.reinstall')
                       : $t('admin_dash.frontend.install')
                   }}
@@ -100,19 +123,22 @@
                   </template>
                 </Popover>
               </span>
-              <span class="btn-group" v-if="frontend.name !== 'admin-fe'">
+              <span
+                v-if="frontend.name !== 'admin-fe'"
+                class="btn-group"
+              >
                 <button
                   class="button button-default btn"
                   type="button"
                   :disabled="
-                             adminDraft[':pleroma'][':frontends'][':primary'].name === frontend.name &&
-                             adminDraft[':pleroma'][':frontends'][':primary'].ref === frontend.refs[0]
-                             "
+                    adminDraft[':pleroma'][':frontends'][':primary'].name === frontend.name &&
+                      adminDraft[':pleroma'][':frontends'][':primary'].ref === frontend.refs[0]
+                  "
                   :title="$t('admin_dash.frontend.update')"
                   @click="setDefault(frontend)"
                 >
                   {{
-                      $t('admin_dash.frontend.set_default')
+                    $t('admin_dash.frontend.set_default')
                   }}
                 </button>
                 {{ ' ' }}
diff --git a/src/components/settings_modal/helpers/attachment_setting.vue b/src/components/settings_modal/helpers/attachment_setting.vue
index cc2278b0..0bede2c2 100644
--- a/src/components/settings_modal/helpers/attachment_setting.vue
+++ b/src/components/settings_modal/helpers/attachment_setting.vue
@@ -3,7 +3,10 @@
     v-if="matchesExpertLevel"
     class="AttachmentSetting"
   >
-    <label :for="path" :class="{ 'faint': shouldBeDisabled }">
+    <label
+      :for="path"
+      :class="{ 'faint': shouldBeDisabled }"
+    >
       <template v-if="backendDescriptionLabel">
         {{ backendDescriptionLabel + ' ' }}
       </template>
@@ -51,10 +54,10 @@
           ref="mediaUpload"
           class="media-upload-icon"
           :drop-files="dropFiles"
-          @uploaded="setMediaFile"
-          @upload-failed="uploadFailed"
           normal-button
           :accept-types="acceptTypes"
+          @uploaded="setMediaFile"
+          @upload-failed="uploadFailed"
         />
       </div>
     </div>
diff --git a/src/components/settings_modal/helpers/number_setting.vue b/src/components/settings_modal/helpers/number_setting.vue
index ce168570..065cfbcf 100644
--- a/src/components/settings_modal/helpers/number_setting.vue
+++ b/src/components/settings_modal/helpers/number_setting.vue
@@ -3,7 +3,10 @@
     v-if="matchesExpertLevel"
     class="NumberSetting"
   >
-    <label :for="path" :class="{ 'faint': shouldBeDisabled }">
+    <label
+      :for="path"
+      :class="{ 'faint': shouldBeDisabled }"
+    >
       <template v-if="backendDescriptionLabel">
         {{ backendDescriptionLabel + ' ' }}
       </template>
diff --git a/src/components/settings_modal/helpers/string_setting.vue b/src/components/settings_modal/helpers/string_setting.vue
index 84d0a9d6..9de99d78 100644
--- a/src/components/settings_modal/helpers/string_setting.vue
+++ b/src/components/settings_modal/helpers/string_setting.vue
@@ -3,7 +3,10 @@
     v-if="matchesExpertLevel"
     class="StringSetting"
   >
-    <label :for="path" :class="{ 'faint': shouldBeDisabled }">
+    <label
+      :for="path"
+      :class="{ 'faint': shouldBeDisabled }"
+    >
       <template v-if="backendDescriptionLabel">
         {{ backendDescriptionLabel + ' ' }}
       </template>
diff --git a/src/components/settings_modal/settings_modal.vue b/src/components/settings_modal/settings_modal.vue
index 57ec5535..4e7fd931 100644
--- a/src/components/settings_modal/settings_modal.vue
+++ b/src/components/settings_modal/settings_modal.vue
@@ -125,21 +125,24 @@
           id="unscrolled-content"
           class="extra-content"
         />
-        <span class="admin-buttons" v-if="modalMode === 'admin'">
+        <span
+          v-if="modalMode === 'admin'"
+          class="admin-buttons"
+        >
           <button
             class="button-default btn"
-            @click="resetAdminDraft"
             :disabled="!adminDraftAny"
+            @click="resetAdminDraft"
           >
-              {{ $t("admin_dash.reset_all") }}
+            {{ $t("admin_dash.reset_all") }}
           </button>
           {{ ' ' }}
           <button
             class="button-default btn"
-            @click="pushAdminDraft"
             :disabled="!adminDraftAny"
+            @click="pushAdminDraft"
           >
-              {{ $t("admin_dash.commit_all") }}
+            {{ $t("admin_dash.commit_all") }}
           </button>
         </span>
       </div>
-- 
cgit v1.2.3-70-g09d2


From 6816bc8badb34a41e41718b0d42e1021c974ff64 Mon Sep 17 00:00:00 2001
From: Henry Jameson <me@hjkos.com>
Date: Fri, 5 May 2023 01:50:41 +0300
Subject: remove unused stuff

---
 .../settings_modal/admin_tabs/frontends_tab.vue    |   8 +-
 .../settings_modal/admin_tabs/instance_tab.vue     | 108 ++++++---------------
 .../settings_modal/admin_tabs/limits_tab.vue       |  56 +++--------
 3 files changed, 43 insertions(+), 129 deletions(-)

(limited to 'src/components/settings_modal/admin_tabs/frontends_tab.vue')

diff --git a/src/components/settings_modal/admin_tabs/frontends_tab.vue b/src/components/settings_modal/admin_tabs/frontends_tab.vue
index e108a963..5281ef22 100644
--- a/src/components/settings_modal/admin_tabs/frontends_tab.vue
+++ b/src/components/settings_modal/admin_tabs/frontends_tab.vue
@@ -13,14 +13,10 @@
           <p>{{ $t('admin_dash.frontend.default_frontend_tip2') }}</p>
         </li>
         <li>
-          <StringSetting path=":pleroma.:frontends.:primary.name">
-            NAME
-          </StringSetting>
+          <StringSetting path=":pleroma.:frontends.:primary.name"/>
         </li>
         <li>
-          <StringSetting path=":pleroma.:frontends.:primary.ref">
-            REF
-          </StringSetting>
+          <StringSetting path=":pleroma.:frontends.:primary.ref"/>
         </li>
         <li>
           <GroupSetting path=":pleroma.:frontends.:primary" />
diff --git a/src/components/settings_modal/admin_tabs/instance_tab.vue b/src/components/settings_modal/admin_tabs/instance_tab.vue
index e519e135..d537adb6 100644
--- a/src/components/settings_modal/admin_tabs/instance_tab.vue
+++ b/src/components/settings_modal/admin_tabs/instance_tab.vue
@@ -4,34 +4,22 @@
       <h2>{{ $t('admin_dash.instance.instance') }}</h2>
       <ul class="setting-list">
         <li>
-          <StringSetting path=":pleroma.:instance.:name">
-            NAME
-          </StringSetting>
+          <StringSetting path=":pleroma.:instance.:name"/>
         </li>
         <li>
-          <StringSetting path=":pleroma.:instance.:email">
-            ADMIN EMAIL
-          </StringSetting>
+          <StringSetting path=":pleroma.:instance.:email"/>
         </li>
         <li>
-          <StringSetting path=":pleroma.:instance.:description">
-            DESCRIPTION
-          </StringSetting>
+          <StringSetting path=":pleroma.:instance.:description"/>
         </li>
         <li>
-          <StringSetting path=":pleroma.:instance.:short_description">
-            SHORT DESCRIPTION
-          </StringSetting>
+          <StringSetting path=":pleroma.:instance.:short_description"/>
         </li>
         <li>
-          <AttachmentSetting path=":pleroma.:instance.:instance_thumbnail">
-            INSTANCE THUMBNAIL
-          </AttachmentSetting>
+          <AttachmentSetting path=":pleroma.:instance.:instance_thumbnail"/>
         </li>
         <li>
-          <AttachmentSetting path=":pleroma.:instance.:background_image">
-            BACKGROUND IMAGE
-          </AttachmentSetting>
+          <AttachmentSetting path=":pleroma.:instance.:background_image"/>
         </li>
       </ul>
     </div>
@@ -39,53 +27,39 @@
       <h2>{{ $t('admin_dash.instance.registrations') }}</h2>
       <ul class="setting-list">
         <li>
-          <BooleanSetting path=":pleroma.:instance.:registrations_open">
-            REGISTRATIONS OPEN
-          </BooleanSetting>
+          <BooleanSetting path=":pleroma.:instance.:registrations_open"/>
           <ul class="setting-list suboptions">
             <li>
               <BooleanSetting
                 path=":pleroma.:instance.:invites_enabled"
                 parent-path=":pleroma.:instance.:registrations_open"
                 parent-invert
-              >
-                INVITES ENABLED
-              </BooleanSetting>
+              />
             </li>
           </ul>
         </li>
         <li>
-          <BooleanSetting path=":pleroma.:instance.:birthday_required">
-            BDEY REQUIRED
-          </BooleanSetting>
+          <BooleanSetting path=":pleroma.:instance.:birthday_required"/>
           <ul class="setting-list suboptions">
             <li>
               <IntegerSetting
                 path=":pleroma.:instance.:birthday_min_age"
                 parent-path=":pleroma.:instance.:birthday_required"
-              >
-                BDEY age of consent
-              </IntegerSetting>
+              />
             </li>
           </ul>
         </li>
         <li>
-          <BooleanSetting path=":pleroma.:instance.:account_activation_required">
-            ACTIVATION REQUIRED
-          </BooleanSetting>
+          <BooleanSetting path=":pleroma.:instance.:account_activation_required"/>
         </li>
         <li>
-          <BooleanSetting path=":pleroma.:instance.:account_approval_required">
-            APPROVAL REQUIRED
-          </BooleanSetting>
+          <BooleanSetting path=":pleroma.:instance.:account_approval_required"/>
         </li>
         <li>
           <h3>{{ $t('admin_dash.instance.captcha_header') }}</h3>
         </li>
         <li>
-          <BooleanSetting :path="[':pleroma', 'Pleroma.Captcha', ':enabled']">
-            CAPTCHA
-          </BooleanSetting>
+          <BooleanSetting :path="[':pleroma', 'Pleroma.Captcha', ':enabled']"/>
           <ul class="setting-list suboptions">
             <li>
               <ChoiceSetting
@@ -95,15 +69,11 @@
                   'Pleroma.Captcha.Native': $t('admin_dash.captcha.native'),
                   'Pleroma.Captcha.Kocaptcha': $t('admin_dash.captcha.kocaptcha')
                 }"
-              >
-                CAPTCHA TYPE
-              </ChoiceSetting>
+              />
               <IntegerSetting
                 :path="[':pleroma', 'Pleroma.Captcha', ':seconds_valid']"
                 :parent-path="[':pleroma', 'Pleroma.Captcha', ':enabled']"
-              >
-                VALID
-              </IntegerSetting>
+              />
             </li>
           </ul>
           <ul
@@ -112,9 +82,7 @@
           >
             <h4>{{ $t('admin_dash.instance.kocaptcha') }}</h4>
             <li>
-              <StringSetting :path="[':pleroma', 'Pleroma.Captcha.Kocaptcha', ':endpoint']">
-                cockAPTCHA ENDPOINT
-              </StringSetting>
+              <StringSetting :path="[':pleroma', 'Pleroma.Captcha.Kocaptcha', ':endpoint']"/>
             </li>
           </ul>
         </li>
@@ -124,17 +92,13 @@
       <h2>{{ $t('admin_dash.instance.access') }}</h2>
       <ul class="setting-list">
         <li>
-          <BooleanSetting path=":pleroma.:instance.:public">
-            PUBLIC
-          </BooleanSetting>
+          <BooleanSetting path=":pleroma.:instance.:public"/>
         </li>
         <li>
           <h3>{{ $t('admin_dash.instance.restrict.header') }}</h3>
         </li>
         <li>
-          <ChoiceSetting path=":pleroma.:instance.:limit_to_local_content">
-            SEARCH RESTRICTION
-          </ChoiceSetting>
+          <ChoiceSetting path=":pleroma.:instance.:limit_to_local_content"/>
         </li>
         <li>
           <h4>{{ $t('admin_dash.instance.restrict.timelines') }}</h4>
@@ -145,9 +109,7 @@
             indeterminate-state=":if_instance_is_private"
             swap-description-and-label
             hide-description
-          >
-            LOCAL TIMELINES
-          </BooleanSetting>
+          />
         </li>
         <li>
           <BooleanSetting
@@ -155,14 +117,10 @@
             indeterminate-state=":if_instance_is_private"
             swap-description-and-label
             hide-description
-          >
-            FED TIMELINES
-          </BooleanSetting>
+          />
         </li>
         <li>
-          <GroupSetting path=":pleroma.:restrict_unauthenticated.:timelines">
-            TIMELINES
-          </GroupSetting>
+          <GroupSetting path=":pleroma.:restrict_unauthenticated.:timelines"/>
         </li>
         <li>
           <h4>{{ $t('admin_dash.instance.restrict.profiles') }}</h4>
@@ -173,9 +131,7 @@
             indeterminate-state=":if_instance_is_private"
             swap-description-and-label
             hide-description
-          >
-            LOCAL PROFILES
-          </BooleanSetting>
+          />
         </li>
         <li>
           <BooleanSetting
@@ -183,14 +139,10 @@
             indeterminate-state=":if_instance_is_private"
             swap-description-and-label
             hide-description
-          >
-            FED PROFILES
-          </BooleanSetting>
+          />
         </li>
         <li>
-          <GroupSetting path=":pleroma.:restrict_unauthenticated.:profiles">
-            PROFILES
-          </GroupSetting>
+          <GroupSetting path=":pleroma.:restrict_unauthenticated.:profiles"/>
         </li>
         <li>
           <h4>{{ $t('admin_dash.instance.restrict.activities') }}</h4>
@@ -201,9 +153,7 @@
             indeterminate-state=":if_instance_is_private"
             swap-description-and-label
             hide-description
-          >
-            LOCAL STATUSES
-          </BooleanSetting>
+          />
         </li>
         <li>
           <BooleanSetting
@@ -211,14 +161,10 @@
             indeterminate-state=":if_instance_is_private"
             swap-description-and-label
             hide-description
-          >
-            FED STATUSES
-          </BooleanSetting>
+          />
         </li>
         <li>
-          <GroupSetting path=":pleroma.:restrict_unauthenticated.:activities">
-            STATUSES
-          </GroupSetting>
+          <GroupSetting path=":pleroma.:restrict_unauthenticated.:activities"/>
         </li>
       </ul>
     </div>
diff --git a/src/components/settings_modal/admin_tabs/limits_tab.vue b/src/components/settings_modal/admin_tabs/limits_tab.vue
index f7a70c97..068f2cda 100644
--- a/src/components/settings_modal/admin_tabs/limits_tab.vue
+++ b/src/components/settings_modal/admin_tabs/limits_tab.vue
@@ -11,9 +11,7 @@
             source="admin"
             path=":pleroma.:instance.:limit"
             draft-mode
-          >
-            POST LIMIT
-          </IntegerSetting>
+          />
         </li>
         <li>
           <IntegerSetting
@@ -21,9 +19,7 @@
             path=":pleroma.:instance.:remote_limit"
             expert="1"
             draft-mode
-          >
-            POST LIMIT (remote)
-          </IntegerSetting>
+          />
         </li>
         <li>
           <h3>{{ $t('admin_dash.limits.uploads') }}</h3>
@@ -33,27 +29,21 @@
             source="admin"
             path=":pleroma.:instance.:description_limit"
             draft-mode
-          >
-            IMAGE DESCRIPTION LIMIT
-          </IntegerSetting>
+          />
         </li>
         <li>
           <IntegerSetting
             source="admin"
             path=":pleroma.:instance.:upload_limit"
             draft-mode
-          >
-            UPLOAD LIMIT KiB
-          </IntegerSetting>
+          />
         </li>
         <li>
           <IntegerSetting
             source="admin"
             path=":pleroma.:instance.:max_media_attachments"
             draft-mode
-          >
-            MAX ATTACHMENTS
-          </IntegerSetting>
+          />
         </li>
         <li>
           <h3>{{ $t('admin_dash.limits.users') }}</h3>
@@ -63,27 +53,21 @@
             source="admin"
             path=":pleroma.:instance.:max_pinned_statuses"
             draft-mode
-          >
-            MAX PINNED POSTS
-          </IntegerSetting>
+          />
         </li>
         <li>
           <IntegerSetting
             source="admin"
             path=":pleroma.:instance.:user_bio_length"
             draft-mode
-          >
-            BIO LENGTH
-          </IntegerSetting>
+          />
         </li>
         <li>
           <IntegerSetting
             source="admin"
             path=":pleroma.:instance.:user_name_length"
             draft-mode
-          >
-            NAME LENGTH
-          </IntegerSetting>
+          />
         </li>
         <li>
           <h4>{{ $t('admin_dash.limits.profile_fields') }}</h4>
@@ -93,9 +77,7 @@
             source="admin"
             path=":pleroma.:instance.:max_account_fields"
             draft-mode
-          >
-            MAX ACCOUNT FIELDS
-          </IntegerSetting>
+          />
         </li>
         <li>
           <IntegerSetting
@@ -103,27 +85,21 @@
             path=":pleroma.:instance.:max_remote_account_fields"
             draft-mode
             expert="1"
-          >
-            MAX ACCOUNT FIELDS (remote)
-          </IntegerSetting>
+          />
         </li>
         <li>
           <IntegerSetting
             source="admin"
             path=":pleroma.:instance.:account_field_name_length"
             draft-mode
-          >
-            MAX ACCOUNT FIELD NAME
-          </IntegerSetting>
+          />
         </li>
         <li>
           <IntegerSetting
             source="admin"
             path=":pleroma.:instance.:account_field_value_length"
             draft-mode
-          >
-            MAX ACCOUNT VALUE NAME
-          </IntegerSetting>
+          />
         </li>
         <li>
           <h4>{{ $t('admin_dash.limits.user_uploads') }}</h4>
@@ -133,18 +109,14 @@
             source="admin"
             path=":pleroma.:instance.:avatar_upload_limit"
             draft-mode
-          >
-            MAX AVATAR SIZE KiB
-          </IntegerSetting>
+          />
         </li>
         <li>
           <IntegerSetting
             source="admin"
             path=":pleroma.:instance.:banner_upload_limit"
             draft-mode
-          >
-            MAX BANNER SIZE KiB
-          </IntegerSetting>
+          />
         </li>
       </ul>
     </div>
-- 
cgit v1.2.3-70-g09d2


From b9c69a2272219865ff7e5b35dd1a0df7ead16538 Mon Sep 17 00:00:00 2001
From: Henry Jameson <me@hjkos.com>
Date: Mon, 8 May 2023 21:01:29 +0300
Subject: improve the semantics

---
 .../settings_modal/admin_tabs/frontends_tab.vue    |  28 +--
 .../settings_modal/admin_tabs/limits_tab.vue       | 222 +++++++++++----------
 2 files changed, 130 insertions(+), 120 deletions(-)

(limited to 'src/components/settings_modal/admin_tabs/frontends_tab.vue')

diff --git a/src/components/settings_modal/admin_tabs/frontends_tab.vue b/src/components/settings_modal/admin_tabs/frontends_tab.vue
index 5281ef22..f09e6a80 100644
--- a/src/components/settings_modal/admin_tabs/frontends_tab.vue
+++ b/src/components/settings_modal/admin_tabs/frontends_tab.vue
@@ -11,15 +11,17 @@
           <h3>{{ $t('admin_dash.frontend.default_frontend') }}</h3>
           <p>{{ $t('admin_dash.frontend.default_frontend_tip') }}</p>
           <p>{{ $t('admin_dash.frontend.default_frontend_tip2') }}</p>
-        </li>
-        <li>
-          <StringSetting path=":pleroma.:frontends.:primary.name"/>
-        </li>
-        <li>
-          <StringSetting path=":pleroma.:frontends.:primary.ref"/>
-        </li>
-        <li>
-          <GroupSetting path=":pleroma.:frontends.:primary" />
+          <ul class="setting-list">
+            <li>
+              <StringSetting path=":pleroma.:frontends.:primary.name"/>
+            </li>
+            <li>
+              <StringSetting path=":pleroma.:frontends.:primary.ref"/>
+            </li>
+            <li>
+              <GroupSetting path=":pleroma.:frontends.:primary" />
+            </li>
+          </ul>
         </li>
       </ul>
       <div class="setting-list">
@@ -77,7 +79,6 @@
                 <button
                   class="button button-default btn"
                   type="button"
-                  :title="$t('admin_dash.frontend.update')"
                   @click="update(frontend)"
                 >
                   {{
@@ -112,7 +113,7 @@
                     <button
                       class="button button-default btn dropdown-button"
                       type="button"
-                      :title="$t('admin_dash.frontend.update')"
+                      :title="$t('admin_dash.frontend.more_install_options')"
                     >
                       <FAIcon icon="chevron-down" />
                     </button>
@@ -120,7 +121,7 @@
                 </Popover>
               </span>
               <span
-                v-if="frontend.name !== 'admin-fe'"
+                v-if="frontend.installed && frontend.name !== 'admin-fe'"
                 class="btn-group"
               >
                 <button
@@ -130,7 +131,6 @@
                     adminDraft[':pleroma'][':frontends'][':primary'].name === frontend.name &&
                       adminDraft[':pleroma'][':frontends'][':primary'].ref === frontend.refs[0]
                   "
-                  :title="$t('admin_dash.frontend.update')"
                   @click="setDefault(frontend)"
                 >
                   {{
@@ -164,7 +164,7 @@
                     <button
                       class="button button-default btn dropdown-button"
                       type="button"
-                      :title="$t('admin_dash.frontend.update')"
+                      :title="$t('admin_dash.frontend.more_default_options')"
                     >
                       <FAIcon icon="chevron-down" />
                     </button>
diff --git a/src/components/settings_modal/admin_tabs/limits_tab.vue b/src/components/settings_modal/admin_tabs/limits_tab.vue
index 068f2cda..ef4b9271 100644
--- a/src/components/settings_modal/admin_tabs/limits_tab.vue
+++ b/src/components/settings_modal/admin_tabs/limits_tab.vue
@@ -5,118 +5,128 @@
       <ul class="setting-list">
         <li>
           <h3>{{ $t('admin_dash.limits.posts') }}</h3>
-        </li>
-        <li>
-          <IntegerSetting
-            source="admin"
-            path=":pleroma.:instance.:limit"
-            draft-mode
-          />
-        </li>
-        <li>
-          <IntegerSetting
-            source="admin"
-            path=":pleroma.:instance.:remote_limit"
-            expert="1"
-            draft-mode
-          />
+          <ul class="setting-list">
+            <li>
+              <IntegerSetting
+                source="admin"
+                path=":pleroma.:instance.:limit"
+                draft-mode
+              />
+            </li>
+            <li>
+              <IntegerSetting
+                source="admin"
+                path=":pleroma.:instance.:remote_limit"
+                expert="1"
+                draft-mode
+              />
+            </li>
+          </ul>
         </li>
         <li>
           <h3>{{ $t('admin_dash.limits.uploads') }}</h3>
-        </li>
-        <li>
-          <IntegerSetting
-            source="admin"
-            path=":pleroma.:instance.:description_limit"
-            draft-mode
-          />
-        </li>
-        <li>
-          <IntegerSetting
-            source="admin"
-            path=":pleroma.:instance.:upload_limit"
-            draft-mode
-          />
-        </li>
-        <li>
-          <IntegerSetting
-            source="admin"
-            path=":pleroma.:instance.:max_media_attachments"
-            draft-mode
-          />
+          <ul class="setting-list">
+            <li>
+              <IntegerSetting
+                source="admin"
+                path=":pleroma.:instance.:description_limit"
+                draft-mode
+              />
+            </li>
+            <li>
+              <IntegerSetting
+                source="admin"
+                path=":pleroma.:instance.:upload_limit"
+                draft-mode
+              />
+            </li>
+            <li>
+              <IntegerSetting
+                source="admin"
+                path=":pleroma.:instance.:max_media_attachments"
+                draft-mode
+              />
+            </li>
+          </ul>
         </li>
         <li>
           <h3>{{ $t('admin_dash.limits.users') }}</h3>
-        </li>
-        <li>
-          <IntegerSetting
-            source="admin"
-            path=":pleroma.:instance.:max_pinned_statuses"
-            draft-mode
-          />
-        </li>
-        <li>
-          <IntegerSetting
-            source="admin"
-            path=":pleroma.:instance.:user_bio_length"
-            draft-mode
-          />
-        </li>
-        <li>
-          <IntegerSetting
-            source="admin"
-            path=":pleroma.:instance.:user_name_length"
-            draft-mode
-          />
-        </li>
-        <li>
-          <h4>{{ $t('admin_dash.limits.profile_fields') }}</h4>
-        </li>
-        <li>
-          <IntegerSetting
-            source="admin"
-            path=":pleroma.:instance.:max_account_fields"
-            draft-mode
-          />
-        </li>
-        <li>
-          <IntegerSetting
-            source="admin"
-            path=":pleroma.:instance.:max_remote_account_fields"
-            draft-mode
-            expert="1"
-          />
-        </li>
-        <li>
-          <IntegerSetting
-            source="admin"
-            path=":pleroma.:instance.:account_field_name_length"
-            draft-mode
-          />
-        </li>
-        <li>
-          <IntegerSetting
-            source="admin"
-            path=":pleroma.:instance.:account_field_value_length"
-            draft-mode
-          />
-        </li>
-        <li>
-          <h4>{{ $t('admin_dash.limits.user_uploads') }}</h4>
-        </li>
-        <li>
-          <IntegerSetting
-            source="admin"
-            path=":pleroma.:instance.:avatar_upload_limit"
-            draft-mode
-          />
-        </li>
-        <li>
-          <IntegerSetting
-            source="admin"
-            path=":pleroma.:instance.:banner_upload_limit"
-            draft-mode
-          />
+          <ul class="setting-list">
+            <li>
+              <IntegerSetting
+                source="admin"
+                path=":pleroma.:instance.:max_pinned_statuses"
+                draft-mode
+              />
+            </li>
+            <li>
+              <IntegerSetting
+                source="admin"
+                path=":pleroma.:instance.:user_bio_length"
+                draft-mode
+              />
+            </li>
+            <li>
+              <IntegerSetting
+                source="admin"
+                path=":pleroma.:instance.:user_name_length"
+                draft-mode
+              />
+            </li>
+            <li>
+              <h4>{{ $t('admin_dash.limits.profile_fields') }}</h4>
+              <ul class="setting-list">
+                <li>
+                  <IntegerSetting
+                    source="admin"
+                    path=":pleroma.:instance.:max_account_fields"
+                    draft-mode
+                  />
+                </li>
+                <li>
+                  <IntegerSetting
+                    source="admin"
+                    path=":pleroma.:instance.:max_remote_account_fields"
+                    draft-mode
+                    expert="1"
+                  />
+                </li>
+                <li>
+                  <IntegerSetting
+                    source="admin"
+                    path=":pleroma.:instance.:account_field_name_length"
+                    draft-mode
+                  />
+                </li>
+                <li>
+                  <IntegerSetting
+                    source="admin"
+                    path=":pleroma.:instance.:account_field_value_length"
+                    draft-mode
+                  />
+                </li>
+              </ul>
+            </li>
+            <li>
+              <h4>{{ $t('admin_dash.limits.user_uploads') }}</h4>
+              <ul class="setting-list">
+                <li>
+                  <IntegerSetting
+                    source="admin"
+                    path=":pleroma.:instance.:avatar_upload_limit"
+                    draft-mode
+                  />
+                </li>
+                <li>
+                  <IntegerSetting
+                    source="admin"
+                    path=":pleroma.:instance.:banner_upload_limit"
+                    draft-mode
+                  />
+                </li>
+              </ul>
+            </li>
+          </ul>
         </li>
       </ul>
     </div>
-- 
cgit v1.2.3-70-g09d2


From 039b6c61a2ac0c64b1d24295374401f8bf56af0a Mon Sep 17 00:00:00 2001
From: Henry Jameson <me@hjkos.com>
Date: Mon, 8 May 2023 21:37:29 +0300
Subject: lint

---
 .../settings_modal/admin_tabs/frontends_tab.vue    |  4 +-
 .../settings_modal/admin_tabs/instance_tab.vue     | 44 +++++++++++-----------
 2 files changed, 24 insertions(+), 24 deletions(-)

(limited to 'src/components/settings_modal/admin_tabs/frontends_tab.vue')

diff --git a/src/components/settings_modal/admin_tabs/frontends_tab.vue b/src/components/settings_modal/admin_tabs/frontends_tab.vue
index f09e6a80..13b8fa6b 100644
--- a/src/components/settings_modal/admin_tabs/frontends_tab.vue
+++ b/src/components/settings_modal/admin_tabs/frontends_tab.vue
@@ -13,10 +13,10 @@
           <p>{{ $t('admin_dash.frontend.default_frontend_tip2') }}</p>
           <ul class="setting-list">
             <li>
-              <StringSetting path=":pleroma.:frontends.:primary.name"/>
+              <StringSetting path=":pleroma.:frontends.:primary.name" />
             </li>
             <li>
-              <StringSetting path=":pleroma.:frontends.:primary.ref"/>
+              <StringSetting path=":pleroma.:frontends.:primary.ref" />
             </li>
             <li>
               <GroupSetting path=":pleroma.:frontends.:primary" />
diff --git a/src/components/settings_modal/admin_tabs/instance_tab.vue b/src/components/settings_modal/admin_tabs/instance_tab.vue
index a7ef0f68..cbc578f1 100644
--- a/src/components/settings_modal/admin_tabs/instance_tab.vue
+++ b/src/components/settings_modal/admin_tabs/instance_tab.vue
@@ -4,22 +4,22 @@
       <h2>{{ $t('admin_dash.instance.instance') }}</h2>
       <ul class="setting-list">
         <li>
-          <StringSetting path=":pleroma.:instance.:name"/>
+          <StringSetting path=":pleroma.:instance.:name" />
         </li>
         <li>
-          <StringSetting path=":pleroma.:instance.:email"/>
+          <StringSetting path=":pleroma.:instance.:email" />
         </li>
         <li>
-          <StringSetting path=":pleroma.:instance.:description"/>
+          <StringSetting path=":pleroma.:instance.:description" />
         </li>
         <li>
-          <StringSetting path=":pleroma.:instance.:short_description"/>
+          <StringSetting path=":pleroma.:instance.:short_description" />
         </li>
         <li>
-          <AttachmentSetting path=":pleroma.:instance.:instance_thumbnail"/>
+          <AttachmentSetting path=":pleroma.:instance.:instance_thumbnail" />
         </li>
         <li>
-          <AttachmentSetting path=":pleroma.:instance.:background_image"/>
+          <AttachmentSetting path=":pleroma.:instance.:background_image" />
         </li>
       </ul>
     </div>
@@ -27,7 +27,7 @@
       <h2>{{ $t('admin_dash.instance.registrations') }}</h2>
       <ul class="setting-list">
         <li>
-          <BooleanSetting path=":pleroma.:instance.:registrations_open"/>
+          <BooleanSetting path=":pleroma.:instance.:registrations_open" />
           <ul class="setting-list suboptions">
             <li>
               <BooleanSetting
@@ -39,7 +39,7 @@
           </ul>
         </li>
         <li>
-          <BooleanSetting path=":pleroma.:instance.:birthday_required"/>
+          <BooleanSetting path=":pleroma.:instance.:birthday_required" />
           <ul class="setting-list suboptions">
             <li>
               <IntegerSetting
@@ -50,16 +50,16 @@
           </ul>
         </li>
         <li>
-          <BooleanSetting path=":pleroma.:instance.:account_activation_required"/>
+          <BooleanSetting path=":pleroma.:instance.:account_activation_required" />
         </li>
         <li>
-          <BooleanSetting path=":pleroma.:instance.:account_approval_required"/>
+          <BooleanSetting path=":pleroma.:instance.:account_approval_required" />
         </li>
         <li>
           <h3>{{ $t('admin_dash.instance.captcha_header') }}</h3>
           <ul class="setting-list">
             <li>
-              <BooleanSetting :path="[':pleroma', 'Pleroma.Captcha', ':enabled']"/>
+              <BooleanSetting :path="[':pleroma', 'Pleroma.Captcha', ':enabled']" />
               <ul class="setting-list suboptions">
                 <li>
                   <ChoiceSetting
@@ -81,7 +81,7 @@
                   <h4>{{ $t('admin_dash.instance.kocaptcha') }}</h4>
                   <ul class="setting-list">
                     <li>
-                      <StringSetting :path="[':pleroma', 'Pleroma.Captcha.Kocaptcha', ':endpoint']"/>
+                      <StringSetting :path="[':pleroma', 'Pleroma.Captcha.Kocaptcha', ':endpoint']" />
                     </li>
                   </ul>
                 </li>
@@ -99,7 +99,7 @@
             override-backend-description
             override-backend-description-label
             path=":pleroma.:instance.:public"
-            />
+          />
         </li>
         <li>
           <ChoiceSetting
@@ -123,7 +123,7 @@
                     indeterminate-state=":if_instance_is_private"
                     swap-description-and-label
                     hide-description
-                    />
+                  />
                 </li>
                 <li>
                   <BooleanSetting
@@ -131,10 +131,10 @@
                     indeterminate-state=":if_instance_is_private"
                     swap-description-and-label
                     hide-description
-                    />
+                  />
                 </li>
                 <li>
-                  <GroupSetting path=":pleroma.:restrict_unauthenticated.:timelines"/>
+                  <GroupSetting path=":pleroma.:restrict_unauthenticated.:timelines" />
                 </li>
               </ul>
             </li>
@@ -147,7 +147,7 @@
                     indeterminate-state=":if_instance_is_private"
                     swap-description-and-label
                     hide-description
-                    />
+                  />
                 </li>
                 <li>
                   <BooleanSetting
@@ -155,10 +155,10 @@
                     indeterminate-state=":if_instance_is_private"
                     swap-description-and-label
                     hide-description
-                    />
+                  />
                 </li>
                 <li>
-                  <GroupSetting path=":pleroma.:restrict_unauthenticated.:profiles"/>
+                  <GroupSetting path=":pleroma.:restrict_unauthenticated.:profiles" />
                 </li>
               </ul>
             </li>
@@ -171,7 +171,7 @@
                     indeterminate-state=":if_instance_is_private"
                     swap-description-and-label
                     hide-description
-                    />
+                  />
                 </li>
                 <li>
                   <BooleanSetting
@@ -179,10 +179,10 @@
                     indeterminate-state=":if_instance_is_private"
                     swap-description-and-label
                     hide-description
-                    />
+                  />
                 </li>
                 <li>
-                  <GroupSetting path=":pleroma.:restrict_unauthenticated.:activities"/>
+                  <GroupSetting path=":pleroma.:restrict_unauthenticated.:activities" />
                 </li>
               </ul>
             </li>
-- 
cgit v1.2.3-70-g09d2

