Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleaned up version string and URL in the top navigation panel #33

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Based on the suggestion at https://keepachangelog.com/en/1.0.0/.

## [Unreleased]
- Upgraded NPM packages with `npm upgrade`.
- Improved display of version string in the top navigation panel
and turned it into a link to the tag in Github.

## [0.2.0] - 2020-05-19
- Added support for gzipping the ontology before upload to the reasoner.
Expand Down
25 changes: 18 additions & 7 deletions src/components/TopNavigationBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,8 @@
<div>
<!-- Navigation bar at the top of the page -->
<nav class="navbar navbar-expand navbar-dark bg-dark mb-2 fixed-top">
<a
class="navbar-brand"
href="index.html"
>
Open Tree Resolver <small>{{ version }}</small>
</a>
<a class="navbar-brand" href="./index.html" style="margin-right: 0.2em;">Open Tree Resolver</a>
<a class="navbar-brand" :href="versionURL" target="_blank"><small>{{ versionString }}</small></a>
<div class="collapse navbar-collapse">
<ul class="navbar-nav">
<li class="nav-item">
Expand Down Expand Up @@ -61,8 +57,23 @@ export default {
props: {
version: {
type: String,
default: 'unversioned',
},
},
computed: {
versionString() {
if (!this.version) return "";
if (this.version.startsWith("refs/tags/")) {
return this.version.substr(10);
}
return this.version;
},
versionURL() {
if (!this.version) return undefined;
if (this.version.startsWith("refs/tags/")) {
return "https://github.com/phyloref/open-tree-resolver/releases/tag/" + this.version.substr(10);
}
return undefined;
}
}
};
</script>