Skip to content

Commit

Permalink
Merge pull request #32 from Savage-Aim/materia
Browse files Browse the repository at this point in the history
Security fix in backend server
  • Loading branch information
freyamade authored May 29, 2022
2 parents a4fa6b2 + c7df81c commit ecdaf3c
Show file tree
Hide file tree
Showing 7 changed files with 67 additions and 5 deletions.
2 changes: 1 addition & 1 deletion backend/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ psycopg2-binary==2.9.3
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycparser==2.21
PyJWT==2.3.0
PyJWT==2.4.0
pyOpenSSL==22.0.0
pyparsing==3.0.6
python3-openid==3.2.0
Expand Down
Binary file added frontend/public/materia/danger.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/public/materia/info.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/public/materia/primary.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/public/materia/success.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/public/materia/warning.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
70 changes: 66 additions & 4 deletions frontend/src/components/welcome.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<div class="card-header">
<div class="card-header-title is-centered">
<figure class="image is-64x64">
<img class="is-rounded" src="/materia.png" alt="Savage Aim Materia Logo" width="64" height="64" />
<img ref="materia" class="is-rounded" :src="`/materia/${cls}.png`" alt="Savage Aim Materia Logo" width="64" height="64" @click="changeMateria" />
</figure>
<h2 class="title">Savage <span class="has-text-danger">Aim</span></h2>
<h2 class="title">Savage <span :class="`has-text-${cls}`" class="ease">Aim</span></h2>
</div>
</div>
<div class="card-content has-text-centered">
Expand All @@ -23,14 +23,76 @@
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator'
// TODO - Make getting feedback possible, either a discord or some other thing idk
@Component
export default class Welcome extends Vue {}
export default class Welcome extends Vue {
cls = 'danger'
clsList = [
'danger',
'info',
'primary',
'success',
'warning',
]
get materia(): HTMLElement {
return this.$refs.materia as HTMLElement
}
changeMateria(): void {
if (this.materia.classList.contains('spin')) return
this.materia.classList.add('spin')
window.setTimeout(this.clsChange, 350)
window.setTimeout(this.stopSpin, 1200)
}
clsChange(): void {
// Record the current cls so we don't pick it again
const current = this.clsList.indexOf(this.cls)
let newIndex = current
while (newIndex === current) {
newIndex = Math.floor(Math.random() * this.clsList.length)
}
this.cls = this.clsList[newIndex]
}
stopSpin(): void {
this.materia.classList.remove('spin')
}
}
</script>

<style lang="scss" scoped>
@-moz-keyframes spin {
10% { -moz-transform: rotate(15deg); }
100% { -moz-transform: rotate(-360deg); }
}
@-webkit-keyframes spin {
10% { -webkit-transform: rotate(15deg); }
100% { -webkit-transform: rotate(-360deg); }
}
@keyframes spin {
10% {
-webkit-transform: rotate(15deg);
transform:rotate(15deg);
}
100% {
-webkit-transform: rotate(-360deg);
transform:rotate(-360deg);
}
}
.card-header-title .title {
font-weight: 300;
padding-left: 1rem;
}
img.spin {
animation-name: spin;
animation-duration: 1.2s;
}
span.ease {
transition: color 0.4s ease;
}
</style>

0 comments on commit ecdaf3c

Please sign in to comment.