-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Sunik <[email protected]> Signed-off-by: Sunik Kupfer <[email protected]>
- Loading branch information
Showing
10 changed files
with
1,048 additions
and
20 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -3,6 +3,8 @@ Nextcloud - Tasks | |
|
||
@author Sunik Kupfer | ||
@copyright 2023 Sunik Kupfer <mail@sunik.de> | ||
@author Raimund Schlüßler | ||
@copyright 2018 Raimund Schlüßler <[email protected]> | ||
|
||
This library is free software; you can redistribute it and/or | ||
modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE | ||
|
@@ -24,21 +26,24 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. | |
<div class="repeat__icon"> | ||
<component :is="icon" :size="20" /> | ||
</div> | ||
{{ recurrence }} | ||
<RepeatSummary class="property-repeat__summary__content" | ||
:recurrence-rule="recurrence" /> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
|
||
import { translate as t } from '@nextcloud/l10n' | ||
import RepeatSummary from './RepeatItem/RepeatSummary.vue' | ||
|
||
export default { | ||
components: { | ||
RepeatSummary, | ||
}, | ||
props: { | ||
recurrence: { | ||
type: String, | ||
default: null, | ||
type: Object, | ||
required: true, | ||
}, | ||
disabled: { | ||
type: Boolean, | ||
|
@@ -74,5 +79,11 @@ export default { | |
flex-basis: 44px; | ||
flex-shrink: 0; | ||
} | ||
|
||
.property-repeat__summary__content { | ||
display: flex; | ||
align-items: center; | ||
margin-bottom: 5px; | ||
} | ||
} | ||
</style> |
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,66 @@ | ||
<!-- | ||
- @copyright Copyright (c) 2019 Georg Ehrke <oc.list@georgehrke.com> | ||
- | ||
- @author Georg Ehrke <[email protected]> | ||
- @author Richard Steinmetz <[email protected]> | ||
- | ||
- @license AGPL-3.0-or-later | ||
- | ||
- This program is free software: you can redistribute it and/or modify | ||
- it under the terms of the GNU Affero General Public License as | ||
- published by the Free Software Foundation, either version 3 of the | ||
- License, or (at your option) any later version. | ||
- | ||
- This program is distributed in the hope that it will be useful, | ||
- but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
- GNU Affero General Public License for more details. | ||
- | ||
- You should have received a copy of the GNU Affero General Public License | ||
- along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
- | ||
--> | ||
|
||
<template> | ||
<span v-if="display"> | ||
{{ recurrenceRule | formatRecurrenceRule }} | ||
</span> | ||
<span v-else> | ||
{{ t('calendar', 'No recurrence') }} | ||
</span> | ||
</template> | ||
|
||
<script> | ||
import { translate as t } from '@nextcloud/l10n' | ||
import formatRecurrenceRule from '../../../filters/recurrenceRuleFormat.js' | ||
|
||
export default { | ||
name: 'RepeatSummary', | ||
filters: { | ||
formatRecurrenceRule, | ||
}, | ||
props: { | ||
/** | ||
* The recurrence-rule object as defined on the eventComponent | ||
*/ | ||
recurrenceRule: { | ||
type: Object, | ||
required: true, | ||
}, | ||
}, | ||
computed: { | ||
/** | ||
* Returns whether to display the summary. | ||
* We do not want to show it if it doesn't repeat | ||
* | ||
* @return {boolean} | ||
*/ | ||
display() { | ||
return this.recurrenceRule.frequency !== 'NONE' | ||
}, | ||
}, | ||
methods: { | ||
t, | ||
}, | ||
} | ||
</script> |
Oops, something went wrong.