From 517dd91119172e002812d8ee0c64873e56a7ff32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Mon, 25 May 2020 20:07:34 +0200 Subject: [PATCH] Tryna calm TS --- .drone.yml | 29 +++++++++++++++++ src/components/user/Heading/util.ts | 1 + src/components/user/Image/edit.tsx | 20 ++++-------- src/components/user/Layout/edit.tsx | 10 +++--- src/components/user/Paragraph/edit.tsx | 4 +-- src/lib.ts | 43 -------------------------- tsconfig.json | 7 +++-- 7 files changed, 47 insertions(+), 67 deletions(-) create mode 100644 .drone.yml delete mode 100644 src/lib.ts diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..90aca39 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,29 @@ +workspace: + path: /sb + +kind: pipeline +type: docker +name: default +steps: + - name: build + image: node:12 + commands: + - npm ci + - npm run build + + - name: publish + when: + branch: + - master + image: appleboy/drone-scp + repo: b12f/bbcom + settings: + host: web5svsvy.wh.hosting.zone + port: 2244 + username: + from_secret: bbcom_ssh_user + key: + from_secret: bbcom_ssh_key + source: ./dist/* + target: /home/web5svsvy/html/schlechtenburg.b12f.io/ + rm: true diff --git a/src/components/user/Heading/util.ts b/src/components/user/Heading/util.ts index 03e73c5..c322598 100644 --- a/src/components/user/Heading/util.ts +++ b/src/components/user/Heading/util.ts @@ -1 +1,2 @@ +export const a = 1; export const getDefaultData = () => ({}); diff --git a/src/components/user/Image/edit.tsx b/src/components/user/Image/edit.tsx index 045be1b..0f4f42e 100644 --- a/src/components/user/Image/edit.tsx +++ b/src/components/user/Image/edit.tsx @@ -1,10 +1,8 @@ import { defineComponent, reactive, - computed, ref, Ref, - onMounted, watch, PropType, } from '@vue/composition-api'; @@ -14,14 +12,14 @@ import { useActivation, } from '@components/TreeElement'; +import SbToolbar from '@internal/Toolbar'; + import { getDefaultData, ImageData, ImageProps, } from './util'; -import SbToolbar from '@internal/Toolbar'; - import './style.scss'; export default defineComponent({ @@ -37,33 +35,27 @@ export default defineComponent({ }, }, - setup(props: ImageProps, context) { + setup(props: ImageProps) { const localData = reactive({ src: props.data.src, alt: props.data.alt, }); - console.log(localData); const fileInput: Ref = ref(null); - const { isActive } = useActivation(props.blockId); - watch(() => props.data, () => { - console.log('props update image'); localData.src = props.data.src; localData.alt = props.data.alt; }); const selectImage = () => { - console.log(fileInput); if (fileInput.value) { fileInput.value.click(); } }; const onImageSelect = () => { - console.log('select image'); if (fileInput.value && fileInput.value.files && fileInput.value.files.length) { localData.src = window.URL.createObjectURL(fileInput.value.files[0]); } @@ -93,9 +85,9 @@ export default defineComponent({ }} /> - {this.localData.src ? - {this.localData.alt} : -