feat(achievements): implement unlocking, saving and notification
This commit is contained in:
@@ -6,6 +6,7 @@ import Buttons from "./Buttons.vue";
|
||||
import ButtonSelector from "~/components/Common/ButtonSelector.vue";
|
||||
|
||||
const store = useContactStore();
|
||||
const achievements = useAchievementsStore();
|
||||
const confirmationModal = useConfirmationModal();
|
||||
|
||||
const ACTIONS = {
|
||||
@@ -65,6 +66,12 @@ const actionateButton = async (button: (typeof selected)["value"]) => {
|
||||
store.pushNotification(`${verb} opened`);
|
||||
await sleep(100);
|
||||
await navigateTo(content, { open: { target: "_blank " } });
|
||||
|
||||
await sleep(500);
|
||||
|
||||
if (button === "github") {
|
||||
achievements.unlock("contact_git_visit");
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user