mirror of
https://github.com/git-touch/git-touch
synced 2025-03-07 12:47:42 +01:00
fix: avatar link
This commit is contained in:
parent
31e945cf5f
commit
9121316acd
@ -71,7 +71,8 @@ class GiteaUserScreen extends StatelessWidget {
|
|||||||
starCount: v.starsCount,
|
starCount: v.starsCount,
|
||||||
forkCount: v.forksCount,
|
forkCount: v.forksCount,
|
||||||
note: 'Updated ${timeago.format(v.updatedAt)}',
|
note: 'Updated ${timeago.format(v.updatedAt)}',
|
||||||
url: '/gitea/${v.owner.login}/${v.name}', // TODO:
|
url: '/gitea/${v.owner.login}/${v.name}',
|
||||||
|
avatarLink: '/gitea/${v.owner.login}',
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
@ -18,6 +18,7 @@ class RepositoryItem extends StatelessWidget {
|
|||||||
final String primaryLanguageColor;
|
final String primaryLanguageColor;
|
||||||
final String note;
|
final String note;
|
||||||
final String url;
|
final String url;
|
||||||
|
final String avatarLink;
|
||||||
|
|
||||||
RepositoryItem({
|
RepositoryItem({
|
||||||
@required this.owner,
|
@required this.owner,
|
||||||
@ -31,6 +32,7 @@ class RepositoryItem extends StatelessWidget {
|
|||||||
this.note,
|
this.note,
|
||||||
this.iconData,
|
this.iconData,
|
||||||
@required this.url,
|
@required this.url,
|
||||||
|
@required this.avatarLink,
|
||||||
});
|
});
|
||||||
|
|
||||||
RepositoryItem.gl({
|
RepositoryItem.gl({
|
||||||
@ -46,6 +48,7 @@ class RepositoryItem extends StatelessWidget {
|
|||||||
this.primaryLanguageColor,
|
this.primaryLanguageColor,
|
||||||
this.note,
|
this.note,
|
||||||
}) : url = '/gitlab/projects/$id',
|
}) : url = '/gitlab/projects/$id',
|
||||||
|
avatarLink = '/gitlab/user/$id',
|
||||||
iconData = _buildGlIconData(visibility);
|
iconData = _buildGlIconData(visibility);
|
||||||
|
|
||||||
RepositoryItem.gh({
|
RepositoryItem.gh({
|
||||||
@ -61,6 +64,7 @@ class RepositoryItem extends StatelessWidget {
|
|||||||
@required bool isPrivate,
|
@required bool isPrivate,
|
||||||
@required bool isFork,
|
@required bool isFork,
|
||||||
}) : iconData = _buildIconData(isPrivate, isFork),
|
}) : iconData = _buildIconData(isPrivate, isFork),
|
||||||
|
avatarLink = '/$owner',
|
||||||
url = '/$owner/$name';
|
url = '/$owner/$name';
|
||||||
|
|
||||||
static IconData _buildIconData(bool isPrivate, bool isFork) {
|
static IconData _buildIconData(bool isPrivate, bool isFork) {
|
||||||
@ -101,7 +105,7 @@ class RepositoryItem extends StatelessWidget {
|
|||||||
Avatar(
|
Avatar(
|
||||||
url: avatarUrl,
|
url: avatarUrl,
|
||||||
size: AvatarSize.small,
|
size: AvatarSize.small,
|
||||||
linkUrl: '/$owner',
|
linkUrl: avatarLink,
|
||||||
),
|
),
|
||||||
SizedBox(width: 8),
|
SizedBox(width: 8),
|
||||||
Expanded(
|
Expanded(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user