This commit is contained in:
Troplo 2020-11-29 01:47:36 +11:00
parent d14b745cfb
commit e72dc7b594
8 changed files with 223 additions and 72 deletions

View File

@ -684,6 +684,7 @@ blockquote {
<b-navbar>
<template slot="brand">
<b-navbar-item tag="router-link" :to="{ path: '/' }">
<vue-skip-to to="#main"></vue-skip-to>
<img
:src = $store.state.meta.icon
>

View File

@ -10,7 +10,8 @@
<b-button class="is-info" @click="$router.push('/thread/new')">
{{postNewThreadText}}
</b-button>
<select-button v-model='selectedCategory' :options='categories'></select-button>
<br>
<select-button class="is-hidden-desktop" v-model='selectedCategory' :options='categories'></select-button>
</div>
<br>
<div class='threads_main'>

View File

@ -14,22 +14,7 @@
</style>
<template>
<main>
<section v-if="!$store.state.experimentsStore.marketplace" class="hero is-info is-large">
<div class="hero-body">
<div class="container">
<h2>
Kaverti Marketplace
</h2>
<h1>
The Kaverti Marketplace is coming soon
</h1>
<h2 v-if="$store.state.developerMode">
However, you're currently opted into Experiments, you can enable the Marketplace experiment in User Settings.
</h2>
</div>
</div>
</section>
<section v-if='$store.state.experimentsStore.marketplace' class="hero is-info">
<section class="hero is-info">
<div class="hero-body" style="padding: 1rem 1rem !important;">
<div class="mobile-container">
<div class="container">
@ -38,12 +23,13 @@
</div>
</div>
</section>
<div class="section" v-if="$store.state.experimentsStore.marketplace">
<div class="section">
<div class="">
<div class="column">
<b-button tag="router-link"
to="/marketplace/create"
type="is-link is-primary">
type="is-link is-primary"
v-if="$store.state.username">
Create Marketplace Item
</b-button>
</div>

View File

@ -79,15 +79,7 @@
<b-upload v-model="item.file" expanded>
<a class="button is-primary is-fullwidth">
<b-icon icon="upload"></b-icon>
<span>{{ item.file.name || "Upload .OBJ"}}</span>
</a>
</b-upload>
</b-field>
<b-field class="file">
<b-upload v-model="item.fileMtl" expanded>
<a class="button is-primary is-fullwidth">
<b-icon icon="upload"></b-icon>
<span>{{ item.fileMtl.name || "Upload .MTL"}}</span>
<span>{{ item.file.name || "Upload .PNG of modified template"}}</span>
</a>
</b-upload>
</b-field>

View File

@ -40,22 +40,7 @@
</div>
<button slot='footer' class='button button--modal' @click.stop='setShareModalState(false)'>OK</button>
</modal-window>
<section v-if="!$store.state.experimentsStore.teams" class="hero is-info is-large">
<div class="hero-body">
<div class="container">
<h2>
Kaverti Teams
</h2>
<h1>
Kaverti Teams are coming soon
</h1>
<h2 v-if="$store.state.developerMode">
However, you're currently opted into Experiments, you can enable the Teams experiment in User Settings.
</h2>
</div>
</div>
</section>
<section v-if='$store.state.experimentsStore.teams' class="hero is-info">
<section class="hero is-info">
<div class="hero-body" style="padding: 1rem 1rem !important;">
<div class="mobile-container">
<div class="container">
@ -64,7 +49,7 @@
</div>
</div>
</section>
<div v-if="$store.state.experimentsStore.teams" class='route_container user_route'>
<div class='route_container user_route'>
<div class="section profile-heading card">
<div class="columns is-mobile is-multiline">
<div class="column is-2">

View File

@ -26,16 +26,111 @@
<div slot='main' class="card-content">
<br>
<div>
<p>User Profile Badges:</p>
<b-dropdown v-model="rolePrepend.RoleId"
v-for="role in roles"
:key="role.id"
:value="role.id"
:native-value="role.id">
<b-dropdown-item :value='role.id'>
<span>{{role.name}}</span>
</b-dropdown-item>
</b-dropdown>
<b-field label="Role 1">
<b-select disabled="disabled" :placeholder="rolePrepend.Role.name">
<option
:v-model="rolePrepend.Role.id"
v-for="option in roles"
:value="option.id"
:key="option.id">
{{ option.name }}
</option>
</b-select>
</b-field>
<b-field label="Role 2" v-if="rolePrepend.Role.id">
<b-select v-model="rolePrepend.Role2.id" :placeholder="rolePrepend.Role2.name">
<option
:v-model="rolePrepend.Role2.id"
v-for="option in roles"
:value="option.id"
:key="option.id">
{{ option.name }}
</option>
</b-select>
</b-field>
<b-field label="Role 3" v-if="rolePrepend.Role2.id">
<b-select v-model="rolePrepend.Role3.id" :placeholder="rolePrepend.Role3.name">
<option
:v-model="rolePrepend.Role3.id"
v-for="option in roles"
:value="option.id"
:key="option.id">
{{ option.name }}
</option>
</b-select>
</b-field>
<b-field label="Role 4" v-if="rolePrepend.Role3.id">
<b-select v-model="rolePrepend.Role4.id" placeholder="Select a role">
<option
:v-model="rolePrepend.Role4.id"
v-for="option in roles"
:value="option.id"
:key="option.id">
{{ option.name }}
</option>
</b-select>
</b-field>
<b-field label="Role 5" v-if="rolePrepend.Role4.id">
<b-select v-model="rolePrepend.Role5.id" placeholder="Select a role">
<option
:v-model="rolePrepend.Role5.id"
v-for="option in roles"
:value="option.id"
:key="option.id">
{{ option.name }}
</option>
</b-select>
</b-field>
<b-field label="Role 6" v-if="rolePrepend.Role5.id">
<b-select v-model="rolePrepend.Role6.id" placeholder="Select a role">
<option
v-for="option in roles"
:value="option.id"
:key="option.id">
{{ option.name }}
</option>
</b-select>
</b-field>
<b-field label="Role 7" v-if="rolePrepend.Role6.id">
<b-select v-model="rolePrepend.Role7.id" placeholder="Select a role">
<option
v-for="option in roles"
:value="option.id"
:key="option.id">
{{ option.name }}
</option>
</b-select>
</b-field>
<b-field label="Role 8" v-if="rolePrepend.Role7.id">
<b-select v-model="rolePrepend.Role8.id" placeholder="Select a role">
<option
v-for="option in roles"
:value="option.id"
:key="option.id">
{{ option.name }}
</option>
</b-select>
</b-field>
<b-field label="Role 9" v-if="rolePrepend.Role8.id">
<b-select v-model="rolePrepend.Role9.id" placeholder="Select a role">
<option
v-for="option in roles"
:value="option.id"
:key="option.id">
{{ option.name }}
</option>
</b-select>
</b-field>
<b-field label="Role 10" v-if="rolePrepend.Role9.id">
<b-select v-model="rolePrepend.Role10.id" placeholder="Select a role">
<option
v-for="option in roles"
:value="option.id"
:key="option.id">
{{ option.name }}
</option>
</b-select>
</b-field>
</div>
</div>
<div slot='footer'>
@ -111,6 +206,46 @@ export default {
team: [],
rolePrepend: {
username: '',
Role: {
name: '',
id: '',
},
Role2: {
name: '',
id: '',
},
Role3: {
name: '',
id: '',
},
Role4: {
name: '',
id: '',
},
Role5: {
name: '',
id: '',
},
Role6: {
name: '',
id: '',
},
Role7: {
name: '',
id: '',
},
Role8: {
name: '',
id: '',
},
Role9: {
name: '',
id: '',
},
Role10: {
name: '',
id: '',
},
RoleId: '',
Role2Id: '',
Role3Id: '',
@ -156,7 +291,27 @@ export default {
methods: {
showModifyModal (user) {
this.modifyModal = true
this.rolePrepend = user
this.rolePrepend.Role.name = user.Role.name
this.rolePrepend.Role.id = user.RoleId
this.rolePrepend.Role2.name = user.Role2.name
this.rolePrepend.Role2.id = user.Role2Id
this.rolePrepend.Role3.name = user.Role3.name
this.rolePrepend.Role3.id = user.Role3Id
this.rolePrepend.Role4.name = user.Role4.name
this.rolePrepend.Role4.id = user.Role4Id
this.rolePrepend.Role5.name = user.Role5.name
this.rolePrepend.Role5.id = user.Role5Id
this.rolePrepend.Role6.name = user.Role6.name
this.rolePrepend.Role6.id = user.Role6Id
this.rolePrepend.Role7.name = user.Role7.name
this.rolePrepend.Role7.id = user.Role7Id
this.rolePrepend.Role8.name = user.Role8.name
this.rolePrepend.Role8.id = user.Role8Id
this.rolePrepend.Role9.name = user.Role9.name
this.rolePrepend.Role9.id = user.Role9Id
this.rolePrepend.Role10.name = user.Role10.name
this.rolePrepend.Role10.id = user.Role10Id
this.rolePrepend.username = user.User.username
},
clearTeamErrors() {
this.tcreateProd.errors.username = ''

View File

@ -17,21 +17,6 @@
</style>
<template>
<main>
<section class="hero is-info is-large" v-if="!$store.state.experimentsStore.teams">
<div class="hero-body">
<div class="container">
<h2>
Kaverti Teams
</h2>
<h1>
Kaverti Teams are coming soon
</h1>
<h2 v-if="$store.state.developerMode">
However, you're currently opted into Experiments, you can enable the Teams experiment in User Settings.
</h2>
</div>
</div>
</section>
<b-modal :active="createTeamModal" v-model="createTeamModal">
<div class="modal-card" style="width: auto">
<template>
@ -92,7 +77,7 @@
</template>
</div>
</b-modal>
<section v-if='$store.state.experimentsStore.teams' class="hero is-info">
<section class="hero is-info">
<div class="hero-body" style="padding: 1rem 1rem !important;">
<div class="mobile-container">
<div class="container">

View File

@ -0,0 +1,46 @@
import bpy
def hex_to_rgb(value):
gamma = 2.05
value = value.lstrip('#')
lv = len(value)
fin = list(int(value[i:i + lv // 3], 16) for i in range(0, lv, lv // 3))
r = pow(fin[0] / 255, gamma)
g = pow(fin[1] / 255, gamma)
b = pow(fin[2] / 255, gamma)
fin.clear()
fin.append(r)
fin.append(g)
fin.append(b)
return tuple(fin)
bpy.ops.wm.open_mainfile(filepath='C:/Users/matth/Documents/GitHub/website/rendering/avatar.blend')
bpy.data.objects['Head'].select = True
bpy.data.materials['Head'].diffuse_color = hex_to_rgb('#ffffff')
bpy.data.materials['Face'].diffuse_color = hex_to_rgb('#ffffff')
bpy.data.objects['Left Arm'].select = True
bpy.data.objects['Left Arm'].active_material.diffuse_color = hex_to_rgb('#ffffff')
bpy.data.objects['Torso'].select = True
bpy.data.objects['Torso'].active_material.diffuse_color = hex_to_rgb('#ffffff')
bpy.data.objects['Right Arm'].select = True
bpy.data.objects['Right Arm'].active_material.diffuse_color = hex_to_rgb('#ffffff')
bpy.data.objects['Left Leg'].select = True
bpy.data.objects['Left Leg'].active_material.diffuse_color = hex_to_rgb('#ffffff')
bpy.data.objects['Right Leg'].select = True
bpy.data.objects['Right Leg'].active_material.diffuse_color = hex_to_rgb('#ffffff')
face_Image = bpy.data.images.load(filepath = 'C:/Users/matth/Documents/GitHub/website/rendering/global/defaultFace.png')
bpy.data.textures['Face'].image = face_Image
shirt_Image = bpy.data.images.load(filepath = 'C:/Users/matth/Documents/GitHub/website/rendering/global/a4162f0e4f4d16da250cde836b526dcd.png')
bpy.data.textures['Shirt'].image = shirt_Image
bpy.data.textures['ShirtR'].image = shirt_Image
bpy.data.textures['ShirtL'].image = shirt_Image
pants_Image = bpy.data.images.load(filepath = 'C:/Users/matth/Documents/GitHub/website/rendering/global/0.png')
bpy.data.textures['PantsR'].image = pants_Image
bpy.data.textures['PantsL'].image = pants_Image
for obj in bpy.data.objects:
obj.select = False
bpy.ops.object.select_all(action='SELECT')
bpy.ops.view3d.camera_to_view_selected()
scene = bpy.context.scene
scene.render.image_settings.file_format = 'PNG'
scene.render.filepath = 'C:/xampp21/htdocs/marketplace/avatars/15b15617fbf8320728072717eec2c964.png'
bpy.ops.render.render(write_still = 1)