feat(settings/user/color): confirmation modal text and synchronization
This commit is contained in:
@@ -4,6 +4,7 @@ const { onRender, onClick } = useScreen();
|
|||||||
const app = useAppStore();
|
const app = useAppStore();
|
||||||
const store = useSettingsStore();
|
const store = useSettingsStore();
|
||||||
const { assets } = useAssets();
|
const { assets } = useAssets();
|
||||||
|
const confirmationModal = useConfirmationModal();
|
||||||
|
|
||||||
const GRID_SIZE = 4;
|
const GRID_SIZE = 4;
|
||||||
const GRID_START_X = 32;
|
const GRID_START_X = 32;
|
||||||
@@ -105,16 +106,14 @@ const handleCancel = () => {
|
|||||||
store.closeSubMenu();
|
store.closeSubMenu();
|
||||||
};
|
};
|
||||||
|
|
||||||
const { open: openModal, close: closeModal } = useConfirmationModal();
|
|
||||||
|
|
||||||
const handleConfirm = () => {
|
const handleConfirm = () => {
|
||||||
app.save();
|
app.save();
|
||||||
openModal({
|
confirmationModal.open({
|
||||||
text: "hey",
|
text: $t("settings.user.color.confirmation"),
|
||||||
|
onClosed: () => store.closeSubMenu(),
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
closeModal();
|
confirmationModal.close();
|
||||||
store.closeSubMenu();
|
|
||||||
}, 2000);
|
}, 2000);
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -33,7 +33,8 @@
|
|||||||
|
|
||||||
"color": {
|
"color": {
|
||||||
"title": "Color",
|
"title": "Color",
|
||||||
"description": "Select your favorite color."
|
"description": "Select your favorite color.",
|
||||||
|
"confirmation": "Color setting saved."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"touchScreen": {
|
"touchScreen": {
|
||||||
|
|||||||
Reference in New Issue
Block a user