forked from nextcloud/calendar
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor Attendee List, show avatar, rsvp, ...
Signed-off-by: Georg Ehrke <[email protected]>
- Loading branch information
1 parent
68c5b2c
commit cb84ebd
Showing
15 changed files
with
1,102 additions
and
80 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
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
78 changes: 78 additions & 0 deletions
78
src/components/Editor/Alarm/AlarmTimeBeforeAfterSelect.vue
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,78 @@ | ||
<!-- | ||
- @copyright Copyright (c) 2019 Georg Ehrke <oc.list@georgehrke.com> | ||
- | ||
- @author Georg Ehrke <[email protected]> | ||
- | ||
- @license GNU AGPL version 3 or any later version | ||
- | ||
- 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> | ||
<Multiselect | ||
:allow-empty="false" | ||
:options="options" | ||
:value="selected" | ||
track-by="type" | ||
label="label" | ||
@select="select" | ||
/> | ||
</template> | ||
|
||
<script> | ||
import { | ||
Multiselect | ||
} from 'nextcloud-vue' | ||
|
||
export default { | ||
name: 'AlarmTimeBeforeAfterSelect', | ||
components: { | ||
Multiselect | ||
}, | ||
props: { | ||
isBefore: { | ||
type: Boolean, | ||
required: true | ||
}, | ||
}, | ||
computed: { | ||
options () { | ||
return [{ | ||
'label': t('calendar', 'before'), | ||
'type': 'before', | ||
}, { | ||
'label': t('calendar', 'after'), | ||
'type': 'after' | ||
}] | ||
}, | ||
selected () { | ||
const type = this.isBefore | ||
? 'before' | ||
: 'after' | ||
|
||
return this.options.find(o => o.type === type) | ||
} | ||
}, | ||
methods: { | ||
select (value) { | ||
if (!value) { | ||
return | ||
} | ||
|
||
this.$emit('change', value.type) | ||
} | ||
} | ||
} | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<!-- | ||
- @copyright Copyright (c) 2019 Georg Ehrke <oc.list@georgehrke.com> | ||
- | ||
- @author Georg Ehrke <[email protected]> | ||
- | ||
- @license GNU AGPL version 3 or any later version | ||
- | ||
- 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> | ||
<div> | ||
<alarm-type-select /> | ||
<input type="number" /> | ||
<alarm-time-unit-select /> | ||
<span>before at</span> | ||
<DatetimePicker type="time" /> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import AlarmTypeSelect from './AlarmTypeSelect' | ||
import AlarmTimeUnitSelect from './AlarmTimeUnitSelect' | ||
|
||
export default { | ||
name: 'AlarmTimeCustomAllDay', | ||
components: { | ||
AlarmTimeUnitSelect, | ||
AlarmTypeSelect | ||
|
||
} | ||
} | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<!-- | ||
- @copyright Copyright (c) 2019 Georg Ehrke <oc.list@georgehrke.com> | ||
- | ||
- @author Georg Ehrke <[email protected]> | ||
- | ||
- @license GNU AGPL version 3 or any later version | ||
- | ||
- 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> | ||
<div> | ||
<alarm-type-select /> | ||
<input type="number" /> | ||
<alarm-time-unit-select /> | ||
<alarm-time-before-after-select /> | ||
<alarm-time-start-end-select /> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import AlarmTypeSelect from './AlarmTypeSelect' | ||
import AlarmTimeUnitSelect from './AlarmTimeUnitSelect' | ||
import AlarmTimeBeforeAfterSelect from './AlarmTimeBeforeAfterSelect' | ||
import AlarmTimeStartEndSelect from './AlarmTimeStartEndSelect' | ||
|
||
export default { | ||
name: 'AlarmTimeCustomTimed', | ||
components: { | ||
AlarmTimeStartEndSelect, | ||
AlarmTimeBeforeAfterSelect, | ||
AlarmTimeUnitSelect, | ||
AlarmTypeSelect | ||
|
||
} | ||
} | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
<!-- | ||
- @copyright Copyright (c) 2019 Georg Ehrke <oc.list@georgehrke.com> | ||
- | ||
- @author Georg Ehrke <[email protected]> | ||
- | ||
- @license GNU AGPL version 3 or any later version | ||
- | ||
- 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> | ||
<Multiselect | ||
:allow-empty="false" | ||
:options="options" | ||
:value="selected" | ||
track-by="trigger" | ||
label="label" | ||
@select="select" | ||
/> | ||
</template> | ||
|
||
<script> | ||
import { | ||
Multiselect | ||
} from 'nextcloud-vue' | ||
import defaultAlarms from '../../../defaults/defaultAlarmProvider' | ||
|
||
export default { | ||
name: 'AlarmTimeSelect', | ||
components: { | ||
Multiselect | ||
}, | ||
props: { | ||
triggerType: { | ||
type: String, | ||
required: true | ||
}, | ||
isAllDay: { | ||
type: Boolean, | ||
required: true | ||
} | ||
}, | ||
computed: { | ||
options() { | ||
const options = this.isAllDay | ||
? defaultAlarms.allDayEvents | ||
: defaultAlarms.timedEvents | ||
|
||
options.push({ | ||
label: t('calendar', 'Custom'), | ||
trigger: 'custom' | ||
}) | ||
}, | ||
selected() { | ||
return this.options.find(o => o.trigger === this.triggerType) | ||
} | ||
}, | ||
methods: { | ||
select(value) { | ||
if (!value) { | ||
return | ||
} | ||
|
||
this.$emit('change', value.trigger) | ||
} | ||
} | ||
} | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
<!-- | ||
- @copyright Copyright (c) 2019 Georg Ehrke <oc.list@georgehrke.com> | ||
- | ||
- @author Georg Ehrke <[email protected]> | ||
- | ||
- @license GNU AGPL version 3 or any later version | ||
- | ||
- 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> | ||
<Multiselect | ||
:allow-empty="false" | ||
:options="options" | ||
:value="selected" | ||
track-by="related" | ||
label="label" | ||
@select="select" | ||
/> | ||
</template> | ||
|
||
<script> | ||
import { | ||
Multiselect | ||
} from 'nextcloud-vue' | ||
|
||
export default { | ||
name: 'AlarmTimeStartEndSelect', | ||
components: { | ||
Multiselect | ||
}, | ||
props: { | ||
isRelatedToStart: { | ||
type: Boolean, | ||
required: true | ||
}, | ||
}, | ||
computed: { | ||
options () { | ||
return [{ | ||
'label': t('calendar', 'before'), | ||
'related': 'start', | ||
}, { | ||
'label': t('calendar', 'after'), | ||
'related': 'end' | ||
}] | ||
}, | ||
selected () { | ||
const type = this.isRelatedToStart | ||
? 'start' | ||
: 'end' | ||
|
||
return this.options.find(o => o.related === type) | ||
} | ||
}, | ||
methods: { | ||
select (value) { | ||
if (!value) { | ||
return | ||
} | ||
|
||
this.$emit('change', value.related) | ||
} | ||
} | ||
} | ||
</script> |
Oops, something went wrong.