mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 14:53:50 +02:00
setting release status on own avatars (closes #46)
This commit is contained in:
@@ -1640,6 +1640,16 @@ CefSharp.BindObjectAsync(
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
API.$on('AVATAR:SAVE', function (args) {
|
||||||
|
var { json } = args;
|
||||||
|
this.$emit('AVATAR', {
|
||||||
|
json,
|
||||||
|
params: {
|
||||||
|
avatarId: json.id
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
API.$on('AVATAR:SELECT', function (args) {
|
API.$on('AVATAR:SELECT', function (args) {
|
||||||
this.$emit('USER:CURRENT', args);
|
this.$emit('USER:CURRENT', args);
|
||||||
});
|
});
|
||||||
@@ -1740,6 +1750,26 @@ CefSharp.BindObjectAsync(
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
params: {
|
||||||
|
id: string
|
||||||
|
releaseStatus: string ('public','private'),
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
API.saveAvatar = function (params) {
|
||||||
|
return this.call(`avatars/${params.id}`, {
|
||||||
|
method: 'PUT',
|
||||||
|
params
|
||||||
|
}).then((json) => {
|
||||||
|
var args = {
|
||||||
|
json,
|
||||||
|
params
|
||||||
|
};
|
||||||
|
this.$emit('AVATAR:SAVE', args);
|
||||||
|
return args;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
params: {
|
params: {
|
||||||
avatarId: string
|
avatarId: string
|
||||||
@@ -6567,6 +6597,30 @@ CefSharp.BindObjectAsync(
|
|||||||
return args;
|
return args;
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
case 'Make Public':
|
||||||
|
API.saveAvatar({
|
||||||
|
id: D.id,
|
||||||
|
releaseStatus: 'public'
|
||||||
|
}).then((args) => {
|
||||||
|
this.$message({
|
||||||
|
message: 'Avatar updated to public',
|
||||||
|
type: 'success'
|
||||||
|
});
|
||||||
|
return args;
|
||||||
|
});;
|
||||||
|
break;
|
||||||
|
case 'Make Private':
|
||||||
|
API.saveAvatar({
|
||||||
|
id: D.id,
|
||||||
|
releaseStatus: 'private'
|
||||||
|
}).then((args) => {
|
||||||
|
this.$message({
|
||||||
|
message: 'Avatar updated to private',
|
||||||
|
type: 'success'
|
||||||
|
});
|
||||||
|
return args;
|
||||||
|
});;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -904,6 +904,9 @@ html
|
|||||||
el-button(type="default" icon="el-icon-more" circle)
|
el-button(type="default" icon="el-icon-more" circle)
|
||||||
el-dropdown-menu(#default="dropdown")
|
el-dropdown-menu(#default="dropdown")
|
||||||
el-dropdown-item(icon="el-icon-check" command="Select Avatar") Select Avatar
|
el-dropdown-item(icon="el-icon-check" command="Select Avatar") Select Avatar
|
||||||
|
template(v-if="avatarDialog.ref.authorId === API.currentUser.id")
|
||||||
|
el-dropdown-item(v-if="avatarDialog.ref.releaseStatus === 'public'" icon="el-icon-user-solid" command="Make Private" divided) Make Private
|
||||||
|
el-dropdown-item(v-else icon="el-icon-user" command="Make Public" divided) Make Public
|
||||||
el-tabs
|
el-tabs
|
||||||
el-tab-pane(label="Info")
|
el-tab-pane(label="Info")
|
||||||
.x-friend-list
|
.x-friend-list
|
||||||
|
|||||||
Reference in New Issue
Block a user