Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
surfer-okd
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PUBLIC
surfer-okd
Commits
f97b51a9
Commit
f97b51a9
authored
Jan 05, 2020
by
Johannes Zellner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show preview drawer instead of directly opening files in a new tab
parent
383f72f7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
1 deletion
+23
-1
style.css
frontend/css/style.css
+4
-0
index.html
frontend/index.html
+12
-0
app.js
frontend/js/app.js
+7
-1
No files found.
frontend/css/style.css
View file @
f97b51a9
...
@@ -89,6 +89,10 @@ a:hover, a:focus {
...
@@ -89,6 +89,10 @@ a:hover, a:focus {
transition
:
background-color
.1s
ease
;
transition
:
background-color
.1s
ease
;
}
}
.el-drawer__header
{
margin-bottom
:
10px
;
}
/* welcome and 404 page */
/* welcome and 404 page */
.container-center
{
.container-center
{
display
:
flex
;
display
:
flex
;
...
...
frontend/index.html
View file @
f97b51a9
...
@@ -121,6 +121,18 @@
...
@@ -121,6 +121,18 @@
</center>
</center>
</div>
</div>
<el-drawer
:title=
"activeEntry.filePath"
:with-header=
"false"
:visible
.
sync=
"previewDrawerVisible"
direction=
"rtl"
size=
"50%"
>
<div
style=
"display: flex; flex-direction: column; height: 100%;"
>
<iframe
:src=
"activeEntry.fullPath"
style=
"width: 100%; height: 100%; border: none; margin: 10px;"
></iframe>
<center>
<el-button
size=
"small"
icon=
"el-icon-download"
style=
"margin: 10px;"
@
click
.
stop=
"onDownload(activeEntry)"
>
Download
</el-button>
<a
:href=
"activeEntry.fullPath"
target=
"_blank"
>
<el-button
size=
"small"
icon=
"el-icon-link"
style=
"margin: 10px;"
>
Open
</el-button>
</a>
</center>
</div>
</el-drawer>
</el-main>
</el-main>
<el-footer
v-show=
"uploadStatus.busy"
>
<el-footer
v-show=
"uploadStatus.busy"
>
<el-row
v-if=
"uploadStatus.uploadListCount"
>
<el-row
v-if=
"uploadStatus.uploadListCount"
>
...
...
frontend/js/app.js
View file @
f97b51a9
...
@@ -146,7 +146,11 @@ function open(row, column, event) {
...
@@ -146,7 +146,11 @@ function open(row, column, event) {
return
;
return
;
}
}
window
.
open
(
encode
(
path
));
app
.
activeEntry
=
row
;
app
.
activeEntry
.
fullPath
=
encode
(
sanitize
(
app
.
path
+
'/'
+
row
.
filePath
));
app
.
previewDrawerVisible
=
true
// window.open(encode(path));
}
}
function
uploadFiles
(
files
)
{
function
uploadFiles
(
files
)
{
...
@@ -280,6 +284,8 @@ var app = new Vue({
...
@@ -280,6 +284,8 @@ var app = new Vue({
password
:
''
,
password
:
''
,
busy
:
false
busy
:
false
},
},
previewDrawerVisible
:
false
,
activeEntry
:
{},
entries
:
[],
entries
:
[],
accessTokens
:
[],
accessTokens
:
[],
accessTokensDialogVisible
:
false
accessTokensDialogVisible
:
false
...
...
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