Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
I
imageboard-web
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Trirst
imageboard-web
Commits
b7ab66a7
Commit
b7ab66a7
authored
Jun 26, 2021
by
Trirst
Browse files
Options
Downloads
Patches
Plain Diff
Refine image upload component's style
parent
d0e06117
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#766
passed
Jun 26, 2021
Stage: build
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/components/ImageUpload.vue
+34
-32
34 additions, 32 deletions
src/components/ImageUpload.vue
src/components/WarningBox.vue
+1
-1
1 addition, 1 deletion
src/components/WarningBox.vue
with
35 additions
and
33 deletions
src/components/ImageUpload.vue
+
34
−
32
View file @
b7ab66a7
<
template
>
<div>
<div
class=
"
p-12
m-4 border-dotted border-4 border-gray-400"
class=
"
h-48
m-4 border-dotted border-4 border-gray-400"
@
drop.prevent=
"
updateWrapper($event);
$event.currentTarget.classList.remove('bg-gray-200');
...
...
@@ -9,7 +9,7 @@
@
dragover.prevent=
"$event.currentTarget.classList.add('bg-gray-200')"
@
dragleave.prevent=
"$event.currentTarget.classList.remove('bg-gray-200')"
>
<div
class=
"relative"
>
<div
class=
"relative
h-full flex justify-center items-center
"
>
<input
type=
"file"
ref=
"imageInput"
...
...
@@ -19,15 +19,16 @@
multiple
class=
"h-full w-full opacity-0 absolute z-10 cursor-pointer"
/>
<
div
class=
"font-semibold
text-sm
opacity-25 relative"
>
<
span
class=
"font-semibold opacity-25 relative"
>
Drag and drop images here or click here to browse.
</span>
</div>
</div>
<
/
div>
<div
class=
"flex flex-col items-center m-4"
>
<WarningBox
v-if=
"invalidType"
@
click=
"invalidType = false"
>
One or more files have invalid types
.
Please upload PNG, JPEG or GIF image only
.
</WarningBox>
<ul
v-if=
"imageList.length"
v-cloak
>
<ul
v-if=
"imageList.length"
>
<li
v-for=
"(image, index) in imageList"
:key=
"index"
...
...
@@ -54,6 +55,7 @@
Submit
</button>
</div>
</div>
</
template
>
<
script
>
...
...
This diff is collapsed.
Click to expand it.
src/components/WarningBox.vue
+
1
−
1
View file @
b7ab66a7
<
template
>
<div
class=
"
p-
4
p-
5
m-2
font-semibold
bg-red-400
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment