Make Admin panel design more consistent

This commit is contained in:
Phillip Thelen
2024-07-17 15:06:11 +02:00
parent 489bd851bb
commit 1a2f299e04
13 changed files with 346 additions and 206 deletions

View File

@@ -1,6 +1,6 @@
<template> <template>
<div class="row standard-page"> <div class="row standard-page col-12 d-flex justify-content-center">
<div class="well col-12"> <div class="admin-panel-content">
<h1>Admin Panel</h1> <h1>Admin Panel</h1>
<form <form
class="form-inline" class="form-inline"
@@ -39,6 +39,11 @@
.input-group-append { .input-group-append {
width:auto; width:auto;
} }
.admin-panel-content {
flex: 0 0 800px;
max-width: unset;
}
</style> </style>
<script> <script>

View File

@@ -1,13 +1,15 @@
<template> <template>
<div class="accordion-group"> <div class="card mt-2">
<div class="card-header">
<h3 <h3
class="expand-toggle" class="mb-0 mt-0"
:class="{'open': expand}" :class="{'open': expand}"
@click="expand = !expand" @click="expand = !expand"
> >
Achievements Achievements
</h3> </h3>
<div v-if="expand"> </div>
<div v-if="expand" class="card-body">
<ul> <ul>
<li <li
v-for="item in achievements" v-for="item in achievements"

View File

@@ -1,13 +1,15 @@
<template> <template>
<div class="accordion-group"> <div class="card mt-2">
<div class="card-header">
<h3 <h3
class="expand-toggle" class="mb-0 mt-0"
:class="{'open': expand}" :class="{'open': expand}"
@click="expand = !expand" @click="expand = !expand"
> >
Current Avatar Appearance, Drop Count Today Current Avatar Appearance, Drop Count Today
</h3> </h3>
<div v-if="expand"> </div>
<div v-if="expand" class="card-body">
<div>Drops Today: {{ items.lastDrop.count }}</div> <div>Drops Today: {{ items.lastDrop.count }}</div>
<div>Most Recent Drop: {{ items.lastDrop.date | formatDate }}</div> <div>Most Recent Drop: {{ items.lastDrop.date | formatDate }}</div>
<div>Use Costume: {{ preferences.costume ? 'on' : 'off' }}</div> <div>Use Costume: {{ preferences.costume ? 'on' : 'off' }}</div>

View File

