Skip to content

Commit

Permalink
Improved UI manage-whitelist component (#11861)
Browse files Browse the repository at this point in the history
  • Loading branch information
p0psicles authored Oct 19, 2024
1 parent bfec7a8 commit 20ae32e
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -350,16 +350,6 @@ export default {
animation-timing-function: ease-out;
}
@keyframes spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(180deg);
}
}
.template-body {
display: flex;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div v-if="open" class="manage-whitelist-control-wrapper">
<div class="title-header">
<span class="title">{{releaseGroup}}</span>
<svg class="manage-whitelist-close" @click="open = !open">
<svg class="manage-whitelist-close spin-hover-90" @click="open = !open">
<use xlink:href="images/svg/close.svg#close" />
</svg>
</div>
Expand Down Expand Up @@ -47,27 +47,31 @@ export default {
this.show.config.release.whitelist.push(releaseGroup);
this.save(`adding release group ${releaseGroup} from the whitelist`);
}
this.open = false;
},
removeFromWhitelist() {
const { releaseGroup, show } = this;
if (show.config.release.whitelist.map(item => item.toLowerCase()).includes(releaseGroup.toLowerCase())) {
this.show.config.release.whitelist = this.show.config.release.whitelist.filter(group => group.toLowerCase() !== releaseGroup.toLowerCase());
this.save(`removing release group ${releaseGroup} from the whitelist`);
}
this.open = false;
},
addToBlacklist() {
const { releaseGroup, show } = this;
if (!show.config.release.blacklist.map(item => item.toLowerCase()).includes(releaseGroup.toLowerCase())) {
this.show.config.release.blacklist.push(releaseGroup);
this.save(`adding release group ${releaseGroup} from the blacklist`);
}
this.open = false;
},
removeFromBlacklist() {
const { releaseGroup, show } = this;
if (show.config.release.blacklist.map(item => item.toLowerCase()).includes(releaseGroup.toLowerCase())) {
this.show.config.release.blacklist = this.show.config.release.blacklist.filter(group => group.toLowerCase() !== releaseGroup.toLowerCase());
this.save(`removing release group ${releaseGroup} from the blacklist`);
}
this.open = false;
},
async save(message) {
const { saveShowConfig, show } = this;
Expand Down Expand Up @@ -95,7 +99,7 @@ export default {
top: 25px;
left: 0;
background-color: rgb(51, 51, 51);
padding: 1rem;
padding: 1rem 1.2rem;
border-radius: 4px;
z-index: 1;
flex-flow: column;
Expand Down Expand Up @@ -125,7 +129,7 @@ export default {
.manage-whitelist-control-wrapper form {
display: flex;
flex-flow: column;
gap: 5px;
gap: 10px;
}
.manage-whitelist-control-wrapper button {
Expand Down
10 changes: 10 additions & 0 deletions themes-default/slim/src/style/spin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,13 @@
transform: rotate(90deg);
}
}

@keyframes spin {
from {
transform: rotate(0deg);
}

to {
transform: rotate(180deg);
}
}
10 changes: 5 additions & 5 deletions themes/dark/assets/js/medusa-runtime.js

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions themes/light/assets/js/medusa-runtime.js

Large diffs are not rendered by default.

0 comments on commit 20ae32e

Please sign in to comment.