mirror of
https://github.com/PhaseII-eAmusement-Network/PhaseWeb3-Vue.git
synced 2026-09-27 03:06:30 -05:00
fix version filter for games, fix game header
This commit is contained in:
@@ -38,9 +38,7 @@ const props = defineProps({
|
||||
function loadRoutes() {
|
||||
const navigationData = [
|
||||
{
|
||||
label: `${
|
||||
props.game.shortName ? props.game.shortName : props.game.name
|
||||
} Home`,
|
||||
label: "Game TOP",
|
||||
icon: PhHouse,
|
||||
path: `/games/${props.game.id}/`,
|
||||
route: "game_page",
|
||||
|
||||
@@ -102,7 +102,7 @@ async function loadProfile() {
|
||||
}
|
||||
|
||||
if (data && !versionForm.currentVersion) {
|
||||
versionForm.currentVersion = [...data.versions].sort().at(-1);
|
||||
versionForm.currentVersion = Math.max(...data.versions);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Failed to fetch user profile data:", error);
|
||||
|
||||
@@ -28,7 +28,7 @@ var gameID = null;
|
||||
var thisGame = null;
|
||||
|
||||
const myProfile = ref(null);
|
||||
const myVersions = ref(null);
|
||||
const myVersions = ref([]);
|
||||
const profiles = ref([]);
|
||||
const hitchartData = ref(null);
|
||||
const timeSensitiveData = ref([]);
|
||||
@@ -43,8 +43,8 @@ const versionForm = reactive({
|
||||
watch(
|
||||
() => versionForm.currentVersion,
|
||||
() => {
|
||||
loadGame(versionForm.currentVersion, profiles.length != 0);
|
||||
loadProfile();
|
||||
loadGame(versionForm.currentVersion, profiles.length != 0);
|
||||
musicIds.value = [];
|
||||
},
|
||||
);
|
||||
@@ -99,7 +99,7 @@ async function loadProfile() {
|
||||
myVersions.value = data.versions;
|
||||
|
||||
if (data && !versionForm.currentVersion) {
|
||||
versionForm.currentVersion = [...data.versions].sort().at(-1);
|
||||
versionForm.currentVersion = Math.max(...data.versions);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Failed to fetch user profile data:", error);
|
||||
|
||||
@@ -103,7 +103,7 @@ async function loadProfile() {
|
||||
myStats.value.timeline = baseTimeline;
|
||||
|
||||
if (data && !versionForm.currentVersion) {
|
||||
versionForm.currentVersion = [...data.versions].sort().at(-1);
|
||||
versionForm.currentVersion = Math.max(...data.versions);
|
||||
}
|
||||
|
||||
if (data.hitChart?.length) {
|
||||
|
||||
@@ -76,7 +76,7 @@ async function loadProfile() {
|
||||
myVersions.value = data.versions;
|
||||
|
||||
if (data && !versionForm.currentVersion) {
|
||||
versionForm.currentVersion = [...data.versions].sort().at(-1);
|
||||
versionForm.currentVersion = Math.max(...data.versions);
|
||||
}
|
||||
|
||||
if (thisGame.useActiveRival) {
|
||||
@@ -242,7 +242,7 @@ async function deleteRival(otherUserId, type) {
|
||||
|
||||
async function setActive(type) {
|
||||
var lastObject = myProfile.value?.last ?? {};
|
||||
var rivalPosition = null;
|
||||
var rivalPosition;
|
||||
if (type.startsWith("friend_")) {
|
||||
rivalPosition = parseInt(type.replace("friend_", ""), 10);
|
||||
} else {
|
||||
@@ -275,7 +275,7 @@ async function setActive(type) {
|
||||
|
||||
async function setInactive(type) {
|
||||
var lastObject = myProfile.value?.last ?? {};
|
||||
var rivalPosition = null;
|
||||
var rivalPosition;
|
||||
|
||||
if (type.startsWith("friend_")) {
|
||||
rivalPosition = parseInt(type.replace("friend_", ""), 10);
|
||||
|
||||
Reference in New Issue
Block a user