From 77f6490f2d7e7bcdc7c63d70fbf60b1f02b1d38a Mon Sep 17 00:00:00 2001 From: Seth Sharp Date: Thu, 8 Feb 2024 19:54:58 +1000 Subject: [PATCH] wip --- .../Editor/Components/Modals/EditImage.vue | 45 ++----------------- .../js/Components/Editor/Nodes/Image/Image.js | 9 ---- .../js/Components/Editor/Nodes/Image/View.vue | 5 +-- 3 files changed, 5 insertions(+), 54 deletions(-) diff --git a/resources/js/Components/Editor/Components/Modals/EditImage.vue b/resources/js/Components/Editor/Components/Modals/EditImage.vue index b74e3433..01e1678d 100644 --- a/resources/js/Components/Editor/Components/Modals/EditImage.vue +++ b/resources/js/Components/Editor/Components/Modals/EditImage.vue @@ -13,38 +13,17 @@ const props = defineProps({ modelValue: { type: [String, null], }, - href: { - required: true, - }, alt: { required: true, }, height: { required: true, }, - fit: { - required: true, - }, - target: { - required: true, - }, }) -const emits = defineEmits([ - 'update:href', - 'update:alt', - 'update:height', - 'update:fit', - 'update:target', -]) - -const { - href: computedHref, - alt: computedAlt, - height: computedHeight, - fit: computedFit, - target: computedTarget, -} = useVModels(props, emits) +const emits = defineEmits(['update:alt', 'update:height']) + +const { alt: computedAlt, height: computedHeight, fit: computedFit } = useVModels(props, emits) const path = '' const errors = ref({}) @@ -93,11 +72,6 @@ watch( -
- - -
-
@@ -140,18 +114,7 @@ watch( v-model="computedHeight" />
- -
- - -
- + Save
diff --git a/resources/js/Components/Editor/Nodes/Image/Image.js b/resources/js/Components/Editor/Nodes/Image/Image.js index 525e5a59..a9d19458 100644 --- a/resources/js/Components/Editor/Nodes/Image/Image.js +++ b/resources/js/Components/Editor/Nodes/Image/Image.js @@ -19,18 +19,9 @@ export default Node.create({ alt: { default: null, }, - href: { - default: null, - }, height: { default: 'full', }, - fit: { - default: 'none', - }, - target: { - default: '_self', - }, } }, diff --git a/resources/js/Components/Editor/Nodes/Image/View.vue b/resources/js/Components/Editor/Nodes/Image/View.vue index 12b8e1fa..8d024142 100644 --- a/resources/js/Components/Editor/Nodes/Image/View.vue +++ b/resources/js/Components/Editor/Nodes/Image/View.vue @@ -19,7 +19,7 @@ const props = defineProps({ const open = ref(false) -let { src, href, alt, height, fit, target } = breakdownNodeViewProps(props) +let { src, alt, height } = breakdownNodeViewProps(props)