Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wiki-js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
wiki-js
Commits
d0706b37
You need to sign in or sign up before continuing.
Commit
d0706b37
authored
Jan 26, 2020
by
NGPixel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: ctrl + click save in editor to save and close
parent
da86d8cc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
editor.vue
client/components/editor.vue
+13
-3
No files found.
client/components/editor.vue
View file @
d0706b37
...
...
@@ -9,7 +9,8 @@
v-btn.animated.fadeInDown(
text
color='green'
@click.native.stop='save'
@click='save'
@click.ctrl.exact='saveAndClose'
:class='{ "is-icon": $vuetify.breakpoint.mdAndDown }'
)
v-icon(color='green', :left='$vuetify.breakpoint.lgAndUp') mdi-check
...
...
@@ -17,7 +18,7 @@
v-btn.animated.fadeInDown.wait-p1s(
text
color='blue'
@click
.native.stop
='openPropsModal'
@click='openPropsModal'
:class='{ "is-icon": $vuetify.breakpoint.mdAndDown, "mx-0": !welcomeMode, "ml-0": welcomeMode }'
)
v-icon(color='blue', :left='$vuetify.breakpoint.lgAndUp') mdi-tag-text-outline
...
...
@@ -27,7 +28,7 @@
text
color='red'
:class='{ "is-icon": $vuetify.breakpoint.mdAndDown }'
@click
.native.stop
='exit'
@click='exit'
)
v-icon(color='red', :left='$vuetify.breakpoint.lgAndUp') mdi-close
span.white--text(v-if='$vuetify.breakpoint.lgAndUp')
{{
$t
(
'common:actions.close'
)
}}
...
...
@@ -270,9 +271,18 @@ export default {
style
:
'error'
,
icon
:
'warning'
})
throw
err
}
this
.
hideProgressDialog
()
},
async
saveAndClose
()
{
try
{
await
this
.
save
()
await
this
.
exit
()
}
catch
(
err
)
{
// Error is already handled
}
},
async
exit
()
{
if
(
this
.
initContentParsed
!==
this
.
$store
.
get
(
'editor/content'
))
{
this
.
dialogUnsaved
=
true
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment