Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
subugoe
emo
TIDO
Commits
ca23766a
Commit
ca23766a
authored
Apr 24, 2020
by
schneider210
Browse files
bugfix: compute sequenceindex in root instance and pass it down as prop to infobar and metadata
parent
14c198fe
Pipeline
#132356
passed with stages
in 3 minutes and 37 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/App.vue
View file @
ca23766a
...
...
@@ -108,8 +108,7 @@ export default {
}
this
.
$root
.
$emit
(
'
update-item
'
,
node
.
label
);
this
.
$root
.
$emit
(
'
update-item-index
'
,
this
.
getItemIndex
(
node
.
label
));
this
.
$root
.
$emit
(
'
update-nav-sequence
'
,
this
.
getSequenceIndex
(
label
));
this
.
$root
.
$emit
(
'
update-sequence-index
'
,
label
);
this
.
$root
.
$emit
(
'
update-sequence-index
'
,
this
.
getSequenceIndex
(
label
));
},
},
);
...
...
@@ -148,10 +147,10 @@ export default {
}
});
},
getSequenceIndex
(
node
label
)
{
getSequenceIndex
(
label
)
{
let
index
=
0
;
this
.
manifests
.
forEach
((
manifest
,
idx
)
=>
{
if
(
manifest
.
label
===
node
label
)
{
if
(
manifest
.
label
===
label
)
{
index
=
idx
;
}
});
...
...
src/components/infobar.vue
View file @
ca23766a
...
...
@@ -42,12 +42,8 @@ export default {
this
.
fasChevronRight
=
fasChevronRight
;
},
mounted
()
{
this
.
$root
.
$on
(
'
update-sequence-index
'
,
(
nodelabel
)
=>
{
this
.
manifests
.
forEach
((
manifest
,
index
)
=>
{
if
(
manifest
.
label
===
nodelabel
)
{
this
.
sequenceindex
=
index
;
}
});
this
.
$root
.
$on
(
'
update-sequence-index
'
,
(
index
)
=>
{
this
.
sequenceindex
=
index
;
});
},
};
...
...
src/components/metadata.vue
View file @
ca23766a
...
...
@@ -64,12 +64,8 @@ export default {
},
},
mounted
()
{
this
.
$root
.
$on
(
'
update-sequence-index
'
,
(
nodelabel
)
=>
{
this
.
manifests
.
forEach
((
manifest
,
index
)
=>
{
if
(
manifest
.
label
===
nodelabel
)
{
this
.
sequenceindex
=
index
;
}
});
this
.
$root
.
$on
(
'
update-sequence-index
'
,
(
index
)
=>
{
this
.
sequenceindex
=
index
;
});
},
};
...
...
src/mixins/navigation.js
View file @
ca23766a
...
...
@@ -85,7 +85,7 @@ export default {
this
.
itemindex
=
index
;
});
this
.
$root
.
$on
(
'
update-
nav-
sequence
'
,
(
nodelabel
)
=>
{
this
.
$root
.
$on
(
'
update-sequence
-index
'
,
(
nodelabel
)
=>
{
this
.
manifests
.
forEach
((
manifest
,
index
)
=>
{
if
(
manifest
.
label
===
nodelabel
)
{
this
.
sequenceindex
=
index
;
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment