mirror of
https://github.com/git-touch/git-touch
synced 2024-12-18 11:19:28 +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,
|
||||
forkCount: v.forksCount,
|
||||
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 note;
|
||||
final String url;
|
||||
final String avatarLink;
|
||||
|
||||
RepositoryItem({
|
||||
@required this.owner,
|
||||
@ -31,6 +32,7 @@ class RepositoryItem extends StatelessWidget {
|
||||
this.note,
|
||||
this.iconData,
|
||||
@required this.url,
|
||||
@required this.avatarLink,
|
||||
});
|
||||
|
||||
RepositoryItem.gl({
|
||||
@ -46,6 +48,7 @@ class RepositoryItem extends StatelessWidget {
|
||||
this.primaryLanguageColor,
|
||||
this.note,
|
||||
}) : url = '/gitlab/projects/$id',
|
||||
avatarLink = '/gitlab/user/$id',
|
||||
iconData = _buildGlIconData(visibility);
|
||||
|
||||
RepositoryItem.gh({
|
||||
@ -61,6 +64,7 @@ class RepositoryItem extends StatelessWidget {
|
||||
@required bool isPrivate,
|
||||
@required bool isFork,
|
||||
}) : iconData = _buildIconData(isPrivate, isFork),
|
||||
avatarLink = '/$owner',
|
||||
url = '/$owner/$name';
|
||||
|
||||
static IconData _buildIconData(bool isPrivate, bool isFork) {
|
||||
@ -101,7 +105,7 @@ class RepositoryItem extends StatelessWidget {
|
||||
Avatar(
|
||||
url: avatarUrl,
|
||||
size: AvatarSize.small,
|
||||
linkUrl: '/$owner',
|
||||
linkUrl: avatarLink,
|
||||
),
|
||||
SizedBox(width: 8),
|
||||
Expanded(
|
||||
|
Loading…
Reference in New Issue
Block a user