Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
nakasyou committed Nov 18, 2024
1 parent 9b024f5 commit 55cfb34
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ export default (props: Props) => {
}}
title="Confirm"
>
本当に再スキャンしますか?このデータは失われます。
本当にリセットしますか?このデータは失われます。
</Dialog>
</Show>
<div class="w-full h-[calc(100dvh-200px)]">
Expand Down Expand Up @@ -384,7 +384,7 @@ export default (props: Props) => {
onClick={() => setRescanConfirm(true)}
type="button"
>
ReScan
画像をリセット
</button>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ export const ScanedImageEditor = (props: Props) => {

let scanInputRef!: HTMLInputElement

const reScan = () => {
const reScan = (camera: boolean) => {
scanInputRef.capture = camera ? 'camera' : ''
scanInputRef.oninput = () => {
if (!scanInputRef.files) {
return
Expand Down Expand Up @@ -50,11 +51,14 @@ export const ScanedImageEditor = (props: Props) => {
}}
class="ml-5"
>
<input ref={scanInputRef} type="file" class="hidden" />
<div>
<input ref={scanInputRef} accept="image/*" type="file" class="hidden" />
<div class="flex gap-2 items-center justify-center">
<Show when={!props.noteData.blobs.scanedImage}>
<button class="outlined-button" onClick={reScan} type="button">
スキャン!
<button class="outlined-button" onClick={() => reScan(true)} type="button">
スキャン
</button>
<button class="text-button" onClick={() => reScan(false)} type="button">
ファイルを選択
</button>
</Show>
</div>
Expand Down

0 comments on commit 55cfb34

Please sign in to comment.