Skip to content

Commit af941ab

Browse files
committed
add theme color, link to avatar settings section from user profile
1 parent 356bf32 commit af941ab

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

templates/shared/user/profile_big_avatar.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div id="profile-avatar-card" class="ui card">
22
<div id="profile-avatar" class="content tw-flex">
33
{{if eq .SignedUserID .ContextUser.ID}}
4-
<a class="image" href="{{AppSubUrl}}/user/settings" data-tooltip-content="{{ctx.Locale.Tr "user.change_avatar"}}">
4+
<a class="image" href="{{AppSubUrl}}/user/settings#avatar" data-tooltip-content="{{ctx.Locale.Tr "user.change_avatar"}}">
55
{{/* the size doesn't take affect (and no need to take affect), image size(width) should be controlled by the parent container since this is not a flex layout*/}}
66
{{ctx.AvatarUtils.Avatar .ContextUser 256}}
77
</a>

templates/user/settings/profile.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
<h4 class="ui top attached header">
101101
{{ctx.Locale.Tr "settings.avatar"}}
102102
</h4>
103-
<div class="ui attached segment">
103+
<div class="ui attached segment" id="avatar">
104104
<form class="ui form" action="{{.Link}}/avatar" method="post" enctype="multipart/form-data">
105105
{{.CsrfTokenHtml}}
106106
{{if not .DisableGravatar}}

web_src/js/features/comp/Cropper.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ async function initCompCropper({container, fileInput, imageSource}: CropperOpts)
1313
let currentFileLastModified = 0;
1414

1515
const canvasEl = createElementFromHTML<CropperCanvas>(`
16-
<cropper-canvas background>
16+
<cropper-canvas background theme-color="var(--color-primary)">
1717
<cropper-image src="${imageSource.src}" scalable skewable translatable></cropper-image>
1818
<cropper-shade hidden></cropper-shade>
1919
<cropper-handle action="select" plain></cropper-handle>
20-
<cropper-selection initial-coverage="0.5" initial-aspect-ratio="1" movable resizable>
20+
<cropper-selection initial-coverage="0.5" initial-aspect-ratio="1" movable resizable outlined>
2121
<cropper-grid role="grid" covered></cropper-grid>
2222
<cropper-crosshair centered></cropper-crosshair>
2323
<cropper-handle action="move" theme-color="#ffffff23"></cropper-handle>

0 commit comments

Comments
 (0)