Skip to content

Commit ade6ccf

Browse files
committed
User's describe() now exposes the link for the avatar in links.avatarImage.href instead of meta.avatarUrl. This is a breaking change.
1 parent 0cf157a commit ade6ccf

File tree

5 files changed

+4
-4
lines changed

5 files changed

+4
-4
lines changed

app/layouts/default.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
</InputGroup>
3030
<SplitButton v-if="currentUser.props?.id" :model="userMenu" text>
3131
<NuxtLink to="/user/settings" class="flex items-center">
32-
<Avatar :image="currentUser.meta?.avatarUrl" alt="user avatar" shape="circle" />
32+
<Avatar :image="currentUser.links?.avatarImage?.href" alt="user avatar" shape="circle" />
3333
<span class="ml-2">
3434
{{ currentUser.meta?.displayName }}
3535
</span>

app/pages/user/admin/[id].vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343

4444
<div class="mb-4">
4545
<span class="font-medium text-900 mb-2">Profile Picture</span><br>
46-
<Avatar :image="user.meta?.avatarUrl" alt="user avatar" class="h-10rem w-10rem" shape="circle" />
46+
<Avatar :image="user.links?.avatarImage?.href" alt="user avatar" class="h-10rem w-10rem" shape="circle" />
4747
</div>
4848
</FieldsetItem>
4949

app/pages/user/settings/index.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
</div>
2323
</div>
2424
<div class="col text-center mb-3">
25-
<Image :src="currentUser.meta?.avatarUrl" alt="user avatar" class="inline-block"/>
25+
<Image :src="currentUser.links?.avatarImage?.href" alt="user avatar" class="inline-block"/>
2626
</div>
2727
</div>
2828

ving/docs/change-log.md

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ outline: deep
99
* Added VingRecord.describeLinks() to generate links for the UI rather than having to manually code them in a describe() override. They are automatically generated for all VingRecords via the CLI, and then pages that are generated also use the exposed links. #179
1010
* NOTE: You'll need to add a describeLinks() override to classes generated before now.
1111
* NOTE: S3File's describe() now exposes the links for the file and thumbnail in links.file.href and links.thumbnail.href respectively instead of meta.fileUrl and meta.thumbnailUrl. This is a breaking change.
12+
* NOTE: User's describe() now exposes the link for the avatar in links.avatarImage.href instead of meta.avatarUrl. This is a breaking change.
1213

1314
### 2025-01-12
1415
* Removed pulumi from the project.

ving/record/records/User.mjs

-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ export class UserRecord extends RoleMixin(VingRecord) {
132132
const out = await super.describe(params);
133133
if (params?.include?.meta && out.meta) {
134134
out.meta.displayName = this.displayName();
135-
out.meta.avatarUrl = await this.avatarUrl();
136135
}
137136
return out;
138137
}

0 commit comments

Comments
 (0)