-
-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: filter to view all files without location data in places (fix #…
…1124) Signed-off-by: Varun Patil <[email protected]>
- Loading branch information
Showing
9 changed files
with
114 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
<template> | ||
<div class="places-top-matter"> | ||
<NcActions v-if="name"> | ||
<NcActionButton :aria-label="t('memories', 'Back')" @click="back()"> | ||
{{ t('memories', 'Back') }} | ||
<template #icon> <BackIcon :size="20" /> </template> | ||
</NcActionButton> | ||
</NcActions> | ||
|
||
<div class="name">{{ name || viewname }}</div> | ||
|
||
<div class="right-actions"> | ||
<NcActions :inline="0"> | ||
<!-- root view (not cluster or unassigned) --> | ||
<template v-if="!name && !routeIsPlacesUnassigned"> | ||
<NcActionButton | ||
:aria-label="t('memories', 'Files without location')" | ||
@click="openUnassigned" | ||
close-after-click | ||
> | ||
{{ t('memories', 'Files without location') }} | ||
<template #icon> <UnassignedIcon :size="20" /> </template> | ||
</NcActionButton> | ||
</template> | ||
</NcActions> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { defineComponent } from 'vue'; | ||
import NcActions from '@nextcloud/vue/dist/Components/NcActions.js'; | ||
import NcActionButton from '@nextcloud/vue/dist/Components/NcActionButton.js'; | ||
import * as strings from '@services/strings'; | ||
import BackIcon from 'vue-material-design-icons/ArrowLeft.vue'; | ||
import UnassignedIcon from 'vue-material-design-icons/MapMarkerOff.vue'; | ||
export default defineComponent({ | ||
name: 'PlacesTopMatter', | ||
components: { | ||
NcActions, | ||
NcActionButton, | ||
BackIcon, | ||
UnassignedIcon, | ||
}, | ||
computed: { | ||
viewname(): string { | ||
return strings.viewName(this.$route.name!); | ||
}, | ||
name(): string | null { | ||
if (this.routeIsPlacesUnassigned) { | ||
return this.t('memories', 'Unidentified location'); | ||
} | ||
return this.$route.params.name?.split('-').slice(1).join('-'); | ||
}, | ||
}, | ||
methods: { | ||
back() { | ||
this.$router.go(-1); | ||
}, | ||
openUnassigned() { | ||
this.$router.push({ | ||
name: _m.routes.Places.name, | ||
params: { | ||
name: this.c.PLACES_NULL, | ||
}, | ||
}); | ||
}, | ||
}, | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters