-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #904 from sgfost/tournament-mode
- add preliminary tournament lobby and dashboard with onboarding and schedules - add tournament banner to the landing page when tournaments are enabled - add tournament participation links to the navbar, landing page, and footer when tournaments are enabled
- Loading branch information
Showing
73 changed files
with
1,746 additions
and
661 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { url } from "@port-of-mars/client/util"; | ||
import { TournamentRoundInviteStatus, TournamentStatus } from "@port-of-mars/shared/types"; | ||
import { TStore } from "@port-of-mars/client/plugins/tstore"; | ||
import { AjaxRequest } from "@port-of-mars/client/plugins/ajax"; | ||
|
||
export class TournamentAPI { | ||
constructor(public store: TStore, public ajax: AjaxRequest) {} | ||
|
||
async getTournamentStatus(): Promise<TournamentStatus> { | ||
try { | ||
return this.ajax.get(url("/tournament/status"), ({ data }) => data); | ||
} catch (e) { | ||
console.log("Unable to get tournament status"); | ||
console.log(e); | ||
throw e; | ||
} | ||
} | ||
|
||
async getInviteStatus(): Promise<TournamentRoundInviteStatus> { | ||
try { | ||
return this.ajax.get(url("/tournament/invite-status"), ({ data }) => data); | ||
} catch (e) { | ||
console.log("Unable to get tournament round invite status"); | ||
console.log(e); | ||
throw e; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,14 @@ [email protected] | |
<b-link :to="solo" title="Solo Mode">Solo Mode</b-link> | ||
</li> | ||
<li> | ||
<b-link :to="lobby" title="Play Port of Mars">Play Port of Mars</b-link> | ||
<b-link v-if="isFreePlayEnabled" :to="freePlayLobby" title="Port of Mars Free Play" | ||
>Free Play</b-link | ||
> | ||
</li> | ||
<li> | ||
<b-link v-if="isTournamentEnabled" :to="tournamentDashboard" title="Join Mars Madness" | ||
>Join Mars Madness</b-link | ||
> | ||
</li> | ||
<li> | ||
<b-link :to="manual" title="User Manual">How to Play</b-link> | ||
|
@@ -97,11 +104,12 @@ import { Component, Vue } from "vue-property-decorator"; | |
import { Constants } from "@port-of-mars/shared/settings"; | ||
import { | ||
LOGIN_PAGE, | ||
LOBBY_PAGE, | ||
FREE_PLAY_LOBBY_PAGE, | ||
CONSENT_PAGE, | ||
MANUAL_PAGE, | ||
PRIVACY_PAGE, | ||
SOLO_GAME_PAGE, | ||
TOURNAMENT_DASHBOARD_PAGE, | ||
} from "@port-of-mars/shared/routes"; | ||
@Component({}) | ||
|
@@ -110,13 +118,22 @@ export default class Footer extends Vue { | |
consent = { name: CONSENT_PAGE }; | ||
manual = { name: MANUAL_PAGE }; | ||
login = { name: LOGIN_PAGE }; | ||
lobby = { name: LOBBY_PAGE }; | ||
freePlayLobby = { name: FREE_PLAY_LOBBY_PAGE }; | ||
tournamentDashboard = { name: TOURNAMENT_DASHBOARD_PAGE }; | ||
privacy = { name: PRIVACY_PAGE }; | ||
solo = { name: SOLO_GAME_PAGE }; | ||
get constants() { | ||
return Constants; | ||
} | ||
get isTournamentEnabled() { | ||
return this.$tstore.state.isTournamentEnabled; | ||
} | ||
get isFreePlayEnabled() { | ||
return this.$tstore.state.isFreePlayEnabled; | ||
} | ||
} | ||
</script> | ||
|
||
|
Oops, something went wrong.