Skip to content
Merged
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
3 changes: 2 additions & 1 deletion src/MainPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,8 @@ export default defineComponent({
const match = search.match(regex);
if(match){
const redirectContent = decodeURIComponent(match[1]);
const url = new URL(`${window.origin}${this.pathPrefix.replace('.', '')}#/${redirectContent}`);
const {pathname: browserPathname} = window.location;
const url = new URL(`${window.origin}${browserPathname}#/${redirectContent}`);
window.location.replace(url.toString());
}
}
Expand Down
1 change: 1 addition & 0 deletions src/components/Description.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export default {

#stac-browser .styled-description {
line-height: 1.4em;
overflow-x: clip;

h1, h2, h3, h4, h5, h6 {
color: map-get($theme-colors, "primary");
Expand Down
12 changes: 4 additions & 8 deletions src/components/StacLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ export default {
if (this.isStacBrowserLink || this.button) {
let obj = {
to: this.href,
rel: this.rel
rel: this.rel,
href: this.href
};
if (Utils.isObject(this.button)) {
Object.assign(obj, this.button);
Expand All @@ -107,7 +108,7 @@ export default {
if (this.button) {
return 'b-button';
}
return this.isStacBrowserLink ? 'router-link' : 'a';
return 'a';
},
href() {
if (this.stac || this.isStacBrowserLink) {
Expand All @@ -121,12 +122,7 @@ export default {
}
if (!href.startsWith('/')) {
const {pathname} = window.location;
if(pathname !== '/' && pathname !== this.pathPrefix ){
href = pathname + href;
}else{
href = '/' + href;
}

href = `${pathname}#/${href}`;
}

// Add private query parameters to links: https://github.com/radiantearth/stac-browser/issues/142
Expand Down