@@ -1,16 +1,18 @@
<template> <template>
<div class="accordion-group"> <form @submit.prevent="saveHero({hero, msg: 'Contributor details', clearData: true})">
<div class="card mt-2">
<div class="card-header">
<h3 <h3
class="expand-toggle" class="mb-0 mt-0"
:class="{'open': expand}" :class="{'open': expand}"
@click="expand = !expand" @click="expand = !expand"
> >
Contributor Details Contributor Details
</h3> </h3>
<div v-if="expand"> </div>
<form @submit.prevent="saveHero({hero, msg: 'Contributor details', clearData: true})"> <div v-if="expand" class="card-body">
<div> <div class="mb-4">
<label>Permissions</label> <h3 class="mt-0">Permissions</h3>
<div class="checkbox"> <div class="checkbox">
<label> <label>
<input <input
@@ -72,8 +74,9 @@
</label> </label>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group row">
<label>Title</label> <label class="col-sm-3 col-form-label">Title</label>
<div class="col-sm-9">
<input <input
v-model="hero.contributor.text" v-model="hero.contributor.text"
class="form-control textField" class="form-control textField"
@@ -88,9 +91,11 @@
Advisor, Chamberlain, Designer, Mathematician, Shirtster, Spokesperson, Advisor, Chamberlain, Designer, Mathematician, Shirtster, Spokesperson,
Statistician, Tinker, Transcriber, Troubadour. Statistician, Tinker, Transcriber, Troubadour.
</small> </small>
</div>
</div> </div>
<div class="form-group form-inline"> <div class="form-group row">
<label>Tier</label> <label class="col-sm-3 col-form-label">Tier</label>
<div class="col-sm-9">
<input <input
v-model="hero.contributor.level" v-model="hero.contributor.level"
class="form-control levelField" class="form-control levelField"
@@ -101,20 +106,12 @@
This determines which items, pets, mounts are available, and name-tag coloring. This determines which items, pets, mounts are available, and name-tag coloring.
Tiers 8 and 9 are automatically given admin status. Tiers 8 and 9 are automatically given admin status.
</small> </small>
</div>
</div> </div>
<div <div class="form-group row">
v-if="hero.secret.text" <label class="col-sm-3 col-form-label">Contributions</label>
class="form-group" <div class="col-sm-9">
> <textarea
<label>Moderation Notes</label>
<div
v-markdown="hero.secret.text"
class="markdownPreview"
></div>
</div>
<div class="form-group">
<label>Contributions</label>
<textarea
v-model="hero.contributor.contributions" v-model="hero.contributor.contributions"
class="form-control" class="form-control"
cols="5" cols="5"
@@ -124,9 +121,11 @@
v-markdown="hero.contributor.contributions" v-markdown="hero.contributor.contributions"
class="markdownPreview" class="markdownPreview"
></div> ></div>
</div>
</div> </div>
<div class="form-group"> <div class="form-group row">
<label>Edit Moderation Notes</label> <label class="col-sm-3 col-form-label">Moderation Notes</label>
<div class="col-sm-9">
<textarea <textarea
v-model="hero.secret.text" v-model="hero.secret.text"
class="form-control" class="form-control"
@@ -137,15 +136,17 @@
v-markdown="hero.secret.text" v-markdown="hero.secret.text"
class="markdownPreview" class="markdownPreview"
></div> ></div>
</div>
</div> </div>
</div>
<div class="card-footer" v-if="expand">
<input <input
type="submit" type="submit"
value="Save and Clear Data" value="Save"
class="btn btn-primary" class="btn btn-primary mt-1"
> ></div>
</form>
</div>
</div> </div>
</form>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@@ -1,7 +1,9 @@
<template> <template>
<div class="accordion-group"> <form @submit.prevent="saveHero({ hero, msg: 'Authentication' })">
<div class="card mt-2">
<div class="card-header">
<h3 <h3
class="expand-toggle" class="mb-0 mt-0"
:class="{'open': expand}" :class="{'open': expand}"
@click="expand = !expand" @click="expand = !expand"
> >
@@ -10,7 +12,8 @@
v-if="errorsOrWarningsExist" v-if="errorsOrWarningsExist"
>- ERRORS / WARNINGS EXIST</span> >- ERRORS / WARNINGS EXIST</span>
</h3> </h3>
<div v-if="expand"> </div>
<div v-if="expand" class="card-body">
<p <p
v-if="errorsOrWarningsExist" v-if="errorsOrWarningsExist"
class="errorMessage" class="errorMessage"
@@ -18,13 +21,15 @@
See error(s) below. See error(s) below.
</p> </p>
<div> <div class="form-group row">
Account created: <label class="col-sm-3 col-form-label">Account created:</label>
<strong>{{ hero.auth.timestamps.created | formatDate }}</strong> <strong class="col-sm-9 col-form-label">
{{ hero.auth.timestamps.created | formatDate }}</strong>
</div> </div>
<div v-if="hero.flags.thirdPartyTools"> <div class="form-group row" v-if="hero.flags.thirdPartyTools">
User has employed <strong>third party tools</strong>. Last known usage: User has employed <strong>third party tools</strong>. Last known usage:
<strong>{{ hero.flags.thirdPartyTools | formatDate }}</strong> <strong class="col-sm-9 col-form-label">
{{ hero.flags.thirdPartyTools | formatDate }}</strong>
</div> </div>
<div v-if="cronError"> <div v-if="cronError">
"lastCron" value: "lastCron" value:
@@ -35,26 +40,34 @@
("auth.timestamps.loggedin" and "lastCron" dates are different). ("auth.timestamps.loggedin" and "lastCron" dates are different).
</span> </span>
</div> </div>
<div class="form-inline"> <div class="form-group row">
<div> <label class="col-sm-3 col-form-label">Most recent cron:</label>
Most recent cron:
<strong>{{ hero.auth.timestamps.loggedin | formatDate }}</strong> <div class="col-sm-9 col-form-label">
("auth.timestamps.loggedin") <strong>
</div> {{ hero.auth.timestamps.loggedin | formatDate }}</strong>
<button <button
class="btn btn-primary ml-2" class="btn btn-warning btn-sm ml-4"
@click="resetCron()" @click="resetCron()"
> >
Reset Cron to Yesterday Reset Cron to Yesterday
</button> </button>
</div>
</div> </div>
<div class="subsection-start"> <div class="form-group row">
Time zone: <label class="col-sm-3 col-form-label">Time zone:</label>
<strong>{{ hero.preferences.timezoneOffset | formatTimeZone }}</strong> <strong class="col-sm-9 col-form-label">
{{ hero.preferences.timezoneOffset | formatTimeZone }}</strong>
</div> </div>
<div> <div class="form-group row">
Custom Day Start time (CDS): <label class="col-sm-3 col-form-label">Custom Day Start time (CDS)</label>
<strong>{{ hero.preferences.dayStart }}</strong> <div class="col-sm-9">
<input
v-model="hero.preferences.dayStart"
class="form-control levelField"
type="number"
>
</div>
</div> </div>
<div v-if="timezoneDiffError || timezoneMissingError"> <div v-if="timezoneDiffError || timezoneMissingError">
Time zone at previous cron: Time zone at previous cron:
@@ -87,18 +100,17 @@
</div> </div>
</div> </div>
<div class="subsection-start form-inline"> <div class="form-group row">
API Token: &nbsp; <label class="col-sm-3 col-form-label">API Token</label>
<form @submit.prevent="changeApiToken()"> <div class="col-sm-9">
<input <button
type="submit" @click="changeApiToken()"
value="Change API Token" value="Change API Token"
class="btn btn-primary" class="btn btn-danger">
> Change API Token
</form> </button>
<div <div
v-if="tokenModified" v-if="tokenModified"
class="form-inline"
> >
<strong>API Token has been changed. Tell the player something like this:</strong> <strong>API Token has been changed. Tell the player something like this:</strong>
<br> <br>
@@ -111,35 +123,53 @@
For the iOS app, if you can't log out you might need to uninstall it, For the iOS app, if you can't log out you might need to uninstall it,
reboot your phone, then reinstall it. reboot your phone, then reinstall it.
</div> </div>
</div>
</div> </div>
<div class="subsection-start"> <div class="form-group row">
Local authentication: <label class="col-sm-3 col-form-label">Local Authentication E-Mail</label>
<span v-if="hero.auth.local.email">Yes, &nbsp; <div class="col-sm-9">
<strong>{{ hero.auth.local.email }}</strong></span> <input
v-model="hero.auth.local.email"
class="form-control"
type="text"
>
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label">Google authentication</label>
<div class="col-sm-9">
<pre v-if="authMethodExists('google')">{{ hero.auth.google }}</pre>
<span v-else><strong>None</strong></span> <span v-else><strong>None</strong></span>
</div>
</div> </div>
<div> <div class="form-group row">
Google authentication: <label class="col-sm-3 col-form-label">Facebook authentication</label>
<pre v-if="authMethodExists('google')">{{ hero.auth.google }}</pre> <div class="col-sm-9">
<span v-else><strong>None</strong></span>
</div>
<div>
Facebook authentication:
<pre v-if="authMethodExists('facebook')">{{ hero.auth.facebook }}</pre> <pre v-if="authMethodExists('facebook')">{{ hero.auth.facebook }}</pre>
<span v-else><strong>None</strong></span> <span v-else><strong>None</strong></span>
</div>
</div> </div>
<div> <div class="form-group row">
Apple ID authentication: <label class="col-sm-3 col-form-label">Apple ID authentication</label>
<pre v-if="authMethodExists('apple')">{{ hero.auth.apple }}</pre> <div class="col-sm-9">
<pre v-if="authMethodExists('apple')">{{ hero.auth.apple }}</pre>
<span v-else><strong>None</strong></span> <span v-else><strong>None</strong></span>
</div>
</div> </div>
<div class="subsection-start"> <div class="subsection-start">
Full "auth" object for checking above is correct: Full "auth" object for checking above is correct:
<pre>{{ hero.auth }}</pre> <pre>{{ hero.auth }}</pre>
</div> </div>
</div> </div>
<div class="card-footer" v-if="expand">
<input
type="submit"
value="Save"
class="btn btn-primary mt-1"
></div>
</div> </div>
</form>
</template> </template>
<script> <script>

