chore: Update environment variables for beta and production environments
This commit is contained in:
parent
cf1e457edc
commit
cbf9bdba46
|
@ -1,3 +1,5 @@
|
||||||
VITE_BYPASS_LOGIN=0
|
VITE_BYPASS_LOGIN=0
|
||||||
VITE_BYPASS_TUTORIAL=0
|
VITE_BYPASS_TUTORIAL=0
|
||||||
VITE_SERVER_URL=https://api.beta.pokerogue.net
|
VITE_SERVER_URL=https://api.beta.pokerogue.net
|
||||||
|
VITE_DISCORD_CLIENT_ID=1248062921129459756
|
||||||
|
VITE_GOOGLE_CLIENT_ID=955345393540-2k6lfftf0fdnb0krqmpthjnqavfvvf73.apps.googleusercontent.com
|
|
@ -1,3 +1,5 @@
|
||||||
VITE_BYPASS_LOGIN=0
|
VITE_BYPASS_LOGIN=0
|
||||||
VITE_BYPASS_TUTORIAL=0
|
VITE_BYPASS_TUTORIAL=0
|
||||||
VITE_SERVER_URL=https://api.pokerogue.net
|
VITE_SERVER_URL=https://api.pokerogue.net
|
||||||
|
VITE_DISCORD_CLIENT_ID=1248062921129459756
|
||||||
|
VITE_GOOGLE_CLIENT_ID=955345393540-2k6lfftf0fdnb0krqmpthjnqavfvvf73.apps.googleusercontent.com
|
|
@ -131,12 +131,12 @@ export class LoginPhase extends Phase {
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
}, () => {
|
}, () => {
|
||||||
const redirectUri = encodeURIComponent(`${Utils.serverUrl}/auth/discord/callback`);
|
const redirectUri = encodeURIComponent(`${import.meta.env.VITE_SERVER_URL}/auth/discord/callback`);
|
||||||
const discordId = import.meta.env.VITE_DISCORD_CLIENT_ID;
|
const discordId = import.meta.env.VITE_DISCORD_CLIENT_ID;
|
||||||
const discordUrl = `https://discord.com/api/oauth2/authorize?client_id=${discordId}&redirect_uri=${redirectUri}&response_type=code&scope=identify`;
|
const discordUrl = `https://discord.com/api/oauth2/authorize?client_id=${discordId}&redirect_uri=${redirectUri}&response_type=code&scope=identify`;
|
||||||
window.open(discordUrl, "_self");
|
window.open(discordUrl, "_self");
|
||||||
}, () => {
|
}, () => {
|
||||||
const redirectUri = encodeURIComponent(`${Utils.serverUrl}/auth/google/callback`);
|
const redirectUri = encodeURIComponent(`${import.meta.env.VITE_SERVER_URL}/auth/google/callback`);
|
||||||
const googleId = import.meta.env.VITE_GOOGLE_CLIENT_ID;
|
const googleId = import.meta.env.VITE_GOOGLE_CLIENT_ID;
|
||||||
const googleUrl = `https://accounts.google.com/o/oauth2/auth?client_id=${googleId}&redirect_uri=${redirectUri}&response_type=code&scope=openid`;
|
const googleUrl = `https://accounts.google.com/o/oauth2/auth?client_id=${googleId}&redirect_uri=${redirectUri}&response_type=code&scope=openid`;
|
||||||
window.open(googleUrl, "_self");
|
window.open(googleUrl, "_self");
|
||||||
|
|
|
@ -8,6 +8,7 @@ export default class MockText {
|
||||||
private textureManager;
|
private textureManager;
|
||||||
public list = [];
|
public list = [];
|
||||||
public style;
|
public style;
|
||||||
|
public text = "";
|
||||||
|
|
||||||
constructor(textureManager, x, y, content, styleOptions) {
|
constructor(textureManager, x, y, content, styleOptions) {
|
||||||
this.scene = textureManager.scene;
|
this.scene = textureManager.scene;
|
||||||
|
@ -17,6 +18,8 @@ export default class MockText {
|
||||||
// Phaser.GameObjects.Text.prototype.updateText = () => null;
|
// Phaser.GameObjects.Text.prototype.updateText = () => null;
|
||||||
// Phaser.Textures.TextureManager.prototype.addCanvas = () => {};
|
// Phaser.Textures.TextureManager.prototype.addCanvas = () => {};
|
||||||
UI.prototype.showText = this.showText;
|
UI.prototype.showText = this.showText;
|
||||||
|
this.text = "";
|
||||||
|
this.phaserText = "";
|
||||||
// super(scene, x, y);
|
// super(scene, x, y);
|
||||||
// this.phaserText = new Phaser.GameObjects.Text(scene, x, y, content, styleOptions);
|
// this.phaserText = new Phaser.GameObjects.Text(scene, x, y, content, styleOptions);
|
||||||
}
|
}
|
||||||
|
@ -150,7 +153,8 @@ export default class MockText {
|
||||||
|
|
||||||
setText(text) {
|
setText(text) {
|
||||||
// Sets the text this Game Object will display.
|
// Sets the text this Game Object will display.
|
||||||
// return this.phaserText.setText(text);
|
// return this.phaserText.setText\(text);
|
||||||
|
this.text = text;
|
||||||
}
|
}
|
||||||
|
|
||||||
setAngle(angle) {
|
setAngle(angle) {
|
||||||
|
|
|
@ -34,7 +34,7 @@ export default class LoginFormUiHandler extends FormModalUiHandler {
|
||||||
googleImage.setInteractive();
|
googleImage.setInteractive();
|
||||||
googleImage.setName("google-icon");
|
googleImage.setName("google-icon");
|
||||||
googleImage.on("pointerdown", () => {
|
googleImage.on("pointerdown", () => {
|
||||||
const redirectUri = encodeURIComponent(`${Utils.serverUrl}/auth/google/callback`);
|
const redirectUri = encodeURIComponent(`${import.meta.env.VITE_SERVER_URL}/auth/google/callback`);
|
||||||
const googleId = import.meta.env.VITE_GOOGLE_CLIENT_ID;
|
const googleId = import.meta.env.VITE_GOOGLE_CLIENT_ID;
|
||||||
const googleUrl = `https://accounts.google.com/o/oauth2/auth?client_id=${googleId}&redirect_uri=${redirectUri}&response_type=code&scope=openid`;
|
const googleUrl = `https://accounts.google.com/o/oauth2/auth?client_id=${googleId}&redirect_uri=${redirectUri}&response_type=code&scope=openid`;
|
||||||
window.open(googleUrl, "_self");
|
window.open(googleUrl, "_self");
|
||||||
|
@ -47,7 +47,7 @@ export default class LoginFormUiHandler extends FormModalUiHandler {
|
||||||
discordImage.setInteractive();
|
discordImage.setInteractive();
|
||||||
discordImage.setName("discord-icon");
|
discordImage.setName("discord-icon");
|
||||||
discordImage.on("pointerdown", () => {
|
discordImage.on("pointerdown", () => {
|
||||||
const redirectUri = encodeURIComponent(`${Utils.serverUrl}/auth/discord/callback`);
|
const redirectUri = encodeURIComponent(`${import.meta.env.VITE_SERVER_URL}/auth/discord/callback`);
|
||||||
const discordId = import.meta.env.VITE_DISCORD_CLIENT_ID;
|
const discordId = import.meta.env.VITE_DISCORD_CLIENT_ID;
|
||||||
const discordUrl = `https://discord.com/api/oauth2/authorize?client_id=${discordId}&redirect_uri=${redirectUri}&response_type=code&scope=identify`;
|
const discordUrl = `https://discord.com/api/oauth2/authorize?client_id=${discordId}&redirect_uri=${redirectUri}&response_type=code&scope=identify`;
|
||||||
window.open(discordUrl, "_self");
|
window.open(discordUrl, "_self");
|
||||||
|
@ -152,7 +152,7 @@ export default class LoginFormUiHandler extends FormModalUiHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
processExternalProvider() : void {
|
processExternalProvider() : void {
|
||||||
this.externalPartyTitle.setText(i18next.t("menu:orUse"));
|
this.externalPartyTitle.setText(i18next.t("menu:orUse") ?? "");
|
||||||
this.externalPartyTitle.setX(20+this.externalPartyTitle.text.length);
|
this.externalPartyTitle.setX(20+this.externalPartyTitle.text.length);
|
||||||
this.externalPartyTitle.setVisible(true);
|
this.externalPartyTitle.setVisible(true);
|
||||||
this.externalPartyContainer.setPositionRelative(this.modalContainer, 175, 0);
|
this.externalPartyContainer.setPositionRelative(this.modalContainer, 175, 0);
|
||||||
|
|
|
@ -339,7 +339,7 @@ export default class MenuUiHandler extends MessageUiHandler {
|
||||||
handler: () => {
|
handler: () => {
|
||||||
if (loggedInUser?.discordId === "") {
|
if (loggedInUser?.discordId === "") {
|
||||||
const token = Utils.getCookie(Utils.sessionIdKey);
|
const token = Utils.getCookie(Utils.sessionIdKey);
|
||||||
const redirectUri = encodeURIComponent(`${Utils.serverUrl}/auth/discord/callback`);
|
const redirectUri = encodeURIComponent(`${import.meta.env.VITE_SERVER_URL}/auth/discord/callback`);
|
||||||
const discordId = import.meta.env.VITE_DISCORD_CLIENT_ID;
|
const discordId = import.meta.env.VITE_DISCORD_CLIENT_ID;
|
||||||
const discordUrl = `https://discord.com/api/oauth2/authorize?client_id=${discordId}&redirect_uri=${redirectUri}&response_type=code&scope=identify&state=${token}`;
|
const discordUrl = `https://discord.com/api/oauth2/authorize?client_id=${discordId}&redirect_uri=${redirectUri}&response_type=code&scope=identify&state=${token}`;
|
||||||
window.open(discordUrl, "_self");
|
window.open(discordUrl, "_self");
|
||||||
|
@ -360,7 +360,7 @@ export default class MenuUiHandler extends MessageUiHandler {
|
||||||
handler: () => {
|
handler: () => {
|
||||||
if (loggedInUser?.googleId === "") {
|
if (loggedInUser?.googleId === "") {
|
||||||
const token = Utils.getCookie(Utils.sessionIdKey);
|
const token = Utils.getCookie(Utils.sessionIdKey);
|
||||||
const redirectUri = encodeURIComponent(`${Utils.serverUrl}/auth/google/callback`);
|
const redirectUri = encodeURIComponent(`${import.meta.env.VITE_SERVER_URL}/auth/google/callback`);
|
||||||
const googleId = import.meta.env.VITE_GOOGLE_CLIENT_ID;
|
const googleId = import.meta.env.VITE_GOOGLE_CLIENT_ID;
|
||||||
const googleUrl = `https://accounts.google.com/o/oauth2/auth?client_id=${googleId}&response_type=code&redirect_uri=${redirectUri}&scope=openid&state=${token}`;
|
const googleUrl = `https://accounts.google.com/o/oauth2/auth?client_id=${googleId}&response_type=code&redirect_uri=${redirectUri}&scope=openid&state=${token}`;
|
||||||
window.open(googleUrl, "_self");
|
window.open(googleUrl, "_self");
|
||||||
|
|
Loading…
Reference in New Issue