Add 'Revert All Selection' feature #68
This commit introduces 'Revert: None - Selected' toggle, enabling users to revert all reversible scripts with a single action, improving user safety and control over script effects. This feature addresses user-reported concerns about the ease of reverting script changes. This feature should enhance the user experience by streamlining the revert process along with providing essential information about script reversibility. Key changes: - Add buttons to revert all selected scripts or setting all selected scripts to non-revert state. - Add tooltips with detailed explanations about consequences of modifying revert states, includinginformation about irreversible script changes. Supporting changes: - Align items on top menu vertically for better visual consistency. - Rename `SelectionType` to `RecommendationStatusType` for more clarity. - Rename `IReverter` to `Reverter` to move away from `I` prefix convention. - The `.script` CSS class was duplicated in `TheScriptsView.vue` and `TheScriptsArea.vue`, leading to style collisions in the development environment. The class has been renamed to component-specific classes to avoid such issues in the future.
This commit is contained in:
@@ -0,0 +1,87 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="sections">
|
||||
<section class="description">
|
||||
<AppIcon :icon="icon" class="icon" />
|
||||
<span class="text">{{ description }}</span>
|
||||
</section>
|
||||
<section
|
||||
v-if="considerations.length > 0"
|
||||
class="considerations"
|
||||
>
|
||||
<AppIcon icon="triangle-exclamation" class="icon" />
|
||||
<span class="text">
|
||||
Considerations:
|
||||
<ul>
|
||||
<li
|
||||
v-for="considerationItem in considerations"
|
||||
:key="considerationItem"
|
||||
>
|
||||
{{ considerationItem }}
|
||||
</li>
|
||||
</ul>
|
||||
</span>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { PropType, defineComponent } from 'vue';
|
||||
import AppIcon from '@/presentation/components/Shared/Icon/AppIcon.vue';
|
||||
import { IconName } from '@/presentation/components/Shared/Icon/IconName';
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
AppIcon,
|
||||
},
|
||||
props: {
|
||||
icon: {
|
||||
type: String as PropType<IconName>,
|
||||
required: true,
|
||||
},
|
||||
description: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
considerations: {
|
||||
type: Array as PropType<ReadonlyArray<string>>,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@use "@/presentation/assets/styles/main" as *;
|
||||
|
||||
ul {
|
||||
@include reset-ul;
|
||||
padding-left: 0em;
|
||||
margin-top: 0.25em;
|
||||
list-style: disc;
|
||||
li {
|
||||
line-height: 1.2em;
|
||||
}
|
||||
}
|
||||
.sections {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.75em;
|
||||
.considerations {
|
||||
display: flex;
|
||||
gap: 0.5em;
|
||||
.icon {
|
||||
color: $color-caution;
|
||||
}
|
||||
}
|
||||
.description {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5em;
|
||||
.icon {
|
||||
color: $color-success;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user