fix(riot-v5): on page change, selected images for deletion should be cleared
update riot-mui version
This commit is contained in:
parent
92fd78165f
commit
781b026471
|
@ -27,7 +27,7 @@
|
|||
"core-js": "^3.9.1",
|
||||
"js-beautify": "^1.13.0",
|
||||
"riot": "^5.3.1",
|
||||
"riot-mui": "joxit/riot-5-mui#53a3399a",
|
||||
"riot-mui": "joxit/riot-5-mui#e3e993f",
|
||||
"rollup": "^2.34.2",
|
||||
"rollup-plugin-app-utils": "^1.0.6",
|
||||
"rollup-plugin-commonjs": "^10.1.0",
|
||||
|
|
|
@ -29,7 +29,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
</th>
|
||||
<th class="show-tag-history">History</th>
|
||||
<th class="remove-tag { state.toDelete.size > 0 ? 'delete' : '' }" if="{ props.isImageRemoveActivated }">
|
||||
<material-checkbox ref="remove-tag-checkbox" class="indeterminate" if="{ state.toDelete.size === 0}"
|
||||
<material-checkbox class="indeterminate" checked="{ state.multiDelete }" if="{ state.toDelete.size === 0}"
|
||||
title="Toggle multi-delete. Alt+Click to select all tags." onChange="{ onRemoveImageHeaderChange }">
|
||||
</material-checkbox>
|
||||
<material-button waves-center="true" rounded="true" waves-color="#ddd"
|
||||
|
@ -96,9 +96,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
this.state = {
|
||||
toDelete: new Set(),
|
||||
multiDelete: false,
|
||||
page: props.page,
|
||||
}
|
||||
},
|
||||
onMounted(props, state) {},
|
||||
onBeforeUpdate(props, state) {
|
||||
if (state.page !== props.page) {
|
||||
state.toDelete.clear();
|
||||
}
|
||||
state.page = props.page
|
||||
},
|
||||
bulkDelete() {
|
||||
this.state.toDelete.forEach(image => deleteImage(image, this.props.registryUrl, true))
|
||||
},
|
||||
|
|
16
src/index.js
16
src/index.js
|
@ -1,11 +1,13 @@
|
|||
import { component, register } from 'riot';
|
||||
import MaterialCard from 'riot-mui/src/material-elements/material-card/material-card.riot';
|
||||
import MaterialSpinner from 'riot-mui/src/material-elements/material-spinner/material-spinner.riot';
|
||||
import MaterialNavbar from 'riot-mui/src/material-elements/material-navbar/material-navbar.riot';
|
||||
import MaterialFooter from 'riot-mui/src/material-elements/material-footer/material-footer.riot';
|
||||
import MaterialButton from 'riot-mui/src/material-elements/material-button/material-button.riot';
|
||||
import MaterialCheckbox from 'riot-mui/src/material-elements/material-checkbox/material-checkbox.riot';
|
||||
import MaterialTabs from 'riot-mui/src/material-elements/material-tabs/material-tabs.riot';
|
||||
import {
|
||||
MaterialCard,
|
||||
MaterialSpinner,
|
||||
MaterialNavbar,
|
||||
MaterialFooter,
|
||||
MaterialButton,
|
||||
MaterialCheckbox,
|
||||
MaterialTabs,
|
||||
} from 'riot-mui';
|
||||
|
||||
import DockerRegistryUI from './components/docker-registry-ui.riot';
|
||||
|
||||
|
|
Loading…
Reference in New Issue