Lines 139-156
export const useNavigationStore = defineStore("navigation", () => {
Link Here
|
139 |
} |
139 |
} |
140 |
|
140 |
|
141 |
function _mapMatches(currentMatches, params) { |
141 |
function _mapMatches(currentMatches, params) { |
142 |
return currentMatches |
142 |
const matches = currentMatches |
143 |
.filter(match => _isBaseOrNotStub(match.meta.self)) |
143 |
.filter(match => _isBaseOrNotStub(match.meta.self)) |
144 |
.filter(match => _isEmptyNode(match.meta.self)) |
144 |
.filter(match => _isEmptyNode(match.meta.self)) |
145 |
.map(match => { |
145 |
.map(match => { |
146 |
let path = _getPath(match, params); |
146 |
let path = _getPath(match, params); |
147 |
return { |
147 |
const externalPath = path.includes(".pl"); |
|
|
148 |
const test = { |
148 |
...match.meta.self, |
149 |
...match.meta.self, |
149 |
icon: null, |
150 |
icon: null, |
150 |
path, |
151 |
...(externalPath |
|
|
152 |
? { href: path, path: null } |
153 |
: { path }), |
151 |
children: null, |
154 |
children: null, |
152 |
}; |
155 |
}; |
|
|
156 |
return test; |
153 |
}); |
157 |
}); |
|
|
158 |
return matches; |
154 |
} |
159 |
} |
155 |
}), |
160 |
}), |
156 |
leftNavigation: computed(() => { |
161 |
leftNavigation: computed(() => { |
157 |
- |
|
|