Skip to content

Commit

Permalink
Merge pull request #2589 from threefoldtech/development_2.5_profile_page
Browse files Browse the repository at this point in the history
Fix email instance
  • Loading branch information
samaradel authored Apr 21, 2024
2 parents dd92950 + fda39d3 commit 037203a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions packages/playground/src/dashboard/twin_view.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<v-col>
<v-list-item v-if="!editEmail">
<div style="display: flex; justify-content: space-between">
{{ email }}
{{ profileManager.profile?.email }}
<v-icon @click="editEmail = true">mdi-pencil</v-icon>
</div>
</v-list-item>
Expand Down Expand Up @@ -189,7 +189,7 @@ import { useProfileManager } from "../stores";
import type { FarmInterface } from "../types";
import { createCustomToast, ToastType } from "../utils/custom_toast";
import { getFarms } from "../utils/get_farms";
import { getGrid, readEmail, storeEmail } from "../utils/grid";
import { getGrid, storeEmail } from "../utils/grid";
const profileManager = useProfileManager();
Expand Down Expand Up @@ -222,7 +222,7 @@ const apps = [
onMounted(async () => {
const profile = profileManager.profile!;
const grid = await getGrid(profile);
email.value = await readEmail(grid!);
if (!grid) {
createCustomToast("Fetch Grid Failed", ToastType.danger);
Expand Down
4 changes: 3 additions & 1 deletion packages/playground/src/weblets/profile_manager.vue
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,9 @@ async function activate(mnemonic: string, keypairType: KeypairType) {
try {
const grid = await getGrid({ mnemonic, keypairType });
const profile = await loadProfile(grid!);
if (email.value) {
profile.email = email.value;
}
profileManager.set({ ...profile, mnemonic });
emit("update:modelValue", false);
} catch (e) {
Expand Down

0 comments on commit 037203a

Please sign in to comment.