Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Sharkey
Manage
Activity
Members
Labels
Plan
Issues
336
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
23
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TransFem.org
Sharkey
Commits
f6987c72
Unverified
Commit
f6987c72
authored
5 years ago
by
tamaina
Committed by
GitHub
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Make timeline widget flexible (#5788)
parent
91078957
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/client/app.vue
+1
-1
1 addition, 1 deletion
src/client/app.vue
src/client/widgets/timeline.vue
+50
-5
50 additions, 5 deletions
src/client/widgets/timeline.vue
with
51 additions
and
6 deletions
src/client/app.vue
+
1
−
1
View file @
f6987c72
...
...
@@ -924,7 +924,7 @@ export default Vue.extend({
>
div
{
position
:
sticky
;
top
:
calc
(
#{
$header-height
}
+
var
(
--
margin
));
height
:
calc
(
100vh
-
#{
$header-height
}
-
var
(
--
margin
));
height
:
calc
(
100vh
-
#{
$header-height
}
-
var
(
--
margin
)
*
2
);
&
.edit
{
overflow
:
auto
;
...
...
This diff is collapsed.
Click to expand it.
src/client/widgets/timeline.vue
+
50
−
5
View file @
f6987c72
<
template
>
<div
class=
"mkw-timeline"
>
<mk-container
:show-header=
"!props.compact"
>
<div
class=
"mkw-timeline"
:style=
"`flex-basis: $
{basis}%; height: ${previewHeight}px;`"
>
<mk-container
:show-header=
"!props.compact"
class=
"container"
>
<template
#header
>
<button
@
click=
"choose"
class=
"_button"
>
<fa
v-if=
"props.src === 'home'"
:icon=
"faHome"
/>
...
...
@@ -14,7 +14,7 @@
</button>
</
template
>
<div
style=
"height: 300px; padding: 8px; overflow: auto; background: var(--bg);
"
>
<div
class=
"tl
"
>
<x-timeline
:key=
"props.src === 'list' ? `list:${props.list.id}` : props.src === 'antenna' ? `antenna:${props.antenna.id}` : props.src"
:src=
"props.src"
:list=
"props.list"
:antenna=
"props.antenna"
/>
</div>
</mk-container>
...
...
@@ -29,12 +29,16 @@ import XTimeline from '../components/timeline.vue';
import
define
from
'
./define
'
;
import
i18n
from
'
../i18n
'
;
const
basisSteps
=
[
25
,
50
,
75
,
100
]
const
previewHeights
=
[
200
,
300
,
400
,
500
]
export
default
define
({
name
:
'
timeline
'
,
props
:
()
=>
({
src
:
'
home
'
,
list
:
null
,
compact
:
false
compact
:
false
,
basisStep
:
0
})
}).
extend
({
i18n
,
...
...
@@ -51,9 +55,25 @@ export default define({
};
},
computed
:
{
basis
():
number
{
return
basisSteps
[
this
.
props
.
basisStep
]
||
25
},
previewHeight
():
number
{
return
previewHeights
[
this
.
props
.
basisStep
]
||
300
}
},
methods
:
{
func
()
{
this
.
props
.
compact
=
!
this
.
props
.
compact
;
if
(
this
.
props
.
basisStep
===
basisSteps
.
length
-
1
)
{
this
.
props
.
basisStep
=
0
this
.
props
.
compact
=
!
this
.
props
.
compact
;
}
else
{
this
.
props
.
basisStep
+=
1
}
this
.
save
();
},
...
...
@@ -111,3 +131,28 @@ export default define({
}
});
</
script
>
<
style
lang=
"scss"
>
.mkw-timeline
{
flex-grow
:
1
;
flex-shrink
:
0
;
.container
{
display
:
flex
;
flex-direction
:
column
;
height
:
100%
;
>
div
{
overflow
:
auto
;
flex-grow
:
1
;
}
}
.tl
{
height
:
100%
;
padding
:
8px
;
background
:
var
(
--
bg
);
box-sizing
:
border-box
;
}
}
</
style
>
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