2023-01-13 10:55:31 +00:00
|
|
|
import { Component, Vue, Watch } from "vue-facing-decorator";
|
2021-11-23 16:30:19 +00:00
|
|
|
import HomeViewComponent from "./views/home-view/home-view-component.vue";
|
2022-01-25 16:22:44 +00:00
|
|
|
import HelpViewComponent from "./views/help-view/help-view-component.vue";
|
2022-01-26 15:32:19 +00:00
|
|
|
import MapViewComponent from "./views/map-view/map-view.component.vue";
|
2021-11-24 15:01:53 +00:00
|
|
|
import SearchViewComponent from "./views/search-view/search-view-component.vue";
|
2022-01-14 15:49:31 +00:00
|
|
|
import DatasetDetailComponent from "./views/dataset-detail.component/dataset-detail.component.vue";
|
2021-11-25 11:08:58 +00:00
|
|
|
import ServiceViewComponent from "./views/services-view/service-view-component.vue";
|
|
|
|
import OaiViewComponent from "./views/oai-view/oai-view-component.vue";
|
2021-11-30 14:26:40 +00:00
|
|
|
import ContactViewComponent from "./views/contact-view/contact-view-component.vue";
|
2021-12-01 14:45:01 +00:00
|
|
|
import SitelinkViewComponent from "./views/sitelink-view/sitelink-view-component.vue";
|
2021-12-02 10:35:44 +00:00
|
|
|
import ImprintViewComponent from "./views/imprint-view/imprint-view-component.vue";
|
2021-12-06 13:11:20 +00:00
|
|
|
import TermsViewComponent from "./views/terms-view/terms-view-component";
|
2021-11-23 16:30:19 +00:00
|
|
|
|
2023-01-13 10:55:31 +00:00
|
|
|
@Component({
|
2021-11-12 09:13:22 +00:00
|
|
|
components: {
|
2021-11-23 16:30:19 +00:00
|
|
|
HomeViewComponent,
|
2021-11-25 11:08:58 +00:00
|
|
|
HelpViewComponent,
|
2022-01-25 16:22:44 +00:00
|
|
|
MapViewComponent,
|
2021-11-24 15:01:53 +00:00
|
|
|
SearchViewComponent,
|
2021-12-10 15:43:02 +00:00
|
|
|
DatasetDetailComponent,
|
2021-11-25 11:08:58 +00:00
|
|
|
ServiceViewComponent,
|
|
|
|
OaiViewComponent,
|
2021-11-30 14:26:40 +00:00
|
|
|
ContactViewComponent,
|
2021-12-01 14:45:01 +00:00
|
|
|
SitelinkViewComponent,
|
2021-12-02 10:35:44 +00:00
|
|
|
ImprintViewComponent,
|
2021-12-06 13:11:20 +00:00
|
|
|
TermsViewComponent,
|
2021-11-12 09:13:22 +00:00
|
|
|
},
|
|
|
|
})
|
2021-11-25 11:08:58 +00:00
|
|
|
export default class App extends Vue {
|
2021-11-26 10:29:13 +00:00
|
|
|
public active = false;
|
2024-03-18 09:04:36 +00:00
|
|
|
public portal = "https://data.tethys.at/login"; // VUE_API + "/login";
|
|
|
|
|
2024-09-12 14:31:24 +00:00
|
|
|
/**
|
|
|
|
* Computed property that returns the current year.
|
|
|
|
* @returns {number} The current year as a number.
|
|
|
|
*/
|
2024-03-18 09:04:36 +00:00
|
|
|
get currentYear() {
|
|
|
|
return new Date().getFullYear();
|
|
|
|
}
|
2021-11-26 10:29:13 +00:00
|
|
|
|
2024-09-12 14:31:24 +00:00
|
|
|
/**
|
|
|
|
* Lifecycle hook called when the component is mounted.
|
|
|
|
* Currently empty, but can be used to add setup logic when the component is mounted.
|
|
|
|
*/
|
2021-11-25 11:08:58 +00:00
|
|
|
mounted(): void {
|
2024-09-12 14:31:24 +00:00
|
|
|
|
2021-11-26 10:29:13 +00:00
|
|
|
}
|
|
|
|
|
2024-09-12 14:31:24 +00:00
|
|
|
/**
|
|
|
|
* Toggles the visibility of the mobile menu.
|
|
|
|
* @param {MouseEvent} event - The mouse event triggered by the user's interaction.
|
|
|
|
*/
|
2024-03-16 15:42:25 +00:00
|
|
|
public showMobilemenu(event: MouseEvent): void {
|
2024-09-12 14:31:24 +00:00
|
|
|
// Prevent the default behavior of the event (e.g., following a link)
|
2021-11-26 10:29:13 +00:00
|
|
|
event.preventDefault();
|
2024-09-12 14:31:24 +00:00
|
|
|
// Toggle the active state of the mobile menu
|
2021-11-26 10:29:13 +00:00
|
|
|
this.active = !this.active;
|
|
|
|
}
|
2021-11-25 11:08:58 +00:00
|
|
|
|
2024-09-12 14:31:24 +00:00
|
|
|
/**
|
|
|
|
* Watcher that triggers when the route changes.
|
|
|
|
* It deactivates the mobile menu by setting `active` to false.
|
|
|
|
*/
|
2021-11-26 10:29:13 +00:00
|
|
|
@Watch("$route")
|
2021-12-10 10:57:19 +00:00
|
|
|
protected oRouteChangedChanged(): void {
|
2024-09-12 14:31:24 +00:00
|
|
|
// Close the mobile menu when the route changes
|
2021-11-26 10:29:13 +00:00
|
|
|
this.active = false;
|
2021-11-25 11:08:58 +00:00
|
|
|
}
|
|
|
|
}
|