mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-11 10:53:52 +02:00
* 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'
127 lines
3.2 KiB
JavaScript
127 lines
3.2 KiB
JavaScript
const vrcPlusImageReq = {
|
|
uploadGalleryImage(imageData) {
|
|
const params = {
|
|
tag: 'gallery'
|
|
};
|
|
return window.API.call('file/image', {
|
|
uploadImage: true,
|
|
matchingDimensions: false,
|
|
postData: JSON.stringify(params),
|
|
imageData
|
|
}).then((json) => {
|
|
const args = {
|
|
json,
|
|
params
|
|
};
|
|
window.API.$emit('GALLERYIMAGE:ADD', args);
|
|
return args;
|
|
});
|
|
},
|
|
|
|
uploadSticker(imageData, params) {
|
|
return window.API.call('file/image', {
|
|
uploadImage: true,
|
|
matchingDimensions: true,
|
|
postData: JSON.stringify(params),
|
|
imageData
|
|
}).then((json) => {
|
|
const args = {
|
|
json,
|
|
params
|
|
};
|
|
window.API.$emit('STICKER:ADD', args);
|
|
return args;
|
|
});
|
|
},
|
|
|
|
getPrints(params) {
|
|
return window.API.call(`prints/user/${window.API.currentUser.id}`, {
|
|
method: 'GET',
|
|
params
|
|
}).then((json) => {
|
|
const args = {
|
|
json,
|
|
params
|
|
};
|
|
window.API.$emit('PRINT:LIST', args);
|
|
return args;
|
|
});
|
|
},
|
|
|
|
deletePrint(printId) {
|
|
return window.API.call(`prints/${printId}`, {
|
|
method: 'DELETE'
|
|
}).then((json) => {
|
|
const args = {
|
|
json,
|
|
printId
|
|
};
|
|
// window.API.$emit('PRINT:DELETE', args);
|
|
return args;
|
|
});
|
|
},
|
|
|
|
uploadPrint(imageData, cropWhiteBorder, params) {
|
|
return window.API.call('prints', {
|
|
uploadImagePrint: true,
|
|
cropWhiteBorder,
|
|
postData: JSON.stringify(params),
|
|
imageData
|
|
}).then((json) => {
|
|
const args = {
|
|
json,
|
|
params
|
|
};
|
|
window.API.$emit('PRINT:ADD', args);
|
|
return args;
|
|
});
|
|
},
|
|
|
|
getPrint(params) {
|
|
return window.API.call(`prints/${params.printId}`, {
|
|
method: 'GET'
|
|
}).then((json) => {
|
|
const args = {
|
|
json,
|
|
params
|
|
};
|
|
window.API.$emit('PRINT', args);
|
|
return args;
|
|
});
|
|
},
|
|
|
|
uploadEmoji(imageData, params) {
|
|
return window.API.call('file/image', {
|
|
uploadImage: true,
|
|
matchingDimensions: true,
|
|
postData: JSON.stringify(params),
|
|
imageData
|
|
}).then((json) => {
|
|
const args = {
|
|
json,
|
|
params
|
|
};
|
|
window.API.$emit('EMOJI:ADD', args);
|
|
return args;
|
|
});
|
|
}
|
|
|
|
// ----------- no place uses this function ------------
|
|
|
|
// editPrint(params) {
|
|
// return window.API.call(`prints/${params.printId}`, {
|
|
// method: 'POST',
|
|
// params
|
|
// }).then((json) => {
|
|
// const args = {
|
|
// json,
|
|
// params
|
|
// };
|
|
// window.API.$emit('PRINT:EDIT', args);
|
|
// return args;
|
|
// });
|
|
// },
|
|
};
|
|
|
|
export default vrcPlusImageReq;
|