mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-11 19:03:51 +02:00
refactor: dialogs (#1224)
* refactor: dialogs * fix: storeAvatarImage * FriendLog.vue * FriendLog.vue * FriendLog.vue * GameLog.vue * fix: next day button jumping to the wrong date * sync master * fix: launchGame * Notification.vue * Feed.vue * Search.vue * Profile.vue * PlayerList.vue * Login.vue * utils * update dialog * del gameLog.pug * fix * fix: group role cannot be displayed currently * fix: "Hide Friends in Same Instance" hides players in unrelated private instances (#1210) * fix * fix: "Hide Friends in Same Instance" does not work when "Split Favorite Friends" is enabled * fix Notification.vue message * fix: deleteFavoriteNoConfirm * fix: feed status style * fix: infinite loading when deleting note * fix: private players will not be hidden when 'Hide Friends in Same Instance', and 'Hide Friends in Same Instance' will not work when 'Split Favorite Friends'
This commit is contained in:
@@ -49,7 +49,7 @@ const friendReq = {
|
||||
json,
|
||||
params
|
||||
};
|
||||
window.API.$emit('FRIEND:REQUEST:CANCEL', args);
|
||||
// window.API.$emit('FRIEND:REQUEST:CANCEL', args);
|
||||
return args;
|
||||
});
|
||||
},
|
||||
|
||||
@@ -14,7 +14,7 @@ const imageReq = {
|
||||
method: 'PUT'
|
||||
});
|
||||
window.$app.avatarDialog.loading = false;
|
||||
window.$app.changeAvatarImageDialogLoading = false;
|
||||
// window.$app.changeAvatarImageDialogLoading = false;
|
||||
},
|
||||
|
||||
async uploadAvatarImage(params, fileId) {
|
||||
@@ -28,14 +28,15 @@ const imageReq = {
|
||||
params,
|
||||
fileId
|
||||
};
|
||||
window.API.$emit('AVATARIMAGE:INIT', args);
|
||||
// window.API.$emit('AVATARIMAGE:INIT', args);
|
||||
return args;
|
||||
});
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
window.API.uploadAvatarFailCleanup(fileId);
|
||||
imageReq.uploadAvatarFailCleanup(fileId);
|
||||
throw err;
|
||||
}
|
||||
return void 0;
|
||||
// return void 0;
|
||||
},
|
||||
|
||||
async uploadAvatarImageFileStart(params) {
|
||||
@@ -50,12 +51,12 @@ const imageReq = {
|
||||
json,
|
||||
params
|
||||
};
|
||||
window.API.$emit('AVATARIMAGE:FILESTART', args);
|
||||
// window.API.$emit('AVATARIMAGE:FILESTART', args);
|
||||
return args;
|
||||
});
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
window.API.uploadAvatarFailCleanup(params.fileId);
|
||||
imageReq.uploadAvatarFailCleanup(params.fileId);
|
||||
}
|
||||
return void 0;
|
||||
},
|
||||
@@ -75,7 +76,7 @@ const imageReq = {
|
||||
json,
|
||||
params
|
||||
};
|
||||
window.API.$emit('AVATARIMAGE:FILEFINISH', args);
|
||||
// window.API.$emit('AVATARIMAGE:FILEFINISH', args);
|
||||
return args;
|
||||
});
|
||||
},
|
||||
@@ -92,12 +93,12 @@ const imageReq = {
|
||||
json,
|
||||
params
|
||||
};
|
||||
window.API.$emit('AVATARIMAGE:SIGSTART', args);
|
||||
// window.API.$emit('AVATARIMAGE:SIGSTART', args);
|
||||
return args;
|
||||
});
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
window.API.uploadAvatarFailCleanup(params.fileId);
|
||||
imageReq.uploadAvatarFailCleanup(params.fileId);
|
||||
}
|
||||
return void 0;
|
||||
},
|
||||
@@ -117,7 +118,7 @@ const imageReq = {
|
||||
json,
|
||||
params
|
||||
};
|
||||
window.API.$emit('AVATARIMAGE:SIGFINISH', args);
|
||||
// window.API.$emit('AVATARIMAGE:SIGFINISH', args);
|
||||
return args;
|
||||
});
|
||||
},
|
||||
@@ -131,7 +132,7 @@ const imageReq = {
|
||||
json,
|
||||
params
|
||||
};
|
||||
window.API.$emit('AVATARIMAGE:SET', args);
|
||||
// window.API.$emit('AVATARIMAGE:SET', args);
|
||||
window.API.$emit('AVATAR', args);
|
||||
return args;
|
||||
});
|
||||
@@ -152,7 +153,7 @@ const imageReq = {
|
||||
method: 'PUT'
|
||||
});
|
||||
window.$app.worldDialog.loading = false;
|
||||
window.$app.changeWorldImageDialogLoading = false;
|
||||
// window.$app.changeWorldImageDialogLoading = false;
|
||||
},
|
||||
|
||||
async uploadWorldImage(params, fileId) {
|
||||
@@ -166,12 +167,12 @@ const imageReq = {
|
||||
params,
|
||||
fileId
|
||||
};
|
||||
window.API.$emit('WORLDIMAGE:INIT', args);
|
||||
// window.API.$emit('WORLDIMAGE:INIT', args);
|
||||
return args;
|
||||
});
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
window.API.uploadWorldFailCleanup(fileId);
|
||||
imageReq.uploadWorldFailCleanup(fileId);
|
||||
}
|
||||
return void 0;
|
||||
},
|
||||
@@ -188,12 +189,12 @@ const imageReq = {
|
||||
json,
|
||||
params
|
||||
};
|
||||
window.API.$emit('WORLDIMAGE:FILESTART', args);
|
||||
// window.API.$emit('WORLDIMAGE:FILESTART', args);
|
||||
return args;
|
||||
});
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
window.API.uploadWorldFailCleanup(params.fileId);
|
||||
imageReq.uploadWorldFailCleanup(params.fileId);
|
||||
}
|
||||
return void 0;
|
||||
},
|
||||
@@ -213,7 +214,7 @@ const imageReq = {
|
||||
json,
|
||||
params
|
||||
};
|
||||
window.API.$emit('WORLDIMAGE:FILEFINISH', args);
|
||||
// window.API.$emit('WORLDIMAGE:FILEFINISH', args);
|
||||
return args;
|
||||
});
|
||||
},
|
||||
@@ -230,12 +231,12 @@ const imageReq = {
|
||||
json,
|
||||
params
|
||||
};
|
||||
window.API.$emit('WORLDIMAGE:SIGSTART', args);
|
||||
// window.API.$emit('WORLDIMAGE:SIGSTART', args);
|
||||
return args;
|
||||
});
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
window.API.uploadWorldFailCleanup(params.fileId);
|
||||
imageReq.uploadWorldFailCleanup(params.fileId);
|
||||
}
|
||||
return void 0;
|
||||
},
|
||||
@@ -255,7 +256,7 @@ const imageReq = {
|
||||
json,
|
||||
params
|
||||
};
|
||||
window.API.$emit('WORLDIMAGE:SIGFINISH', args);
|
||||
// window.API.$emit('WORLDIMAGE:SIGFINISH', args);
|
||||
return args;
|
||||
});
|
||||
},
|
||||
@@ -269,7 +270,7 @@ const imageReq = {
|
||||
json,
|
||||
params
|
||||
};
|
||||
window.API.$emit('WORLDIMAGE:SET', args);
|
||||
// window.API.$emit('WORLDIMAGE:SET', args);
|
||||
window.API.$emit('WORLD', args);
|
||||
return args;
|
||||
});
|
||||
@@ -283,7 +284,7 @@ const imageReq = {
|
||||
json,
|
||||
params
|
||||
};
|
||||
window.API.$emit('AVATARIMAGE:GET', args);
|
||||
// window.API.$emit('AVATARIMAGE:GET', args);
|
||||
return args;
|
||||
});
|
||||
},
|
||||
@@ -297,7 +298,7 @@ const imageReq = {
|
||||
json,
|
||||
params
|
||||
};
|
||||
window.API.$emit('WORLDIMAGE:GET', args);
|
||||
// window.API.$emit('WORLDIMAGE:GET', args);
|
||||
return args;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ const miscReq = {
|
||||
json,
|
||||
params
|
||||
};
|
||||
window.API.$emit('NOTE', args);
|
||||
// window.API.$emit('NOTE', args);
|
||||
return args;
|
||||
});
|
||||
},
|
||||
@@ -46,7 +46,7 @@ const miscReq = {
|
||||
json,
|
||||
params
|
||||
};
|
||||
window.API.$emit('FEEDBACK:REPORT:USER', args);
|
||||
// window.API.$emit('FEEDBACK:REPORT:USER', args);
|
||||
return args;
|
||||
});
|
||||
},
|
||||
@@ -81,7 +81,7 @@ const miscReq = {
|
||||
const args = {
|
||||
json
|
||||
};
|
||||
window.API.$emit('VRCCREDITS', args);
|
||||
// window.API.$emit('VRCCREDITS', args);
|
||||
return args;
|
||||
});
|
||||
},
|
||||
@@ -170,10 +170,43 @@ const miscReq = {
|
||||
json,
|
||||
params
|
||||
};
|
||||
window.API.$emit('BADGE:UPDATE', args);
|
||||
// window.API.$emit('BADGE:UPDATE', args);
|
||||
return args;
|
||||
});
|
||||
},
|
||||
|
||||
getVisits() {
|
||||
return window.API.call('visits', {
|
||||
method: 'GET'
|
||||
}).then((json) => {
|
||||
const args = {
|
||||
json
|
||||
};
|
||||
// window.API.$emit('VISITS', args);
|
||||
return args;
|
||||
});
|
||||
}
|
||||
|
||||
// /**
|
||||
// * @params {{
|
||||
// userId: string,
|
||||
// emojiId: string
|
||||
// }} params
|
||||
// * @returns {Promise<{json: any, params}>}
|
||||
// */
|
||||
// sendBoop(params) {
|
||||
// return window.API.call(`users/${params.userId}/boop`, {
|
||||
// method: 'POST',
|
||||
// params
|
||||
// }).then((json) => {
|
||||
// const args = {
|
||||
// json,
|
||||
// params
|
||||
// };
|
||||
// this.$emit('BOOP:SEND', args);
|
||||
// return args;
|
||||
// });
|
||||
// }
|
||||
};
|
||||
|
||||
export default miscReq;
|
||||
|
||||
@@ -265,7 +265,8 @@ const notificationReq = {
|
||||
notificationId
|
||||
}
|
||||
};
|
||||
window.API.$emit('NOTIFICATION:V2:HIDE', args);
|
||||
// useless
|
||||
// window.API.$emit('NOTIFICATION:V2:HIDE', args);
|
||||
return args;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ const playerModerationReq = {
|
||||
json,
|
||||
params
|
||||
};
|
||||
window.API.$emit('PLAYER-MODERATION:SEND', args);
|
||||
// window.API.$emit('PLAYER-MODERATION:SEND', args);
|
||||
return args;
|
||||
});
|
||||
},
|
||||
|
||||
@@ -126,7 +126,33 @@ const userReq = {
|
||||
json,
|
||||
params
|
||||
};
|
||||
window.API.$emit('USER:FEEDBACK', args);
|
||||
// window.API.$emit('USER:FEEDBACK', args);
|
||||
return args;
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* @typedef {{
|
||||
* status: 'active' | 'offline' | 'busy' | 'ask me' | 'join me',
|
||||
* statusDescription: string
|
||||
* }} SaveCurrentUserParameters
|
||||
*/
|
||||
|
||||
/**
|
||||
* Updates current user's status.
|
||||
* @param params {SaveCurrentUserParameters} new status to be set
|
||||
* @returns {Promise<{json: any, params}>}
|
||||
*/
|
||||
saveCurrentUser(params) {
|
||||
return window.API.call(`users/${window.API.currentUser.id}`, {
|
||||
method: 'PUT',
|
||||
params
|
||||
}).then((json) => {
|
||||
var args = {
|
||||
json,
|
||||
params
|
||||
};
|
||||
window.API.$emit('USER:CURRENT:SAVE', args);
|
||||
return args;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ const vrcPlusImageReq = {
|
||||
json,
|
||||
printId
|
||||
};
|
||||
window.API.$emit('PRINT:DELETE', args);
|
||||
// window.API.$emit('PRINT:DELETE', args);
|
||||
return args;
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user