Skip to content

Commit

Permalink
Version 0.1.2, see changelog. Signup fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
Soleone committed Sep 22, 2020
1 parent 5faad04 commit 8765a39
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 15 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

### 0.1.2

- Fix login bug
- Fix available button disabled state
- Temporarily disable code form validation
- Redirect to player profile right away after succesful sign up

## 0.1.1

- Prevent setting to available when challenge code is empty
Expand Down
10 changes: 6 additions & 4 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ None of this is guaranteed to be worked on by anyone.

## Milestones

### 0.1.2

- See number of online users (recently logged in)

### 0.1.3

- Bugfix: Re-enabled and fix form code validation
- See number of online users (recently logged in)
- Allow status message to be displayed (e.g. bugs)
- Notifications when challenges are made available
- Browser notification API?
- [Firebase Cloud Messaging](https://firebase.google.com/docs/cloud-messaging)

### 0.1.4

Expand Down Expand Up @@ -66,3 +66,5 @@ None of this is guaranteed to be worked on by anyone.
- Matchup wanted (God, deck type)
- Decklist
- Announcement post? Voice?
- Mark challenge as connected to help other players to try to queue with you anymore
- Quick copy button
5 changes: 3 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
label="Available"
class="force-height mr-2"
@change="updateAvailability()"
:disabled="player.challenge.code.toString() == ''"
:disabled="!isAvailableEnabled"
></v-switch>

<v-chip :visible="!!user" pill outlined @click="visitPlayer()">
Expand Down Expand Up @@ -104,6 +104,7 @@ export default {
...mapState(['user', 'status']),
...mapGetters({
userName: 'userName',
isAvailableEnabled: 'isAvailableEnabled',
player: 'playerObject'
})
},
Expand All @@ -119,7 +120,7 @@ export default {
},
data() {
return {
version: '0.1.1'
version: '0.1.2'
}
},
methods: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/FirebaseUI.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default {
})
this.$gtag.event('playerCreated')
}
this.$router.push('/')
this.$router.push({ name: 'Player' })
})
},
uiShown: () => {
Expand Down
13 changes: 13 additions & 0 deletions src/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,19 @@ export default new Vuex.Store({
challenge.player = new Player(player)
return challenge
})
},
isAvailableEnabled(state) {
if (!state.player) {
return false
} else if (!state.player.challenge) {
return false
} else if (!state.player.challenge.code) {
return false
} else if (state.player.challenge.code === '') {
return false
} else {
return true
}
}
},
modules: {}
Expand Down
11 changes: 3 additions & 8 deletions src/views/Player.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<v-row>
<v-spacer></v-spacer>
<v-col cols="12" :lg="columnSizeLg * 2">
<v-alert v-if="player.challenge.code.toString() === ''" type="info">
<v-alert v-if="!isAvailableEnabled" type="info">
Once you entered a challenge code you can set yourself to available
using the switch in the top menu bar.
</v-alert>
Expand Down Expand Up @@ -136,20 +136,15 @@ export default {
],
rules: {
code: {
length: value => {
return (
value == '' ||
(value && value.length >= 3 && value.length <= 40) ||
'Needs to be between 3 and 40 characters.'
)
}
length: value => true
}
}
}
},
computed: {
...mapState(['user']),
...mapGetters({
isAvailableEnabled: 'isAvailableEnabled',
player: 'playerObject'
})
},
Expand Down

0 comments on commit 8765a39

Please sign in to comment.