the RunwareAI Plugin is working now
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
v-for="style in styles"
|
||||
:key="style.id"
|
||||
class="style-item"
|
||||
@click="$emit('styleSelected', style)"
|
||||
@click="selectStyle(style)"
|
||||
>
|
||||
<img :src="'/storage/' + style.preview_image" :alt="style.title" class="style-thumbnail" />
|
||||
<div class="style-details">
|
||||
@@ -29,6 +29,19 @@ import { ref, onMounted } from 'vue';
|
||||
|
||||
const styles = ref([]);
|
||||
|
||||
const props = defineProps({
|
||||
position: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
image_id: {
|
||||
type: Number,
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
|
||||
const emits = defineEmits(['styleSelected', 'back', 'close']);
|
||||
|
||||
const fetchStyles = () => {
|
||||
axios.get('/api/styles')
|
||||
.then(response => {
|
||||
@@ -39,18 +52,14 @@ const fetchStyles = () => {
|
||||
});
|
||||
};
|
||||
|
||||
const selectStyle = (style) => {
|
||||
console.log('StyleSelector.vue: emitting styleSelected with image_id:', props.image_id);
|
||||
emits('styleSelected', style, props.image_id);
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
fetchStyles();
|
||||
});
|
||||
|
||||
const props = defineProps({
|
||||
position: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
|
||||
const emits = defineEmits(['styleSelected', 'back', 'close']);
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Reference in New Issue
Block a user