Add system announcements interface

This commit is contained in:
garrettmills
2020-08-12 21:27:51 -05:00
parent 143fccf179
commit 1458e4126b
9 changed files with 270 additions and 4 deletions

View File

@@ -38,6 +38,7 @@ const template = `
<h6 class="dropdown-header">Hello, {{ first_name }}.</h6>
<a href="/dash/profile" class="dropdown-item">My Profile</a>
<a href="/dash/c/listing/reflect/Token" v-if="can.api_tokens" class="dropdown-item">API Tokens</a>
<a href="/dash/c/listing/system/Announcement" v-if="can.messages" class="dropdown-item">System Announcements</a>
<div class="dropdown-divider"></div>
<a href="/auth/logout" class="dropdown-item">Sign-Out of {{ app_name }}</a>
</div>
@@ -64,6 +65,7 @@ export default class NavBarComponent extends Component {
async vue_on_create() {
this.can.api_tokens = await session.check_permissions('v1:reflect:tokens:list')
this.can.messages = await session.check_permissions('v1:message:banners:create')
this.$forceUpdate()
}