2020-05-03 14:36:12 +00:00
|
|
|
<template>
|
2020-05-25 00:43:55 +00:00
|
|
|
<Modal
|
|
|
|
:is-open="modalActivated"
|
|
|
|
class="settings-modal"
|
|
|
|
:class="{ peek: modalPeeked }"
|
|
|
|
:no-background="modalPeeked"
|
2020-05-03 14:36:12 +00:00
|
|
|
>
|
2020-05-26 20:58:55 +00:00
|
|
|
<div class="settings-modal-panel panel">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<span class="title">
|
2023-03-21 08:26:25 +00:00
|
|
|
{{ modalMode === 'user' ? $t('settings.settings') : $t('admin_dash.window_title') }}
|
2020-05-26 20:58:55 +00:00
|
|
|
</span>
|
|
|
|
<transition name="fade">
|
2022-04-19 21:46:04 +00:00
|
|
|
<div
|
|
|
|
v-if="currentSaveStateNotice"
|
|
|
|
class="alert"
|
|
|
|
:class="{ transparent: !currentSaveStateNotice.error, error: currentSaveStateNotice.error}"
|
|
|
|
@click.prevent
|
|
|
|
>
|
|
|
|
{{ currentSaveStateNotice.error ? $t('settings.saving_err') : $t('settings.saving_ok') }}
|
2022-03-16 20:02:44 +00:00
|
|
|
</div>
|
2020-05-26 20:58:55 +00:00
|
|
|
</transition>
|
|
|
|
<button
|
2020-11-24 10:32:42 +00:00
|
|
|
class="btn button-default"
|
2021-03-08 17:53:30 +00:00
|
|
|
:title="$t('general.peek')"
|
2021-03-08 19:03:55 +00:00
|
|
|
@click="peekModal"
|
2020-05-26 20:58:55 +00:00
|
|
|
>
|
2021-03-08 17:53:30 +00:00
|
|
|
<FAIcon
|
|
|
|
:icon="['far', 'window-minimize']"
|
|
|
|
fixed-width
|
|
|
|
/>
|
2020-05-26 20:58:55 +00:00
|
|
|
</button>
|
|
|
|
<button
|
2020-11-24 10:32:42 +00:00
|
|
|
class="btn button-default"
|
2021-03-08 17:53:30 +00:00
|
|
|
:title="$t('general.close')"
|
2021-03-08 19:03:55 +00:00
|
|
|
@click="closeModal"
|
2020-05-26 20:58:55 +00:00
|
|
|
>
|
2021-03-08 17:53:30 +00:00
|
|
|
<FAIcon
|
|
|
|
icon="times"
|
|
|
|
fixed-width
|
|
|
|
/>
|
2020-05-26 20:58:55 +00:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<div class="panel-body">
|
2023-03-14 19:50:43 +00:00
|
|
|
<SettingsModalUserContent v-if="modalMode === 'user' && modalOpenedOnceUser" />
|
|
|
|
<SettingsModalAdminContent v-if="modalMode === 'admin' && modalOpenedOnceAdmin" />
|
2020-05-26 20:58:55 +00:00
|
|
|
</div>
|
2023-03-22 16:57:23 +00:00
|
|
|
<div class="panel-footer settings-footer -flexible-height">
|
2021-03-08 17:53:30 +00:00
|
|
|
<Popover
|
2023-03-21 08:26:25 +00:00
|
|
|
v-if="modalMode === 'user'"
|
2021-03-08 17:53:30 +00:00
|
|
|
class="export"
|
|
|
|
trigger="click"
|
|
|
|
placement="top"
|
|
|
|
:offset="{ y: 5, x: 5 }"
|
|
|
|
:bound-to="{ x: 'container' }"
|
|
|
|
remove-padding
|
2021-03-08 19:03:55 +00:00
|
|
|
>
|
2022-07-31 09:35:48 +00:00
|
|
|
<template #trigger>
|
2021-04-07 19:42:34 +00:00
|
|
|
<button
|
|
|
|
class="btn button-default"
|
|
|
|
:title="$t('general.close')"
|
|
|
|
>
|
|
|
|
<span>{{ $t("settings.file_export_import.backup_restore") }}</span>
|
2022-03-23 14:15:05 +00:00
|
|
|
{{ ' ' }}
|
2021-04-07 19:42:34 +00:00
|
|
|
<FAIcon
|
|
|
|
icon="chevron-down"
|
|
|
|
/>
|
|
|
|
</button>
|
|
|
|
</template>
|
2022-07-31 09:35:48 +00:00
|
|
|
<template #content="{close}">
|
2021-03-08 17:53:30 +00:00
|
|
|
<div class="dropdown-menu">
|
|
|
|
<button
|
|
|
|
class="button-default dropdown-item dropdown-item-icon"
|
|
|
|
@click.prevent="backup"
|
|
|
|
@click="close"
|
|
|
|
>
|
|
|
|
<FAIcon
|
|
|
|
icon="file-download"
|
|
|
|
fixed-width
|
2021-03-08 19:00:43 +00:00
|
|
|
/><span>{{ $t("settings.file_export_import.backup_settings") }}</span>
|
2021-03-08 17:53:30 +00:00
|
|
|
</button>
|
|
|
|
<button
|
|
|
|
class="button-default dropdown-item dropdown-item-icon"
|
|
|
|
@click.prevent="backupWithTheme"
|
|
|
|
@click="close"
|
|
|
|
>
|
|
|
|
<FAIcon
|
|
|
|
icon="file-download"
|
|
|
|
fixed-width
|
2021-03-08 19:00:43 +00:00
|
|
|
/><span>{{ $t("settings.file_export_import.backup_settings_theme") }}</span>
|
2021-03-08 17:53:30 +00:00
|
|
|
</button>
|
|
|
|
<button
|
|
|
|
class="button-default dropdown-item dropdown-item-icon"
|
|
|
|
@click.prevent="restore"
|
|
|
|
@click="close"
|
|
|
|
>
|
|
|
|
<FAIcon
|
|
|
|
icon="file-upload"
|
|
|
|
fixed-width
|
2021-03-08 19:00:43 +00:00
|
|
|
/><span>{{ $t("settings.file_export_import.restore_settings") }}</span>
|
2021-03-08 17:53:30 +00:00
|
|
|
</button>
|
|
|
|
</div>
|
2021-04-07 19:42:34 +00:00
|
|
|
</template>
|
2021-03-08 17:53:30 +00:00
|
|
|
</Popover>
|
2022-02-22 21:31:40 +00:00
|
|
|
|
2022-03-29 12:35:18 +00:00
|
|
|
<Checkbox
|
|
|
|
:model-value="!!expertLevel"
|
|
|
|
@update:modelValue="expertLevel = Number($event)"
|
|
|
|
>
|
2022-02-28 16:23:32 +00:00
|
|
|
{{ $t("settings.expert_mode") }}
|
2022-02-22 21:31:40 +00:00
|
|
|
</Checkbox>
|
2023-03-21 08:26:25 +00:00
|
|
|
<span v-if="modalMode === 'admin'">
|
|
|
|
<i18n-t keypath="admin_dash.wip_notice">
|
|
|
|
<template #adminFeLink>
|
|
|
|
<a
|
|
|
|
href="/pleroma/admin/#/login-pleroma"
|
|
|
|
target="_blank"
|
|
|
|
>
|
|
|
|
{{ $t("admin_dash.old_ui_link") }}
|
|
|
|
</a>
|
|
|
|
</template>
|
|
|
|
</i18n-t>
|
|
|
|
</span>
|
2022-03-27 09:58:28 +00:00
|
|
|
<span
|
2022-03-29 08:57:54 +00:00
|
|
|
id="unscrolled-content"
|
2022-03-29 12:35:18 +00:00
|
|
|
class="extra-content"
|
2022-03-24 22:01:20 +00:00
|
|
|
/>
|
2023-04-24 20:01:29 +00:00
|
|
|
<span
|
|
|
|
v-if="modalMode === 'admin'"
|
|
|
|
class="admin-buttons"
|
|
|
|
>
|
2023-03-22 16:57:23 +00:00
|
|
|
<button
|
|
|
|
class="button-default btn"
|
|
|
|
:disabled="!adminDraftAny"
|
2023-04-24 20:01:29 +00:00
|
|
|
@click="resetAdminDraft"
|
2023-03-22 16:57:23 +00:00
|
|
|
>
|
2023-04-24 20:01:29 +00:00
|
|
|
{{ $t("admin_dash.reset_all") }}
|
2023-03-22 16:57:23 +00:00
|
|
|
</button>
|
|
|
|
{{ ' ' }}
|
|
|
|
<button
|
|
|
|
class="button-default btn"
|
|
|
|
:disabled="!adminDraftAny"
|
2023-04-24 20:01:29 +00:00
|
|
|
@click="pushAdminDraft"
|
2023-03-22 16:57:23 +00:00
|
|
|
>
|
2023-04-24 20:01:29 +00:00
|
|
|
{{ $t("admin_dash.commit_all") }}
|
2023-03-22 16:57:23 +00:00
|
|
|
</button>
|
|
|
|
</span>
|
2021-03-08 17:53:30 +00:00
|
|
|
</div>
|
2020-05-26 20:58:55 +00:00
|
|
|
</div>
|
2020-05-25 00:43:55 +00:00
|
|
|
</Modal>
|
2020-05-03 14:36:12 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script src="./settings_modal.js"></script>
|
|
|
|
|
|
|
|
<style src="./settings_modal.scss" lang="scss"></style>
|