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