|
23 | 23 | @cancel="$emit('cancel-photo-suggestions')" |
24 | 24 | @save="$emit('save-photo-suggestions-selection',$event)" |
25 | 25 | @zoom="$emit('zoom-photo-suggestion', $event)" /> |
| 26 | + <TrackMetadataTab v-if="isPublic() && activeTab === 'maps-track-metadata' && !fileInfo" |
| 27 | + :track="track" /> |
26 | 28 | <!-- TODO: create a standard to allow multiple elements here? --> |
27 | 29 | <template v-if="fileInfo" #description> |
28 | 30 | <LegacyView v-for="view in views" |
@@ -86,12 +88,14 @@ import moment from '@nextcloud/moment' |
86 | 88 | import { Type as ShareTypes } from '@nextcloud/sharing' |
87 | 89 | import axios from '@nextcloud/axios' |
88 | 90 | import FileInfo from '../services/FileInfo' |
89 | | -import {isPublic} from "../utils/common"; |
| 91 | +import { isPublic } from '../utils/common' |
| 92 | +import TrackMetadataTab from './TrackMetadataTab' |
90 | 93 |
|
91 | 94 | export default { |
92 | 95 | name: 'Sidebar', |
93 | 96 |
|
94 | 97 | components: { |
| 98 | + TrackMetadataTab, |
95 | 99 | // NcActionButton, |
96 | 100 | NcAppSidebar, |
97 | 101 | FavoriteSidebarTab, |
@@ -128,6 +132,11 @@ export default { |
128 | 132 | required: true, |
129 | 133 | type: Array, |
130 | 134 | }, |
| 135 | + track: { |
| 136 | + required: false, |
| 137 | + validator: prop => typeof prop === 'object' || prop === null, |
| 138 | + default: null, |
| 139 | + }, |
131 | 140 | }, |
132 | 141 |
|
133 | 142 | data() { |
@@ -228,7 +237,7 @@ export default { |
228 | 237 | background() { |
229 | 238 | const iconColor = OCA.Accessibility?.theme === 'dark' ? 'ffffff' : '000000' |
230 | 239 | if (this.typeOpened === 'track') { |
231 | | - return generateUrl('/svg/maps/road?color=' + iconColor) |
| 240 | + return generateFilePath('maps', 'img', 'road.svg') |
232 | 241 | } |
233 | 242 | if (this.typeOpened === 'maps') { |
234 | 243 | return generateFilePath('maps', 'img', 'maps.png') |
@@ -299,6 +308,19 @@ export default { |
299 | 308 | 'app-sidebar--full': this.isFullScreen, |
300 | 309 | }, |
301 | 310 | } |
| 311 | + } else if (this.activeTab === 'maps-track-metadata') { |
| 312 | + const iconColor = OCA.Accessibility?.theme === 'dark' ? 'ffffff' : '000000' |
| 313 | + return { |
| 314 | + title: t('maps', 'Track metadata'), |
| 315 | + compact: true, |
| 316 | + background: this.background, |
| 317 | + subtitle: '', |
| 318 | + active: this.activeTab, |
| 319 | + class: { |
| 320 | + 'app-sidebar--has-preview': false, |
| 321 | + 'app-sidebar--full': this.isFullScreen, |
| 322 | + }, |
| 323 | + } |
302 | 324 | } else { |
303 | 325 | return { |
304 | 326 | loading: false, |
@@ -388,6 +410,9 @@ export default { |
388 | 410 | watch: { |
389 | 411 | }, |
390 | 412 | methods: { |
| 413 | + isPublic() { |
| 414 | + return isPublic() |
| 415 | + }, |
391 | 416 | /** |
392 | 417 | * Can this tab be displayed ? |
393 | 418 | * |
|
0 commit comments