fix(riot-ui): upgrade and fix dialog confirm popup

This commit is contained in:
Joxit
2022-12-06 23:08:23 +01:00
parent fe724c4d1f
commit dd251b55a0
4 changed files with 15 additions and 25 deletions

View File

@@ -16,17 +16,17 @@
-->
<confirm-delete-image>
<material-popup opened="{ props.opened }" onClick="{ props.onClick }">
<div slot="title">These images will be deleted</div>
<div slot="content">
<div class="material-popup-title">These images will be deleted</div>
<div class="material-popup-content">
<ul>
<li each="{ image in displayImagesToDelete(props.toDelete, props.tags) }">{ image.name }:{ image.tag }</li>
</ul>
</div>
<div slot="action">
<material-button class="dialog-button" waves-color="rgba(158,158,158,.4)" onClick="{ deleteImages }">
<div class="material-popup-action">
<material-button class="dialog-button" waves-color="rgba(158,158,158,.4)" onClick="{ deleteImages }" color="#000" inverted>
Delete
</material-button>
<material-button class="dialog-button" waves-color="rgba(158,158,158,.4)" onClick="{ props.onClick }">
<material-button class="dialog-button" waves-color="rgba(158,158,158,.4)" onClick="{ props.onClick }" color="#000" inverted>
Cancel
</material-button>
</div>

View File

@@ -58,8 +58,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
deleteImage() {
this.props.handleCheckboxChange(ACTION_DELETE_IMAGE, this.props.image);
},
handleCheckboxChange(checked) {
const action = checked ? ACTION_CHECK_TO_DELETE : ACTION_UNCHECK_TO_DELETE;
handleCheckboxChange(event) {
const action = event.target.checked ? ACTION_CHECK_TO_DELETE : ACTION_UNCHECK_TO_DELETE;
this.props.handleCheckboxChange(action, this.props.image);
},
};

View File

@@ -174,7 +174,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
confirmDeleteImage: false,
});
},
onRemoveImageHeaderChange(checked, event) {
onRemoveImageHeaderChange(event) {
if (event.altKey === true) {
const tags = getPage(this.props.tags, this.props.page);
tags
@@ -186,7 +186,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
});
} else {
this.update({
multiDelete: checked,
multiDelete: event.target.checked,
});
}
},