wikijs-fork/views/modals/editor-image.pug

104 lines
4.0 KiB
Plaintext
Raw Normal View History

2016-11-29 03:03:18 +00:00
.modal#modal-editor-image
.modal-background
.modal-container
.modal-content.is-expanded
2016-11-29 03:03:18 +00:00
header.is-green
span Insert Image
p.modal-notify(v-bind:class="{ 'is-active': isLoading }")
span {{ isLoadingText }}
i
.modal-toolbar.is-green
a.button(v-on:click="newFolder")
i.fa.fa-folder
span New Folder
a.button#btn-editor-image-upload
2016-11-29 03:03:18 +00:00
i.fa.fa-upload
span Upload Image
label
input(type="file", multiple)
a.button(v-on:click="fetchFromUrl")
i.fa.fa-download
span Fetch from URL
section.is-gapless
2016-11-30 03:23:44 +00:00
.columns.is-stretched
2016-11-29 03:03:18 +00:00
.column.is-one-quarter.modal-sidebar.is-green(style={'max-width':'350px'})
2016-11-30 03:23:44 +00:00
.model-sidebar-header Folders
ul.model-sidebar-list
li(v-for="fld in folders")
a(v-on:click="selectFolder(fld)", v-bind:class="{ 'is-active': currentFolder === fld }")
i.icon-folder2
2016-12-04 01:20:06 +00:00
span / {{ fld }}
2016-11-30 03:23:44 +00:00
.model-sidebar-header Alignment
.model-sidebar-content
p.control.is-fullwidth
select(v-model='currentAlign')
option(value='left') Left (default)
option(value='center') Centered
option(value='right') Right
option(value='logo') Page Logo
.column.editor-modal-image-choices
2016-11-29 03:03:18 +00:00
figure(v-for="img in images", v-bind:class="{ 'is-active': currentImage === img._id }", v-on:click="selectImage(img._id)", v-bind:data-uid="img._id")
img(v-bind:src="'/uploads/t/' + img._id + '.png'")
span: strong {{ img.basename }}
span {{ img.filesize | filesize }}
2016-12-04 01:20:06 +00:00
em(v-show="images.length < 1")
i.icon-marquee-minus
| This folder is empty.
2016-11-29 03:03:18 +00:00
footer
a.button.is-grey.is-outlined(v-on:click="cancel") Discard
a.button.is-green(v-on:click="insertImage") Insert Image
2016-11-29 03:03:18 +00:00
.modal.is-superimposed(v-bind:class="{ 'is-active': newFolderShow }")
.modal-background
.modal-container
.modal-content
2016-11-29 03:03:18 +00:00
header.is-light-blue New Folder
section
label.label Enter the new folder name:
p.control.is-fullwidth
input.input#txt-editor-image-newfoldername(type='text', placeholder='folder name', v-model='newFolderName', v-on:keyup.enter="newFolderCreate", v-on:keyup.esc="newFolderDiscard")
2016-11-29 03:03:18 +00:00
span.help.is-danger(v-show="newFolderError") This folder name is invalid!
footer
a.button.is-grey.is-outlined(v-on:click="newFolderDiscard") Discard
a.button.is-light-blue(v-on:click="newFolderCreate") Create
2016-09-25 21:32:39 +00:00
2016-11-29 03:03:18 +00:00
.modal.is-superimposed(v-bind:class="{ 'is-active': fetchFromUrlShow }")
2016-09-25 21:32:39 +00:00
.modal-background
.modal-container
.modal-content
2016-11-29 03:03:18 +00:00
header.is-light-blue Fetch Image from URL
section
label.label Enter full URL path to the image:
p.control.is-fullwidth
input.input#txt-editor-image-fetchurl(type='text', placeholder='http://www.example.com/some-image.png', v-model='fetchFromUrlURL')
2016-11-29 03:03:18 +00:00
span.help.is-danger.is-hidden This URL path is invalid!
footer
a.button.is-grey.is-outlined(v-on:click="fetchFromUrlDiscard") Discard
a.button.is-light-blue(v-on:click="fetchFromUrlGo") Fetch
2016-11-29 03:03:18 +00:00
.modal.is-superimposed(v-bind:class="{ 'is-active': renameImageShow }")
2016-10-17 03:24:19 +00:00
.modal-background
.modal-container
.modal-content
2016-11-29 03:03:18 +00:00
header.is-indigo Rename Image
section
label.label Enter the new filename (without the extension) of the image:
p.control.is-fullwidth
input.input#txt-editor-image-rename(type='text', placeholder='filename', v-model='renameImageFilename')
2016-11-29 03:03:18 +00:00
span.help.is-danger.is-hidden This filename is invalid!
footer
a.button.is-grey.is-outlined(v-on:click="renameImageDiscard") Discard
a.button.is-light-blue(v-on:click="renameImageGo") Rename
2016-10-17 03:24:19 +00:00
2016-11-29 03:03:18 +00:00
.modal.is-superimposed(v-bind:class="{ 'is-active': deleteImageShow }")
.modal-background
.modal-container
.modal-content
2016-11-29 03:03:18 +00:00
header.is-red Delete image?
section
span Are you sure you want to delete #[strong {{deleteImageFilename}}]?
footer
a.button.is-grey.is-outlined(v-on:click="deleteImageWarn(false)") Discard
a.button.is-red(v-on:click="deleteImageGo") Delete