fix: don't allow to remove root user

This commit is contained in:
Oleg Lobanov
2021-01-11 22:33:36 +01:00
parent 8cea2f75b3
commit 019ce80fc5
6 changed files with 22 additions and 11 deletions

View File

@@ -26,14 +26,14 @@ Vue.prototype.$showSuccess = (message) => {
})).show()
}
Vue.prototype.$showError = (error) => {
Vue.prototype.$showError = (error, displayReport = true) => {
let btns = [
Noty.button(i18n.t('buttons.close'), '', function () {
n.close()
})
]
if (!disableExternal) {
if (!disableExternal && displayReport) {
btns.unshift(Noty.button(i18n.t('buttons.reportIssue'), '', function () {
window.open('https://github.com/filebrowser/filebrowser/issues/new/choose')
}))