logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://hacktivis.me/git/pleroma-fe.git
commit: 1492937a7e8e27a31699879dc710d3e36c67b953
parent e0fbeee88edb29f04a3260560d10d1a812f84029
Author: Henry Jameson <me@hjkos.com>
Date:   Mon, 24 Apr 2023 23:01:29 +0300

lint

Diffstat:

Msrc/components/media_upload/media_upload.vue6+++---
Msrc/components/settings_modal/admin_tabs/frontends_tab.vue56+++++++++++++++++++++++++++++++++++++++++---------------
Msrc/components/settings_modal/helpers/attachment_setting.vue9++++++---
Msrc/components/settings_modal/helpers/number_setting.vue5++++-
Msrc/components/settings_modal/helpers/string_setting.vue5++++-
Msrc/components/settings_modal/settings_modal.vue13++++++++-----
6 files changed, 66 insertions(+), 28 deletions(-)

diff --git 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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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>