View File

@@ -1,13 +1,15 @@
<template> <template>
<div class="accordion-group"> <div class="card mt-2">
<div class="card-header">
<h3 <h3
class="expand-toggle" class="mb-0 mt-0"
:class="{'open': expand}" :class="{'open': expand}"
@click="expand = !expand" @click="expand = !expand"
> >
Customizations Customizations
</h3> </h3>
<div v-if="expand"> </div>
<div v-if="expand" class="card-body">
<div <div
v-for="itemType in itemTypes" v-for="itemType in itemTypes"
:key="itemType" :key="itemType"

View File

@@ -1,13 +1,15 @@
<template> <template>
<div class="accordion-group"> <div class="card mt-2">
<div class="card-header">
<h3 <h3
class="expand-toggle" class="mb-0 mt-0"
:class="{'open': expand}" :class="{'open': expand}"
@click="expand = !expand" @click="expand = !expand"
> >
Items Items
</h3> </h3>
<div v-if="expand"> </div>
<div v-if="expand" class="card-body">
<div> <div>
The sections below display each item's key (bolded if the player has ever owned it), The sections below display each item's key (bolded if the player has ever owned it),
followed by the item's English name. followed by the item's English name.

View File

@@ -1,7 +1,8 @@
<template> <template>
<div class="accordion-group"> <div class="card mt-2">
<div class="card-header">
<h3 <h3
class="expand-toggle" class="mb-0 mt-0"
:class="{'open': expand}" :class="{'open': expand}"
@click="expand = !expand" @click="expand = !expand"
> >
@@ -10,7 +11,8 @@
v-if="errorsOrWarningsExist" v-if="errorsOrWarningsExist"
>- ERRORS / WARNINGS EXIST</span> >- ERRORS / WARNINGS EXIST</span>
</h3> </h3>
<div v-if="expand"> </div>
<div v-if="expand" class="card-body">
<div <div
v-if="errorsOrWarningsExist" v-if="errorsOrWarningsExist"
class="errorMessage" class="errorMessage"

View File

@@ -1,68 +1,88 @@
<template> <template>
<div class="accordion-group"> <form @submit.prevent="saveHero({hero, msg: 'Privileges or Gems or Moderation Notes'})">
<div class="card mt-2">
<div class="card-header">
<h3 <h3
class="expand-toggle" class="mb-0 mt-0"
:class="{'open': expand}" :class="{'open': expand}"
@click="expand = !expand" @click="expand = !expand"
> >
Privileges, Gem Balance Priviliges, Gem Balance
</h3> </h3>
<div v-if="expand"> </div>
<div v-if="expand" class="card-body">
<p <p
v-if="errorsOrWarningsExist" v-if="errorsOrWarningsExist"
class="errorMessage" class="errorMessage"
> >
Player has had privileges removed or has moderation notes. Player has had privileges removed or has moderation notes.
</p> </p>
<div class="form-group row">
<form @submit.prevent="saveHero({hero, msg: 'Privileges or Gems or Moderation Notes'})"> <div class="col-sm-9 offset-sm-3">
<div class="checkbox"> <div class="form-check">
<label> <input
<input
v-if="hero.flags" v-if="hero.flags"
v-model="hero.flags.chatShadowMuted" v-model="hero.flags.chatShadowMuted"
class="form-check-input"
type="checkbox" type="checkbox"
> Shadow Mute >
</label> <label class="form-check-label">
Shadow Mute
</label>
</div>
</div>
</div> </div>
<div class="checkbox"> <div class="form-group row">
<label> <div class="col-sm-9 offset-sm-3">
<input <div class="form-check">
<input
v-if="hero.flags" v-if="hero.flags"
v-model="hero.flags.chatRevoked" v-model="hero.flags.chatRevoked"
class="form-check-input"
type="checkbox" type="checkbox"
> Mute (Revoke Chat Privileges) >
</label> <label class="form-check-label">
Mute (Revoke Chat Privileges)
</label>
</div>
</div>
</div> </div>
<div class="checkbox"> <div class="form-group row">
<label> <div class="col-sm-9 offset-sm-3">
<input <div class="form-check">
<input
v-model="hero.auth.blocked" v-model="hero.auth.blocked"
class="form-check-input"
type="checkbox" type="checkbox"
> Ban / Block >
</label> <label class="form-check-label">
Ban / Block
</label>
</div>
</div>
</div> </div>
<div class="form-inline"> <div class="form-group row">
<label> <label class="col-sm-3 col-form-label">
Balance Balance
</label>
<div class="col-sm-9">
<input <input
v-model="hero.balance" v-model="hero.balance"
class="form-control balanceField" class="form-control balanceField"
type="number" type="number"
step="0.25" step="0.25"
> >
</label>
<span>
<small> <small>
Balance is in USD, not in Gems. Balance is in USD, not in Gems.
E.g., if this number is 1, it means 4 Gems. E.g., if this number is 1, it means 4 Gems.
Arrows change Balance by 0.25 (i.e., 1 Gem per click). Arrows change Balance by 0.25 (i.e., 1 Gem per click).
Do not use when awarding tiers; tier gems are automatic. Do not use when awarding tiers; tier gems are automatic.
</small> </small>
</span> </div>
</div> </div>
<div class="form-group"> <div class="form-group row">
<label>Moderation Notes</label> <label class="col-sm-3 col-form-label">Moderation Notes</label>
<div class="col-sm-9">
<textarea <textarea
v-model="hero.secret.text" v-model="hero.secret.text"
class="form-control" class="form-control"
@@ -73,15 +93,17 @@
v-markdown="hero.secret.text" v-markdown="hero.secret.text"
class="markdownPreview" class="markdownPreview"
></div> ></div>
</div>
</div> </div>
</div>
<div class="card-footer" v-if="expand">
<input <input
type="submit" type="submit"
value="Save" value="Save"
class="btn btn-primary" class="btn btn-primary mt-1"
> ></div>
</form>
</div>
</div> </div>
</form>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@@ -1,14 +1,16 @@
<template> <template>
<div class="accordion-group"> <form @submit.prevent="saveHero({ hero, msg: 'Subscription Perks' })">
<div class="card mt-2">
<div class="card-header">
<h3 <h3
class="expand-toggle" class="mb-0 mt-0"
:class="{'open': expand}" :class="{'open': expand}"
@click="expand = !expand" @click="expand = !expand"
> >
Subscription, Monthly Perks Subscription, Monthly Perks
</h3> </h3>
<div v-if="expand"> </div>
<form @submit.prevent="saveHero({ hero, msg: 'Subscription Perks' })"> <div v-if="expand" class="card-body">
<div v-if="hero.purchased.plan.paymentMethod"> <div v-if="hero.purchased.plan.paymentMethod">
Payment method: Payment method:
<strong>{{ hero.purchased.plan.paymentMethod }}</strong> <strong>{{ hero.purchased.plan.paymentMethod }}</strong>
@@ -23,46 +25,68 @@
</div> </div>
<div <div
v-if="hero.purchased.plan.dateCreated" v-if="hero.purchased.plan.dateCreated"
class="form-inline" class="form-group row"
> >
<label> <label>
Creation date: Creation date:
</label>
<div class="col-sm-9">
<input <input
v-model="hero.purchased.plan.dateCreated" v-model="hero.purchased.plan.dateCreated"
class="form-control" class="form-control"
type="text" type="text"
> <strong class="ml-2">{{ dateFormat(hero.purchased.plan.dateCreated) }}</strong> >
</label> <div class="input-group-append">
<strong>
{{ dateFormat(hero.purchased.plan.dateCreated) }}
</strong>
</div>
</div>
</div> </div>
<div <div
v-if="hero.purchased.plan.dateCurrentTypeCreated" v-if="hero.purchased.plan.dateCurrentTypeCreated"
class="form-inline" class="form-group row"
> >
<label> <label class="col-sm-3 col-form-label">
Start date for current subscription type: Start date for current subscription type:
</label>
<div class="col-sm-9 input-group">
<input <input
v-model="hero.purchased.plan.dateCurrentTypeCreated" v-model="hero.purchased.plan.dateCurrentTypeCreated"
class="form-control" class="form-control"
type="text" type="text"
> >
</label> <div class="input-group-append">
<strong class="ml-2">{{ dateFormat(hero.purchased.plan.dateCurrentTypeCreated) }}</strong> <strong>
{{ dateFormat(hero.purchased.plan.dateCurrentTypeCreated) }}
</strong>
</div>
</div>
</div> </div>
<div class="form-inline"> <div class="form-group row">
<label> <label class="col-sm-3 col-form-label">
Termination date: Termination date:
<div> </label>
<div class="col-sm-9">
<div class="input-group">
<input <input
v-model="hero.purchased.plan.dateTerminated" v-model="hero.purchased.plan.dateTerminated"
class="form-control" class="form-control"
type="text" type="text"
> <strong class="ml-2">{{ dateFormat(hero.purchased.plan.dateTerminated) }}</strong> >
<div class="input-group-append">
<strong class="input-group-text">
{{ dateFormat(hero.purchased.plan.dateTerminated) }}
</strong>
</div>
</div>
</div> </div>
</label>
</div> </div>
<div class="form-inline"> <div class="form-group row">
<label> <label class="col-sm-3 col-form-label">
Consecutive months: Consecutive months:
</label>
<div class="col-sm-9">
<input <input
v-model="hero.purchased.plan.consecutive.count" v-model="hero.purchased.plan.consecutive.count"
class="form-control" class="form-control"
@@ -70,11 +94,13 @@
min="0" min="0"
step="1" step="1"
> >
</label> </div>
</div> </div>
<div class="form-inline"> <div class="form-group row">
<label> <label class="col-sm-3 col-form-label">
Perk offset months: Perk offset months:
</label>
<div class="col-sm-9">
<input <input
v-model="hero.purchased.plan.consecutive.offset" v-model="hero.purchased.plan.consecutive.offset"
class="form-control" class="form-control"
@@ -82,11 +108,14 @@
min="0" min="0"
step="1" step="1"
> >
</label> </div>
</div> </div>
<div class="form-inline"> <div class="form-group row">
<label class="col-sm-3 col-form-label">
Perk month count: Perk month count:
<input </label>
<div class="col-sm-9">
<input
v-model="hero.purchased.plan.perkMonthCount" v-model="hero.purchased.plan.perkMonthCount"
class="form-control" class="form-control"
type="number" type="number"
@@ -94,26 +123,33 @@
max="2" max="2"
step="1" step="1"
> >
</div>
</div> </div>
<div> <div class="form-group row">
Next Mystic Hourglass: <label class="col-sm-3 col-form-label">
<strong>{{ nextHourglassDate }}</strong> Next Mystic Hourglass:
</label>
<strong class="col-sm-9 col-form-label">{{ nextHourglassDate }}</strong>
</div> </div>
<div class="form-inline"> <div class="form-group row">
<label> <label class="col-sm-3 col-form-label">
Mystic Hourglasses: Mystic Hourglasses:
<input </label>
<div class="col-sm-9">
<input
v-model="hero.purchased.plan.consecutive.trinkets" v-model="hero.purchased.plan.consecutive.trinkets"
class="form-control" class="form-control"
type="number" type="number"
min="0" min="0"
step="1" step="1"
> >
</label> </div>
</div> </div>
<div class="form-inline"> <div class="form-group row">
<label> <label class="col-sm-3 col-form-label">
Gem cap increase: Gem cap increase:
</label>
<div class="col-sm-9">
<input <input
v-model="hero.purchased.plan.consecutive.gemCapExtra" v-model="hero.purchased.plan.consecutive.gemCapExtra"
class="form-control" class="form-control"
@@ -122,16 +158,22 @@
max="25" max="25"
step="5" step="5"
> >
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label">
Total Gem cap:
</label> </label>
<strong class="col-sm-9 col-form-label">
{{ Number(hero.purchased.plan.consecutive.gemCapExtra) + 25 }}
</strong>
</div> </div>
<div> <div class="form-group row">
Total Gem cap: <label class="col-sm-3 col-form-label">
<strong>{{ Number(hero.purchased.plan.consecutive.gemCapExtra) + 25 }}</strong>
</div>
<div class="form-inline">
<label>
Gems bought this month: Gems bought this month:
<input </label>
<div class="col-sm-9">
<input
v-model="hero.purchased.plan.gemsBought" v-model="hero.purchased.plan.gemsBought"
class="form-control" class="form-control"
type="number" type="number"
@@ -139,7 +181,7 @@
:max="hero.purchased.plan.consecutive.gemCapExtra + 25" :max="hero.purchased.plan.consecutive.gemCapExtra + 25"
step="1" step="1"
> >
</label> </div>
</div> </div>
<div <div
v-if="hero.purchased.plan.extraMonths > 0" v-if="hero.purchased.plan.extraMonths > 0"
@@ -147,8 +189,11 @@
Additional credit (applied upon cancellation): Additional credit (applied upon cancellation):
<strong>{{ hero.purchased.plan.extraMonths }}</strong> <strong>{{ hero.purchased.plan.extraMonths }}</strong>
</div> </div>
<div> <div class="form-group row">
Mystery Items: <label class="col-sm-3 col-form-label">
Mystery Items:
</label>
<div class="col-sm-9 col-form-label">
<span <span
v-if="hero.purchased.plan.mysteryItems.length > 0" v-if="hero.purchased.plan.mysteryItems.length > 0"
> >
@@ -165,17 +210,31 @@
<span v-else> <span v-else>
<strong>None</strong> <strong>None</strong>
</span> </span>
</div>
</div> </div>
</div>
<div class="card-footer" v-if="expand">
<input <input
type="submit" type="submit"
value="Save" value="Save"
class="btn btn-primary mt-1" class="btn btn-primary mt-1"
> ></div>
</form>
</div>
</div> </div>
</form>
</template> </template>
<style scoped>
.input-group-append {
width:auto;
.input-group-text {
border-bottom-right-radius: 2px;
border-top-right-radius: 2px;
}
}
</style>
<script> <script>
import moment from 'moment'; import moment from 'moment';
import { getPlanContext } from '@/../../common/script/cron'; import { getPlanContext } from '@/../../common/script/cron';

