forked from AkkomaGang/admin-fe
Add tooltip and success message after instance was rebooted
This commit is contained in:
parent
7f2d61bc15
commit
020c4e1389
4 changed files with 23 additions and 9 deletions
|
@ -29,6 +29,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||||
- Report notes
|
- Report notes
|
||||||
- Ability to moderate users on the statuses page
|
- Ability to moderate users on the statuses page
|
||||||
- Ability to moderate user on the user's page
|
- Ability to moderate user on the user's page
|
||||||
|
- Ability to restart an application when settings that require instance reboot were changed
|
||||||
- Mobile UI for Settings tab
|
- Mobile UI for Settings tab
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
|
@ -364,7 +364,9 @@ export default {
|
||||||
emoji: 'Emoji',
|
emoji: 'Emoji',
|
||||||
markup: 'Markup settings',
|
markup: 'Markup settings',
|
||||||
corsPlug: 'CORS plug config',
|
corsPlug: 'CORS plug config',
|
||||||
instanceReboot: 'Instance Reboot'
|
instanceReboot: 'Instance Reboot',
|
||||||
|
restartApp: 'You must restart the instance to apply settings',
|
||||||
|
restartSuccess: 'Instance rebooted successfully!'
|
||||||
},
|
},
|
||||||
invites: {
|
invites: {
|
||||||
inviteTokens: 'Invite tokens',
|
inviteTokens: 'Invite tokens',
|
||||||
|
|
|
@ -4,12 +4,14 @@
|
||||||
<div class="settings-header-container">
|
<div class="settings-header-container">
|
||||||
<h1 class="settings-header">{{ $t('settings.settings') }}</h1>
|
<h1 class="settings-header">{{ $t('settings.settings') }}</h1>
|
||||||
<div>
|
<div>
|
||||||
<el-button v-if="needReboot" class="settings-reboot-button" @click="restartApp">
|
<el-tooltip v-if="needReboot" :content="$t('settings.restartApp')" placement="bottom-end">
|
||||||
|
<el-button type="warning" class="settings-reboot-button" @click="restartApp">
|
||||||
<span>
|
<span>
|
||||||
<i class="el-icon-refresh"/>
|
<i class="el-icon-refresh"/>
|
||||||
{{ $t('settings.instanceReboot') }}
|
{{ $t('settings.instanceReboot') }}
|
||||||
</span>
|
</span>
|
||||||
</el-button>
|
</el-button>
|
||||||
|
</el-tooltip>
|
||||||
<el-link
|
<el-link
|
||||||
:underline="false"
|
:underline="false"
|
||||||
href="https://docs-develop.pleroma.social/backend/administration/CLI_tasks/config/"
|
href="https://docs-develop.pleroma.social/backend/administration/CLI_tasks/config/"
|
||||||
|
@ -244,8 +246,16 @@ export default {
|
||||||
this.$store.dispatch('FetchSettings')
|
this.$store.dispatch('FetchSettings')
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
restartApp() {
|
async restartApp() {
|
||||||
this.$store.dispatch('RestartApplication')
|
try {
|
||||||
|
await this.$store.dispatch('RestartApplication')
|
||||||
|
} catch (e) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.$message({
|
||||||
|
type: 'success',
|
||||||
|
message: i18n.t('settings.restartSuccess')
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -275,6 +275,7 @@
|
||||||
width: 145px;
|
width: 145px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
.single-input {
|
.single-input {
|
||||||
margin-right: 10px
|
margin-right: 10px
|
||||||
|
|
Loading…
Reference in a new issue