This commit is contained in:
Henry Jameson 2023-04-24 23:01:29 +03:00
parent e0fbeee88e
commit 1492937a7e
6 changed files with 66 additions and 28 deletions

View File

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

View File

@ -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">
@ -100,7 +123,10 @@
</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"

View File

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

View File

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

View File

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

View File

@ -125,19 +125,22 @@
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") }}
</button>
{{ ' ' }}
<button
class="button-default btn"
@click="pushAdminDraft"
:disabled="!adminDraftAny"
@click="pushAdminDraft"
>
{{ $t("admin_dash.commit_all") }}
</button>