diff options
author | silverwind <me@silverwind.io> | 2022-08-09 14:37:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-09 14:37:34 +0200 |
commit | 1b2cd4c4e19c78390be329b4a3ad50ff8857ca8d (patch) | |
tree | c3c9af67b599f92af60c9cd5bb7feee056d97734 /templates/repo | |
parent | 36f9ee5813beba0fc4b394a5db636f76afc5cc38 (diff) | |
download | gitea-1b2cd4c4e19c78390be329b4a3ad50ff8857ca8d.tar.gz gitea-1b2cd4c4e19c78390be329b4a3ad50ff8857ca8d.zip |
Replace fomantic popup module with tippy.js (#20428)
- replace fomantic popup module with tippy.js
- fix chaining and add comment
- add 100ms delay to tooltips
- stopwatch improvments, raise default maxWidth
- update web_src/js/features/common-global.js
- use type=submit instead of js
Diffstat (limited to 'templates/repo')
-rw-r--r-- | templates/repo/commit_statuses.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/diff/stats.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/header.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/issue/view_content/add_reaction.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/settings/deploy_keys.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/settings/webhook/history.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/view_file.tmpl | 22 |
7 files changed, 12 insertions, 22 deletions
diff --git a/templates/repo/commit_statuses.tmpl b/templates/repo/commit_statuses.tmpl index aabbc88c7b..893887736c 100644 --- a/templates/repo/commit_statuses.tmpl +++ b/templates/repo/commit_statuses.tmpl @@ -1,5 +1,5 @@ <a class="ui link commit-statuses-trigger">{{template "repo/commit_status" .Status}}</a> -<div class="ui popup very wide fixed basic commit-statuses"> +<div class="ui commit-statuses-popup commit-statuses hide"> <div class="ui relaxed list divided"> {{range .Statuses}} <div class="ui item singular-status df"> diff --git a/templates/repo/diff/stats.tmpl b/templates/repo/diff/stats.tmpl index 505826a1fa..fd1cb019a1 100644 --- a/templates/repo/diff/stats.tmpl +++ b/templates/repo/diff/stats.tmpl @@ -1,4 +1,4 @@ {{Add .file.Addition .file.Deletion}} -<span class="diff-stats-bar tooltip mx-3" data-content="{{.root.locale.Tr "repo.diff.stats_desc_file" (Add .file.Addition .file.Deletion) .file.Addition .file.Deletion | Str2html}}" data-variation="wide"> +<span class="diff-stats-bar tooltip mx-3" data-content="{{.root.locale.Tr "repo.diff.stats_desc_file" (Add .file.Addition .file.Deletion) .file.Addition .file.Deletion | Str2html}}"> <div class="diff-stats-add-bar" style="width: {{DiffStatsWidth .file.Addition .file.Deletion}}%"></div> </span> diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl index fa0fb79813..87a4a2fdaf 100644 --- a/templates/repo/header.tmpl +++ b/templates/repo/header.tmpl @@ -98,7 +98,7 @@ {{else if and (not $.CanSignedUserFork) (eq (len $.UserAndOrgForks) 0)}} data-content="{{$.locale.Tr "repo.fork_from_self"}}" {{end}} - data-position="top center" data-variation="tiny" tabindex="0"> + data-position="top center" tabindex="0"> <a class="ui compact{{if $.ShowForkModal}} show-modal{{end}} small basic button" {{if not $.CanSignedUserFork}} {{if gt (len $.UserAndOrgForks) 1}} diff --git a/templates/repo/issue/view_content/add_reaction.tmpl b/templates/repo/issue/view_content/add_reaction.tmpl index 9f4fb21cef..1d0ddb62a9 100644 --- a/templates/repo/issue/view_content/add_reaction.tmpl +++ b/templates/repo/issue/view_content/add_reaction.tmpl @@ -7,7 +7,7 @@ <div class="header">{{ .ctx.locale.Tr "repo.pick_reaction"}}</div> <div class="divider"></div> {{range $value := AllowedReactions}} - <div class="item reaction" data-content="{{$value}}">{{ReactionToEmoji $value}}</div> + <div class="item reaction tooltip" data-content="{{$value}}">{{ReactionToEmoji $value}}</div> {{end}} </div> </div> diff --git a/templates/repo/settings/deploy_keys.tmpl b/templates/repo/settings/deploy_keys.tmpl index 0a7e614ca8..2f8a4c6c1e 100644 --- a/templates/repo/settings/deploy_keys.tmpl +++ b/templates/repo/settings/deploy_keys.tmpl @@ -56,7 +56,7 @@ </button> </div> <div class="left floated content"> - <i class="{{if .HasRecentActivity}}green{{end}}" {{if .HasRecentActivity}}data-content="{{$.locale.Tr "settings.key_state_desc"}}" data-variation="inverted"{{end}}>{{svg "octicon-key" 32}}</i> + <i class="tooltip{{if .HasRecentActivity}} green{{end}}" {{if .HasRecentActivity}}data-content="{{$.locale.Tr "settings.key_state_desc"}}"{{end}}>{{svg "octicon-key" 32}}</i> </div> <div class="content"> <strong>{{.Name}}</strong> diff --git a/templates/repo/settings/webhook/history.tmpl b/templates/repo/settings/webhook/history.tmpl index d3d84c1439..e99ff6a0b9 100644 --- a/templates/repo/settings/webhook/history.tmpl +++ b/templates/repo/settings/webhook/history.tmpl @@ -44,7 +44,7 @@ <div class="right menu"> <form class="item" action="{{$.Link}}/replay/{{.UUID}}" method="post"> {{$.CsrfTokenHtml}} - <button class="ui tiny button tooltip" data-content="{{$.locale.Tr "repo.settings.webhook.replay.description"}}" data-variation="inverted tiny">{{svg "octicon-sync"}}</button> + <button class="ui tiny button tooltip" data-content="{{$.locale.Tr "repo.settings.webhook.replay.description"}}">{{svg "octicon-sync"}}</button> </form> </div> {{end}} diff --git a/templates/repo/view_file.tmpl b/templates/repo/view_file.tmpl index 3ba8350dcb..a25fe28c97 100644 --- a/templates/repo/view_file.tmpl +++ b/templates/repo/view_file.tmpl @@ -120,22 +120,12 @@ {{end}} </tbody> </table> - <div class="code-line-menu ui fluid popup transition hidden"> - <div class="ui column relaxed equal height"> - <div class="column"> - {{if $.Permission.CanRead $.UnitTypeIssues}} - <div class="ui link list"> - <a class="item ref-in-new-issue" href="{{.RepoLink}}/issues/new?body={{.Repository.HTMLURL}}{{printf "/src/commit/" }}{{PathEscape .CommitID}}/{{PathEscapeSegments .TreePath}}" rel="nofollow noindex">{{.locale.Tr "repo.issues.context.reference_issue"}}</a> - </div> - {{end}} - <div class="ui link list"> - <a class="item view_git_blame" href="{{.Repository.HTMLURL}}/blame/commit/{{PathEscape .CommitID}}/{{PathEscapeSegments .TreePath}}">{{.locale.Tr "repo.view_git_blame"}}</a> - </div> - <div class="ui link list"> - <a data-clipboard-text="{{.Repository.HTMLURL}}/src/commit/{{PathEscape .CommitID}}/{{PathEscapeSegments .TreePath}}" class="item copy-line-permalink">{{.locale.Tr "repo.file_copy_permalink"}}</a> - </div> - </div> - </div> + <div class="code-line-menu ui vertical pointing menu hide"> + {{if $.Permission.CanRead $.UnitTypeIssues}} + <a class="item ref-in-new-issue" href="{{.RepoLink}}/issues/new?body={{.Repository.HTMLURL}}{{printf "/src/commit/" }}{{PathEscape .CommitID}}/{{PathEscapeSegments .TreePath}}" rel="nofollow noindex">{{.locale.Tr "repo.issues.context.reference_issue"}}</a> + {{end}} + <a class="item view_git_blame" href="{{.Repository.HTMLURL}}/blame/commit/{{PathEscape .CommitID}}/{{PathEscapeSegments .TreePath}}">{{.locale.Tr "repo.view_git_blame"}}</a> + <a class="item copy-line-permalink" data-url="{{.Repository.HTMLURL}}/src/commit/{{PathEscape .CommitID}}/{{PathEscapeSegments .TreePath}}">{{.locale.Tr "repo.file_copy_permalink"}}</a> </div> {{end}} {{end}} |