Skip to content

Commit

Permalink
Track calendar by url in multiselect
Browse files Browse the repository at this point in the history
and fix translate while we are at it

Signed-off-by: Raimund Schlüßler <raimund.schluessler@mailbox.org>
  • Loading branch information
raimund-schluessler committed Dec 4, 2021
1 parent e6cd60d commit e9aeb61
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/components/AppSidebar/CalendarPickerItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
<div class="property__item">
<Multiselect
label="displayName"
track-by="displayName"
track-by="url"
:disabled="isDisabled"
:options="calendars"
:value="calendar"
:placeholder="translate('tasks', 'Select a calendar')"
:placeholder="t('tasks', 'Select a calendar')"
@select="change">
<template #singleLabel="scope">
<CalendarPickerOption v-bind="scope.option" />
Expand All @@ -43,7 +43,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
color=""
owner=""
:is-shared-with-me="false"
:display-name="translate('tasks', 'No calendar matches the search.')" />
:display-name="t('tasks', 'No calendar matches the search.')" />
</template>
</Multiselect>
</div>
Expand All @@ -52,7 +52,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
<script>
import CalendarPickerOption from './CalendarPickerOption'
import { translate } from '@nextcloud/l10n'
import { translate as t } from '@nextcloud/l10n'
import Multiselect from '@nextcloud/vue/dist/Components/Multiselect'
export default {
Expand Down Expand Up @@ -80,7 +80,8 @@ export default {
},
},
methods: {
translate,
t,
/**
* TODO: this should emit the calendar id instead
*
Expand Down

0 comments on commit e9aeb61

Please sign in to comment.