summaryrefslogtreecommitdiffstats
path: root/apps/files_reminders
diff options
context:
space:
mode:
authorChristopher Ng <chrng8@gmail.com>2023-08-08 14:23:39 -0700
committerAndy Scherzinger <info@andy-scherzinger.de>2023-08-10 12:28:19 +0200
commit271122e05ab828912a1e7664c40170c8a8e09f39 (patch)
treefaba5954ee79d7b82df4d3f7796a3ec15f5783f0 /apps/files_reminders
parentfa4840976ef40cb1ae76a1da21169bdb09518903 (diff)
downloadnextcloud-server-271122e05ab828912a1e7664c40170c8a8e09f39.tar.gz
nextcloud-server-271122e05ab828912a1e7664c40170c8a8e09f39.zip
enh: remove icons
Signed-off-by: Christopher Ng <chrng8@gmail.com> (cherry picked from commit d086fe38cc118aaafe5d12742eaff7802926e3f5)
Diffstat (limited to 'apps/files_reminders')
-rw-r--r--apps/files_reminders/src/components/SetReminderActions.vue16
-rw-r--r--apps/files_reminders/src/shared/utils.ts2
2 files changed, 3 insertions, 15 deletions
diff --git a/apps/files_reminders/src/components/SetReminderActions.vue b/apps/files_reminders/src/components/SetReminderActions.vue
index 929cdc6c957..38ed9761a5e 100644
--- a/apps/files_reminders/src/components/SetReminderActions.vue
+++ b/apps/files_reminders/src/components/SetReminderActions.vue
@@ -38,20 +38,17 @@
{{ t('files_reminders', 'Clear reminder') }} — {{ getDateString(dueDate) }}
</NcActionButton>
<NcActionSeparator />
- <NcActionButton v-for="({ icon, label, ariaLabel, dateString, action }) in options"
+ <NcActionButton v-for="({ label, ariaLabel, dateString, action }) in options"
:key="label"
:aria-label="ariaLabel"
@click="action">
- <template #icon>
- <component :is="icon" />
- </template>
{{ label }} — {{ dateString }}
</NcActionButton>
</NcActions>
</template>
<script lang="ts">
-import Vue, { type Component, type PropType } from 'vue'
+import Vue, { type PropType } from 'vue'
import { translate as t } from '@nextcloud/l10n'
import { showError, showSuccess } from '@nextcloud/dialogs'
@@ -61,10 +58,6 @@ import NcActionSeparator from '@nextcloud/vue/dist/Components/NcActionSeparator.
import ArrowLeft from 'vue-material-design-icons/ArrowLeft.vue'
import CloseCircleOutline from 'vue-material-design-icons/CloseCircleOutline.vue'
-import Update from 'vue-material-design-icons/Update.vue'
-import ChevronRight from 'vue-material-design-icons/ChevronRight.vue'
-import CalendarWeekend from 'vue-material-design-icons/CalendarWeekend.vue'
-import ChevronDoubleRight from 'vue-material-design-icons/ChevronDoubleRight.vue'
import { clearReminder, setReminder } from '../services/reminderService.ts'
import {
@@ -79,7 +72,6 @@ import type { FileAttributes } from '../shared/types.ts'
interface ReminderOption {
dateTimePreset: DateTimePreset
- icon: Component
label: string
ariaLabel: string
dateString?: string
@@ -88,28 +80,24 @@ interface ReminderOption {
const laterToday: ReminderOption = {
dateTimePreset: DateTimePreset.LaterToday,
- icon: Update,
label: t('files_reminders', 'Later today'),
ariaLabel: t('files_reminders', 'Set reminder for later today'),
}
const tomorrow: ReminderOption = {
dateTimePreset: DateTimePreset.Tomorrow,
- icon: ChevronRight,
label: t('files_reminders', 'Tomorrow'),
ariaLabel: t('files_reminders', 'Set reminder for tomorrow'),
}
const thisWeekend: ReminderOption = {
dateTimePreset: DateTimePreset.ThisWeekend,
- icon: CalendarWeekend,
label: t('files_reminders', 'This weekend'),
ariaLabel: t('files_reminders', 'Set reminder for this weekend'),
}
const nextWeek: ReminderOption = {
dateTimePreset: DateTimePreset.NextWeek,
- icon: ChevronDoubleRight,
label: t('files_reminders', 'Next week'),
ariaLabel: t('files_reminders', 'Set reminder for next week'),
}
diff --git a/apps/files_reminders/src/shared/utils.ts b/apps/files_reminders/src/shared/utils.ts
index 165d409ad2c..85e0b14c017 100644
--- a/apps/files_reminders/src/shared/utils.ts
+++ b/apps/files_reminders/src/shared/utils.ts
@@ -31,7 +31,7 @@ export enum DateTimePreset {
}
export const getDateTime = (dateTime: DateTimePreset): Date => {
- const matchPreset = {
+ const matchPreset: Record<DateTimePreset, () => Date> = {
[DateTimePreset.LaterToday]: () => {
const hour = moment().get('hour')
const later = moment()