-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial commit of admin panel #149
Changes from 1 commit
595adaf
69759b1
89a5af9
ef04ce8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<template> | ||
<h1>{{ title }}</h1> | ||
|
||
<transition mode="out-in" name="cross-fade"> | ||
<div v-if="adding && $slots.add"> | ||
<slot name="add" :cancel="cancelAdd" /> | ||
</div> | ||
<div v-else> | ||
<div class="header"> | ||
<div class="filters"> | ||
<slot name="filters" /> | ||
</div> | ||
<div class="action-buttons"> | ||
<slot name="action-buttons" /> | ||
<button v-if="$slots.add" class="btn btn-sm btn-primary" @click="adding = true;">Add</button> | ||
</div> | ||
</div> | ||
<slot /> | ||
</div> | ||
</transition> | ||
</template> | ||
|
||
<style lang="scss" scoped> | ||
.header { | ||
width: 100%; | ||
padding: 1rem 0; | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
|
||
.action-buttons { | ||
justify-content: flex-end; | ||
|
||
button { | ||
margin-left: 0.5rem; | ||
} | ||
} | ||
} | ||
</style> | ||
|
||
<script lang="ts" setup> | ||
import { shallowRef } from 'vue'; | ||
|
||
|
||
defineProps({ | ||
title: { | ||
type: String, | ||
required: true | ||
} | ||
}); | ||
|
||
const adding = shallowRef(false); | ||
|
||
function cancelAdd() { | ||
adding.value = false; | ||
} | ||
|
||
</script> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export enum AccountFlag { | ||
None = 'None', | ||
Admin = 'Admin', | ||
Moderator = 'Moderator', | ||
Developer = 'Developer', | ||
ContentCreator = 'ContentCreator', | ||
HubOwner = 'HubOwner' | ||
} | ||
Comment on lines
+1
to
+8
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add numbers in comments from There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The enum numbers aren't relevant to the front end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export enum GameServerTrust { | ||
Epic = 0, | ||
Trusted = 1, | ||
Untrusted = 2 | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Must've autoformatted 🤷