Added notify for non admins
This commit is contained in:
parent
1a20d35a13
commit
1df9664937
1 changed files with 8 additions and 3 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue