Skip to content

Commit

Permalink
Merge pull request #1 from Savage-Aim/wiki
Browse files Browse the repository at this point in the history
Wiki
  • Loading branch information
freyamade authored Jan 20, 2022
2 parents f16dcd0 + f7f8268 commit d450a8d
Show file tree
Hide file tree
Showing 9 changed files with 101 additions and 91 deletions.
6 changes: 5 additions & 1 deletion backend/api/models/character.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,8 @@ def generate_token() -> str:
"""
Generate a token for a Character to use for verification
"""
return 'savageaim-' + ''.join(choice(CHARACTERS) for _ in range(RANDOM_CHARS))
code = 'savageaim-' + ''.join(choice(CHARACTERS) for _ in range(RANDOM_CHARS))
while Character.objects.filter(token=code).exists():
code = 'savageaim-' + ''.join(choice(CHARACTERS) for _ in range(RANDOM_CHARS))

return code
6 changes: 5 additions & 1 deletion backend/api/models/team.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,8 @@ def generate_invite_code() -> str:
Generate a new invite code for a team
Can be used to regenerate the code later as needed
"""
return ''.join(choice(CHARS) for _ in range(CODE_LEN))
code = ''.join(choice(CHARS) for _ in range(CODE_LEN))
while Team.objects.filter(invite_code=code).exists():
code = ''.join(choice(CHARS) for _ in range(CODE_LEN))

return code
15 changes: 15 additions & 0 deletions backend/backend/settings_live.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,18 @@
CELERY_RESULT_SERIALIZER = 'json'
CELERY_TIMEZONE = 'Europe/Dublin'
CELERY_ANNOTATIONS = {'tasks.verify_character': {'rate_limit': '1/s'}}

# Get django logs to stdout
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
'console': {
'class': 'logging.StreamHandler',
},
},
'root': {
'handlers': ['console'],
'level': 'WARNING',
},
}
2 changes: 1 addition & 1 deletion backend/deployment/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ RUN pip3 install -r requirements.txt

# Set the gunicorn to run the wsgi file
EXPOSE 443
ENTRYPOINT python3 manage.py migrate && gunicorn --bind=0.0.0.0:443 --access-logfile - --log-file - --log-level info backend.wsgi
ENTRYPOINT python3 manage.py migrate && gunicorn --bind=0.0.0.0:443 --access-logfile - --log-file - --log-level info --capture-output --enable-stdio-inheritance backend.wsgi
2 changes: 1 addition & 1 deletion frontend/.env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VUE_APP_VERSION="0.1.0"
VUE_APP_VERSION="0.1.1"
6 changes: 4 additions & 2 deletions frontend/src/components/footer.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<template>
<footer id="footer" class="content has-text-centered">
<a href="#changelog" class="has-text-white" title="Changelog" @click="showChangelog"><span class="icon is-large"><i class="material-icons">update</i></span></a>
<p>Savage Aim, by Erika Yukiko (Lich)</p>
<a href="https://wiki.savageaim.com" target="_blank" data-microtip-position="top" role="tooltip" aria-label="Wiki"><span class="icon is-large"><i class="material-icons">menu_book</i></span></a>
<a href="#changelog" data-microtip-position="top" role="tooltip" aria-label="Changelog" @click="showChangelog"><span class="icon is-large"><i class="material-icons">update</i></span></a>
<a href="https://github.com/Savage-Aim/app" target="_blank" data-microtip-position="top" role="tooltip" aria-label="Github Repo" @click="showChangelog"><span class="icon is-large"><i class="material-icons">code</i></span></a>
<p>Savage Aim v{{ $store.state.version }}, by Erika Yukiko (Lich)</p>
<p>FINAL FANTASY XIV ©2010 - {{ currentYear }} SQUARE ENIX CO., LTD. All Rights Reserved.</p>
<p>FINAL FANTASY is a registered trademark of Square Enix Holdings Co., Ltd. All material used under license.</p>
</footer>
Expand Down
17 changes: 7 additions & 10 deletions frontend/src/components/modals/changelog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,15 @@
<div class="card-content content">
<h2 class="has-text-primary subtitle">{{ version }}</h2>
<div class="divider"><i class="material-icons icon">expand_more</i> Major Changes <i class="material-icons icon">expand_more</i></div>
<p>Added a settings popup under the User dropdown.</p>
<p>Currently the only setting is to change your theme for the coloured BIS List displays on the team page and in the colours popup.</p>
<p>However we have laid the groundwork to add more customisation in the future!</p>
<p>We have a wiki now!</p>
<p><a href="https://wiki.savageaim.com" target="_blank">wiki.savageaim.com</a></p>
<p>Removed a lot of the help text from the pages since it's all in the wiki now!</p>

<div class="divider"><i class="material-icons icon">expand_more</i> Minor Changes <i class="material-icons icon">expand_more</i></div>
<p>
Changed current gear display on BIS tables in the team page to use tooltips instead of the HTML title element.
<ul><li>This means that mobile users can now tap on slots in the tables to see a tooltip indicating the current gear in the slot.</li></ul>
</p>
<p>Page titles now update so your tab and history displays will have more detail to them!</p>
<p>Any 404 errors will keep the URL used to generate them, instead of replacing it the /404.</p>
<p>Moved the system to dedicated infrastructure!</p>
<p>Prevented any issues forming from Teams or Characters generating duplicate tokens by preventing that from happening altogether.</p>
<p>Added wiki and github links to the footer.</p>
<p>Footer now also displays the current version.</p>
<p>Footer links now use tooltips instead of titles.</p>
</div>
</div>
</template>
Expand Down
5 changes: 0 additions & 5 deletions frontend/src/components/modals/legend.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@
</div>
</div>
<div class="card-content">
<p>In the Team View pages, Characters' BIS Lists are rendered with colour and text.</p>
<p>The text in each box indicates the gear that is Best in Slot for that slot.</p>
<p>The colour of the box indicates the item level of the gear the character currently has equipped.</p>
<p>If you have one, you can hover your mouse over this box to get the name of the gear they currently have equipped.</p>
<p>The colours' meanings are outlined below.</p>
<p>Please note that all references to a "Maximum Item Level" (Max IL) refer to the Item Level of the Weapon obtained from the Tier's final raid.</p>
<p>For example, the Max IL for Pandæmonium: Asphodelos is 605.</p>
<hr />
Expand Down
133 changes: 63 additions & 70 deletions frontend/src/views/team/loot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,41 +28,31 @@
<div class="card">
<div class="card-header">
<div class="card-header-title">
How This Works
What Item Dropped
</div>
</div>
<div class="card-content">
<p>Below the line is a drop down with all the different types of drops you can typically get from raids.</p>
<p>By selecting one, you will see two boxes below.</p>
<p>The box on the left contains Need data, or the Characters in the static that need that item for the role they play in the static.</p>
<p>The box on the right contains Greed data, which are where Characters in the static need the item for BIS Lists for other jobs.</p>
<p>The Raid Lead will have buttons to click that allows for recording loot obtained. This will also mark off the appropriate item and list for whoever is recorded as getting the loot.</p>
<p>At the bottom of the page is the Loot History for this team for the current Tier. Click or tap on the history box below to view it.</p>
<p class="has-text-warning">Please note that looted rings will replace whichever slot has the Raid ring on BIS, so be careful with your list setup.</p>
</div>
</div>
</div>
<ItemDropdown v-model="displayItem" />

<div class="column is-full">
<ItemDropdown v-model="displayItem" />

<!-- Display generic errors here -->
<div class="box has-background-danger" v-if="bisLootErrors.greed !== undefined">
<b>Greed: </b> {{ bisLootErrors.greed[0] }}
</div>
<div class="box has-background-danger" v-if="bisLootErrors.greed_bis_id !== undefined">
<b>Greed BIS ID:</b> {{ bisLootErrors.greed_bis_id[0] }}
</div>
<div class="box has-background-danger" v-if="bisLootErrors.item !== undefined">
<b>Item: </b> {{ bisLootErrors.item[0] }}
</div>
<div class="box has-background-danger" v-if="bisLootErrors.member_id !== undefined">
<b>Member ID:</b> {{ bisLootErrors.member_id[0] }}
<!-- Display generic errors here -->
<div class="box has-background-danger" v-if="bisLootErrors.greed !== undefined">
<b>Greed: </b> {{ bisLootErrors.greed[0] }}
</div>
<div class="box has-background-danger" v-if="bisLootErrors.greed_bis_id !== undefined">
<b>Greed BIS ID:</b> {{ bisLootErrors.greed_bis_id[0] }}
</div>
<div class="box has-background-danger" v-if="bisLootErrors.item !== undefined">
<b>Item: </b> {{ bisLootErrors.item[0] }}
</div>
<div class="box has-background-danger" v-if="bisLootErrors.member_id !== undefined">
<b>Member ID:</b> {{ bisLootErrors.member_id[0] }}
</div>
</div>
</div>
</div>

<!-- Need -->
<div class="column is-half" v-if="displayItem !== 'na'">
<div class="column is-half">
<div class="card">
<div class="card-header">
<div class="card-header-title">
Expand All @@ -72,37 +62,38 @@
<div class="card-content">
<p>Below are the people that need the chosen item for their Team BIS.</p>
<p v-if="editable">Clicking the button beside anyone will add a Loot entry, and update their BIS List accordingly.</p>

<div class="box list-item" v-for="entry in loot.gear[displayItem].need" :key="`need-${entry.member_id}`" data-microtip-position="top" role="tooltip" :aria-label="`Current: ${entry.current_gear_name}`">
<div class="list-data">
<div class="left">
{{ entry.character_name }}
</div>
<div class="right">
<div class="tags has-addons is-hidden-touch">
<span class="tag is-light">
iL
</span>
<span class="tag" :class="[`is-${entry.job_role}`]">
{{ entry.current_gear_il }}
<template v-if="displayItem !== 'na'">
<div class="box list-item" v-for="entry in loot.gear[displayItem].need" :key="`need-${entry.member_id}`" data-microtip-position="top" role="tooltip" :aria-label="`Current: ${entry.current_gear_name}`">
<div class="list-data">
<div class="left">
{{ entry.character_name }}
</div>
<div class="right">
<div class="tags has-addons is-hidden-touch">
<span class="tag is-light">
iL
</span>
<span class="tag" :class="[`is-${entry.job_role}`]">
{{ entry.current_gear_il }}
</span>
</div>
<span class="icon">
<img :src="`/job_icons/${entry.job_icon_name}.png`" :alt="`${entry.job_icon_name} job icon`" />
</span>
</div>
<span class="icon">
<img :src="`/job_icons/${entry.job_icon_name}.png`" :alt="`${entry.job_icon_name} job icon`" />
</span>
</div>
<div v-if="editable" class="list-actions">
<button class="button is-success" @click="() => { giveNeedLoot(entry) }" v-if="!requesting">Give Item</button>
<button class="button is-success is-loading" v-else>Give Item</button>
</div>
</div>
<div v-if="editable" class="list-actions">
<button class="button is-success" @click="() => { giveNeedLoot(entry) }" v-if="!requesting">Give Item</button>
<button class="button is-success is-loading" v-else>Give Item</button>
</div>
</div>
</template>
</div>
</div>
</div>

<!-- Greed -->
<div class="column is-half" v-if="displayItem !== 'na'">
<div class="column is-half">
<div class="card">
<div class="card-header">
<div class="card-header-title">
Expand All @@ -113,32 +104,34 @@
<p>Below are the people that need the chosen item for any other BIS they have, grouped by character.</p>
<p v-if="editable">Clicking the button beside anyone will add a Loot entry, and update their BIS List accordingly.</p>

<div class="box" v-for="entry in loot.gear[displayItem].greed" :key="`greed-${entry.member_id}`">
<div class="list-item" v-for="list in entry.greed_lists" :key="`greed-${entry.member_id}-${list.bis_list_id}`" data-microtip-position="top" role="tooltip" :aria-label="`Current: ${list.current_gear_name}`">
<div class="list-data">
<div class="left">
{{ entry.character_name }}
</div>
<div class="right">
<div class="tags has-addons is-hidden-touch">
<span class="tag is-light">
iL
</span>
<span class="tag" :class="[`is-${list.job_role}`]">
{{ list.current_gear_il }}
<template v-if="displayItem !== 'na'">
<div class="box" v-for="entry in loot.gear[displayItem].greed" :key="`greed-${entry.member_id}`">
<div class="list-item" v-for="list in entry.greed_lists" :key="`greed-${entry.member_id}-${list.bis_list_id}`" data-microtip-position="top" role="tooltip" :aria-label="`Current: ${list.current_gear_name}`">
<div class="list-data">
<div class="left">
{{ entry.character_name }}
</div>
<div class="right">
<div class="tags has-addons is-hidden-touch">
<span class="tag is-light">
iL
</span>
<span class="tag" :class="[`is-${list.job_role}`]">
{{ list.current_gear_il }}
</span>
</div>
<span class="icon">
<img :src="`/job_icons/${list.job_icon_name}.png`" :alt="`${list.job_icon_name} job icon`" />
</span>
</div>
<span class="icon">
<img :src="`/job_icons/${list.job_icon_name}.png`" :alt="`${list.job_icon_name} job icon`" />
</span>
</div>
</div>
<div v-if="editable" class="list-actions">
<button class="button is-success" @click="() => { giveGreedLoot(entry, list) }" v-if="!requesting">Give Item</button>
<button class="button is-success is-loading" v-else>Give Item</button>
<div v-if="editable" class="list-actions">
<button class="button is-success" @click="() => { giveGreedLoot(entry, list) }" v-if="!requesting">Give Item</button>
<button class="button is-success is-loading" v-else>Give Item</button>
</div>
</div>
</div>
</div>
</template>
</div>
</div>
</div>
Expand Down

0 comments on commit d450a8d

Please sign in to comment.