View File

@@ -1,13 +1,15 @@
<template> <template>
<div class="accordion-group"> <div class="card mt-2">
<div class="card-header">
<h3 <h3
class="expand-toggle" class="mb-0 mt-0"
:class="{'open': expand}" :class="{'open': expand}"
@click="toggleTransactionsOpen" @click="toggleTransactionsOpen"
> >
Transactions Transactions
</h3> </h3>
<div v-if="expand"> </div>
<div v-if="expand" class="card-body">
<purchase-history-table <purchase-history-table
:gem-transactions="gemTransactions" :gem-transactions="gemTransactions"
:hourglass-transactions="hourglassTransactions" :hourglass-transactions="hourglassTransactions"

View File

@@ -1,52 +1,58 @@
<template> <template>
<div class="accordion-group"> <form @submit.prevent="saveHero({hero, msg: 'Users Profile'})">
<div class="card mt-2">
<div class="card-header">
<h3 <h3
class="expand-toggle" class="mb-0 mt-0"
:class="{'open': expand}" :class="{'open': expand}"
@click="expand = !expand" @click="expand = !expand"
> >
Users Profile User Profile
</h3> </h3>
<div v-if="expand"> </div>
<form @submit.prevent="saveHero({hero, msg: 'Users Profile'})"> <div v-if="expand" class="card-body">
<div class="form-group"> <div class="form-group row">
<label>Display name</label> <label class="col-sm-3 col-form-label">Display name</label>
<input <div class="col-sm-9">
<input
v-model="hero.profile.name" v-model="hero.profile.name"
class="form-control textField" class="form-control"
type="text" type="text"
> >
</div>
</div> </div>
<div class="form-group"> <div class="form-group row">
<label>Photo URL</label> <label class="col-sm-3 col-form-label">Photo URL</label>
<div class="col-sm-9">
<input <input
v-model="hero.profile.imageUrl" v-model="hero.profile.imageUrl"
class="form-control textField" class="form-control"
type="text" type="text"
> ></div>
</div> </div>
<div class="form-group"> <div class="form-group row">
<label>About</label> <label class="col-sm-3 col-form-label">About</label>
<div class="row about-row"> <div class="col-sm-9">
<textarea <textarea
v-model="hero.profile.blurb" v-model="hero.profile.blurb"
class="form-control col" class="form-control"
rows="10" rows="10"
></textarea> ></textarea>
<div <div
v-markdown="hero.profile.blurb" v-markdown="hero.profile.blurb"
class="markdownPreview col" class="markdownPreview"
></div> ></div>
</div> </div>
</div> </div>
</div>
<div class="card-footer" v-if="expand">
<input <input
type="submit" type="submit"
value="Save" value="Save"
class="btn btn-primary" class="btn btn-primary mt-1"
> ></div>
</form>
</div>
</div> </div>
</form>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@@ -389,12 +389,17 @@ api.updateHero = {
hero.markModified('items'); hero.markModified('items');
} }
if (updateData.auth && updateData.auth.blocked === true) { if (updateData.auth) {
hero.auth.blocked = updateData.auth.blocked; if (updateData.auth.blocked === true) {
hero.preferences.sleep = true; // when blocking, have them rest at an inn to prevent damage hero.auth.blocked = updateData.auth.blocked;
} hero.preferences.sleep = true; // when blocking, have them rest at an inn to prevent damage
if (updateData.auth && updateData.auth.blocked === false) { } else if (updateData.auth.blocked === false) {
hero.auth.blocked = false; hero.auth.blocked = false;
}
if (updateData.auth.local && updateData.auth.local.email) {
hero.auth.local.email = updateData.auth.local.email;
}
} }
if (updateData.flags && _.isBoolean(updateData.flags.chatRevoked)) { if (updateData.flags && _.isBoolean(updateData.flags.chatRevoked)) {