-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move all day checkbox into component
Signed-off-by: Raimund Schlüßler <raimund.schluessler@mailbox.org>
- Loading branch information
1 parent
882f2b5
commit b41d630
Showing
4 changed files
with
128 additions
and
22 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,99 @@ | ||
<!-- | ||
Nextcloud - Tasks | ||
|
||
@author Raimund Schlüßler | ||
@copyright 2021 Raimund Schlüßler <raimund.schluessler@mailbox.org> | ||
|
||
This library is free software; you can redistribute it and/or | ||
modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE | ||
License as published by the Free Software Foundation; either | ||
version 3 of the License, or any later version. | ||
|
||
This library 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 library. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
--> | ||
|
||
<template> | ||
<PropertyItem | ||
:property-string="propertyString" | ||
:allow-editing="false" | ||
v-on="$listeners"> | ||
<template #content__title> | ||
<input :id="checkBoxId" | ||
type="checkbox" | ||
class="checkbox" | ||
:name="checkBoxId" | ||
:class="{disabled}" | ||
:aria-checked="checked" | ||
:checked="checked" | ||
:disabled="disabled" | ||
@click="$emit('setChecked', checked)"> | ||
<label :for="checkBoxId"> | ||
<span>{{ propertyString }}</span> | ||
</label> | ||
</template> | ||
</PropertyItem> | ||
</template> | ||
|
||
<script> | ||
import PropertyItem from './PropertyItem' | ||
|
||
export default { | ||
components: { | ||
PropertyItem, | ||
}, | ||
props: { | ||
checkBoxId: { | ||
type: String, | ||
required: true, | ||
}, | ||
checked: { | ||
type: Boolean, | ||
default: false, | ||
}, | ||
disabled: { | ||
type: Boolean, | ||
default: false, | ||
}, | ||
propertyString: { | ||
type: String, | ||
default: '', | ||
}, | ||
}, | ||
data() { | ||
return { | ||
} | ||
}, | ||
methods: { | ||
setDate(date) {}, | ||
setTime(time) {}, | ||
}, | ||
} | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
.property__item::v-deep .item__content .content__title { | ||
padding-right: 0; | ||
} | ||
|
||
input[type='checkbox'].checkbox + label { | ||
padding-left: 14px; | ||
width: 100%; | ||
|
||
&::before { | ||
margin-left: 0; | ||
border-width: 2px; | ||
border-radius: var(--border-radius); | ||
} | ||
> span { | ||
font-weight: bold; | ||
margin-left: 7px; | ||
} | ||
} | ||
</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
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