refactor: moved server content to /server
This commit is contained in:
39
server/views/modals/admin-createuser.pug
Normal file
39
server/views/modals/admin-createuser.pug
Normal file
@@ -0,0 +1,39 @@
|
||||
|
||||
.modal#modal-admin-users-create
|
||||
.modal-background
|
||||
.modal-container
|
||||
.modal-content
|
||||
header.is-blue
|
||||
span Create / Authorize User
|
||||
p.modal-notify(v-bind:class='{ "is-active": loading }'): i
|
||||
section
|
||||
label.label Email address:
|
||||
p.control.is-fullwidth
|
||||
input.input(type='text', placeholder='e.g. john.doe@company.com', v-model='email')
|
||||
section
|
||||
label.label Provider:
|
||||
p.control.is-fullwidth
|
||||
select(v-model='provider')
|
||||
option(value='local') Local Database
|
||||
if appconfig.auth.microsoft.enabled
|
||||
option(value='windowslive') Microsoft Account
|
||||
if appconfig.auth.google.enabled
|
||||
option(value='google') Google ID
|
||||
if appconfig.auth.facebook.enabled
|
||||
option(value='facebook') Facebook
|
||||
if appconfig.auth.github.enabled
|
||||
option(value='github') GitHub
|
||||
if appconfig.auth.slack.enabled
|
||||
option(value='slack') Slack
|
||||
section(v-if='provider=="local"')
|
||||
label.label Password:
|
||||
p.control.is-fullwidth
|
||||
input.input(type='password', placeholder='', v-model='password')
|
||||
section(v-if='provider=="local"')
|
||||
label.label Full Name:
|
||||
p.control.is-fullwidth
|
||||
input.input(type='text', placeholder='e.g. John Doe', v-model='name')
|
||||
footer
|
||||
a.button.is-grey.is-outlined(v-on:click='cancel') Discard
|
||||
a.button(v-on:click='create', v-if='provider=="local"', v-bind:disabled='loading', v-bind:class='{ "is-disabled": loading, "is-blue": !loading }') Create User
|
||||
a.button(v-on:click='create', v-if='provider!="local"', v-bind:disabled='loading', v-bind:class='{ "is-disabled": loading, "is-blue": !loading }') Authorize User
|
12
server/views/modals/admin-deleteuser.pug
Normal file
12
server/views/modals/admin-deleteuser.pug
Normal file
@@ -0,0 +1,12 @@
|
||||
.modal#modal-admin-users-delete
|
||||
.modal-background
|
||||
.modal-container
|
||||
.modal-content
|
||||
header.is-red
|
||||
span Delete User Account?
|
||||
p.modal-notify(v-bind:class='{ "is-active": loading }'): i
|
||||
section
|
||||
span Are you sure you want to delete this user account? This action cannot be undone!
|
||||
footer
|
||||
a.button.is-grey.is-outlined(v-on:click='cancel') Abort
|
||||
a.button.is-red(v-on:click='deleteUser') Delete
|
25
server/views/modals/admin-upgrade.pug
Normal file
25
server/views/modals/admin-upgrade.pug
Normal file
@@ -0,0 +1,25 @@
|
||||
.modal(v-bind:class='{ "is-active": upgradeModal.state }')
|
||||
.modal-background
|
||||
.modal-container
|
||||
.modal-content
|
||||
template(v-if='upgradeModal.step === "running"')
|
||||
header.is-blue Install
|
||||
section.modal-loading
|
||||
i
|
||||
span Wiki.js {{ upgradeModal.mode }} in progress...
|
||||
em Please wait
|
||||
template(v-if='upgradeModal.step === "error"')
|
||||
header.is-red Installation Error
|
||||
section.modal-loading
|
||||
span {{ upgradeModal.error }}
|
||||
footer
|
||||
a.button.is-grey.is-outlined(v-on:click='upgradeCancel') Abort
|
||||
a.button.is-deep-orange(v-on:click='upgradeStart') Try Again
|
||||
template(v-if='upgradeModal.step === "confirm"')
|
||||
header.is-deep-orange Are you sure?
|
||||
section
|
||||
label.label You are about to {{ upgradeModal.mode }} Wiki.js.
|
||||
span.note You will not be able to access your wiki during the operation. Content will not be affected. However, it is your responsability to ensure you have a backup in the unexpected event content gets lost or corrupted.
|
||||
footer
|
||||
a.button.is-grey.is-outlined(v-on:click='upgradeCancel') Abort
|
||||
a.button.is-deep-orange(v-on:click='upgradeStart') Start
|
10
server/views/modals/create-discard.pug
Normal file
10
server/views/modals/create-discard.pug
Normal file
@@ -0,0 +1,10 @@
|
||||
.modal#modal-create-discard
|
||||
.modal-background
|
||||
.modal-container
|
||||
.modal-content
|
||||
header.is-orange Discard?
|
||||
section
|
||||
span Are you sure you want to leave this page and loose anything you wrote so far?
|
||||
footer
|
||||
a.button.is-grey.is-outlined.btn-create-discard Stay on page
|
||||
a.button.is-orange(href='/') Discard
|
14
server/views/modals/create.pug
Normal file
14
server/views/modals/create.pug
Normal file
@@ -0,0 +1,14 @@
|
||||
|
||||
.modal#modal-create-prompt
|
||||
.modal-background
|
||||
.modal-container
|
||||
.modal-content
|
||||
header.is-light-blue Create New Document
|
||||
section
|
||||
label.label Enter the new document path:
|
||||
p.control.is-fullwidth
|
||||
input.input#txt-create-prompt(type='text', placeholder='page-name')
|
||||
span.help.is-danger.is-hidden This document path is invalid!
|
||||
footer
|
||||
a.button.is-grey.is-outlined.btn-create-prompt Discard
|
||||
a.button.is-light-blue.btn-create-go Create
|
11
server/views/modals/edit-discard.pug
Normal file
11
server/views/modals/edit-discard.pug
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
.modal#modal-edit-discard
|
||||
.modal-background
|
||||
.modal-container
|
||||
.modal-content
|
||||
header.is-orange Discard?
|
||||
section
|
||||
span Are you sure you want to leave this page and loose any modifications?
|
||||
footer
|
||||
a.button.is-grey.is-outlined.btn-edit-discard Stay on page
|
||||
a.button.is-orange(href='/' + pageData.meta.path) Discard
|
23
server/views/modals/editor-codeblock.pug
Normal file
23
server/views/modals/editor-codeblock.pug
Normal file
@@ -0,0 +1,23 @@
|
||||
|
||||
.modal#modal-editor-codeblock
|
||||
.modal-background
|
||||
.modal-container
|
||||
.modal-content.is-expanded
|
||||
|
||||
header.is-green
|
||||
span Insert Code Block
|
||||
|
||||
section.is-gapless
|
||||
.columns.is-stretched
|
||||
.column.is-one-quarter.modal-sidebar.is-green(style={'max-width':'350px'})
|
||||
.model-sidebar-header Language
|
||||
.model-sidebar-content
|
||||
p.control.is-fullwidth
|
||||
select(v-model='modeSelected')
|
||||
option(v-for='mode in modes', v-bind:value='mode.name') {{ mode.caption }}
|
||||
.column.ace-container
|
||||
#codeblock-editor
|
||||
|
||||
footer
|
||||
a.button.is-grey.is-outlined(v-on:click='cancel') Discard
|
||||
a.button.is-green(v-on:click='insertCode') Insert Code Block
|
80
server/views/modals/editor-file.pug
Normal file
80
server/views/modals/editor-file.pug
Normal file
@@ -0,0 +1,80 @@
|
||||
|
||||
.modal#modal-editor-file
|
||||
.modal-background
|
||||
.modal-container
|
||||
.modal-content.is-expanded
|
||||
|
||||
header.is-green
|
||||
span Insert File
|
||||
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-file-upload
|
||||
i.fa.fa-upload
|
||||
span Upload File
|
||||
label
|
||||
input(type='file', multiple)
|
||||
section.is-gapless
|
||||
.columns.is-stretched
|
||||
.column.is-one-quarter.modal-sidebar.is-green(style={'max-width':'350px'})
|
||||
.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
|
||||
span / {{ fld }}
|
||||
.column.editor-modal-file-choices
|
||||
figure(v-for='fl in files', v-bind:class='{ "is-active": currentFile === fl._id }', v-on:click='selectFile(fl._id)', v-bind:data-uid='fl._id')
|
||||
i(class='icon-file')
|
||||
span: strong {{ fl.filename }}
|
||||
span {{ fl.mime }}
|
||||
span {{ fl.filesize | filesize }}
|
||||
em(v-show='files.length < 1')
|
||||
i.icon-marquee-minus
|
||||
| This folder is empty.
|
||||
footer
|
||||
a.button.is-grey.is-outlined(v-on:click='cancel') Discard
|
||||
a.button.is-green(v-on:click='insertFileLink') Insert Link to File
|
||||
|
||||
.modal.is-superimposed(v-bind:class='{ "is-active": newFolderShow }')
|
||||
.modal-background
|
||||
.modal-container
|
||||
.modal-content
|
||||
header.is-light-blue New Folder
|
||||
section
|
||||
label.label Enter the new folder name:
|
||||
p.control.is-fullwidth
|
||||
input.input#txt-editor-file-newfoldername(type='text', placeholder='folder name', v-model='newFolderName', v-on:keyup.enter='newFolderCreate', v-on:keyup.esc='newFolderDiscard')
|
||||
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
|
||||
|
||||
.modal.is-superimposed(v-bind:class='{ "is-active": renameFileShow }')
|
||||
.modal-background
|
||||
.modal-container
|
||||
.modal-content
|
||||
header.is-indigo Rename File
|
||||
section
|
||||
label.label Enter the new filename (without the extension) of the file:
|
||||
p.control.is-fullwidth
|
||||
input.input#txt-editor-file-rename(type='text', placeholder='filename', v-model='renameFileFilename')
|
||||
span.help.is-danger.is-hidden This filename is invalid!
|
||||
footer
|
||||
a.button.is-grey.is-outlined(v-on:click='renameFileDiscard') Discard
|
||||
a.button.is-light-blue(v-on:click='renameFileGo') Rename
|
||||
|
||||
.modal.is-superimposed(v-bind:class='{ "is-active": deleteFileShow }')
|
||||
.modal-background
|
||||
.modal-container
|
||||
.modal-content
|
||||
header.is-red Delete file?
|
||||
section
|
||||
span Are you sure you want to delete #[strong {{deleteFileFilename}}]?
|
||||
footer
|
||||
a.button.is-grey.is-outlined(v-on:click='deleteFileWarn(false)') Discard
|
||||
a.button.is-red(v-on:click='deleteFileGo') Delete
|
104
server/views/modals/editor-image.pug
Normal file
104
server/views/modals/editor-image.pug
Normal file
@@ -0,0 +1,104 @@
|
||||
|
||||
.modal#modal-editor-image
|
||||
.modal-background
|
||||
.modal-container
|
||||
.modal-content.is-expanded
|
||||
|
||||
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
|
||||
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
|
||||
.columns.is-stretched
|
||||
.column.is-one-quarter.modal-sidebar.is-green(style={'max-width':'350px'})
|
||||
.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
|
||||
span / {{ fld }}
|
||||
.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
|
||||
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 }}
|
||||
em(v-show='images.length < 1')
|
||||
i.icon-marquee-minus
|
||||
| This folder is empty.
|
||||
footer
|
||||
a.button.is-grey.is-outlined(v-on:click='cancel') Discard
|
||||
a.button.is-green(v-on:click='insertImage') Insert Image
|
||||
|
||||
.modal.is-superimposed(v-bind:class='{ "is-active": newFolderShow }')
|
||||
.modal-background
|
||||
.modal-container
|
||||
.modal-content
|
||||
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')
|
||||
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
|
||||
|
||||
.modal.is-superimposed(v-bind:class='{ "is-active": fetchFromUrlShow }')
|
||||
.modal-background
|
||||
.modal-container
|
||||
.modal-content
|
||||
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')
|
||||
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
|
||||
|
||||
.modal.is-superimposed(v-bind:class='{ "is-active": renameImageShow }')
|
||||
.modal-background
|
||||
.modal-container
|
||||
.modal-content
|
||||
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')
|
||||
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
|
||||
|
||||
.modal.is-superimposed(v-bind:class='{ "is-active": deleteImageShow }')
|
||||
.modal-background
|
||||
.modal-container
|
||||
.modal-content
|
||||
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
|
33
server/views/modals/editor-link.pug
Normal file
33
server/views/modals/editor-link.pug
Normal file
@@ -0,0 +1,33 @@
|
||||
|
||||
//.modallayer#modal-editor-link
|
||||
.modallayer-content
|
||||
.tabs.is-boxed
|
||||
ul
|
||||
li
|
||||
a
|
||||
span.icon.is-small
|
||||
i.fa.fa-file-text-o
|
||||
span Internal Document Link
|
||||
li.is-active
|
||||
a
|
||||
span.icon.is-small
|
||||
i.fa.fa-external-link
|
||||
span External Link
|
||||
.columns.is-hidden
|
||||
.column
|
||||
label.label Text to display
|
||||
p.control
|
||||
input.input(type='text', placeholder='Text input')
|
||||
.column
|
||||
label.label Link
|
||||
p.control
|
||||
input.input(type='text', placeholder='http://')
|
||||
.columns
|
||||
.column
|
||||
label.label Text to display
|
||||
p.control
|
||||
input.input(type='text', placeholder='Text input')
|
||||
.column
|
||||
label.label Link
|
||||
p.control
|
||||
input.input(type='text', placeholder='http://')
|
28
server/views/modals/editor-video.pug
Normal file
28
server/views/modals/editor-video.pug
Normal file
@@ -0,0 +1,28 @@
|
||||
|
||||
.modal#modal-editor-video
|
||||
.modal-background
|
||||
.modal-container
|
||||
.modal-content
|
||||
header.is-green Insert Video Player
|
||||
section
|
||||
label.label Enter the link to the video to be embedded:
|
||||
p.control.is-fullwidth
|
||||
input.input(type='text', placeholder='https://www.youtube.com/watch?v=xxxxxxxxxxx', v-model='link')
|
||||
span.help.is-red.is-hidden This URL is invalid or not supported!
|
||||
.note The following are supported:
|
||||
ul
|
||||
li
|
||||
i.icon-youtube-play
|
||||
span Youtube
|
||||
li
|
||||
i.icon-vimeo
|
||||
span Vimeo
|
||||
li
|
||||
i.icon-film
|
||||
span Dailymotion
|
||||
li
|
||||
i.icon-video
|
||||
span Any standard MP4 file
|
||||
footer
|
||||
a.button.is-grey.is-outlined(v-on:click='cancel') Discard
|
||||
a.button.is-green(v-on:click='insertVideo') Insert Video
|
15
server/views/modals/move.pug
Normal file
15
server/views/modals/move.pug
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
.modal#modal-move-prompt
|
||||
.modal-background
|
||||
.modal-container
|
||||
.modal-content
|
||||
header.is-indigo Move document
|
||||
section
|
||||
label.label Enter the new document path:
|
||||
p.control.is-fullwidth
|
||||
input.input#txt-move-prompt(type='text', placeholder='page-name')
|
||||
span.help.is-red.is-hidden This document path is invalid or not allowed!
|
||||
span.note Note that moving or renaming documents can lead to broken links. Make sure to edit any page that links to this document afterwards!
|
||||
footer
|
||||
a.button.is-grey.is-outlined.btn-move-prompt Discard
|
||||
a.button.is-indigo.btn-move-go Move
|
Reference in New Issue
Block a user