diff --git a/src/components/select/select_motion.vue b/src/components/select/select_motion.vue
new file mode 100644
index 00000000..1b9f4041
--- /dev/null
+++ b/src/components/select/select_motion.vue
@@ -0,0 +1,115 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/settings_modal/tabs/style_tab/style_tab.vue b/src/components/settings_modal/tabs/style_tab/style_tab.vue
index 590624ff..7026f7af 100644
--- a/src/components/settings_modal/tabs/style_tab/style_tab.vue
+++ b/src/components/settings_modal/tabs/style_tab/style_tab.vue
@@ -51,231 +51,241 @@
-
-
-
-
-
+
-
-
-
-
-
-
+ {{ fallbackI18n($t(getFriendlyNamePath(componentsMap.get(key).name)), componentsMap.get(key).name) }}
+
+
+
+
-
+ {{ $t('settings.style.themes3.editor.variant_selector') }}
+
+
+
+
+
+
+ -
+ updateSelectedStates(state, v)"
+ >
+ {{ fallbackI18n($t(getStatePath(selectedComponentName, state)), state) }}
+
+
+
+
+
+
+
+
+ updateSubShadow(axis, value)"
+ />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
updateSelectedStates(state, v)"
+ v-model="isShadowPresent"
+ class="style-control"
>
- {{ fallbackI18n($t(getStatePath(selectedComponentName, state)), state) }}
-
-
-
+ {{ $t('settings.style.themes3.editor.include_in_rule') }}
+
+
+
+
-
-
-
-
- updateSubShadow(axis, value)"
- />
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ {{ $t('settings.style.themes3.palette.light') }}
+
+
-
-
- {{ $t('settings.style.themes3.editor.include_in_rule') }}
-
-
-
-
-
-
-
-
-
+
-
-
+
diff --git a/src/components/shadow_control/shadow_control.js b/src/components/shadow_control/shadow_control.js
index 2befb8ba..fc227b5b 100644
--- a/src/components/shadow_control/shadow_control.js
+++ b/src/components/shadow_control/shadow_control.js
@@ -1,6 +1,7 @@
import ColorInput from 'src/components/color_input/color_input.vue'
import OpacityInput from 'src/components/opacity_input/opacity_input.vue'
import Select from 'src/components/select/select.vue'
+import SelectMotion from 'src/components/select/select_motion.vue'
import Checkbox from 'src/components/checkbox/checkbox.vue'
import Popover from 'src/components/popover/popover.vue'
import ComponentPreview from 'src/components/component_preview/component_preview.vue'
@@ -54,13 +55,11 @@ export default {
ColorInput,
OpacityInput,
Select,
+ SelectMotion,
Checkbox,
Popover,
ComponentPreview
},
- beforeUpdate () {
- this.cValue = (this.modelValue ?? this.fallback ?? []).map(toModel)
- },
computed: {
selectedType: {
get () {
@@ -73,7 +72,6 @@ export default {
selected: {
get () {
const selected = this.cValue[this.selectedId]
- console.log('SELECTED', selected)
if (selected && typeof selected === 'object') {
return { ...selected }
} else if (typeof selected === 'string') {
@@ -95,12 +93,6 @@ export default {
currentFallback () {
return this.fallback?.[this.selectedId]
},
- moveUpValid () {
- return this.selectedId > 0
- },
- moveDnValid () {
- return this.selectedId < this.cValue.length - 1
- },
usingFallback () {
return this.modelValue == null
},
@@ -123,11 +115,20 @@ export default {
}
},
watch: {
+ modelValue (value) {
+ if (!value) this.cValue = (this.modelValue ?? this.fallback ?? []).map(toModel)
+ },
selected (value) {
this.$emit('subShadowSelected', this.selectedId)
}
},
methods: {
+ getNewSubshadow () {
+ return toModel(this.selected)
+ },
+ onSelectChange (id) {
+ this.selectedId = id
+ },
getSubshadowLabel (shadow, index) {
if (typeof shadow === 'object') {
return shadow?.name ?? this.$t('settings.style.shadows.shadow_id', { value: index })
@@ -141,28 +142,6 @@ export default {
this.cValue[this.selectedId].spread = 0
}
this.$emit('update:modelValue', this.cValue)
- }, 100),
- add () {
- this.cValue.push(toModel(this.selected))
- this.selectedId = Math.max(this.cValue.length - 1, 0)
- this.$emit('update:modelValue', this.cValue)
- },
- del () {
- this.cValue.splice(this.selectedId, 1)
- this.selectedId = this.cValue.length === 0 ? undefined : Math.max(this.selectedId - 1, 0)
- this.$emit('update:modelValue', this.cValue)
- },
- moveUp () {
- const movable = this.cValue.splice(this.selectedId, 1)[0]
- this.cValue.splice(this.selectedId - 1, 0, movable)
- this.selectedId -= 1
- this.$emit('update:modelValue', this.cValue)
- },
- moveDn () {
- const movable = this.cValue.splice(this.selectedId, 1)[0]
- this.cValue.splice(this.selectedId + 1, 0, movable)
- this.selectedId += 1
- this.$emit('update:modelValue', this.cValue)
- }
+ }, 100)
}
}
diff --git a/src/components/shadow_control/shadow_control.vue b/src/components/shadow_control/shadow_control.vue
index 669de36e..6a5cd186 100644
--- a/src/components/shadow_control/shadow_control.vue
+++ b/src/components/shadow_control/shadow_control.vue
@@ -28,53 +28,14 @@
{{ getSubshadowLabel(shadow, index) }}
-
-
-
-
-
-
+