Show empty app placeholder depending on permissions
This commit is contained in:
@@ -76,16 +76,15 @@
|
||||
</TableView>
|
||||
</div>
|
||||
|
||||
<!-- TODO check user permissions -->
|
||||
<div class="empty-placeholder" v-if="filteredApps.length === 0">
|
||||
<div class="empty-placeholder" v-if="apps.length !== 0">
|
||||
<!-- for admins -->
|
||||
<div v-if="false">
|
||||
<h4><i class="fa fa-cloud-download fa-fw"></i> {{ $t('apps.noApps.title') }}</h4>
|
||||
<div v-if="profile.isAtLeastAdmin">
|
||||
<h4>{{ $t('apps.noApps.title') }}</h4>
|
||||
<h5 v-html="$t('apps.noApps.description', { appStoreLink: '#/appstore' })"></h5>
|
||||
</div>
|
||||
|
||||
<!-- for non-admins -->
|
||||
<div v-if="true">
|
||||
<div v-if="!profile.isAtLeastAdmin">
|
||||
<h4>{{ $t('apps.noAccess.title') }}</h4>
|
||||
<h5>{{ $t('apps.noAccess.description') }}</h5>
|
||||
</div>
|
||||
@@ -101,7 +100,6 @@ import { Button, ButtonGroup, Dropdown, Icon, TableView, TextInput } from 'panko
|
||||
import { APP_TYPES, HSTATES, ISTATES, RSTATES } from '../constants.js';
|
||||
import AppsModel from '../models/AppsModel.js';
|
||||
import ApplinksModel from '../models/ApplinksModel.js';
|
||||
import GroupsModel from '../models/GroupsModel.js';
|
||||
import DomainsModel from '../models/DomainsModel.js';
|
||||
import ApplinkDialog from './ApplinkDialog.vue';
|
||||
|
||||
@@ -109,7 +107,6 @@ const API_ORIGIN = import.meta.env.VITE_API_ORIGIN ? import.meta.env.VITE_API_OR
|
||||
const accessToken = localStorage.token;
|
||||
|
||||
const appsModel = AppsModel.create(API_ORIGIN, accessToken);
|
||||
const groupsModel = GroupsModel.create(API_ORIGIN, accessToken);
|
||||
const domainsModel = DomainsModel.create(API_ORIGIN, accessToken);
|
||||
const applinksModel = ApplinksModel.create(API_ORIGIN, accessToken);
|
||||
|
||||
@@ -138,6 +135,7 @@ export default {
|
||||
VIEW_TYPE,
|
||||
ready: false,
|
||||
filter: '',
|
||||
profile: this.$root.profile,
|
||||
apps: [],
|
||||
viewType: (localStorage.appsView && (localStorage.appsView === VIEW_TYPE.GRID || localStorage.appsView === VIEW_TYPE.LIST)) ? localStorage.appsView : VIEW_TYPE.GRID,
|
||||
tagFilter: '',
|
||||
@@ -235,6 +233,7 @@ export default {
|
||||
return stopEvent();
|
||||
}
|
||||
|
||||
// TODO
|
||||
// if (app.pendingPostInstallConfirmation && $scope.appPostInstallConfirm) {
|
||||
// $scope.appPostInstallConfirm.show(app);
|
||||
// return stopEvent();
|
||||
|
||||
Reference in New Issue
Block a user