mirror of
https://github.com/lnbits/lnbits.git
synced 2025-10-09 20:12:34 +02:00
Added notify for non admins
This commit is contained in:
@@ -2,9 +2,7 @@
|
|||||||
%} {{ window_vars(user, extensions) }}{% block page %}
|
%} {{ window_vars(user, extensions) }}{% block page %}
|
||||||
<div class="row q-col-gutter-md q-mb-md">
|
<div class="row q-col-gutter-md q-mb-md">
|
||||||
<div class="col-sm-9 col-xs-12">
|
<div class="col-sm-9 col-xs-12">
|
||||||
<p class="text-h4 gt-sm">
|
<p class="text-h4 gt-sm">Add Extensions</p>
|
||||||
Add Extensions<small v-if="!g.user.admin">(admin only)</small>
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-sm-3 col-xs-12 q-ml-auto">
|
<div class="col-sm-3 col-xs-12 q-ml-auto">
|
||||||
@@ -467,6 +465,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created: function () {
|
created: function () {
|
||||||
|
if (!this.g.user.admin) {
|
||||||
|
this.$q.notify({
|
||||||
|
timeout: 3000,
|
||||||
|
message: 'Only Admins can install extensions',
|
||||||
|
icon: null
|
||||||
|
})
|
||||||
|
}
|
||||||
this.extensions = JSON.parse('{{extensions | tojson | safe}}').map(e => ({
|
this.extensions = JSON.parse('{{extensions | tojson | safe}}').map(e => ({
|
||||||
...e,
|
...e,
|
||||||
inProgress: false
|
inProgress: false
|
||||||
|
Reference in New Issue
Block a user