Skip to content

Commit 134d071

Browse files
committed
fixup! feat(Settings): redesign to new vue components
Signed-off-by: Grigory Vodyanov <scratchx@gmx.com>
1 parent 710f721 commit 134d071

File tree

3 files changed

+20
-40
lines changed

3 files changed

+20
-40
lines changed

src/components/AppNavigation/Settings.vue

Lines changed: 16 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4,86 +4,73 @@
44
-->
55

66
<template>
7-
<NcAppNavigationItem
8-
class="navigation-calendar-settings"
7+
<NcAppNavigationItem class="navigation-calendar-settings"
98
:name="settingsTitle"
109
:pinned="true"
1110
@click.prevent="onShowSettings">
1211
<template #icon>
1312
<CogIcon :size="20" decorative />
1413
</template>
1514
<template #extra>
16-
<NcAppSettingsDialog
17-
id="app-settings-modal"
15+
<NcAppSettingsDialog id="app-settings-modal"
1816
class="app-settings-modal"
1917
:name="t('mail', 'Calendar settings')"
2018
:legacy="false"
2119
:show-navigation="true"
2220
:additional-trap-elements="[]"
2321
:open="showSettingsModal"
2422
@update:open="(val) => showSettingsModal = val">
25-
<NcAppSettingsSection
26-
id="settings-modal-general"
23+
<NcAppSettingsSection id="settings-modal-general"
2724
:name="t('calendar', 'General')">
28-
<SettingsTimezoneSelect
29-
:is-disabled="loadingCalendars" />
25+
<SettingsTimezoneSelect :is-disabled="loadingCalendars" />
3026
<NcFormBox>
31-
<NcFormBoxButton
32-
target="_blank"
27+
<NcFormBoxButton target="_blank"
3328
:href="availabilitySettingsUrl">
3429
{{ $t('calendar', 'Availability settings') }}
3530
</NcFormBoxButton>
3631
</NcFormBox>
37-
<SettingsImportSection
38-
:is-disabled="loadingCalendars" />
32+
<SettingsImportSection :is-disabled="loadingCalendars" />
3933
<NcFormGroup :label="t('calendar', 'CalDAV')" :description="t('calendar', 'Access Nextcloud calendars from other apps and devices')">
4034
<NcFormBox>
4135
<NcFormBoxCopyButton :label="t('calendar', 'CalDAV URL')" :value="primaryCalDAV" />
4236
<NcFormBoxCopyButton :label="t('calendar', 'Server Address for iOS and macOS')" :value="appleCalDAV" />
4337
</NcFormBox>
4438
</NcFormGroup>
4539
</NcAppSettingsSection>
46-
<NcAppSettingsSection
47-
id="settings-modal-appearance"
40+
<NcAppSettingsSection id="settings-modal-appearance"
4841
:name="t('calendar', 'Appearance')">
4942
<NcFormBox>
50-
<NcFormBoxSwitch
51-
v-model="hasBirthdayCalendarBinding"
43+
<NcFormBoxSwitch v-model="hasBirthdayCalendarBinding"
5244
:disabled="isBirthdayCalendarDisabled"
5345
@update:modelValue="toggleBirthdayEnabled">
5446
{{ $t('calendar', 'Birthday calendar') }}
5547
</NcFormBoxSwitch>
56-
<NcFormBoxSwitch
57-
v-model="showTasksBinding"
48+
<NcFormBoxSwitch v-model="showTasksBinding"
5849
:disabled="savingTasks"
5950
@update:modelValue="toggleTasksEnabled">
6051
{{ $t('calendar', 'Tasks in calendar') }}
6152
</NcFormBoxSwitch>
62-
<NcFormBoxSwitch
63-
v-model="showWeekendsBinding"
53+
<NcFormBoxSwitch v-model="showWeekendsBinding"
6454
:disabled="savingWeekend"
6555
@update:modelValue="toggleWeekendsEnabled">
6656
{{ $t('calendar', 'Weekends') }}
6757
</NcFormBoxSwitch>
68-
<NcFormBoxSwitch
69-
v-model="showWeekNumbersBinding"
58+
<NcFormBoxSwitch v-model="showWeekNumbersBinding"
7059
:disabled="savingWeekNumber"
7160
@update:modelValue="toggleWeekNumberEnabled">
7261
{{ $t('calendar', 'Week numbers') }}
7362
</NcFormBoxSwitch>
7463
</NcFormBox>
7564

