gitee头像显示问题bugfix

This commit is contained in:
xiaoqi.cxq 2022-06-02 08:54:51 +08:00
parent 5789b2993f
commit b94898960a
2 changed files with 4 additions and 1 deletions

View File

@ -5,7 +5,7 @@
<div class="menu-entry__icon menu-entry__icon--image"> <div class="menu-entry__icon menu-entry__icon--image">
<user-image :user-id="userId"></user-image> <user-image :user-id="userId"></user-image>
</div> </div>
<span>Signed in as <b>{{loginToken.name}}</b>.</span> <span>登录名为<b>{{loginToken.name}}</b></span>
</div> </div>
<div class="menu-entry menu-entry--info flex flex--row flex--align-center" v-if="syncToken"> <div class="menu-entry menu-entry--info flex flex--row flex--align-center" v-if="syncToken">
<div class="menu-entry__icon menu-entry__icon--image"> <div class="menu-entry__icon menu-entry__icon--image">

View File

@ -44,6 +44,9 @@ userSvc.setInfoResolver('gitee', subPrefix, async (sub) => {
}, },
})).body; })).body;
if (user.avatar_url && user.avatar_url.endsWith('.png')) {
user.avatar_url = `${user.avatar_url}!avatar60`;
}
return { return {
id: `${subPrefix}:${user.login}`, id: `${subPrefix}:${user.login}`,
name: user.login, name: user.login,