Skip to content

Commit

Permalink
Merge pull request #12 from blinko-space/main
Browse files Browse the repository at this point in the history
fix build
  • Loading branch information
blinko-space authored Oct 27, 2024
2 parents 864aaf6 + f440fae commit 1f21b0a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/BlinkoEditor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,23 @@ export const BlinkoEditor = observer(({ mode, onSended, onHeightChange }: IProps
return <div ref={editorRef} id='global-editor'>
<Editor
originFiles={!isCreateMode ? blinko.curSelectedNote?.attachments : []}
content={isCreateMode ? blinko.noteContent : blinko.curSelectedNote?.content}
content={isCreateMode ? blinko.noteContent! : blinko.curSelectedNote?.content!}
onChange={v => {
onHeightChange?.(editorRef.current.clientHeight)
isCreateMode ? (blinko.noteContent = v) : (blinko.curSelectedNote.content = v)
isCreateMode ? (blinko.noteContent = v) : (blinko.curSelectedNote!.content = v)
}}
isSendLoading={blinko.upsertNote.loading.value}
bottomSlot={
isCreateMode ? <div className='text-xs text-ignore ml-2'>Drop to upload files</div> :
<div className='text-xs text-desc'>{dayjs(blinko.curSelectedNote.createdAt).format("YYYY-MM-DD hh:mm:ss")}</div>
<div className='text-xs text-desc'>{dayjs(blinko.curSelectedNote!.createdAt).format("YYYY-MM-DD hh:mm:ss")}</div>
}
onSend={async ({ files }) => {
if (isCreateMode) {
//@ts-ignore
await blinko.upsertNote.call({ content: blinko.noteContent, attachments: files.map(i => { return { name: i.name, path: i.uploadPath, size: i.size } }) })
} else {
await blinko.upsertNote.call({
id: blinko.curSelectedNote.id,
id: blinko.curSelectedNote!.id,
//@ts-ignore
content: blinko.curSelectedNote.content, attachments: files.map(i => { return { name: i.name, path: i.uploadPath, size: i.size } })
})
Expand Down
3 changes: 3 additions & 0 deletions update-latest-version.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/bin/bash

echo "Remove the local blinko-website image..."
docker rmi blinko-website || echo "No existing blinko-website image to remove."

echo "Pull up the latest blinko mirror image..."

docker compose -f docker-compose.prod.yml pull blinko-website
Expand Down

0 comments on commit 1f21b0a

Please sign in to comment.