7665
<NcFormBox>
77-
<NcFormBoxSwitch
78-
v-model="eventLimitBinding"
66+
<NcFormBoxSwitch v-model="eventLimitBinding"
7967
:disabled="savingEventLimit"
8068
@update:modelValue="toggleEventLimitEnabled">
8169
{{ $t('calendar', 'Limit number of events shown in Month view') }}
8270
</NcFormBoxSwitch>
8371
</NcFormBox>
8472

85-
<NcSelect
86-
:id="slotDuration"
73+
<NcSelect :id="slotDuration"
8774
:options="slotDurationOptions"
8875
:value="selectedDurationOption"
8976
:disabled="savingSlotDuration"
@@ -93,11 +80,9 @@
9380
label="label"
9481
@option:selected="changeSlotDuration" />
9582
</NcAppSettingsSection>
96-
<NcAppSettingsSection
97-
id="app-settings-modal-editing"
83+
<NcAppSettingsSection id="app-settings-modal-editing"
9884
:name="t('calendar', 'Editing')">
99-
<NcSelect
100-
:options="defaultReminderOptions"
85+
<NcSelect :options="defaultReminderOptions"
10186
:value="selectedDefaultReminderOption"
10287
:disabled="savingDefaultReminder"
10388
:clearable="false"
@@ -106,8 +91,7 @@
10691
label="label"
10792
@option:selected="changeDefaultReminder" />
10893
<NcFormBox>
109-
<NcFormBoxSwitch
110-
v-model="simpleEventEditorBinding"
94+
<NcFormBoxSwitch v-model="simpleEventEditorBinding"
11195
:disabled="savingPopover"
11296
:label="t('calendar', 'Simple event editor')"
11397
@update:modelValue="togglePopoverEnabled">

src/components/AppNavigation/Settings/SettingsAttachmentsFolder.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
-->
55

66
<template>
7-
<NcFormBoxButton
8-
:label="$t('calendar', 'Attachments folder')"
7+
<NcFormBoxButton :label="$t('calendar', 'Attachments folder')"
98
:description="attachmentsFolder"
109
inverted-accent
1110
@click="selectCalendarFolder">

src/components/AppNavigation/Settings/ShortcutOverview.vue

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,18 @@
44
-->
55
<template>
66
<NcAppSettingsShortcutsSection>
7-
<NcHotkeyList
8-
v-for="category in shortcuts"
7+
<NcHotkeyList v-for="category in shortcuts"
98
:key="category.categoryId"
109
:label="category.categoryLabel">
11-
<NcHotkey
12-
v-for="(shortcut, index) in category.shortcuts"
10+
<NcHotkey v-for="(shortcut, index) in category.shortcuts"
1311
:key="`${category.categoryId}-${index}`"
1412
:hotkey="shortcut.or ? null : shortcut.keys[0]"
1513
:label="shortcut.label">
1614
<template v-if="shortcut.or" #hotkey>
1715
<div class="shortcut-section-item__keys">
1816
<div v-for="(key, keyIndex) in shortcut.keys" :key="keyIndex">
1917
<NcKbd :symbol="key" />
20-
<span
21-
v-if="keyIndex !== (shortcut.keys.length - 1)">
18+
<span v-if="keyIndex !== (shortcut.keys.length - 1)">
2219
{{ $t('calendar', 'or') }}
2320
</span>
2421
</div>

0 commit comments

Comments
 (0)