the RunwareAI Plugin is working now

This commit is contained in:
2025-07-30 23:24:47 +02:00
parent 07c6786bda
commit 47860b4b7d
35 changed files with 544 additions and 218 deletions

View File

@@ -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>