Skip to content

Commit dd251b5

Browse files
committed
fix(riot-ui): upgrade and fix dialog confirm popup
1 parent fe724c4 commit dd251b5

File tree

4 files changed

+15
-25
lines changed

4 files changed

+15
-25
lines changed

src/components/dialogs/confirm-delete-image.riot

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@
1616
-->
1717
<confirm-delete-image>
1818
<material-popup opened="{ props.opened }" onClick="{ props.onClick }">
19-
<div slot="title">These images will be deleted</div>
20-
<div slot="content">
19+
<div class="material-popup-title">These images will be deleted</div>
20+
<div class="material-popup-content">
2121
<ul>
2222
<li each="{ image in displayImagesToDelete(props.toDelete, props.tags) }">{ image.name }:{ image.tag }</li>
2323
</ul>
2424
</div>
25-
<div slot="action">
26-
<material-button class="dialog-button" waves-color="rgba(158,158,158,.4)" onClick="{ deleteImages }">
25+
<div class="material-popup-action">
26+
<material-button class="dialog-button" waves-color="rgba(158,158,158,.4)" onClick="{ deleteImages }" color="#000" inverted>
2727
Delete
2828
</material-button>
29-
<material-button class="dialog-button" waves-color="rgba(158,158,158,.4)" onClick="{ props.onClick }">
29+
<material-button class="dialog-button" waves-color="rgba(158,158,158,.4)" onClick="{ props.onClick }" color="#000" inverted>
3030
Cancel
3131
</material-button>
3232
</div>

src/components/tag-list/remove-image.riot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
5858
deleteImage() {
5959
this.props.handleCheckboxChange(ACTION_DELETE_IMAGE, this.props.image);
6060
},
61-
handleCheckboxChange(checked) {
62-
const action = checked ? ACTION_CHECK_TO_DELETE : ACTION_UNCHECK_TO_DELETE;
61+
handleCheckboxChange(event) {
62+
const action = event.target.checked ? ACTION_CHECK_TO_DELETE : ACTION_UNCHECK_TO_DELETE;
6363
this.props.handleCheckboxChange(action, this.props.image);
6464
},
6565
};

src/components/tag-list/tag-table.riot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
174174
confirmDeleteImage: false,
175175
});
176176
},
177-
onRemoveImageHeaderChange(checked, event) {
177+
onRemoveImageHeaderChange(event) {
178178
if (event.altKey === true) {
179179
const tags = getPage(this.props.tags, this.props.page);
180180
tags
@@ -186,7 +186,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
186186
});
187187
} else {
188188
this.update({
189-
multiDelete: checked,
189+
multiDelete: event.target.checked,
190190
});
191191
}
192192
},

src/style.scss

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,6 @@ material-tabs {
8989

9090
material-tabs material-button,
9191
material-tabs material-button .content .text {
92-
background-color: #fff;
93-
color: #aaa;
9492
text-transform: none;
9593
}
9694

@@ -246,17 +244,14 @@ material-card table th {
246244
text-align: left;
247245
}
248246

249-
material-card .material-card-title-action material-button:hover a,
247+
material-button:hover > :first-child[inverted='true'],
250248
material-card .material-card-title-action material-button:hover button,
251-
material-card table tbody tr:hover,
252-
pagination material-button:hover > :first-child {
249+
material-card table tbody tr:hover {
253250
background-color: #eee !important;
254251
}
255252

256-
material-card material-button a,
257-
material-card material-button button,
258-
material-card table tbody tr,
259-
pagination material-button > :first-child {
253+
material-button > :first-child[inverted='true'],
254+
material-card table tbody tr {
260255
transition-duration: .28s;
261256
transition-timing-function: cubic-bezier(.4, 0, .2, 1);
262257
transition-property: background-color;
@@ -317,18 +312,13 @@ material-snackbar .toast {
317312
height: auto;
318313
}
319314

320-
material-popup material-button {
321-
background-color: #fff;
322-
color: #000;
323-
}
324-
325315
material-popup material-button:hover material-waves {
326316
background-color: hsla(0, 0%, 75%, .2);
327317
}
328318

329-
material-popup .popup {
319+
material-popup .popup > .content {
320+
padding: 1em;
330321
max-width: 450px;
331-
top: 2em;
332322
}
333323

334324
footer {

0 commit comments

Comments
 (0)