Minor tweaks
This commit is contained in:
parent
9db4dbd1e7
commit
6a2e5d0809
|
@ -85,7 +85,7 @@ func PaginateMuteList(user *User, pager *Pagination) ([]*User, error) {
|
||||||
return nil, result.Error
|
return nil, result.Error
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now of these friends get their User objects.
|
// Now of these users get their User objects.
|
||||||
for _, b := range ms {
|
for _, b := range ms {
|
||||||
userIDs = append(userIDs, b.TargetUserID)
|
userIDs = append(userIDs, b.TargetUserID)
|
||||||
}
|
}
|
||||||
|
@ -101,9 +101,3 @@ func RemoveMutedUser(sourceUserID, targetUserID uint64, ctx MutedUserContext) er
|
||||||
).Delete(&MutedUser{})
|
).Delete(&MutedUser{})
|
||||||
return result.Error
|
return result.Error
|
||||||
}
|
}
|
||||||
|
|
||||||
// Save photo.
|
|
||||||
func (m *MutedUser) Save() error {
|
|
||||||
result := DB.Save(m)
|
|
||||||
return result.Error
|
|
||||||
}
|
|
||||||
|
|
|
@ -91,13 +91,11 @@
|
||||||
<!-- Reusable "mute site gallery" component -->
|
<!-- Reusable "mute site gallery" component -->
|
||||||
<!-- Parameter: the photo owner User object -->
|
<!-- Parameter: the photo owner User object -->
|
||||||
{{define "mute-site-gallery"}}
|
{{define "mute-site-gallery"}}
|
||||||
<div class="columns is-centered is-mobile">
|
<div class="has-text-centered">
|
||||||
<div class="column is-narrow">
|
<a href="/users/mutelist/add?username={{.User.Username}}&context=site_gallery&next={{.Request.URL.String}}" class="has-text-grey is-size-7">
|
||||||
<a href="/users/mutelist/add?username={{.User.Username}}&context=site_gallery&next={{.Request.URL.String}}" class="has-text-grey is-size-7">
|
<i class="fa fa-eye-slash"></i>
|
||||||
<i class="fa fa-eye-slash"></i>
|
Don't show {{.User.Username}}'s photos
|
||||||
Don't show {{.User.Username}}'s photos
|
</a>
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
|
@ -604,7 +602,7 @@
|
||||||
|
|
||||||
<!-- Like & Comments buttons -->
|
<!-- Like & Comments buttons -->
|
||||||
{{if not $Root.AdminView}}
|
{{if not $Root.AdminView}}
|
||||||
<div class="mt-4 columns is-centered is-mobile is-gapless">
|
<div class="mt-4 mb-2 columns is-centered is-mobile is-gapless">
|
||||||
<div class="column is-narrow mr-1">
|
<div class="column is-narrow mr-1">
|
||||||
{{$Like := $Root.LikeMap.Get .ID}}
|
{{$Like := $Root.LikeMap.Get .ID}}
|
||||||
<button type="button" class="button is-small nonshy-like-button"
|
<button type="button" class="button is-small nonshy-like-button"
|
||||||
|
@ -736,7 +734,7 @@
|
||||||
|
|
||||||
<!-- Like & Comments buttons -->
|
<!-- Like & Comments buttons -->
|
||||||
{{if not $Root.AdminView}}
|
{{if not $Root.AdminView}}
|
||||||
<div class="mt-4 columns is-centered is-mobile is-gapless">
|
<div class="mt-4 mb-2 columns is-centered is-mobile is-gapless">
|
||||||
<div class="column is-narrow mr-1">
|
<div class="column is-narrow mr-1">
|
||||||
{{$Like := $Root.LikeMap.Get .ID}}
|
{{$Like := $Root.LikeMap.Get .ID}}
|
||||||
<button type="button" class="button is-small nonshy-like-button"
|
<button type="button" class="button is-small nonshy-like-button"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user