Skip to content

Commit

Permalink
Merge pull request #710 from SnowCait/pick-multiple-images
Browse files Browse the repository at this point in the history
Pick multiple images
  • Loading branch information
SnowCait authored Oct 13, 2023
2 parents f287a33 + 8b2464d commit 3d910a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion web/src/routes/editor/MediaPicker.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
import { createEventDispatcher } from 'svelte';
import IconPhoto from '@tabler/icons-svelte/dist/svelte/icons/IconPhoto.svelte';
export let multiple = false;
let input: HTMLInputElement | undefined;
let files: FileList;
Expand All @@ -11,7 +13,7 @@
<button on:click|preventDefault={() => input?.click()} class="clear">
<IconPhoto size="30" />
</button>
<input type="file" bind:this={input} bind:files on:change={() => dispatch('pick', files)} accept="image/*" hidden>
<input type="file" {multiple} bind:this={input} bind:files on:change={() => dispatch('pick', files)} accept="image/*" hidden>

<style>
button {
Expand Down
2 changes: 1 addition & 1 deletion web/src/routes/editor/NoteEditor.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@
/>
<div class="actions">
<div class="options">
<MediaPicker on:pick={mediaPicked} />
<MediaPicker multiple={true} on:pick={mediaPicked} />
<EmojiPickerSlide bind:this={emojiPickerSlide} on:pick={onEmojiPick} />
<ContentWarning bind:reason={contentWarningReason} />
</div>
Expand Down

1 comment on commit 3d910a1

@vercel
Copy link

@vercel vercel bot commented on 3d910a1 Oct 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nostter – ./

nostter-git-main-snowcait.vercel.app
nostter.vercel.app
nostter-snowcait.vercel.app

Please sign in to comment.