Browse Source

#3027 【易用性建议】关于邮件易用性建议

pull/3270/head
chenshihai 2 years ago
parent
commit
39e63e9c8e
3 changed files with 54 additions and 1 deletions
  1. +5
    -0
      options/locale/locale_en-US.ini
  2. +5
    -0
      options/locale/locale_zh-CN.ini
  3. +44
    -1
      templates/repo/header.tmpl

+ 5
- 0
options/locale/locale_en-US.ini View File

@@ -1392,6 +1392,11 @@ star = Star
fork = Fork fork = Fork
download_archive = Download Repository download_archive = Download Repository
star_fail=Failed to %s the dataset. star_fail=Failed to %s the dataset.
watched=Watched
notWatched=Not watched
un_watch=Unwatch
watch_all=Watch all
watch_no_notify=Watch but not notify


no_desc = No Description no_desc = No Description
no_label = No labels no_label = No labels


+ 5
- 0
options/locale/locale_zh-CN.ini View File

@@ -1409,6 +1409,11 @@ star=点赞
fork=派生 fork=派生
download_archive=下载此项目 download_archive=下载此项目
star_fail=%s失败。 star_fail=%s失败。
watched=已关注
notWatched=未关注
un_watch=不关注
watch_all=关注所有动态
watch_no_notify=关注但不提醒动态




no_desc=暂无描述 no_desc=暂无描述


+ 44
- 1
templates/repo/header.tmpl View File

@@ -51,6 +51,49 @@
</div> </div>
{{if not .IsBeingCreated}} {{if not .IsBeingCreated}}
<div class="repo-buttons"> <div class="repo-buttons">
<div class="ui labeled button" tabindex="0">
<div class="ui compact basic button">
<i class="icon fa-eye{{if not $.IsWatchingRepo}}-slash{{end}}"></i>{{if $.IsWatchingRepo}}{{$.i18n.Tr "repo.watched"}}{{else}}{{$.i18n.Tr "repo.notWatched"}}{{end}}
<div class="ui dropdown floating">
<div class="text" style="display:none;"></div>
<i class="dropdown icon"></i>
{{$WatchNotifyType := or $.WatchNotifyType 0}}
<div class="menu" style="margin-left:-64px;">
<div class="item {{if not $.IsWatchingRepo}}active selected{{end}}">
<form method="post" style="margin: 0;" action="{{$.RepoLink}}/action/unwatch?redirect_to={{$.Link}}">
{{$.CsrfTokenHtml}}
<button type="submit" style="border:none;background:transparent;width:100%;text-align:left;font-weight:inherit;cursor:pointer;">
<i class="check icon" style="{{if $.IsWatchingRepo}}opacity:0{{end}}"></i>
{{$.i18n.Tr "repo.un_watch"}}
</button>
</form>
</div>
<div class="item {{if and $.IsWatchingRepo (eq $WatchNotifyType 9)}}active selected{{end}}">
<form method="post" style="margin: 0;" action="{{$.RepoLink}}/action/watch?redirect_to={{$.Link}}">
{{$.CsrfTokenHtml}}
<button type="submit" style="border:none;background:transparent;width:100%;text-align:left;font-weight:inherit;cursor:pointer;">
<i class="check icon" style="{{if not (and $.IsWatchingRepo (eq $WatchNotifyType 9))}}opacity:0{{end}}"></i>
{{$.i18n.Tr "repo.watch_all"}}
</button>
</form>
</div>
<div class="item {{if and $.IsWatchingRepo (eq $WatchNotifyType 0)}}active selected{{end}}">
<form method="post" style="margin: 0;" action="{{$.RepoLink}}/action/watch_but_reject?redirect_to={{$.Link}}">
{{$.CsrfTokenHtml}}
<button type="submit" style="border:none;background:transparent;width:100%;text-align:left;font-weight:inherit;cursor:pointer;">
<i class="check icon" style="{{if not (and $.IsWatchingRepo (eq $WatchNotifyType 0))}}opacity:0{{end}}"></i>
{{$.i18n.Tr "repo.watch_no_notify"}}
</button>
</form>
</div>
</div>
</div>
</div>
<a class="ui basic label" href="{{.Link}}/watchers">
{{.NumWatches}}
</a>
</div>
<!--
<form method="post" style="margin: 0;" action="{{$.RepoLink}}/action/{{if $.IsWatchingRepo}}un{{end}}watch?redirect_to={{$.Link}}"> <form method="post" style="margin: 0;" action="{{$.RepoLink}}/action/{{if $.IsWatchingRepo}}un{{end}}watch?redirect_to={{$.Link}}">
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}
<div class="ui labeled button" tabindex="0"> <div class="ui labeled button" tabindex="0">
@@ -61,7 +104,7 @@
{{.NumWatches}} {{.NumWatches}}
</a> </a>
</div> </div>
</form>
</form> -->
<form method="post" style="margin: 0;" action="{{$.RepoLink}}/action/{{if $.IsStaringRepo}}un{{end}}star?redirect_to={{$.Link}}"> <form method="post" style="margin: 0;" action="{{$.RepoLink}}/action/{{if $.IsStaringRepo}}un{{end}}star?redirect_to={{$.Link}}">
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}
<div class="ui labeled button" tabindex="0"> <div class="ui labeled button" tabindex="0">


Loading…
Cancel
Save