• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

FAIRsharing / fairsharing.github.io / 24769584990

22 Apr 2026 08:57AM UTC coverage: 95.892% (-4.1%) from 100.0%
24769584990

push

github

web-flow
Merge pull request #2746 from FAIRsharing/dev

Dev

3653 of 3813 branches covered (95.8%)

Branch coverage included in aggregate %.

17344 of 18229 new or added lines in 282 files covered. (95.15%)

766 existing lines in 50 files now uncovered.

38617 of 40268 relevant lines covered (95.9%)

5.48 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

96.0
/src/components/Navigation/NavigationDrawer.vue
1
<template>
2
  <div class="py-10 px-5 d-flex flex-column" style="height: 100%">
1✔
3
    <div
1✔
4
      v-for="(button, index) in buttons"
1✔
5
      :key="'button_' + index"
1✔
6
      class="mb-2"
1✔
7
    >
8
      <v-btn
1✔
9
        :color="button.color"
1✔
10
        :variant="!button.active ? 'outlined' : undefined"
1!
11
        width="100%"
1✔
12
        @click="goTo(button)"
1✔
13
      >
14
        <span
1✔
15
          :class="[
1✔
16
            'text-white',
17
            { 'text-primary': !button.active },
18
            { 'text-accent3': button.primary && !button.active },
19
          ]"
20
          >{{ button.name }}</span
1✔
21
        >
1✔
22
      </v-btn>
1✔
23
    </div>
1✔
24
    <div style="flex-grow: 1">
1✔
25
      <v-btn
1✔
26
        v-if="!user().isLoggedIn"
1✔
27
        class="mr-1 mt-10"
1✔
28
        color="accent3 text-white"
1✔
29
        width="100%"
1✔
30
        @click="goToLogin()"
1✔
31
      >
1✔
32
        Login
33
        <v-icon class="ml-1" size="small"> fas fa-sign-in-alt</v-icon>
1✔
34
      </v-btn>
1✔
35
      <v-btn
1✔
36
        v-else
37
        class="mr-1 mt-10 bg-green pl-2"
1✔
38
        to="/accounts/profile"
1✔
39
        width="100%"
1✔
40
      >
41
        <v-icon class="mr-1" color="white"> fas fa-user-circle</v-icon>
1✔
42
        <span class="text-white ellipse-150">{{
1✔
43
          user().credentials.username
1✔
44
        }}</span>
1✔
45
      </v-btn>
1✔
46
    </div>
1✔
47
    <div>
1✔
48
      <router-link to="/">
1✔
49
        <v-img class="contain" height="70" src="/assets/fairsharing-logo.svg" />
1✔
50
      </router-link>
1✔
51
    </div>
1✔
52
  </div>
1✔
53
</template>
54

55
<script>
56
import { mapState } from "vuex";
1✔
57

58
export default {
1✔
59
  name: "NavigationDrawer",
1✔
60
  data() {
1✔
61
    return {
1✔
62
      buttons: [
1✔
63
        {
1✔
64
          name: "Standards",
1✔
65
          query: { fairsharingRegistry: "Standard" },
1✔
66
          path: "search",
1✔
67
          color: "accent3",
1✔
68
          active: false,
1✔
69
          primary: true,
1✔
70
        },
1✔
71
        {
1✔
72
          name: "Databases",
1✔
73
          query: { fairsharingRegistry: "Database" },
1✔
74
          path: "search",
1✔
75
          color: "accent3",
1✔
76
          active: false,
1✔
77
          primary: true,
1✔
78
        },
1✔
79
        {
1✔
80
          name: "Policies",
1✔
81
          query: { fairsharingRegistry: "Policy" },
1✔
82
          path: "search",
1✔
83
          color: "accent3",
1✔
84
          active: false,
1✔
85
          primary: true,
1✔
86
        },
1✔
87
        {
1✔
88
          name: "Collections",
1✔
89
          query: { fairsharingRegistry: "Collection" },
1✔
90
          path: "search",
1✔
91
          color: "primary",
1✔
92
          active: false,
1✔
93
          primary: false,
1✔
94
        },
1✔
95
        {
1✔
96
          name: "Organisations",
1✔
97
          path: "organisations",
1✔
98
          query: { fairsharingRegistry: undefined },
1✔
99
          color: "primary",
1✔
100
          active: false,
1✔
101
          primary: false,
1✔
102
        },
1✔
103
        {
1✔
104
          name: "Add content",
1✔
105
          path: "new",
1✔
106
          query: { fairsharingRegistry: undefined },
1✔
107
          color: "primary",
1✔
108
          active: false,
1✔
109
          primary: false,
1✔
110
        },
1✔
111
        {
1✔
112
          name: "Stats",
1✔
113
          path: "summary-statistics",
1✔
114
          query: { fairsharingRegistry: undefined },
1✔
115
          color: "primary",
1✔
116
          active: false,
1✔
117
          primary: false,
1✔
118
        },
1✔
119
      ],
1✔
120
    };
1✔
121
  },
1✔
122
  computed: {
1✔
123
    ...mapState("users", ["user"]),
1✔
124
    route() {
1✔
125
      return {
1✔
126
        path: this.$route.path,
1✔
127
        query: this.$route.query,
1✔
128
      };
1✔
129
    },
1✔
130
  },
1✔
131
  watch: {
1✔
132
    route: {
1✔
133
      deep: true,
1✔
134
      handler(val) {
1✔
NEW
135
        this.makeActiveButton(val);
×
136
      },
1✔
137
    },
1✔
138
  },
1✔
139
  mounted() {
1✔
140
    this.makeActiveButton(this.$route);
1✔
141
  },
1✔
142
  methods: {
1✔
143
    async goTo(button) {
1✔
144
      if (
1✔
145
        this.route.path.replace("/", "") !== button.path ||
1!
NEW
146
        this.route.query["fairsharingRegistry"] !==
×
NEW
147
          button.query["fairsharingRegistry"]
×
148
      ) {
1✔
149
        this.buttons.forEach((button) => {
1✔
150
          button.active = false;
7✔
151
        });
1✔
152
        button.active = true;
1✔
153
        await this.$router.push({
1✔
154
          path: "/" + button.path,
1✔
155
          query: button.query,
1✔
156
        });
1✔
157
      }
1✔
158
    },
1✔
159
    async goToLogin() {
1✔
160
      if (this.$route.path !== "/accounts/login") {
1✔
161
        await this.$router.push({
1✔
162
          path: "/accounts/login",
1✔
163
          query: {
1✔
164
            goTo: this.$route.fullPath,
1✔
165
          },
1✔
166
        });
1✔
167
      }
1✔
168
    },
1✔
169
    makeActiveButton(val) {
1✔
170
      this.buttons.forEach((button) => {
1✔
171
        button.active =
7✔
172
          button.path === val.path.replace("/", "") &&
7!
NEW
173
          button.query["fairsharingRegistry"] ===
×
174
            val.query["fairsharingRegistry"];
7✔
175
      });
1✔
176
    },
1✔
177
  },
1✔
178
};
1✔
179
</script>
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc