diff --git a/src/assets/widgets/ear/attached.svg b/src/assets/widgets/ear/attached.svg
index 5f28ec3a778701f10f137f55420ba93e2acfd659..e9072c5830e902be33aa8e9d85a1117c99708609 100644
--- a/src/assets/widgets/ear/attached.svg
+++ b/src/assets/widgets/ear/attached.svg
@@ -14,7 +14,7 @@
/>
-
\ No newline at end of file
+
diff --git a/src/assets/widgets/ear/detached.svg b/src/assets/widgets/ear/detached.svg
index f2b40dd3194afc1336c521fe8cfd05636c295144..6316b8fa5713184c4bf2e3dc7c95d201190faf53 100644
--- a/src/assets/widgets/ear/detached.svg
+++ b/src/assets/widgets/ear/detached.svg
@@ -16,7 +16,7 @@
fill-rule="evenodd"
clip-rule="evenodd"
d="M42.972 23.984C43.0434 23.3322 43.08 22.6703 43.08 22C43.08 11.7827 33.5734 5 23.08 5C12.5866 5 4.08007 11.5 5.08001 23.5C5.63643 30.1774 8.02584 34.5719 11.7307 37.2171C11.1423 38.2409 10.8848 39.4436 11.0483 40.8167C11.6774 46.0984 16.1862 47.9998 22.5242 47.9998C33.6292 47.9998 42.4159 33.9534 42.972 23.984Z"
- fill="#ffcebc"
+ fill="$fillColor"
/>
-
\ No newline at end of file
+
diff --git a/src/assets/widgets/face/base.svg b/src/assets/widgets/face/base.svg
index 3c8eadb707964b2f9ce62f1de4b15dc3afa8ff41..424f3a6b41c2a68ccee1983c26ab6179aa3c452e 100644
--- a/src/assets/widgets/face/base.svg
+++ b/src/assets/widgets/face/base.svg
@@ -9,7 +9,7 @@
face - base
@@ -24,24 +24,15 @@
>
-
+
-
+
-
+
-
\ No newline at end of file
+
diff --git a/src/components/Configurator.vue b/src/components/Configurator.vue
index d078e392a4e13615a5b0b206a125993700440306..36839582a83bdaa9ac9822772bb4c07de861eae1 100644
--- a/src/components/Configurator.vue
+++ b/src/components/Configurator.vue
@@ -49,14 +49,18 @@
{{ t('label.colors') }}
-
import { ref, toRefs, watchEffect } from 'vue'
-import { WrapperShape } from '@/enums'
+import { WidgetType, WrapperShape } from '@/enums'
import type { AvatarOption } from '@/types'
import { getRandomAvatarOption } from '@/utils'
import { AVATAR_LAYER, NONE } from '@/utils/constant'
@@ -84,9 +84,19 @@ watchEffect(async () => {
}
)
+ let skinColor: string | undefined
+
const svgRawList = await Promise.all(promises).then((raw) => {
return raw.map((svgRaw, i) => {
- const widgetFillColor = sortedList[i][1].fillColor
+ const [widgetType, widget] = sortedList[i]
+ let widgetFillColor = widget.fillColor
+
+ if (widgetType === WidgetType.Face) {
+ skinColor = widgetFillColor
+ }
+ if (skinColor && widgetType === WidgetType.Ear) {
+ widgetFillColor = skinColor
+ }
const content = svgRaw
.slice(svgRaw.indexOf('>', svgRaw.indexOf('