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
7456a18f
Commit
7456a18f
authored
Jul 22, 2021
by
dindigala
Browse files
feat: implementing of search in header and navigating to home or search page accordingly
parent
2fcc527d
Pipeline
#214759
passed with stages
in 3 minutes and 42 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/App.vue
View file @
7456a18f
...
...
@@ -202,7 +202,7 @@ export default {
}
if
(
this
.
manifests
?.[
0
]?.
sequence
?.[
0
]?.
id
&&
!
this
.
$route
.
query
.
itemurl
)
{
this
.
loaded
=
false
;
this
.
$router
.
push
({
query
:
{
itemurl
:
this
.
manifests
?.[
0
]?.
sequence
?.[
0
]?.
id
}
});
this
.
$router
.
push
({
query
:
{
...
this
.
$route
.
query
,
itemurl
:
this
.
manifests
?.[
0
]?.
sequence
?.[
0
]?.
id
}
});
}
},
/**
...
...
@@ -307,7 +307,7 @@ export default {
return
;
}
this
.
loaded
=
false
;
this
.
$router
.
push
({
query
:
{
itemurl
:
node
.
label
}
});
this
.
$router
.
push
({
query
:
{
...
this
.
$route
.
query
,
itemurl
:
node
.
label
}
});
},
},
);
...
...
src/components/breadcrumbnavigation.vue
View file @
7456a18f
...
...
@@ -15,17 +15,35 @@
</
template
>
<q-breadcrumbs-el
:class=
"$q.dark.isActive ? 'text-dark' : 'text-white'"
:icon=
"fasHome"
>
<a
:class=
"$q.dark.isActive ? 'text-dark' : 'text-white'"
:href=
"`${config.breadcrumbNavigation.website}`"
class=
"header-links"
>
<q-icon
:name=
"fasHome"
/>
{{ $t(`${config.breadcrumbNavigation.title_homepage_key}`) }}
</a>
</q-breadcrumbs-el>
<q-breadcrumbs-el
v-if=
"!!searchTerm"
:class=
"$q.dark.isActive ? 'text-dark' : 'text-white'"
>
<a
:class=
"$q.dark.isActive ? 'text-dark' : 'text-white'"
:href=
"`${config.breadcrumbNavigation.website}search.html?searchTerm=${searchTerm}`"
class=
"header-links"
>
<q-icon
:name=
"fasSearch"
/>
{{ searchTerm }}
</a>
</q-breadcrumbs-el>
<q-breadcrumbs-el
:icon=
"fasFileAlt"
:label=
"$t(`${config.breadcrumbNavigation.title_viewer_key}`)"
...
...
@@ -40,6 +58,7 @@ import {
fasHome
,
fasFileAlt
,
fasChevronRight
,
fasSearch
,
}
from
'
@quasar/extras/fontawesome-v5
'
;
export
default
{
...
...
@@ -50,10 +69,16 @@ export default {
required
:
true
,
},
},
computed
:
{
searchTerm
()
{
return
this
.
$route
.
query
.
searchTerm
;
},
},
created
()
{
this
.
fasHome
=
fasHome
;
this
.
fasFileAlt
=
fasFileAlt
;
this
.
fasChevronRight
=
fasChevronRight
;
this
.
fasSearch
=
fasSearch
;
},
};
</
script
>
...
...
src/components/header.vue
View file @
7456a18f
...
...
@@ -5,6 +5,7 @@
:class=
"$q.dark.isActive ? 'bg-white' : 'bg-accent'"
>
<BreadCrumbNavigation
v-if=
"$route.query.source==='external'"
:config=
"config"
/>
</div>
...
...
src/index.template.html
View file @
7456a18f
...
...
@@ -31,7 +31,7 @@
-->
<script
id=
"tido-config"
type=
"application/json"
>
{
"
entrypoint
"
:
""
,
"
entrypoint
"
:
"
https://ahikar-dev.sub.uni-goettingen.de/api/textapi/ahikar/arabic-karshuni/collection.json
"
,
"
annotations
"
:
{
"
show
"
:
true
,
"
types
"
:
[
...
...
src/mixins/navigation.js
View file @
7456a18f
...
...
@@ -17,7 +17,7 @@ export default {
const
link
=
this
.
itemurls
[
itemIndex
];
this
.
defaultView
();
this
.
$router
.
push
({
query
:
{
itemurl
:
link
}
});
this
.
$router
.
push
({
query
:
{
...
this
.
$route
.
query
,
itemurl
:
link
}
});
},
updateItem
()
{
...
...
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