Migrate gt-hidden
to tw-hidden
(#30046)
We have to define this one in helpers.css because tailwind only generates a single class but certain things rely on this being double-class. Command ran: ```sh perl -p -i -e 's#gt-hidden#tw-hidden#g' web_src/js/**/* templates/**/* models/**/* web_src/css/**/* --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> (cherry picked from commit ec3d467f15a683b305ac165c3eba6683628dcb25) Conflicts: templates/install.tmpl templates/repo/diff/conversation.tmpl templates/repo/issue/view_content/conversation.tmpl templates/repo/issue/view_content/sidebar.tmpl templates/repo/issue/view_title.tmpl resolved by prefering Forgejo version and applying the commands to all files
This commit is contained in:
parent
e28f4328b3
commit
5016bc5d5c
82 changed files with 195 additions and 192 deletions
|
@ -118,7 +118,7 @@ However, there are still some special cases, so the current guideline is:
|
||||||
### Show/Hide Elements
|
### Show/Hide Elements
|
||||||
|
|
||||||
* Vue components are recommended to use `v-if` and `v-show` to show/hide elements.
|
* Vue components are recommended to use `v-if` and `v-show` to show/hide elements.
|
||||||
* Go template code should use Gitea's `.gt-hidden` and `showElem()/hideElem()/toggleElem()`, see more details in `.gt-hidden`'s comment.
|
* Go template code should use `.tw-hidden` and `showElem()/hideElem()/toggleElem()`, see more details in `.tw-hidden`'s comment.
|
||||||
|
|
||||||
### Styles and Attributes in Go HTML Template
|
### Styles and Attributes in Go HTML Template
|
||||||
|
|
||||||
|
|
|
@ -117,7 +117,7 @@ Gitea使用一些补丁使Fomantic UI更具可访问性(参见`aria.js`和`ari
|
||||||
### 显示/隐藏元素
|
### 显示/隐藏元素
|
||||||
|
|
||||||
* 推荐在Vue组件中使用`v-if`和`v-show`来显示/隐藏元素。
|
* 推荐在Vue组件中使用`v-if`和`v-show`来显示/隐藏元素。
|
||||||
* Go 模板代码应使用 Gitea 的 `.gt-hidden` 和 `showElem()/hideElem()/toggleElem()` 来显示/隐藏元素,请参阅`.gt-hidden`的注释以获取更多详细信息。
|
* Go 模板代码应使用 `.tw-hidden` 和 `showElem()/hideElem()/toggleElem()` 来显示/隐藏元素,请参阅`.tw-hidden`的注释以获取更多详细信息。
|
||||||
|
|
||||||
### Go HTML 模板中的样式和属性
|
### Go HTML 模板中的样式和属性
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,8 @@ export default {
|
||||||
// classes that don't work without CSS variables from "@tailwind base" which we don't use
|
// classes that don't work without CSS variables from "@tailwind base" which we don't use
|
||||||
'transform', 'shadow', 'ring', 'blur', 'grayscale', 'invert', '!invert', 'filter', '!filter',
|
'transform', 'shadow', 'ring', 'blur', 'grayscale', 'invert', '!invert', 'filter', '!filter',
|
||||||
'backdrop-filter',
|
'backdrop-filter',
|
||||||
|
// we use double-class tw-hidden defined in web_src/css/helpers.css for increased specificity
|
||||||
|
'hidden',
|
||||||
// unneeded classes
|
// unneeded classes
|
||||||
'[-a-zA-Z:0-9_.]',
|
'[-a-zA-Z:0-9_.]',
|
||||||
],
|
],
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
<label for="port">{{ctx.Locale.Tr "admin.auths.port"}}</label>
|
<label for="port">{{ctx.Locale.Tr "admin.auths.port"}}</label>
|
||||||
<input id="port" name="port" value="{{$cfg.Port}}" placeholder="636" required>
|
<input id="port" name="port" value="{{$cfg.Port}}" placeholder="636" required>
|
||||||
</div>
|
</div>
|
||||||
<div class="has-tls inline field {{if not .HasTLS}}gt-hidden{{end}}">
|
<div class="has-tls inline field {{if not .HasTLS}}tw-hidden{{end}}">
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
<label><strong>{{ctx.Locale.Tr "admin.auths.skip_tls_verify"}}</strong></label>
|
<label><strong>{{ctx.Locale.Tr "admin.auths.skip_tls_verify"}}</strong></label>
|
||||||
<input name="skip_verify" type="checkbox" {{if .Source.SkipVerify}}checked{{end}}>
|
<input name="skip_verify" type="checkbox" {{if .Source.SkipVerify}}checked{{end}}>
|
||||||
|
@ -113,7 +113,7 @@
|
||||||
<input type="checkbox" name="groups_enabled" class="js-ldap-group-toggle" {{if $cfg.GroupsEnabled}}checked{{end}}>
|
<input type="checkbox" name="groups_enabled" class="js-ldap-group-toggle" {{if $cfg.GroupsEnabled}}checked{{end}}>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="ldap-group-options" class="ui segment secondary {{if not $cfg.GroupsEnabled}}gt-hidden{{end}}">
|
<div id="ldap-group-options" class="ui segment secondary {{if not $cfg.GroupsEnabled}}tw-hidden{{end}}">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label>{{ctx.Locale.Tr "admin.auths.group_search_base"}}</label>
|
<label>{{ctx.Locale.Tr "admin.auths.group_search_base"}}</label>
|
||||||
<input name="group_dn" value="{{$cfg.GroupDN}}" placeholder="ou=group,dc=mydomain,dc=com">
|
<input name="group_dn" value="{{$cfg.GroupDN}}" placeholder="ou=group,dc=mydomain,dc=com">
|
||||||
|
@ -148,7 +148,7 @@
|
||||||
<input id="use_paged_search" name="use_paged_search" type="checkbox" {{if $cfg.UsePagedSearch}}checked{{end}}>
|
<input id="use_paged_search" name="use_paged_search" type="checkbox" {{if $cfg.UsePagedSearch}}checked{{end}}>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="field required search-page-size{{if not $cfg.UsePagedSearch}} gt-hidden{{end}}">
|
<div class="field required search-page-size{{if not $cfg.UsePagedSearch}} tw-hidden{{end}}">
|
||||||
<label for="search_page_size">{{ctx.Locale.Tr "admin.auths.search_page_size"}}</label>
|
<label for="search_page_size">{{ctx.Locale.Tr "admin.auths.search_page_size"}}</label>
|
||||||
<input id="search_page_size" name="search_page_size" value="{{if $cfg.UsePagedSearch}}{{$cfg.SearchPageSize}}{{end}}">
|
<input id="search_page_size" name="search_page_size" value="{{if $cfg.UsePagedSearch}}{{$cfg.SearchPageSize}}{{end}}">
|
||||||
</div>
|
</div>
|
||||||
|
@ -205,7 +205,7 @@
|
||||||
</div>
|
</div>
|
||||||
<p class="help">{{ctx.Locale.Tr "admin.auths.force_smtps_helper"}}</p>
|
<p class="help">{{ctx.Locale.Tr "admin.auths.force_smtps_helper"}}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="has-tls inline field {{if not .HasTLS}}gt-hidden{{end}}">
|
<div class="has-tls inline field {{if not .HasTLS}}tw-hidden{{end}}">
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
<label><strong>{{ctx.Locale.Tr "admin.auths.skip_tls_verify"}}</strong></label>
|
<label><strong>{{ctx.Locale.Tr "admin.auths.skip_tls_verify"}}</strong></label>
|
||||||
<input name="skip_verify" type="checkbox" {{if $cfg.SkipVerify}}checked{{end}}>
|
<input name="skip_verify" type="checkbox" {{if $cfg.SkipVerify}}checked{{end}}>
|
||||||
|
|
|
@ -33,13 +33,13 @@
|
||||||
{{template "admin/auth/source/smtp" .}}
|
{{template "admin/auth/source/smtp" .}}
|
||||||
|
|
||||||
<!-- PAM -->
|
<!-- PAM -->
|
||||||
<div class="pam required field {{if not (eq .type 4)}}gt-hidden{{end}}">
|
<div class="pam required field {{if not (eq .type 4)}}tw-hidden{{end}}">
|
||||||
<label for="pam_service_name">{{ctx.Locale.Tr "admin.auths.pam_service_name"}}</label>
|
<label for="pam_service_name">{{ctx.Locale.Tr "admin.auths.pam_service_name"}}</label>
|
||||||
<input id="pam_service_name" name="pam_service_name" value="{{.pam_service_name}}">
|
<input id="pam_service_name" name="pam_service_name" value="{{.pam_service_name}}">
|
||||||
<label for="pam_email_domain">{{ctx.Locale.Tr "admin.auths.pam_email_domain"}}</label>
|
<label for="pam_email_domain">{{ctx.Locale.Tr "admin.auths.pam_email_domain"}}</label>
|
||||||
<input id="pam_email_domain" name="pam_email_domain" value="{{.pam_email_domain}}">
|
<input id="pam_email_domain" name="pam_email_domain" value="{{.pam_email_domain}}">
|
||||||
</div>
|
</div>
|
||||||
<div class="pam optional field {{if not (eq .type 4)}}gt-hidden{{end}}">
|
<div class="pam optional field {{if not (eq .type 4)}}tw-hidden{{end}}">
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
<label for="skip_local_two_fa"><strong>{{ctx.Locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label>
|
<label for="skip_local_two_fa"><strong>{{ctx.Locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label>
|
||||||
<input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if .skip_local_two_fa}}checked{{end}}>
|
<input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if .skip_local_two_fa}}checked{{end}}>
|
||||||
|
@ -59,7 +59,7 @@
|
||||||
<input name="attributes_in_bind" type="checkbox" {{if .attributes_in_bind}}checked{{end}}>
|
<input name="attributes_in_bind" type="checkbox" {{if .attributes_in_bind}}checked{{end}}>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ldap inline field {{if not (eq .type 2)}}gt-hidden{{end}}">
|
<div class="ldap inline field {{if not (eq .type 2)}}tw-hidden{{end}}">
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
<label><strong>{{ctx.Locale.Tr "admin.auths.syncenabled"}}</strong></label>
|
<label><strong>{{ctx.Locale.Tr "admin.auths.syncenabled"}}</strong></label>
|
||||||
<input name="is_sync_enabled" type="checkbox" {{if .is_sync_enabled}}checked{{end}}>
|
<input name="is_sync_enabled" type="checkbox" {{if .is_sync_enabled}}checked{{end}}>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="ldap dldap field {{if not (or (eq .type 2) (eq .type 5))}}gt-hidden{{end}}">
|
<div class="ldap dldap field {{if not (or (eq .type 2) (eq .type 5))}}tw-hidden{{end}}">
|
||||||
<div class="inline required field {{if .Err_SecurityProtocol}}error{{end}}">
|
<div class="inline required field {{if .Err_SecurityProtocol}}error{{end}}">
|
||||||
<label>{{ctx.Locale.Tr "admin.auths.security_protocol"}}</label>
|
<label>{{ctx.Locale.Tr "admin.auths.security_protocol"}}</label>
|
||||||
<div class="ui selection security-protocol dropdown">
|
<div class="ui selection security-protocol dropdown">
|
||||||
|
@ -20,17 +20,17 @@
|
||||||
<label for="port">{{ctx.Locale.Tr "admin.auths.port"}}</label>
|
<label for="port">{{ctx.Locale.Tr "admin.auths.port"}}</label>
|
||||||
<input id="port" name="port" value="{{.port}}" placeholder="636">
|
<input id="port" name="port" value="{{.port}}" placeholder="636">
|
||||||
</div>
|
</div>
|
||||||
<div class="has-tls inline field {{if not .HasTLS}}gt-hidden{{end}}">
|
<div class="has-tls inline field {{if not .HasTLS}}tw-hidden{{end}}">
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
<label><strong>{{ctx.Locale.Tr "admin.auths.skip_tls_verify"}}</strong></label>
|
<label><strong>{{ctx.Locale.Tr "admin.auths.skip_tls_verify"}}</strong></label>
|
||||||
<input name="skip_verify" type="checkbox" {{if .skip_verify}}checked{{end}}>
|
<input name="skip_verify" type="checkbox" {{if .skip_verify}}checked{{end}}>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ldap field {{if not (eq .type 2)}}gt-hidden{{end}}">
|
<div class="ldap field {{if not (eq .type 2)}}tw-hidden{{end}}">
|
||||||
<label for="bind_dn">{{ctx.Locale.Tr "admin.auths.bind_dn"}}</label>
|
<label for="bind_dn">{{ctx.Locale.Tr "admin.auths.bind_dn"}}</label>
|
||||||
<input id="bind_dn" name="bind_dn" value="{{.bind_dn}}" placeholder="cn=Search,dc=mydomain,dc=com">
|
<input id="bind_dn" name="bind_dn" value="{{.bind_dn}}" placeholder="cn=Search,dc=mydomain,dc=com">
|
||||||
</div>
|
</div>
|
||||||
<div class="ldap field {{if not (eq .type 2)}}gt-hidden{{end}}">
|
<div class="ldap field {{if not (eq .type 2)}}tw-hidden{{end}}">
|
||||||
<label for="bind_password">{{ctx.Locale.Tr "admin.auths.bind_password"}}</label>
|
<label for="bind_password">{{ctx.Locale.Tr "admin.auths.bind_password"}}</label>
|
||||||
<input id="bind_password" name="bind_password" type="password" autocomplete="off" value="{{.bind_password}}">
|
<input id="bind_password" name="bind_password" type="password" autocomplete="off" value="{{.bind_password}}">
|
||||||
</div>
|
</div>
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
<label for="user_base">{{ctx.Locale.Tr "admin.auths.user_base"}}</label>
|
<label for="user_base">{{ctx.Locale.Tr "admin.auths.user_base"}}</label>
|
||||||
<input id="user_base" name="user_base" value="{{.user_base}}" placeholder="ou=Users,dc=mydomain,dc=com">
|
<input id="user_base" name="user_base" value="{{.user_base}}" placeholder="ou=Users,dc=mydomain,dc=com">
|
||||||
</div>
|
</div>
|
||||||
<div class="dldap required field {{if not (eq .type 5)}}gt-hidden{{end}}">
|
<div class="dldap required field {{if not (eq .type 5)}}tw-hidden{{end}}">
|
||||||
<label for="user_dn">{{ctx.Locale.Tr "admin.auths.user_dn"}}</label>
|
<label for="user_dn">{{ctx.Locale.Tr "admin.auths.user_dn"}}</label>
|
||||||
<input id="user_dn" name="user_dn" value="{{.user_dn}}" placeholder="uid=%s,ou=Users,dc=mydomain,dc=com">
|
<input id="user_dn" name="user_dn" value="{{.user_dn}}" placeholder="uid=%s,ou=Users,dc=mydomain,dc=com">
|
||||||
</div>
|
</div>
|
||||||
|
@ -115,13 +115,13 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- ldap group end -->
|
<!-- ldap group end -->
|
||||||
|
|
||||||
<div class="ldap inline field {{if not (eq .type 2)}}gt-hidden{{end}}">
|
<div class="ldap inline field {{if not (eq .type 2)}}tw-hidden{{end}}">
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
<label for="use_paged_search"><strong>{{ctx.Locale.Tr "admin.auths.use_paged_search"}}</strong></label>
|
<label for="use_paged_search"><strong>{{ctx.Locale.Tr "admin.auths.use_paged_search"}}</strong></label>
|
||||||
<input id="use_paged_search" name="use_paged_search" class="use-paged-search" type="checkbox" {{if .use_paged_search}}checked{{end}}>
|
<input id="use_paged_search" name="use_paged_search" class="use-paged-search" type="checkbox" {{if .use_paged_search}}checked{{end}}>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ldap field search-page-size required {{if or (not (eq .type 2)) (not .use_paged_search)}}gt-hidden{{end}}">
|
<div class="ldap field search-page-size required {{if or (not (eq .type 2)) (not .use_paged_search)}}tw-hidden{{end}}">
|
||||||
<label for="search_page_size">{{ctx.Locale.Tr "admin.auths.search_page_size"}}</label>
|
<label for="search_page_size">{{ctx.Locale.Tr "admin.auths.search_page_size"}}</label>
|
||||||
<input id="search_page_size" name="search_page_size" value="{{.search_page_size}}">
|
<input id="search_page_size" name="search_page_size" value="{{.search_page_size}}">
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="oauth2 field {{if not (eq .type 6)}}gt-hidden{{end}}">
|
<div class="oauth2 field {{if not (eq .type 6)}}tw-hidden{{end}}">
|
||||||
<div class="inline required field">
|
<div class="inline required field">
|
||||||
<label>{{ctx.Locale.Tr "admin.auths.oauth2_provider"}}</label>
|
<label>{{ctx.Locale.Tr "admin.auths.oauth2_provider"}}</label>
|
||||||
<div class="ui selection type dropdown">
|
<div class="ui selection type dropdown">
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="smtp field {{if not (eq .type 3)}}gt-hidden{{end}}">
|
<div class="smtp field {{if not (eq .type 3)}}tw-hidden{{end}}">
|
||||||
<div class="inline required field">
|
<div class="inline required field">
|
||||||
<label>{{ctx.Locale.Tr "admin.auths.smtp_auth"}}</label>
|
<label>{{ctx.Locale.Tr "admin.auths.smtp_auth"}}</label>
|
||||||
<div class="ui selection type dropdown">
|
<div class="ui selection type dropdown">
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="sspi field {{if not (eq .type 7)}}gt-hidden{{end}}">
|
<div class="sspi field {{if not (eq .type 7)}}tw-hidden{{end}}">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
<label for="sspi_auto_create_users"><strong>{{ctx.Locale.Tr "admin.auths.sspi_auto_create_users"}}</strong></label>
|
<label for="sspi_auto_create_users"><strong>{{ctx.Locale.Tr "admin.auths.sspi_auto_create_users"}}</strong></label>
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="required non-local field {{if .Err_LoginName}}error{{end}} {{if eq .User.LoginSource 0}}gt-hidden{{end}}">
|
<div class="required non-local field {{if .Err_LoginName}}error{{end}} {{if eq .User.LoginSource 0}}tw-hidden{{end}}">
|
||||||
<label for="login_name">{{ctx.Locale.Tr "admin.users.auth_login_name"}}</label>
|
<label for="login_name">{{ctx.Locale.Tr "admin.users.auth_login_name"}}</label>
|
||||||
<input id="login_name" name="login_name" value="{{.User.LoginName}}" autofocus>
|
<input id="login_name" name="login_name" value="{{.User.LoginName}}" autofocus>
|
||||||
</div>
|
</div>
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
<label for="email">{{ctx.Locale.Tr "email"}}</label>
|
<label for="email">{{ctx.Locale.Tr "email"}}</label>
|
||||||
<input id="email" name="email" type="email" value="{{.User.Email}}" autofocus required>
|
<input id="email" name="email" type="email" value="{{.User.Email}}" autofocus required>
|
||||||
</div>
|
</div>
|
||||||
<div class="local field {{if .Err_Password}}error{{end}} {{if not (or (.User.IsLocal) (.User.IsOAuth2))}}gt-hidden{{end}}">
|
<div class="local field {{if .Err_Password}}error{{end}} {{if not (or (.User.IsLocal) (.User.IsOAuth2))}}tw-hidden{{end}}">
|
||||||
<label for="password">{{ctx.Locale.Tr "password"}}</label>
|
<label for="password">{{ctx.Locale.Tr "password"}}</label>
|
||||||
<input id="password" name="password" type="password" autocomplete="new-password">
|
<input id="password" name="password" type="password" autocomplete="new-password">
|
||||||
<p class="help">{{ctx.Locale.Tr "admin.users.password_helper"}}</p>
|
<p class="help">{{ctx.Locale.Tr "admin.users.password_helper"}}</p>
|
||||||
|
@ -128,13 +128,13 @@
|
||||||
<input name="restricted" type="checkbox" {{if .User.IsRestricted}}checked{{end}}>
|
<input name="restricted" type="checkbox" {{if .User.IsRestricted}}checked{{end}}>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="inline field {{if DisableGitHooks}}gt-hidden{{end}}">
|
<div class="inline field {{if DisableGitHooks}}tw-hidden{{end}}">
|
||||||
<div class="ui checkbox" data-tooltip-content="{{ctx.Locale.Tr "admin.users.allow_git_hook_tooltip"}}">
|
<div class="ui checkbox" data-tooltip-content="{{ctx.Locale.Tr "admin.users.allow_git_hook_tooltip"}}">
|
||||||
<label><strong>{{ctx.Locale.Tr "admin.users.allow_git_hook"}}</strong></label>
|
<label><strong>{{ctx.Locale.Tr "admin.users.allow_git_hook"}}</strong></label>
|
||||||
<input name="allow_git_hook" type="checkbox" {{if .User.CanEditGitHook}}checked{{end}} {{if DisableGitHooks}}disabled{{end}}>
|
<input name="allow_git_hook" type="checkbox" {{if .User.CanEditGitHook}}checked{{end}} {{if DisableGitHooks}}disabled{{end}}>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="inline field {{if or (DisableImportLocal) (.DisableMigrations)}}gt-hidden{{end}}">
|
<div class="inline field {{if or (DisableImportLocal) (.DisableMigrations)}}tw-hidden{{end}}">
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
<label><strong>{{ctx.Locale.Tr "admin.users.allow_import_local"}}</strong></label>
|
<label><strong>{{ctx.Locale.Tr "admin.users.allow_import_local"}}</strong></label>
|
||||||
<input name="allow_import_local" type="checkbox" {{if .User.CanImportLocal}}checked{{end}} {{if DisableImportLocal}}disabled{{end}}>
|
<input name="allow_import_local" type="checkbox" {{if .User.CanImportLocal}}checked{{end}} {{if DisableImportLocal}}disabled{{end}}>
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="required non-local field {{if .Err_LoginName}}error{{end}} {{if eq .login_type "0-0"}}gt-hidden{{end}}">
|
<div class="required non-local field {{if .Err_LoginName}}error{{end}} {{if eq .login_type "0-0"}}tw-hidden{{end}}">
|
||||||
<label for="login_name">{{ctx.Locale.Tr "admin.users.auth_login_name"}}</label>
|
<label for="login_name">{{ctx.Locale.Tr "admin.users.auth_login_name"}}</label>
|
||||||
<input id="login_name" name="login_name" value="{{.login_name}}">
|
<input id="login_name" name="login_name" value="{{.login_name}}">
|
||||||
</div>
|
</div>
|
||||||
|
@ -59,12 +59,12 @@
|
||||||
<label for="email">{{ctx.Locale.Tr "email"}}</label>
|
<label for="email">{{ctx.Locale.Tr "email"}}</label>
|
||||||
<input id="email" name="email" type="email" value="{{.email}}" required>
|
<input id="email" name="email" type="email" value="{{.email}}" required>
|
||||||
</div>
|
</div>
|
||||||
<div class="required local field {{if .Err_Password}}error{{end}} {{if not (eq .login_type "0-0")}}gt-hidden{{end}}">
|
<div class="required local field {{if .Err_Password}}error{{end}} {{if not (eq .login_type "0-0")}}tw-hidden{{end}}">
|
||||||
<label for="password">{{ctx.Locale.Tr "password"}}</label>
|
<label for="password">{{ctx.Locale.Tr "password"}}</label>
|
||||||
<input id="password" name="password" type="password" autocomplete="new-password" value="{{.password}}" {{if eq .login_type "0-0"}}required{{end}}>
|
<input id="password" name="password" type="password" autocomplete="new-password" value="{{.password}}" {{if eq .login_type "0-0"}}required{{end}}>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="inline field local {{if ne .login_type "0-0"}}gt-hidden{{end}}">
|
<div class="inline field local {{if ne .login_type "0-0"}}tw-hidden{{end}}">
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
<label><strong>{{ctx.Locale.Tr "auth.allow_password_change"}}</strong></label>
|
<label><strong>{{ctx.Locale.Tr "auth.allow_password_change"}}</strong></label>
|
||||||
<input name="must_change_password" type="checkbox" checked>
|
<input name="must_change_password" type="checkbox" checked>
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<a id="mobile-notifications-icon" class="item tw-w-auto tw-p-2" href="{{AppSubUrl}}/notifications" data-tooltip-content="{{ctx.Locale.Tr "notifications"}}" aria-label="{{ctx.Locale.Tr "notifications"}}">
|
<a id="mobile-notifications-icon" class="item tw-w-auto tw-p-2" href="{{AppSubUrl}}/notifications" data-tooltip-content="{{ctx.Locale.Tr "notifications"}}" aria-label="{{ctx.Locale.Tr "notifications"}}">
|
||||||
<div class="tw-relative">
|
<div class="tw-relative">
|
||||||
{{svg "octicon-bell"}}
|
{{svg "octicon-bell"}}
|
||||||
<span class="notification_count{{if not $notificationUnreadCount}} gt-hidden{{end}}">{{$notificationUnreadCount}}</span>
|
<span class="notification_count{{if not $notificationUnreadCount}} tw-hidden{{end}}">{{$notificationUnreadCount}}</span>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
@ -75,7 +75,7 @@
|
||||||
</div><!-- end dropdown avatar menu -->
|
</div><!-- end dropdown avatar menu -->
|
||||||
{{else if .IsSigned}}
|
{{else if .IsSigned}}
|
||||||
{{if EnableTimetracking}}
|
{{if EnableTimetracking}}
|
||||||
<a class="active-stopwatch-trigger item tw-mx-0{{if not .ActiveStopwatch}} gt-hidden{{end}}" href="{{.ActiveStopwatch.IssueLink}}" title="{{ctx.Locale.Tr "active_stopwatch"}}">
|
<a class="active-stopwatch-trigger item tw-mx-0{{if not .ActiveStopwatch}} tw-hidden{{end}}" href="{{.ActiveStopwatch.IssueLink}}" title="{{ctx.Locale.Tr "active_stopwatch"}}">
|
||||||
<div class="tw-relative">
|
<div class="tw-relative">
|
||||||
{{svg "octicon-stopwatch"}}
|
{{svg "octicon-stopwatch"}}
|
||||||
<span class="header-stopwatch-dot"></span>
|
<span class="header-stopwatch-dot"></span>
|
||||||
|
@ -114,7 +114,7 @@
|
||||||
<a class="item not-mobile tw-mx-0" href="{{AppSubUrl}}/notifications" data-tooltip-content="{{ctx.Locale.Tr "notifications"}}" aria-label="{{ctx.Locale.Tr "notifications"}}">
|
<a class="item not-mobile tw-mx-0" href="{{AppSubUrl}}/notifications" data-tooltip-content="{{ctx.Locale.Tr "notifications"}}" aria-label="{{ctx.Locale.Tr "notifications"}}">
|
||||||
<div class="tw-relative">
|
<div class="tw-relative">
|
||||||
{{svg "octicon-bell"}}
|
{{svg "octicon-bell"}}
|
||||||
<span class="notification_count{{if not $notificationUnreadCount}} gt-hidden{{end}}">{{$notificationUnreadCount}}</span>
|
<span class="notification_count{{if not $notificationUnreadCount}} tw-hidden{{end}}">{{$notificationUnreadCount}}</span>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tw-mt-4 gt-hidden" data-db-setting-for="common-host">
|
<div class="tw-mt-4 tw-hidden" data-db-setting-for="common-host">
|
||||||
<div class="inline required field {{if .Err_DbSetting}}error{{end}}">
|
<div class="inline required field {{if .Err_DbSetting}}error{{end}}">
|
||||||
<label for="db_host">{{ctx.Locale.Tr "install.host"}}</label>
|
<label for="db_host">{{ctx.Locale.Tr "install.host"}}</label>
|
||||||
<input id="db_host" name="db_host" value="{{.db_host}}">
|
<input id="db_host" name="db_host" value="{{.db_host}}">
|
||||||
|
@ -47,7 +47,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tw-mt-4 gt-hidden" data-db-setting-for="postgres">
|
<div class="tw-mt-4 tw-hidden" data-db-setting-for="postgres">
|
||||||
<div class="inline required field">
|
<div class="inline required field">
|
||||||
<label>{{ctx.Locale.Tr "install.ssl_mode"}}</label>
|
<label>{{ctx.Locale.Tr "install.ssl_mode"}}</label>
|
||||||
<div class="ui selection database type dropdown">
|
<div class="ui selection database type dropdown">
|
||||||
|
@ -68,7 +68,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tw-mt-4 gt-hidden" data-db-setting-for="sqlite3">
|
<div class="tw-mt-4 tw-hidden" data-db-setting-for="sqlite3">
|
||||||
<div class="inline required field {{if or .Err_DbPath .Err_DbSetting}}error{{end}}">
|
<div class="inline required field {{if or .Err_DbPath .Err_DbSetting}}error{{end}}">
|
||||||
<label for="db_path">{{ctx.Locale.Tr "install.path"}}</label>
|
<label for="db_path">{{ctx.Locale.Tr "install.path"}}</label>
|
||||||
<input id="db_path" name="db_path" value="{{.db_path}}">
|
<input id="db_path" name="db_path" value="{{.db_path}}">
|
||||||
|
@ -347,5 +347,5 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<img class="gt-hidden" src="{{AssetUrlPrefix}}/img/forgejo-loading.svg" width="256" height="256">
|
<img class="tw-hidden" src="{{AssetUrlPrefix}}/img/forgejo-loading.svg" width="256" height="256">
|
||||||
{{template "base/footer" .}}
|
{{template "base/footer" .}}
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
{{.CsrfTokenHtml}}
|
{{.CsrfTokenHtml}}
|
||||||
<div class="required field {{if .Err_Name}}error{{end}}">
|
<div class="required field {{if .Err_Name}}error{{end}}">
|
||||||
<label for="org_name">{{ctx.Locale.Tr "org.org_name_holder"}}
|
<label for="org_name">{{ctx.Locale.Tr "org.org_name_holder"}}
|
||||||
<span class="text red gt-hidden" id="org-name-change-prompt">
|
<span class="text red tw-hidden" id="org-name-change-prompt">
|
||||||
<br>{{ctx.Locale.Tr "org.settings.change_orgname_prompt"}}<br>{{ctx.Locale.Tr "org.settings.change_orgname_redirect_prompt"}}
|
<br>{{ctx.Locale.Tr "org.settings.change_orgname_prompt"}}<br>{{ctx.Locale.Tr "org.settings.change_orgname_redirect_prompt"}}
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
|
|
|
@ -71,7 +71,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="divider"></div>
|
<div class="divider"></div>
|
||||||
|
|
||||||
<div class="team-units required grouped field {{if eq .Team.AccessMode 3}}gt-hidden{{end}}">
|
<div class="team-units required grouped field {{if eq .Team.AccessMode 3}}tw-hidden{{end}}">
|
||||||
<label>{{ctx.Locale.Tr "org.team_unit_desc"}}</label>
|
<label>{{ctx.Locale.Tr "org.team_unit_desc"}}</label>
|
||||||
<table class="ui celled table">
|
<table class="ui celled table">
|
||||||
<thead>
|
<thead>
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
<a class="ui tiny button" href="{{.RepoLink}}/src/{{.BranchNameSubURL}}/{{.TreePath | PathEscapeSegments}}">{{ctx.Locale.Tr "repo.normal_view"}}</a>
|
<a class="ui tiny button" href="{{.RepoLink}}/src/{{.BranchNameSubURL}}/{{.TreePath | PathEscapeSegments}}">{{ctx.Locale.Tr "repo.normal_view"}}</a>
|
||||||
<a class="ui tiny button" href="{{.RepoLink}}/commits/{{.BranchNameSubURL}}/{{.TreePath | PathEscapeSegments}}">{{ctx.Locale.Tr "repo.file_history"}}</a>
|
<a class="ui tiny button" href="{{.RepoLink}}/commits/{{.BranchNameSubURL}}/{{.TreePath | PathEscapeSegments}}">{{ctx.Locale.Tr "repo.file_history"}}</a>
|
||||||
<button class="ui tiny button unescape-button">{{ctx.Locale.Tr "repo.unescape_control_characters"}}</button>
|
<button class="ui tiny button unescape-button">{{ctx.Locale.Tr "repo.unescape_control_characters"}}</button>
|
||||||
<button class="ui tiny button escape-button gt-hidden">{{ctx.Locale.Tr "repo.escape_control_characters"}}</button>
|
<button class="ui tiny button escape-button tw-hidden">{{ctx.Locale.Tr "repo.escape_control_characters"}}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</h4>
|
</h4>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
data-fetch-url="{{.RepoLink}}/commit/{{.CommitID}}/load-branches-and-tags"
|
data-fetch-url="{{.RepoLink}}/commit/{{.CommitID}}/load-branches-and-tags"
|
||||||
data-tooltip-content="{{ctx.Locale.Tr "repo.commit.load_referencing_branches_and_tags"}}"
|
data-tooltip-content="{{ctx.Locale.Tr "repo.commit.load_referencing_branches_and_tags"}}"
|
||||||
>...</button>
|
>...</button>
|
||||||
<div class="branch-and-tag-detail gt-hidden">
|
<div class="branch-and-tag-detail tw-hidden">
|
||||||
<div class="divider"></div>
|
<div class="divider"></div>
|
||||||
<div>{{ctx.Locale.Tr "repo.commit.contained_in"}}</div>
|
<div>{{ctx.Locale.Tr "repo.commit.contained_in"}}</div>
|
||||||
<div class="tw-flex tw-mt-2">
|
<div class="tw-flex tw-mt-2">
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
{{template "repo/commit_statuses" dict "Status" .Status "Statuses" .Statuses}}
|
{{template "repo/commit_statuses" dict "Status" .Status "Statuses" .Statuses}}
|
||||||
{{if IsMultilineCommitMessage .Message}}
|
{{if IsMultilineCommitMessage .Message}}
|
||||||
<pre class="commit-body gt-hidden">{{RenderCommitBody $.Context .Message ($.Repository.ComposeMetas ctx)}}</pre>
|
<pre class="commit-body tw-hidden">{{RenderCommitBody $.Context .Message ($.Repository.ComposeMetas ctx)}}</pre>
|
||||||
{{end}}
|
{{end}}
|
||||||
</td>
|
</td>
|
||||||
{{if .Committer}}
|
{{if .Committer}}
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
<button class="ui button js-toggle-commit-body ellipsis-button" aria-expanded="false">...</button>
|
<button class="ui button js-toggle-commit-body ellipsis-button" aria-expanded="false">...</button>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if IsMultilineCommitMessage .Message}}
|
{{if IsMultilineCommitMessage .Message}}
|
||||||
<pre class="commit-body gt-hidden">{{RenderCommitBody $.root.Context .Message ($.comment.Issue.PullRequest.BaseRepo.ComposeMetas ctx)}}</pre>
|
<pre class="commit-body tw-hidden">{{RenderCommitBody $.root.Context .Message ($.comment.Issue.PullRequest.BaseRepo.ComposeMetas ctx)}}</pre>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
@ -73,7 +73,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="template_units" class="gt-hidden">
|
<div id="template_units" class="tw-hidden">
|
||||||
<div class="inline field">
|
<div class="inline field">
|
||||||
<label>{{ctx.Locale.Tr "repo.template.items"}}</label>
|
<label>{{ctx.Locale.Tr "repo.template.items"}}</label>
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
|
|
|
@ -5,15 +5,15 @@
|
||||||
{{if $showFileTree}}
|
{{if $showFileTree}}
|
||||||
<button class="diff-toggle-file-tree-button not-mobile btn interact-fg" data-show-text="{{ctx.Locale.Tr "repo.diff.show_file_tree"}}" data-hide-text="{{ctx.Locale.Tr "repo.diff.hide_file_tree"}}">
|
<button class="diff-toggle-file-tree-button not-mobile btn interact-fg" data-show-text="{{ctx.Locale.Tr "repo.diff.show_file_tree"}}" data-hide-text="{{ctx.Locale.Tr "repo.diff.hide_file_tree"}}">
|
||||||
{{/* the icon meaning is reversed here, "octicon-sidebar-collapse" means show the file tree */}}
|
{{/* the icon meaning is reversed here, "octicon-sidebar-collapse" means show the file tree */}}
|
||||||
{{svg "octicon-sidebar-collapse" 20 "icon gt-hidden"}}
|
{{svg "octicon-sidebar-collapse" 20 "icon tw-hidden"}}
|
||||||
{{svg "octicon-sidebar-expand" 20 "icon gt-hidden"}}
|
{{svg "octicon-sidebar-expand" 20 "icon tw-hidden"}}
|
||||||
</button>
|
</button>
|
||||||
<script>
|
<script>
|
||||||
// Default to true if unset
|
// Default to true if unset
|
||||||
const diffTreeVisible = localStorage?.getItem('diff_file_tree_visible') !== 'false';
|
const diffTreeVisible = localStorage?.getItem('diff_file_tree_visible') !== 'false';
|
||||||
const diffTreeBtn = document.querySelector('.diff-toggle-file-tree-button');
|
const diffTreeBtn = document.querySelector('.diff-toggle-file-tree-button');
|
||||||
const diffTreeIcon = `.octicon-sidebar-${diffTreeVisible ? 'expand' : 'collapse'}`;
|
const diffTreeIcon = `.octicon-sidebar-${diffTreeVisible ? 'expand' : 'collapse'}`;
|
||||||
diffTreeBtn.querySelector(diffTreeIcon).classList.remove('gt-hidden');
|
diffTreeBtn.querySelector(diffTreeIcon).classList.remove('tw-hidden');
|
||||||
diffTreeBtn.setAttribute('data-tooltip-content', diffTreeBtn.getAttribute(diffTreeVisible ? 'data-hide-text' : 'data-show-text'));
|
diffTreeBtn.setAttribute('data-tooltip-content', diffTreeBtn.getAttribute(diffTreeVisible ? 'data-hide-text' : 'data-show-text'));
|
||||||
</script>
|
</script>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
@ -89,9 +89,9 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
<div id="diff-container">
|
<div id="diff-container">
|
||||||
{{if $showFileTree}}
|
{{if $showFileTree}}
|
||||||
<div id="diff-file-tree" class="gt-hidden not-mobile"></div>
|
<div id="diff-file-tree" class="tw-hidden not-mobile"></div>
|
||||||
<script>
|
<script>
|
||||||
if (diffTreeVisible) document.getElementById('diff-file-tree').classList.remove('gt-hidden');
|
if (diffTreeVisible) document.getElementById('diff-file-tree').classList.remove('tw-hidden');
|
||||||
</script>
|
</script>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if .DiffNotAvailable}}
|
{{if .DiffNotAvailable}}
|
||||||
|
@ -159,7 +159,7 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if not (or $file.IsIncomplete $file.IsBin $file.IsSubmodule)}}
|
{{if not (or $file.IsIncomplete $file.IsBin $file.IsSubmodule)}}
|
||||||
<button class="ui basic tiny button unescape-button not-mobile">{{ctx.Locale.Tr "repo.unescape_control_characters"}}</button>
|
<button class="ui basic tiny button unescape-button not-mobile">{{ctx.Locale.Tr "repo.unescape_control_characters"}}</button>
|
||||||
<button class="ui basic tiny button escape-button gt-hidden">{{ctx.Locale.Tr "repo.escape_control_characters"}}</button>
|
<button class="ui basic tiny button escape-button tw-hidden">{{ctx.Locale.Tr "repo.escape_control_characters"}}</button>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if and (not $file.IsSubmodule) (not $.PageIsWiki)}}
|
{{if and (not $file.IsSubmodule) (not $.PageIsWiki)}}
|
||||||
{{if $file.IsDeleted}}
|
{{if $file.IsDeleted}}
|
||||||
|
@ -179,7 +179,7 @@
|
||||||
</div>
|
</div>
|
||||||
</h4>
|
</h4>
|
||||||
<div class="diff-file-body ui attached unstackable table segment" {{if and $file.IsViewed $.IsShowingAllCommits}}data-folded="true"{{end}}>
|
<div class="diff-file-body ui attached unstackable table segment" {{if and $file.IsViewed $.IsShowingAllCommits}}data-folded="true"{{end}}>
|
||||||
<div id="diff-source-{{$file.NameHash}}" class="file-body file-code unicode-escaped code-diff{{if $.IsSplitStyle}} code-diff-split{{else}} code-diff-unified{{end}}{{if $showFileViewToggle}} gt-hidden{{end}}">
|
<div id="diff-source-{{$file.NameHash}}" class="file-body file-code unicode-escaped code-diff{{if $.IsSplitStyle}} code-diff-split{{else}} code-diff-unified{{end}}{{if $showFileViewToggle}} tw-hidden{{end}}">
|
||||||
{{if or $file.IsIncomplete $file.IsBin}}
|
{{if or $file.IsIncomplete $file.IsBin}}
|
||||||
<div class="diff-file-body binary">
|
<div class="diff-file-body binary">
|
||||||
{{if $file.IsIncomplete}}
|
{{if $file.IsIncomplete}}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{{if and $.root.SignedUserID (not $.Repository.IsArchived)}}
|
{{if and $.root.SignedUserID (not $.Repository.IsArchived)}}
|
||||||
<form class="ui form {{if $.hidden}}gt-hidden comment-form{{end}}" action="{{$.root.Issue.Link}}/files/reviews/comments" method="post">
|
<form class="ui form {{if $.hidden}}tw-hidden comment-form{{end}}" action="{{$.root.Issue.Link}}/files/reviews/comments" method="post">
|
||||||
{{$.root.CsrfTokenHtml}}
|
{{$.root.CsrfTokenHtml}}
|
||||||
<input type="hidden" name="origin" value="{{if $.root.PageIsPullFiles}}diff{{else}}timeline{{end}}">
|
<input type="hidden" name="origin" value="{{if $.root.PageIsPullFiles}}diff{{else}}timeline{{end}}">
|
||||||
<input type="hidden" name="latest_commit_id" value="{{$.root.AfterCommitID}}">
|
<input type="hidden" name="latest_commit_id" value="{{$.root.AfterCommitID}}">
|
||||||
|
|
|
@ -60,8 +60,8 @@
|
||||||
<span class="no-content">{{ctx.Locale.Tr "repo.issues.no_content"}}</span>
|
<span class="no-content">{{ctx.Locale.Tr "repo.issues.no_content"}}</span>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
<div id="issuecomment-{{.ID}}-raw" class="raw-content gt-hidden">{{.Content}}</div>
|
<div id="issuecomment-{{.ID}}-raw" class="raw-content tw-hidden">{{.Content}}</div>
|
||||||
<div class="edit-content-zone gt-hidden" data-update-url="{{$.root.RepoLink}}/comments/{{.ID}}" data-context="{{$.root.RepoLink}}" data-attachment-url="{{$.root.RepoLink}}/comments/{{.ID}}/attachments"></div>
|
<div class="edit-content-zone tw-hidden" data-update-url="{{$.root.RepoLink}}/comments/{{.ID}}" data-context="{{$.root.RepoLink}}" data-attachment-url="{{$.root.RepoLink}}/comments/{{.ID}}/attachments"></div>
|
||||||
{{if .Attachments}}
|
{{if .Attachments}}
|
||||||
{{template "repo/issue/view_content/attachments" dict "Attachments" .Attachments "RenderedContent" .RenderedContent}}
|
{{template "repo/issue/view_content/attachments" dict "Attachments" .Attachments "RenderedContent" .RenderedContent}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
@ -75,7 +75,7 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
<div class="scrolling menu reference-list-menu base-tag-list gt-hidden">
|
<div class="scrolling menu reference-list-menu base-tag-list tw-hidden">
|
||||||
{{range .Tags}}
|
{{range .Tags}}
|
||||||
<div class="item {{if eq $.BaseBranch .}}selected{{end}}" data-url="{{$.RepoLink}}/compare/{{PathEscapeSegments .}}{{$.CompareSeparator}}{{if not $.PullRequestCtx.SameRepo}}{{PathEscape $.HeadUser.Name}}/{{PathEscape $.HeadRepo.Name}}:{{end}}{{PathEscapeSegments $.HeadBranch}}">{{$BaseCompareName}}:{{.}}</div>
|
<div class="item {{if eq $.BaseBranch .}}selected{{end}}" data-url="{{$.RepoLink}}/compare/{{PathEscapeSegments .}}{{$.CompareSeparator}}{{if not $.PullRequestCtx.SameRepo}}{{PathEscape $.HeadUser.Name}}/{{PathEscape $.HeadRepo.Name}}:{{end}}{{PathEscapeSegments $.HeadBranch}}">{{$BaseCompareName}}:{{.}}</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
@ -144,7 +144,7 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
<div class="scrolling menu reference-list-menu head-tag-list gt-hidden">
|
<div class="scrolling menu reference-list-menu head-tag-list tw-hidden">
|
||||||
{{range .HeadTags}}
|
{{range .HeadTags}}
|
||||||
<div class="{{if eq $.HeadBranch .}}selected{{end}} item" data-url="{{$.RepoLink}}/compare/{{PathEscapeSegments $.BaseBranch}}{{$.CompareSeparator}}{{if not $.PullRequestCtx.SameRepo}}{{PathEscape $.HeadUser.Name}}/{{PathEscape $.HeadRepo.Name}}:{{end}}{{PathEscapeSegments .}}">{{$HeadCompareName}}:{{.}}</div>
|
<div class="{{if eq $.HeadBranch .}}selected{{end}} item" data-url="{{$.RepoLink}}/compare/{{PathEscapeSegments $.BaseBranch}}{{$.CompareSeparator}}{{if not $.PullRequestCtx.SameRepo}}{{PathEscape $.HeadUser.Name}}/{{PathEscape $.HeadRepo.Name}}:{{end}}{{PathEscapeSegments .}}">{{$HeadCompareName}}:{{.}}</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
@ -171,10 +171,10 @@
|
||||||
{{if .IsNothingToCompare}}
|
{{if .IsNothingToCompare}}
|
||||||
{{if and $.IsSigned $.AllowEmptyPr (not .Repository.IsArchived) .PageIsComparePull}}
|
{{if and $.IsSigned $.AllowEmptyPr (not .Repository.IsArchived) .PageIsComparePull}}
|
||||||
<div class="ui segment">{{ctx.Locale.Tr "repo.pulls.nothing_to_compare_and_allow_empty_pr"}}</div>
|
<div class="ui segment">{{ctx.Locale.Tr "repo.pulls.nothing_to_compare_and_allow_empty_pr"}}</div>
|
||||||
<div class="ui info message show-form-container {{if .Flash}}gt-hidden{{end}}">
|
<div class="ui info message show-form-container {{if .Flash}}tw-hidden{{end}}">
|
||||||
<button class="ui button primary show-form">{{ctx.Locale.Tr "repo.pulls.new"}}</button>
|
<button class="ui button primary show-form">{{ctx.Locale.Tr "repo.pulls.new"}}</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="pullrequest-form {{if not .Flash}}gt-hidden{{end}}">
|
<div class="pullrequest-form {{if not .Flash}}tw-hidden{{end}}">
|
||||||
{{template "repo/issue/new_form" .}}
|
{{template "repo/issue/new_form" .}}
|
||||||
</div>
|
</div>
|
||||||
{{else if and .HeadIsBranch .BaseIsBranch}}
|
{{else if and .HeadIsBranch .BaseIsBranch}}
|
||||||
|
@ -204,7 +204,7 @@
|
||||||
</div>
|
</div>
|
||||||
{{else}}
|
{{else}}
|
||||||
{{if and $.IsSigned (not .Repository.IsArchived)}}
|
{{if and $.IsSigned (not .Repository.IsArchived)}}
|
||||||
<div class="ui info message show-form-container {{if .Flash}}gt-hidden{{end}}">
|
<div class="ui info message show-form-container {{if .Flash}}tw-hidden{{end}}">
|
||||||
<button class="ui button primary show-form">{{ctx.Locale.Tr "repo.pulls.new"}}</button>
|
<button class="ui button primary show-form">{{ctx.Locale.Tr "repo.pulls.new"}}</button>
|
||||||
</div>
|
</div>
|
||||||
{{else if .Repository.IsArchived}}
|
{{else if .Repository.IsArchived}}
|
||||||
|
@ -217,7 +217,7 @@
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if $.IsSigned}}
|
{{if $.IsSigned}}
|
||||||
<div class="pullrequest-form {{if not .Flash}}gt-hidden{{end}}">
|
<div class="pullrequest-form {{if not .Flash}}tw-hidden{{end}}">
|
||||||
{{template "repo/issue/new_form" .}}
|
{{template "repo/issue/new_form" .}}
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
@ -24,14 +24,14 @@
|
||||||
{{svg "octicon-unfold" 16 "tw-mr-2"}}
|
{{svg "octicon-unfold" 16 "tw-mr-2"}}
|
||||||
{{ctx.Locale.Tr "repo.issues.review.show_resolved"}}
|
{{ctx.Locale.Tr "repo.issues.review.show_resolved"}}
|
||||||
</button>
|
</button>
|
||||||
<button id="hide-outdated-{{(index .comments 0).ID}}" data-comment="{{(index .comments 0).ID}}" class="ui tiny labeled button hide-outdated tw-flex tw-items-center gt-hidden">
|
<button id="hide-outdated-{{(index .comments 0).ID}}" data-comment="{{(index .comments 0).ID}}" class="ui tiny labeled button hide-outdated tw-flex tw-items-center tw-hidden">
|
||||||
{{svg "octicon-fold" 16 "tw-mr-2"}}
|
{{svg "octicon-fold" 16 "tw-mr-2"}}
|
||||||
{{ctx.Locale.Tr "repo.issues.review.hide_resolved"}}
|
{{ctx.Locale.Tr "repo.issues.review.hide_resolved"}}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
<div id="code-comments-{{(index .comments 0).ID}}" class="field comment-code-cloud {{if $resolved}}gt-hidden{{end}}">
|
<div id="code-comments-{{(index .comments 0).ID}}" class="field comment-code-cloud {{if $resolved}}tw-hidden{{end}}">
|
||||||
<div class="comment-list">
|
<div class="comment-list">
|
||||||
<ui class="ui comments">
|
<ui class="ui comments">
|
||||||
{{template "repo/diff/comments" dict "root" $ "comments" .comments}}
|
{{template "repo/diff/comments" dict "root" $ "comments" .comments}}
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="quick-pull-branch-name {{if not (eq .commit_choice "commit-to-new-branch")}}gt-hidden{{end}}">
|
<div class="quick-pull-branch-name {{if not (eq .commit_choice "commit-to-new-branch")}}tw-hidden{{end}}">
|
||||||
<div class="new-branch-name-input field {{if .Err_NewBranchName}}error{{end}}">
|
<div class="new-branch-name-input field {{if .Err_NewBranchName}}error{{end}}">
|
||||||
{{svg "octicon-git-branch"}}
|
{{svg "octicon-git-branch"}}
|
||||||
<input type="text" name="new_branch_name" maxlength="100" value="{{.new_branch_name}}" class="input-contrast tw-mr-1 js-quick-pull-new-branch-name" placeholder="{{ctx.Locale.Tr "repo.editor.new_branch_name_desc"}}" {{if eq .commit_choice "commit-to-new-branch"}}required{{end}} title="{{ctx.Locale.Tr "repo.editor.new_branch_name"}}">
|
<input type="text" name="new_branch_name" maxlength="100" value="{{.new_branch_name}}" class="input-contrast tw-mr-1 js-quick-pull-new-branch-name" placeholder="{{ctx.Locale.Tr "repo.editor.new_branch_name_desc"}}" {{if eq .commit_choice "commit-to-new-branch"}}required{{end}} title="{{ctx.Locale.Tr "repo.editor.new_branch_name"}}">
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
<div class="ui bottom attached active tab segment" data-tab="write">
|
<div class="ui bottom attached active tab segment" data-tab="write">
|
||||||
<textarea id="edit_area" name="content" class="gt-hidden" data-id="repo-{{.Repository.Name}}-{{.TreePath}}"
|
<textarea id="edit_area" name="content" class="tw-hidden" data-id="repo-{{.Repository.Name}}-{{.TreePath}}"
|
||||||
data-url="{{.Repository.Link}}/markup"
|
data-url="{{.Repository.Link}}/markup"
|
||||||
data-context="{{.RepoLink}}"
|
data-context="{{.RepoLink}}"
|
||||||
data-previewable-extensions="{{.PreviewableExtensions}}"
|
data-previewable-extensions="{{.PreviewableExtensions}}"
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
<a class="active item" data-tab="write">{{svg "octicon-code" 16 "tw-mr-1"}}{{ctx.Locale.Tr "repo.editor.new_patch"}}</a>
|
<a class="active item" data-tab="write">{{svg "octicon-code" 16 "tw-mr-1"}}{{ctx.Locale.Tr "repo.editor.new_patch"}}</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui bottom attached active tab segment" data-tab="write">
|
<div class="ui bottom attached active tab segment" data-tab="write">
|
||||||
<textarea id="edit_area" name="content" class="gt-hidden" data-id="repo-{{.Repository.Name}}-patch"
|
<textarea id="edit_area" name="content" class="tw-hidden" data-id="repo-{{.Repository.Name}}-patch"
|
||||||
data-context="{{.RepoLink}}"
|
data-context="{{.RepoLink}}"
|
||||||
data-line-wrap-extensions="{{.LineWrapExtensions}}">
|
data-line-wrap-extensions="{{.LineWrapExtensions}}">
|
||||||
{{.FileContent}}</textarea>
|
{{.FileContent}}</textarea>
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<div id="repo-find-file-no-result" class="ui row center tw-mt-8 gt-hidden">
|
<div id="repo-find-file-no-result" class="ui row center tw-mt-8 tw-hidden">
|
||||||
<h3>{{ctx.Locale.Tr "repo.find_file.no_matching"}}</h3>
|
<h3>{{ctx.Locale.Tr "repo.find_file.no_matching"}}</h3>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
</div>
|
</div>
|
||||||
</h2>
|
</h2>
|
||||||
<div class="ui dividing"></div>
|
<div class="ui dividing"></div>
|
||||||
<div class="is-loading tw-py-32 gt-hidden" id="loading-indicator"></div>
|
<div class="is-loading tw-py-32 tw-hidden" id="loading-indicator"></div>
|
||||||
{{template "repo/graph/svgcontainer" .}}
|
{{template "repo/graph/svgcontainer" .}}
|
||||||
{{template "repo/graph/commits" .}}
|
{{template "repo/graph/commits" .}}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if and .Permission.IsAdmin (not .Repository.IsArchived)}}
|
{{if and .Permission.IsAdmin (not .Repository.IsArchived)}}
|
||||||
<div class="ui form gt-hidden tw-flex tw-flex-col tw-mt-4" id="topic_edit">
|
<div class="ui form tw-hidden tw-flex tw-flex-col tw-mt-4" id="topic_edit">
|
||||||
<div class="field tw-flex-1 tw-mb-1">
|
<div class="field tw-flex-1 tw-mb-1">
|
||||||
<div class="ui fluid multiple search selection dropdown tw-flex-wrap" data-text-count-prompt="{{ctx.Locale.Tr "repo.topic.count_prompt"}}" data-text-format-prompt="{{ctx.Locale.Tr "repo.topic.format_prompt"}}">
|
<div class="ui fluid multiple search selection dropdown tw-flex-wrap" data-text-count-prompt="{{ctx.Locale.Tr "repo.topic.count_prompt"}}" data-text-format-prompt="{{ctx.Locale.Tr "repo.topic.format_prompt"}}">
|
||||||
<input type="hidden" name="topics" value="{{range $i, $v := .Topics}}{{.Name}}{{if Eval $i "+" 1 "<" (len $.Topics)}},{{end}}{{end}}">
|
<input type="hidden" name="topics" value="{{range $i, $v := .Topics}}{{.Name}}{{if Eval $i "+" 1 "<" (len $.Topics)}},{{end}}{{end}}">
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
<div class="item">{{ctx.Locale.Tr "repo.pulls.no_results"}}</div>
|
<div class="item">{{ctx.Locale.Tr "repo.pulls.no_results"}}</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
<div id="tag-list" class="scrolling menu reference-list-menu {{if not .Issue}}new-issue{{end}} gt-hidden">
|
<div id="tag-list" class="scrolling menu reference-list-menu {{if not .Issue}}new-issue{{end}} tw-hidden">
|
||||||
{{if .Reference}}
|
{{if .Reference}}
|
||||||
<div class="item text small" data-id="" data-id-selector="#ref_selector"><strong><a href="#">{{ctx.Locale.Tr "repo.clear_ref"}}</a></strong></div>
|
<div class="item text small" data-id="" data-id-selector="#ref_selector"><strong><a href="#">{{ctx.Locale.Tr "repo.clear_ref"}}</a></strong></div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<div class="field {{if not .item.VisibleOnForm}}gt-hidden{{end}}">
|
<div class="field {{if not .item.VisibleOnForm}}tw-hidden{{end}}">
|
||||||
{{template "repo/issue/fields/header" .}}
|
{{template "repo/issue/fields/header" .}}
|
||||||
{{range $i, $opt := .item.Attributes.options}}
|
{{range $i, $opt := .item.Attributes.options}}
|
||||||
<div class="field inline">
|
<div class="field inline">
|
||||||
<div class="ui checkbox tw-mr-0 {{if and ($opt.visible) (not (SliceUtils.Contains $opt.visible "form"))}}gt-hidden{{end}}">
|
<div class="ui checkbox tw-mr-0 {{if and ($opt.visible) (not (SliceUtils.Contains $opt.visible "form"))}}tw-hidden{{end}}">
|
||||||
<input type="checkbox" name="form-field-{{$.item.ID}}-{{$i}}" {{if $opt.required}}required{{end}}>
|
<input type="checkbox" name="form-field-{{$.item.ID}}-{{$i}}" {{if $opt.required}}required{{end}}>
|
||||||
<label>{{RenderMarkdownToHtml $.context $opt.label}}</label>
|
<label>{{RenderMarkdownToHtml $.context $opt.label}}</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="field {{if not .item.VisibleOnForm}}gt-hidden{{end}}">
|
<div class="field {{if not .item.VisibleOnForm}}tw-hidden{{end}}">
|
||||||
{{template "repo/issue/fields/header" .}}
|
{{template "repo/issue/fields/header" .}}
|
||||||
{{/* FIXME: required validation */}}
|
{{/* FIXME: required validation */}}
|
||||||
<div class="ui fluid selection dropdown {{if .item.Attributes.multiple}}multiple clearable{{end}}">
|
<div class="ui fluid selection dropdown {{if .item.Attributes.multiple}}multiple clearable{{end}}">
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="field {{if not .item.VisibleOnForm}}gt-hidden{{end}}">
|
<div class="field {{if not .item.VisibleOnForm}}tw-hidden{{end}}">
|
||||||
{{template "repo/issue/fields/header" .}}
|
{{template "repo/issue/fields/header" .}}
|
||||||
<input type="{{if .item.Validations.is_number}}number{{else}}text{{end}}" name="form-field-{{.item.ID}}" placeholder="{{.item.Attributes.placeholder}}" value="{{.item.Attributes.value}}" {{if .item.Validations.required}}required{{end}} {{if .item.Validations.regex}}pattern="{{.item.Validations.regex}}" title="{{.item.Validations.regex}}"{{end}}>
|
<input type="{{if .item.Validations.is_number}}number{{else}}text{{end}}" name="form-field-{{.item.ID}}" placeholder="{{.item.Attributes.placeholder}}" value="{{.item.Attributes.value}}" {{if .item.Validations.required}}required{{end}} {{if .item.Validations.regex}}pattern="{{.item.Validations.regex}}" title="{{.item.Validations.regex}}"{{end}}>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<div class="field {{if not .item.VisibleOnForm}}gt-hidden{{end}}">
|
<div class="field {{if not .item.VisibleOnForm}}tw-hidden{{end}}">
|
||||||
<div>{{RenderMarkdownToHtml .Context .item.Attributes.value}}</div>
|
<div>{{RenderMarkdownToHtml .Context .item.Attributes.value}}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{{$useMarkdownEditor := not .item.Attributes.render}}
|
{{$useMarkdownEditor := not .item.Attributes.render}}
|
||||||
<div class="field {{if not .item.VisibleOnForm}}gt-hidden{{end}} {{if $useMarkdownEditor}}combo-editor-dropzone{{end}}">
|
<div class="field {{if not .item.VisibleOnForm}}tw-hidden{{end}} {{if $useMarkdownEditor}}combo-editor-dropzone{{end}}">
|
||||||
{{template "repo/issue/fields/header" .}}
|
{{template "repo/issue/fields/header" .}}
|
||||||
|
|
||||||
{{/* the real form element to provide the value */}}
|
{{/* the real form element to provide the value */}}
|
||||||
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
{{if $useMarkdownEditor}}
|
{{if $useMarkdownEditor}}
|
||||||
{{template "shared/combomarkdowneditor" (dict
|
{{template "shared/combomarkdowneditor" (dict
|
||||||
"ContainerClasses" "gt-hidden"
|
"ContainerClasses" "tw-hidden"
|
||||||
"MarkdownPreviewUrl" (print .root.RepoLink "/markup")
|
"MarkdownPreviewUrl" (print .root.RepoLink "/markup")
|
||||||
"MarkdownPreviewContext" .root.RepoLink
|
"MarkdownPreviewContext" .root.RepoLink
|
||||||
"TextareaContent" .item.Attributes.value
|
"TextareaContent" .item.Attributes.value
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
)}}
|
)}}
|
||||||
|
|
||||||
{{if .root.IsAttachmentEnabled}}
|
{{if .root.IsAttachmentEnabled}}
|
||||||
<div class="tw-mt-4 form-field-dropzone gt-hidden">
|
<div class="tw-mt-4 form-field-dropzone tw-hidden">
|
||||||
{{template "repo/upload" .root}}
|
{{template "repo/upload" .root}}
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<small class="desc">{{ctx.Locale.Tr "repo.issues.label_exclusive_desc"}}</small>
|
<small class="desc">{{ctx.Locale.Tr "repo.issues.label_exclusive_desc"}}</small>
|
||||||
<div class="desc tw-ml-1 tw-mt-2 gt-hidden label-exclusive-warning">
|
<div class="desc tw-ml-1 tw-mt-2 tw-hidden label-exclusive-warning">
|
||||||
{{svg "octicon-alert"}} {{ctx.Locale.Tr "repo.issues.label_exclusive_warning"}}
|
{{svg "octicon-alert"}} {{ctx.Locale.Tr "repo.issues.label_exclusive_warning"}}
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<a
|
<a
|
||||||
class="item {{if not .label.IsChecked}}gt-hidden{{end}}"
|
class="item {{if not .label.IsChecked}}tw-hidden{{end}}"
|
||||||
id="label_{{.label.ID}}"
|
id="label_{{.label.ID}}"
|
||||||
href="{{.root.RepoLink}}/{{if or .root.IsPull .root.Issue.IsPull}}pulls{{else}}issues{{end}}?labels={{.label.ID}}"{{/* FIXME: use .root.Issue.Link or create .root.Link */}}
|
href="{{.root.RepoLink}}/{{if or .root.IsPull .root.Issue.IsPull}}pulls{{else}}issues{{end}}?labels={{.label.ID}}"{{/* FIXME: use .root.Issue.Link or create .root.Link */}}
|
||||||
>
|
>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<div class="ui labels list">
|
<div class="ui labels list">
|
||||||
<span class="no-select item {{if .root.HasSelectedLabel}}gt-hidden{{end}}">{{ctx.Locale.Tr "repo.issues.new.no_label"}}</span>
|
<span class="no-select item {{if .root.HasSelectedLabel}}tw-hidden{{end}}">{{ctx.Locale.Tr "repo.issues.new.no_label"}}</span>
|
||||||
<span class="labels-list">
|
<span class="labels-list">
|
||||||
{{range .root.Labels}}
|
{{range .root.Labels}}
|
||||||
{{template "repo/issue/labels/label" dict "root" $.root "label" .}}
|
{{template "repo/issue/labels/label" dict "root" $.root "label" .}}
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
|
|
||||||
{{template "repo/issue/filters" .}}
|
{{template "repo/issue/filters" .}}
|
||||||
|
|
||||||
<div id="issue-actions" class="issue-list-toolbar gt-hidden">
|
<div id="issue-actions" class="issue-list-toolbar tw-hidden">
|
||||||
<div class="issue-list-toolbar-left">
|
<div class="issue-list-toolbar-left">
|
||||||
{{template "repo/issue/openclose" .}}
|
{{template "repo/issue/openclose" .}}
|
||||||
<!-- Total Tracked Time -->
|
<!-- Total Tracked Time -->
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui select-milestone list">
|
<div class="ui select-milestone list">
|
||||||
<span class="no-select item {{if .Milestone}}gt-hidden{{end}}">{{ctx.Locale.Tr "repo.issues.new.no_milestone"}}</span>
|
<span class="no-select item {{if .Milestone}}tw-hidden{{end}}">{{ctx.Locale.Tr "repo.issues.new.no_milestone"}}</span>
|
||||||
<div class="selected">
|
<div class="selected">
|
||||||
{{if .Milestone}}
|
{{if .Milestone}}
|
||||||
<a class="item muted sidebar-item-link" href="{{.RepoLink}}/issues?milestone={{.Milestone.ID}}">
|
<a class="item muted sidebar-item-link" href="{{.RepoLink}}/issues?milestone={{.Milestone.ID}}">
|
||||||
|
@ -129,7 +129,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui select-project list">
|
<div class="ui select-project list">
|
||||||
<span class="no-select item {{if .Project}}gt-hidden{{end}}">{{ctx.Locale.Tr "repo.issues.new.no_projects"}}</span>
|
<span class="no-select item {{if .Project}}tw-hidden{{end}}">{{ctx.Locale.Tr "repo.issues.new.no_projects"}}</span>
|
||||||
<div class="selected">
|
<div class="selected">
|
||||||
{{if .Project}}
|
{{if .Project}}
|
||||||
<a class="item muted sidebar-item-link" href="{{.Project.Link ctx}}">
|
<a class="item muted sidebar-item-link" href="{{.Project.Link ctx}}">
|
||||||
|
@ -165,12 +165,12 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui assignees list">
|
<div class="ui assignees list">
|
||||||
<span class="no-select item {{if .HasSelectedLabel}}gt-hidden{{end}}">
|
<span class="no-select item {{if .HasSelectedLabel}}tw-hidden{{end}}">
|
||||||
{{ctx.Locale.Tr "repo.issues.new.no_assignees"}}
|
{{ctx.Locale.Tr "repo.issues.new.no_assignees"}}
|
||||||
</span>
|
</span>
|
||||||
<div class="selected">
|
<div class="selected">
|
||||||
{{range .Assignees}}
|
{{range .Assignees}}
|
||||||
<a class="item tw-p-1 muted gt-hidden" id="assignee_{{.ID}}" href="{{$.RepoLink}}/issues?assignee={{.ID}}">
|
<a class="item tw-p-1 muted tw-hidden" id="assignee_{{.ID}}" href="{{$.RepoLink}}/issues?assignee={{.ID}}">
|
||||||
{{ctx.AvatarUtils.Avatar . 28 "tw-mr-2 tw-align-middle"}}{{.GetDisplayName}}
|
{{ctx.AvatarUtils.Avatar . 28 "tw-mr-2 tw-align-middle"}}{{.GetDisplayName}}
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
{{template "shared/search/input" dict "Value" .Keyword}}
|
{{template "shared/search/input" dict "Value" .Keyword}}
|
||||||
{{if .PageIsIssueList}}
|
{{if .PageIsIssueList}}
|
||||||
<button id="issue-list-quick-goto" class="ui small icon button gt-hidden" data-tooltip-content="{{ctx.Locale.Tr "explore.go_to"}}" data-repo-link="{{.RepoLink}}">{{svg "octicon-hash"}}</button>
|
<button id="issue-list-quick-goto" class="ui small icon button tw-hidden" data-tooltip-content="{{ctx.Locale.Tr "explore.go_to"}}" data-repo-link="{{.RepoLink}}">{{svg "octicon-hash"}}</button>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{template "shared/search/button"}}
|
{{template "shared/search/button"}}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -59,8 +59,8 @@
|
||||||
<span class="no-content">{{ctx.Locale.Tr "repo.issues.no_content"}}</span>
|
<span class="no-content">{{ctx.Locale.Tr "repo.issues.no_content"}}</span>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
<div id="issue-{{.Issue.ID}}-raw" class="raw-content gt-hidden">{{.Issue.Content}}</div>
|
<div id="issue-{{.Issue.ID}}-raw" class="raw-content tw-hidden">{{.Issue.Content}}</div>
|
||||||
<div class="edit-content-zone gt-hidden" data-update-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/content" data-context="{{.RepoLink}}" data-attachment-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/attachments" data-view-attachment-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/view-attachments"></div>
|
<div class="edit-content-zone tw-hidden" data-update-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/content" data-context="{{.RepoLink}}" data-attachment-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/attachments" data-view-attachment-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/view-attachments"></div>
|
||||||
{{if .Issue.Attachments}}
|
{{if .Issue.Attachments}}
|
||||||
{{template "repo/issue/view_content/attachments" dict "Attachments" .Issue.Attachments "RenderedContent" .Issue.RenderedContent}}
|
{{template "repo/issue/view_content/attachments" dict "Attachments" .Issue.Attachments "RenderedContent" .Issue.RenderedContent}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
@ -171,7 +171,7 @@
|
||||||
|
|
||||||
{{template "repo/issue/view_content/reference_issue_dialog" .}}
|
{{template "repo/issue/view_content/reference_issue_dialog" .}}
|
||||||
|
|
||||||
<div class="gt-hidden" id="no-content">
|
<div class="tw-hidden" id="no-content">
|
||||||
<span class="no-content">{{ctx.Locale.Tr "repo.issues.no_content"}}</span>
|
<span class="no-content">{{ctx.Locale.Tr "repo.issues.no_content"}}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -66,8 +66,8 @@
|
||||||
<span class="no-content">{{ctx.Locale.Tr "repo.issues.no_content"}}</span>
|
<span class="no-content">{{ctx.Locale.Tr "repo.issues.no_content"}}</span>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
<div id="issuecomment-{{.ID}}-raw" class="raw-content gt-hidden">{{.Content}}</div>
|
<div id="issuecomment-{{.ID}}-raw" class="raw-content tw-hidden">{{.Content}}</div>
|
||||||
<div class="edit-content-zone gt-hidden" data-update-url="{{$.RepoLink}}/comments/{{.ID}}" data-context="{{$.RepoLink}}" data-attachment-url="{{$.RepoLink}}/comments/{{.ID}}/attachments"></div>
|
<div class="edit-content-zone tw-hidden" data-update-url="{{$.RepoLink}}/comments/{{.ID}}" data-context="{{$.RepoLink}}" data-attachment-url="{{$.RepoLink}}/comments/{{.ID}}/attachments"></div>
|
||||||
{{if .Attachments}}
|
{{if .Attachments}}
|
||||||
{{template "repo/issue/view_content/attachments" dict "Attachments" .Attachments "RenderedContent" .RenderedContent}}
|
{{template "repo/issue/view_content/attachments" dict "Attachments" .Attachments "RenderedContent" .RenderedContent}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
@ -440,8 +440,8 @@
|
||||||
<span class="no-content">{{ctx.Locale.Tr "repo.issues.no_content"}}</span>
|
<span class="no-content">{{ctx.Locale.Tr "repo.issues.no_content"}}</span>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
<div id="issuecomment-{{.ID}}-raw" class="raw-content gt-hidden">{{.Content}}</div>
|
<div id="issuecomment-{{.ID}}-raw" class="raw-content tw-hidden">{{.Content}}</div>
|
||||||
<div class="edit-content-zone gt-hidden" data-update-url="{{$.RepoLink}}/comments/{{.ID}}" data-context="{{$.RepoLink}}" data-attachment-url="{{$.RepoLink}}/comments/{{.ID}}/attachments"></div>
|
<div class="edit-content-zone tw-hidden" data-update-url="{{$.RepoLink}}/comments/{{.ID}}" data-context="{{$.RepoLink}}" data-attachment-url="{{$.RepoLink}}/comments/{{.ID}}/attachments"></div>
|
||||||
{{if .Attachments}}
|
{{if .Attachments}}
|
||||||
{{template "repo/issue/view_content/attachments" dict "Attachments" .Attachments "RenderedContent" .RenderedContent}}
|
{{template "repo/issue/view_content/attachments" dict "Attachments" .Attachments "RenderedContent" .RenderedContent}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
{{if or $invalid $resolved}}
|
{{if or $invalid $resolved}}
|
||||||
<button id="show-outdated-{{(index .comments 0).ID}}" data-comment="{{(index .comments 0).ID}}" class="{{if not $resolved}}gt-hidden {{end}}ui compact labeled button show-outdated tw-flex tw-items-center">
|
<button id="show-outdated-{{(index .comments 0).ID}}" data-comment="{{(index .comments 0).ID}}" class="{{if not $resolved}}tw-hidden {{end}}ui compact labeled button show-outdated tw-flex tw-items-center">
|
||||||
{{svg "octicon-unfold" 16 "tw-mr-2"}}
|
{{svg "octicon-unfold" 16 "tw-mr-2"}}
|
||||||
{{if $resolved}}
|
{{if $resolved}}
|
||||||
{{ctx.Locale.Tr "repo.issues.review.show_resolved"}}
|
{{ctx.Locale.Tr "repo.issues.review.show_resolved"}}
|
||||||
|
@ -22,7 +22,7 @@
|
||||||
{{ctx.Locale.Tr "repo.issues.review.show_outdated"}}
|
{{ctx.Locale.Tr "repo.issues.review.show_outdated"}}
|
||||||
{{end}}
|
{{end}}
|
||||||
</button>
|
</button>
|
||||||
<button id="hide-outdated-{{(index .comments 0).ID}}" data-comment="{{(index .comments 0).ID}}" class="{{if $resolved}}gt-hidden {{end}}ui compact labeled button hide-outdated tw-flex tw-items-center">
|
<button id="hide-outdated-{{(index .comments 0).ID}}" data-comment="{{(index .comments 0).ID}}" class="{{if $resolved}}tw-hidden {{end}}ui compact labeled button hide-outdated tw-flex tw-items-center">
|
||||||
{{svg "octicon-fold" 16 "tw-mr-2"}}
|
{{svg "octicon-fold" 16 "tw-mr-2"}}
|
||||||
{{if $resolved}}
|
{{if $resolved}}
|
||||||
{{ctx.Locale.Tr "repo.issues.review.hide_resolved"}}
|
{{ctx.Locale.Tr "repo.issues.review.hide_resolved"}}
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
{{$diff := (CommentMustAsDiff ctx (index .comments 0))}}
|
{{$diff := (CommentMustAsDiff ctx (index .comments 0))}}
|
||||||
{{if $diff}}
|
{{if $diff}}
|
||||||
{{$file := (index $diff.Files 0)}}
|
{{$file := (index $diff.Files 0)}}
|
||||||
<div id="code-preview-{{(index .comments 0).ID}}" class="ui table segment{{if $resolved}} gt-hidden{{end}}">
|
<div id="code-preview-{{(index .comments 0).ID}}" class="ui table segment{{if $resolved}} tw-hidden{{end}}">
|
||||||
<div class="diff-file-box diff-box file-content {{TabSizeClass $.Editorconfig $file.Name}}">
|
<div class="diff-file-box diff-box file-content {{TabSizeClass $.Editorconfig $file.Name}}">
|
||||||
<div class="file-body file-code code-view code-diff code-diff-unified unicode-escaped">
|
<div class="file-body file-code code-view code-diff code-diff-unified unicode-escaped">
|
||||||
<table>
|
<table>
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
<div id="code-comments-{{(index .comments 0).ID}}" class="comment-code-cloud ui segment{{if $resolved}} gt-hidden{{end}}">
|
<div id="code-comments-{{(index .comments 0).ID}}" class="comment-code-cloud ui segment{{if $resolved}} tw-hidden{{end}}">
|
||||||
<div class="ui comments tw-mb-0">
|
<div class="ui comments tw-mb-0">
|
||||||
{{range .comments}}
|
{{range .comments}}
|
||||||
{{$createdSubStr:= TimeSinceUnix .CreatedUnix ctx.Locale}}
|
{{$createdSubStr:= TimeSinceUnix .CreatedUnix ctx.Locale}}
|
||||||
|
@ -92,8 +92,8 @@
|
||||||
<span class="no-content">{{ctx.Locale.Tr "repo.issues.no_content"}}</span>
|
<span class="no-content">{{ctx.Locale.Tr "repo.issues.no_content"}}</span>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
<div id="issuecomment-{{.ID}}-raw" class="raw-content gt-hidden">{{.Content}}</div>
|
<div id="issuecomment-{{.ID}}-raw" class="raw-content tw-hidden">{{.Content}}</div>
|
||||||
<div class="edit-content-zone gt-hidden" data-update-url="{{$.RepoLink}}/comments/{{.ID}}" data-context="{{$.RepoLink}}" data-attachment-url="{{$.RepoLink}}/comments/{{.ID}}/attachments"></div>
|
<div class="edit-content-zone tw-hidden" data-update-url="{{$.RepoLink}}/comments/{{.ID}}" data-context="{{$.RepoLink}}" data-attachment-url="{{$.RepoLink}}/comments/{{.ID}}/attachments"></div>
|
||||||
{{if .Attachments}}
|
{{if .Attachments}}
|
||||||
{{template "repo/issue/view_content/attachments" dict "Attachments" .Attachments "RenderedContent" .RenderedContent}}
|
{{template "repo/issue/view_content/attachments" dict "Attachments" .Attachments "RenderedContent" .RenderedContent}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<div class="divider"></div>
|
<div class="divider"></div>
|
||||||
<div class="instruct-toggle"> {{ctx.Locale.Tr "repo.pulls.cmd_instruction_hint"}} </div>
|
<div class="instruct-toggle"> {{ctx.Locale.Tr "repo.pulls.cmd_instruction_hint"}} </div>
|
||||||
<div class="instruct-content tw-mt-2 gt-hidden">
|
<div class="instruct-content tw-mt-2 tw-hidden">
|
||||||
<div><h3>{{ctx.Locale.Tr "repo.pulls.cmd_instruction_checkout_title"}}</h3>{{ctx.Locale.Tr "repo.pulls.cmd_instruction_checkout_desc"}}</div>
|
<div><h3>{{ctx.Locale.Tr "repo.pulls.cmd_instruction_checkout_title"}}</h3>{{ctx.Locale.Tr "repo.pulls.cmd_instruction_checkout_desc"}}</div>
|
||||||
{{$localBranch := .PullRequest.HeadBranch}}
|
{{$localBranch := .PullRequest.HeadBranch}}
|
||||||
{{if ne .PullRequest.HeadRepo.ID .PullRequest.BaseRepo.ID}}
|
{{if ne .PullRequest.HeadRepo.ID .PullRequest.BaseRepo.ID}}
|
||||||
|
@ -21,25 +21,25 @@
|
||||||
<div>git checkout {{.PullRequest.BaseBranch}}</div>
|
<div>git checkout {{.PullRequest.BaseBranch}}</div>
|
||||||
<div>git merge --no-ff {{$localBranch}}</div>
|
<div>git merge --no-ff {{$localBranch}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="gt-hidden" data-pull-merge-style="rebase">
|
<div class="tw-hidden" data-pull-merge-style="rebase">
|
||||||
<div>git checkout {{.PullRequest.BaseBranch}}</div>
|
<div>git checkout {{.PullRequest.BaseBranch}}</div>
|
||||||
<div>git merge --ff-only {{$localBranch}}</div>
|
<div>git merge --ff-only {{$localBranch}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="gt-hidden" data-pull-merge-style="rebase-merge">
|
<div class="tw-hidden" data-pull-merge-style="rebase-merge">
|
||||||
<div>git checkout {{$localBranch}}</div>
|
<div>git checkout {{$localBranch}}</div>
|
||||||
<div>git rebase {{.PullRequest.BaseBranch}}</div>
|
<div>git rebase {{.PullRequest.BaseBranch}}</div>
|
||||||
<div>git checkout {{.PullRequest.BaseBranch}}</div>
|
<div>git checkout {{.PullRequest.BaseBranch}}</div>
|
||||||
<div>git merge --no-ff {{$localBranch}}</div>
|
<div>git merge --no-ff {{$localBranch}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="gt-hidden" data-pull-merge-style="squash">
|
<div class="tw-hidden" data-pull-merge-style="squash">
|
||||||
<div>git checkout {{.PullRequest.BaseBranch}}</div>
|
<div>git checkout {{.PullRequest.BaseBranch}}</div>
|
||||||
<div>git merge --squash {{$localBranch}}</div>
|
<div>git merge --squash {{$localBranch}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="gt-hidden" data-pull-merge-style="fast-forward-only">
|
<div class="tw-hidden" data-pull-merge-style="fast-forward-only">
|
||||||
<div>git checkout {{.PullRequest.BaseBranch}}</div>
|
<div>git checkout {{.PullRequest.BaseBranch}}</div>
|
||||||
<div>git merge --ff-only {{$localBranch}}</div>
|
<div>git merge --ff-only {{$localBranch}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="gt-hidden" data-pull-merge-style="manually-merged">
|
<div class="tw-hidden" data-pull-merge-style="manually-merged">
|
||||||
<div>git checkout {{.PullRequest.BaseBranch}}</div>
|
<div>git checkout {{.PullRequest.BaseBranch}}</div>
|
||||||
<div>git merge {{$localBranch}}</div>
|
<div>git merge {{$localBranch}}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="ui assignees list">
|
<div class="ui assignees list">
|
||||||
<span class="no-select item {{if or .OriginalReviews .PullReviewers}}gt-hidden{{end}}">{{ctx.Locale.Tr "repo.issues.new.no_reviewers"}}</span>
|
<span class="no-select item {{if or .OriginalReviews .PullReviewers}}tw-hidden{{end}}">{{ctx.Locale.Tr "repo.issues.new.no_reviewers"}}</span>
|
||||||
<div class="selected">
|
<div class="selected">
|
||||||
{{range .PullReviewers}}
|
{{range .PullReviewers}}
|
||||||
<div class="item tw-flex tw-items-center tw-py-2">
|
<div class="item tw-flex tw-items-center tw-py-2">
|
||||||
|
@ -144,7 +144,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui select-milestone list">
|
<div class="ui select-milestone list">
|
||||||
<span class="no-select item {{if .Issue.Milestone}}gt-hidden{{end}}">{{ctx.Locale.Tr "repo.issues.new.no_milestone"}}</span>
|
<span class="no-select item {{if .Issue.Milestone}}tw-hidden{{end}}">{{ctx.Locale.Tr "repo.issues.new.no_milestone"}}</span>
|
||||||
<div class="selected">
|
<div class="selected">
|
||||||
{{if .Issue.Milestone}}
|
{{if .Issue.Milestone}}
|
||||||
<a class="item muted sidebar-item-link" href="{{.RepoLink}}/milestone/{{.Issue.Milestone.ID}}">
|
<a class="item muted sidebar-item-link" href="{{.RepoLink}}/milestone/{{.Issue.Milestone.ID}}">
|
||||||
|
@ -202,7 +202,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui select-project list">
|
<div class="ui select-project list">
|
||||||
<span class="no-select item {{if .Issue.Project}}gt-hidden{{end}}">{{ctx.Locale.Tr "repo.issues.new.no_projects"}}</span>
|
<span class="no-select item {{if .Issue.Project}}tw-hidden{{end}}">{{ctx.Locale.Tr "repo.issues.new.no_projects"}}</span>
|
||||||
<div class="selected">
|
<div class="selected">
|
||||||
{{if .Issue.Project}}
|
{{if .Issue.Project}}
|
||||||
<a class="item muted sidebar-item-link" href="{{.Issue.Project.Link ctx}}">
|
<a class="item muted sidebar-item-link" href="{{.Issue.Project.Link ctx}}">
|
||||||
|
@ -247,7 +247,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui assignees list">
|
<div class="ui assignees list">
|
||||||
<span class="no-select item {{if .Issue.Assignees}}gt-hidden{{end}}">{{ctx.Locale.Tr "repo.issues.new.no_assignees"}}</span>
|
<span class="no-select item {{if .Issue.Assignees}}tw-hidden{{end}}">{{ctx.Locale.Tr "repo.issues.new.no_assignees"}}</span>
|
||||||
<div class="selected">
|
<div class="selected">
|
||||||
{{range .Issue.Assignees}}
|
{{range .Issue.Assignees}}
|
||||||
<div class="item">
|
<div class="item">
|
||||||
|
@ -362,7 +362,7 @@
|
||||||
<div class="divider"></div>
|
<div class="divider"></div>
|
||||||
<span class="text"><strong>{{ctx.Locale.Tr "repo.issues.due_date"}}</strong></span>
|
<span class="text"><strong>{{ctx.Locale.Tr "repo.issues.due_date"}}</strong></span>
|
||||||
<div class="ui form" id="deadline-loader">
|
<div class="ui form" id="deadline-loader">
|
||||||
<div class="ui negative message gt-hidden" id="deadline-err-invalid-date">
|
<div class="ui negative message tw-hidden" id="deadline-err-invalid-date">
|
||||||
{{svg "octicon-x" 16 "close icon"}}
|
{{svg "octicon-x" 16 "close icon"}}
|
||||||
{{ctx.Locale.Tr "repo.issues.due_date_invalid"}}
|
{{ctx.Locale.Tr "repo.issues.due_date_invalid"}}
|
||||||
</div>
|
</div>
|
||||||
|
@ -386,7 +386,7 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
{{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}}
|
{{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}}
|
||||||
<div {{if ne .Issue.DeadlineUnix 0}} class="gt-hidden"{{end}} id="deadlineForm">
|
<div {{if ne .Issue.DeadlineUnix 0}} class="tw-hidden"{{end}} id="deadlineForm">
|
||||||
<form class="ui fluid action input issue-due-form" action="{{AppSubUrl}}/{{PathEscape .Repository.Owner.Name}}/{{PathEscape .Repository.Name}}/issues/{{.Issue.Index}}/deadline" method="post" id="update-issue-deadline-form">
|
<form class="ui fluid action input issue-due-form" action="{{AppSubUrl}}/{{PathEscape .Repository.Owner.Name}}/{{PathEscape .Repository.Name}}/issues/{{.Issue.Index}}/deadline" method="post" id="update-issue-deadline-form">
|
||||||
{{$.CsrfTokenHtml}}
|
{{$.CsrfTokenHtml}}
|
||||||
<input required placeholder="{{ctx.Locale.Tr "repo.issues.due_date_form"}}" {{if gt .Issue.DeadlineUnix 0}}value="{{.Issue.DeadlineUnix.FormatDate}}"{{end}} type="date" name="deadlineDate" id="deadlineDate">
|
<input required placeholder="{{ctx.Locale.Tr "repo.issues.due_date_form"}}" {{if gt .Issue.DeadlineUnix 0}}value="{{.Issue.DeadlineUnix.FormatDate}}"{{end}} type="date" name="deadlineDate" id="deadlineDate">
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<h1 class="gt-word-break">
|
<h1 class="gt-word-break">
|
||||||
<span id="issue-title">{{RenderIssueTitle $.Context .Issue.Title ($.Repository.ComposeMetas ctx) | RenderCodeBlock}} <span class="index">#{{.Issue.Index}}</span>
|
<span id="issue-title">{{RenderIssueTitle $.Context .Issue.Title ($.Repository.ComposeMetas ctx) | RenderCodeBlock}} <span class="index">#{{.Issue.Index}}</span>
|
||||||
</span>
|
</span>
|
||||||
<div id="edit-title-input" class="ui input tw-flex-1 gt-hidden">
|
<div id="edit-title-input" class="ui input tw-flex-1 tw-hidden">
|
||||||
<input value="{{.Issue.Title}}" maxlength="255" autocomplete="off">
|
<input value="{{.Issue.Title}}" maxlength="255" autocomplete="off">
|
||||||
</div>
|
</div>
|
||||||
</h1>
|
</h1>
|
||||||
|
@ -22,8 +22,8 @@
|
||||||
</div>
|
</div>
|
||||||
{{if and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .Repository.IsArchived)}}
|
{{if and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .Repository.IsArchived)}}
|
||||||
<div class="edit-buttons">
|
<div class="edit-buttons">
|
||||||
<button id="cancel-edit-title" class="ui small basic button in-edit gt-hidden">{{ctx.Locale.Tr "repo.issues.cancel"}}</button>
|
<button id="cancel-edit-title" class="ui small basic button in-edit tw-hidden">{{ctx.Locale.Tr "repo.issues.cancel"}}</button>
|
||||||
<button id="save-edit-title" class="ui small primary button in-edit gt-hidden tw-mr-0" data-update-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/title" {{if .Issue.IsPull}}data-target-update-url="{{$.RepoLink}}/pull/{{.Issue.Index}}/target_branch"{{end}}>{{ctx.Locale.Tr "repo.issues.save"}}</button>
|
<button id="save-edit-title" class="ui small primary button in-edit tw-hidden tw-mr-0" data-update-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/title" {{if .Issue.IsPull}}data-target-update-url="{{$.RepoLink}}/pull/{{.Issue.Index}}/target_branch"{{end}}>{{ctx.Locale.Tr "repo.issues.save"}}</button>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
|
@ -81,7 +81,7 @@
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
<span id="pull-desc-edit" class="gt-hidden flex-text-block">
|
<span id="pull-desc-edit" class="tw-hidden flex-text-block">
|
||||||
<div class="ui floating filter dropdown">
|
<div class="ui floating filter dropdown">
|
||||||
<div class="ui basic small button tw-mr-0">
|
<div class="ui basic small button tw-mr-0">
|
||||||
<span class="text">{{ctx.Locale.Tr "repo.pulls.compare_compare"}}: {{$.HeadTarget}}</span>
|
<span class="text">{{ctx.Locale.Tr "repo.pulls.compare_compare"}}: {{$.HeadTarget}}</span>
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
<span class="grey commit-summary" title="{{.LatestCommit.Summary}}"><span class="message-wrapper">{{RenderCommitMessageLinkSubject $.Context .LatestCommit.Message $commitLink ($.Repository.ComposeMetas ctx)}}</span>
|
<span class="grey commit-summary" title="{{.LatestCommit.Summary}}"><span class="message-wrapper">{{RenderCommitMessageLinkSubject $.Context .LatestCommit.Message $commitLink ($.Repository.ComposeMetas ctx)}}</span>
|
||||||
{{if IsMultilineCommitMessage .LatestCommit.Message}}
|
{{if IsMultilineCommitMessage .LatestCommit.Message}}
|
||||||
<button class="ui button js-toggle-commit-body ellipsis-button" aria-expanded="false">...</button>
|
<button class="ui button js-toggle-commit-body ellipsis-button" aria-expanded="false">...</button>
|
||||||
<pre class="commit-body gt-hidden">{{RenderCommitBody $.Context .LatestCommit.Message ($.Repository.ComposeMetas ctx)}}</pre>
|
<pre class="commit-body tw-hidden">{{RenderCommitBody $.Context .LatestCommit.Message ($.Repository.ComposeMetas ctx)}}</pre>
|
||||||
{{end}}
|
{{end}}
|
||||||
</span>
|
</span>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<img src="{{AssetUrlPrefix}}/img/forgejo-loading.svg" width="256" height="256">
|
<img src="{{AssetUrlPrefix}}/img/forgejo-loading.svg" width="256" height="256">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="repo_migrating_failed_image" class="sixteen wide center aligned centered column gt-hidden">
|
<div id="repo_migrating_failed_image" class="sixteen wide center aligned centered column tw-hidden">
|
||||||
<div>
|
<div>
|
||||||
<span class="red">{{svg "octicon-git-pull-request-closed" 256 "ui red icon"}}</span>
|
<span class="red">{{svg "octicon-git-pull-request-closed" 256 "ui red icon"}}</span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
<p>{{ctx.Locale.Tr "repo.migrate.migrating" .CloneAddr}}</p>
|
<p>{{ctx.Locale.Tr "repo.migrate.migrating" .CloneAddr}}</p>
|
||||||
<p id="repo_migrating_progress_message"></p>
|
<p id="repo_migrating_progress_message"></p>
|
||||||
</div>
|
</div>
|
||||||
<div id="repo_migrating_failed" class="gt-hidden">
|
<div id="repo_migrating_failed" class="tw-hidden">
|
||||||
{{if .CloneAddr}}
|
{{if .CloneAddr}}
|
||||||
<p>{{ctx.Locale.Tr "repo.migrate.migrating_failed" .CloneAddr}}</p>
|
<p>{{ctx.Locale.Tr "repo.migrate.migrating_failed" .CloneAddr}}</p>
|
||||||
{{else}}
|
{{else}}
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
{{else}}
|
{{else}}
|
||||||
<button class="ui basic show-modal button" data-modal="#cancel-repo-modal">{{ctx.Locale.Tr "cancel"}}</button>
|
<button class="ui basic show-modal button" data-modal="#cancel-repo-modal">{{ctx.Locale.Tr "cancel"}}</button>
|
||||||
{{end}}
|
{{end}}
|
||||||
<button id="repo_migrating_retry" data-migrating-task-retry-url="{{.Link}}/settings/migrate/retry" class="ui basic button gt-hidden">{{ctx.Locale.Tr "retry"}}</button>
|
<button id="repo_migrating_retry" data-migrating-task-retry-url="{{.Link}}/settings/migrate/retry" class="ui basic button tw-hidden">{{ctx.Locale.Tr "retry"}}</button>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -14,9 +14,9 @@
|
||||||
<input id="lfs" name="lfs" type="checkbox" {{if .lfs}} checked{{end}}>
|
<input id="lfs" name="lfs" type="checkbox" {{if .lfs}} checked{{end}}>
|
||||||
<label>{{ctx.Locale.Tr "repo.migrate_options_lfs"}}</label>
|
<label>{{ctx.Locale.Tr "repo.migrate_options_lfs"}}</label>
|
||||||
</div>
|
</div>
|
||||||
<span id="lfs_settings" class="gt-hidden">(<a id="lfs_settings_show" href="#">{{ctx.Locale.Tr "repo.settings.advanced_settings"}}</a>)</span>
|
<span id="lfs_settings" class="tw-hidden">(<a id="lfs_settings_show" href="#">{{ctx.Locale.Tr "repo.settings.advanced_settings"}}</a>)</span>
|
||||||
</div>
|
</div>
|
||||||
<div id="lfs_endpoint" class="gt-hidden">
|
<div id="lfs_endpoint" class="tw-hidden">
|
||||||
<span class="help">{{ctx.Locale.Tr "repo.migrate_options_lfs_endpoint.description" "https://github.com/git-lfs/git-lfs/blob/main/docs/api/server-discovery.md#server-discovery"}}{{if .ContextUser.CanImportLocal}} {{ctx.Locale.Tr "repo.migrate_options_lfs_endpoint.description.local"}}{{end}}</span>
|
<span class="help">{{ctx.Locale.Tr "repo.migrate_options_lfs_endpoint.description" "https://github.com/git-lfs/git-lfs/blob/main/docs/api/server-discovery.md#server-discovery"}}{{if .ContextUser.CanImportLocal}} {{ctx.Locale.Tr "repo.migrate_options_lfs_endpoint.description.local"}}{{end}}</span>
|
||||||
<div class="inline field {{if .Err_LFSEndpoint}}error{{end}}">
|
<div class="inline field {{if .Err_LFSEndpoint}}error{{end}}">
|
||||||
<label>{{ctx.Locale.Tr "repo.migrate_options_lfs_endpoint.label"}}</label>
|
<label>{{ctx.Locale.Tr "repo.migrate_options_lfs_endpoint.label"}}</label>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
</div>
|
</div>
|
||||||
</h4>
|
</h4>
|
||||||
<div class="ui attached segment">
|
<div class="ui attached segment">
|
||||||
<div class="{{if not .HasError}}gt-hidden{{end}} tw-mb-4" id="add-deploy-key-panel">
|
<div class="{{if not .HasError}}tw-hidden{{end}} tw-mb-4" id="add-deploy-key-panel">
|
||||||
<form class="ui form" action="{{.Link}}" method="post">
|
<form class="ui form" action="{{.Link}}" method="post">
|
||||||
{{.CsrfTokenHtml}}
|
{{.CsrfTokenHtml}}
|
||||||
<div class="field">
|
<div class="field">
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="content">{{ctx.Locale.Tr "repo.settings.githook_content"}}</label>
|
<label for="content">{{ctx.Locale.Tr "repo.settings.githook_content"}}</label>
|
||||||
<textarea id="content" name="content" class="gt-hidden">{{if .IsActive}}{{.Content}}{{else}}{{.Sample}}{{end}}</textarea>
|
<textarea id="content" name="content" class="tw-hidden">{{if .IsActive}}{{.Content}}{{else}}{{.Sample}}{{end}}</textarea>
|
||||||
<div class="editor-loading is-loading"></div>
|
<div class="editor-loading is-loading"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="inline field">
|
<div class="inline field">
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<a href="{{.LFSFilesLink}}">{{ctx.Locale.Tr "repo.settings.lfs"}}</a> / <span class="truncate sha">{{.LFSFile.Oid}}</span>
|
<a href="{{.LFSFilesLink}}">{{ctx.Locale.Tr "repo.settings.lfs"}}</a> / <span class="truncate sha">{{.LFSFile.Oid}}</span>
|
||||||
<div class="ui right">
|
<div class="ui right">
|
||||||
{{if .EscapeStatus.Escaped}}
|
{{if .EscapeStatus.Escaped}}
|
||||||
<a class="ui tiny basic button unescape-button gt-hidden">{{ctx.Locale.Tr "repo.unescape_control_characters"}}</a>
|
<a class="ui tiny basic button unescape-button tw-hidden">{{ctx.Locale.Tr "repo.unescape_control_characters"}}</a>
|
||||||
<a class="ui tiny basic button escape-button">{{ctx.Locale.Tr "repo.escape_control_characters"}}</a>
|
<a class="ui tiny basic button escape-button">{{ctx.Locale.Tr "repo.escape_control_characters"}}</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
<a class="ui primary tiny button" href="{{.LFSFilesLink}}/find?oid={{.LFSFile.Oid}}&size={{.LFSFile.Size}}">{{ctx.Locale.Tr "repo.settings.lfs_findcommits"}}</a>
|
<a class="ui primary tiny button" href="{{.LFSFilesLink}}/find?oid={{.LFSFile.Oid}}&size={{.LFSFile.Size}}">{{ctx.Locale.Tr "repo.settings.lfs_findcommits"}}</a>
|
||||||
|
|
|
@ -179,7 +179,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<span>{{.}}</span>
|
<span>{{.}}</span>
|
||||||
<span class="status-check-matched-mark gt-hidden" data-status-check="{{.}}">{{ctx.Locale.Tr "repo.settings.protect_status_check_matched"}}</span>
|
<span class="status-check-matched-mark tw-hidden" data-status-check="{{.}}">{{ctx.Locale.Tr "repo.settings.protect_status_check_matched"}}</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{else}}
|
{{else}}
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
{{TimeSince .Delivered.AsTime ctx.Locale}}
|
{{TimeSince .Delivered.AsTime ctx.Locale}}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="info gt-hidden" id="info-{{.ID}}">
|
<div class="info tw-hidden" id="info-{{.ID}}">
|
||||||
<div class="ui top attached tabular menu">
|
<div class="ui top attached tabular menu">
|
||||||
<a class="item active" data-tab="request-{{.ID}}">{{ctx.Locale.Tr "repo.settings.webhook.request"}}</a>
|
<a class="item active" data-tab="request-{{.ID}}">{{ctx.Locale.Tr "repo.settings.webhook.request"}}</a>
|
||||||
<a class="item" data-tab="response-{{.ID}}">
|
<a class="item" data-tab="response-{{.ID}}">
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="events fields ui grid {{if not .Webhook.ChooseEvents}}gt-hidden{{end}}">
|
<div class="events fields ui grid {{if not .Webhook.ChooseEvents}}tw-hidden{{end}}">
|
||||||
<!-- Repository Events -->
|
<!-- Repository Events -->
|
||||||
<div class="fourteen wide column">
|
<div class="fourteen wide column">
|
||||||
<label>{{ctx.Locale.Tr "repo.settings.event_header_repository"}}</label>
|
<label>{{ctx.Locale.Tr "repo.settings.event_header_repository"}}</label>
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
{{if and (.Permission.CanRead $.UnitTypeCode) (not .IsEmptyRepo) .LanguageStats}}
|
{{if and (.Permission.CanRead $.UnitTypeCode) (not .IsEmptyRepo) .LanguageStats}}
|
||||||
<div class="ui segment sub-menu language-stats-details gt-hidden">
|
<div class="ui segment sub-menu language-stats-details tw-hidden">
|
||||||
{{range .LanguageStats}}
|
{{range .LanguageStats}}
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<i class="color-icon" style="background-color: {{.Color}}"></i>
|
<i class="color-icon" style="background-color: {{.Color}}"></i>
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
<a class="ui mini basic button" href="{{.RepoLink}}/commits/{{.BranchNameSubURL}}/{{PathEscapeSegments .TreePath}}">{{ctx.Locale.Tr "repo.file_history"}}</a>
|
<a class="ui mini basic button" href="{{.RepoLink}}/commits/{{.BranchNameSubURL}}/{{PathEscapeSegments .TreePath}}">{{ctx.Locale.Tr "repo.file_history"}}</a>
|
||||||
{{if .EscapeStatus.Escaped}}
|
{{if .EscapeStatus.Escaped}}
|
||||||
<button class="ui mini basic button unescape-button gt-hidden">{{ctx.Locale.Tr "repo.unescape_control_characters"}}</button>
|
<button class="ui mini basic button unescape-button tw-hidden">{{ctx.Locale.Tr "repo.unescape_control_characters"}}</button>
|
||||||
<button class="ui mini basic button escape-button">{{ctx.Locale.Tr "repo.escape_control_characters"}}</button>
|
<button class="ui mini basic button escape-button">{{ctx.Locale.Tr "repo.escape_control_characters"}}</button>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
|
@ -85,7 +85,7 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
{{else if .EscapeStatus.Escaped}}
|
{{else if .EscapeStatus.Escaped}}
|
||||||
<button class="ui mini basic button unescape-button tw-mr-1 gt-hidden">{{ctx.Locale.Tr "repo.unescape_control_characters"}}</button>
|
<button class="ui mini basic button unescape-button tw-mr-1 tw-hidden">{{ctx.Locale.Tr "repo.unescape_control_characters"}}</button>
|
||||||
<button class="ui mini basic button escape-button tw-mr-1">{{ctx.Locale.Tr "repo.escape_control_characters"}}</button>
|
<button class="ui mini basic button escape-button tw-mr-1">{{ctx.Locale.Tr "repo.escape_control_characters"}}</button>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if and .ReadmeInList .CanEditReadmeFile}}
|
{{if and .ReadmeInList .CanEditReadmeFile}}
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="eight wide right aligned column">
|
<div class="eight wide right aligned column">
|
||||||
{{if .EscapeStatus.Escaped}}
|
{{if .EscapeStatus.Escaped}}
|
||||||
<a class="ui small button unescape-button gt-hidden">{{ctx.Locale.Tr "repo.unescape_control_characters"}}</a>
|
<a class="ui small button unescape-button tw-hidden">{{ctx.Locale.Tr "repo.unescape_control_characters"}}</a>
|
||||||
<a class="ui small button escape-button">{{ctx.Locale.Tr "repo.escape_control_characters"}}</a>
|
<a class="ui small button escape-button">{{ctx.Locale.Tr "repo.escape_control_characters"}}</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if and .CanWriteWiki (not .Repository.IsMirror)}}
|
{{if and .CanWriteWiki (not .Repository.IsMirror)}}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<div id="webauthn-error" class="ui negative message gt-hidden">
|
<div id="webauthn-error" class="ui negative message tw-hidden">
|
||||||
<div class="header">{{ctx.Locale.Tr "webauthn_error"}}</div>
|
<div class="header">{{ctx.Locale.Tr "webauthn_error"}}</div>
|
||||||
<div id="webauthn-error-msg" class="tw-pt-2"></div>
|
<div id="webauthn-error-msg" class="tw-pt-2"></div>
|
||||||
<div class="gt-hidden">
|
<div class="tw-hidden">
|
||||||
<div data-webauthn-error-msg="browser">{{ctx.Locale.Tr "webauthn_unsupported_browser"}}</div>
|
<div data-webauthn-error-msg="browser">{{ctx.Locale.Tr "webauthn_unsupported_browser"}}</div>
|
||||||
<div data-webauthn-error-msg="unknown">{{ctx.Locale.Tr "webauthn_error_unknown"}}</div>
|
<div data-webauthn-error-msg="unknown">{{ctx.Locale.Tr "webauthn_error_unknown"}}</div>
|
||||||
<div data-webauthn-error-msg="insecure">{{ctx.Locale.Tr "webauthn_error_insecure"}}</div>
|
<div data-webauthn-error-msg="insecure">{{ctx.Locale.Tr "webauthn_error_insecure"}}</div>
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
<input type="hidden" name="sort" value="{{$.SortType}}">
|
<input type="hidden" name="sort" value="{{$.SortType}}">
|
||||||
<input type="hidden" name="state" value="{{$.State}}">
|
<input type="hidden" name="state" value="{{$.State}}">
|
||||||
{{template "shared/search/input" dict "Value" $.Keyword}}
|
{{template "shared/search/input" dict "Value" $.Keyword}}
|
||||||
<button id="issue-list-quick-goto" class="ui small icon button gt-hidden" data-tooltip-content="{{ctx.Locale.Tr "explore.go_to"}}">{{svg "octicon-hash"}}</button>
|
<button id="issue-list-quick-goto" class="ui small icon button tw-hidden" data-tooltip-content="{{ctx.Locale.Tr "explore.go_to"}}">{{svg "octicon-hash"}}</button>
|
||||||
{{template "shared/search/button"}}
|
{{template "shared/search/button"}}
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<div class="small-menu-items ui compact tiny menu">
|
<div class="small-menu-items ui compact tiny menu">
|
||||||
<a class="{{if eq .Status 1}}active {{end}}item" href="{{AppSubUrl}}/notifications?q=unread">
|
<a class="{{if eq .Status 1}}active {{end}}item" href="{{AppSubUrl}}/notifications?q=unread">
|
||||||
{{ctx.Locale.Tr "notification.unread"}}
|
{{ctx.Locale.Tr "notification.unread"}}
|
||||||
<div class="notifications-unread-count ui label {{if not $notificationUnreadCount}}gt-hidden{{end}}">{{$notificationUnreadCount}}</div>
|
<div class="notifications-unread-count ui label {{if not $notificationUnreadCount}}tw-hidden{{end}}">{{$notificationUnreadCount}}</div>
|
||||||
</a>
|
</a>
|
||||||
<a class="{{if eq .Status 2}}active {{end}}item" href="{{AppSubUrl}}/notifications?q=read">
|
<a class="{{if eq .Status 2}}active {{end}}item" href="{{AppSubUrl}}/notifications?q=read">
|
||||||
{{ctx.Locale.Tr "notification.read"}}
|
{{ctx.Locale.Tr "notification.read"}}
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
{{if and (eq .Status 1)}}
|
{{if and (eq .Status 1)}}
|
||||||
<form action="{{AppSubUrl}}/notifications/purge" method="post">
|
<form action="{{AppSubUrl}}/notifications/purge" method="post">
|
||||||
{{$.CsrfTokenHtml}}
|
{{$.CsrfTokenHtml}}
|
||||||
<div class="{{if not $notificationUnreadCount}}gt-hidden{{end}}">
|
<div class="{{if not $notificationUnreadCount}}tw-hidden{{end}}">
|
||||||
<button class="ui mini button primary tw-mr-0" title="{{ctx.Locale.Tr "notification.mark_all_as_read"}}">
|
<button class="ui mini button primary tw-mr-0" title="{{ctx.Locale.Tr "notification.mark_all_as_read"}}">
|
||||||
{{svg "octicon-checklist"}}
|
{{svg "octicon-checklist"}}
|
||||||
</button>
|
</button>
|
||||||
|
|
|
@ -90,7 +90,7 @@
|
||||||
{{ctx.Locale.Tr "settings.generate_token"}}
|
{{ctx.Locale.Tr "settings.generate_token"}}
|
||||||
</button>
|
</button>
|
||||||
</form>{{/* Fomantic ".ui.form .warning.message" is hidden by default, so put the warning message out of the form*/}}
|
</form>{{/* Fomantic ".ui.form .warning.message" is hidden by default, so put the warning message out of the form*/}}
|
||||||
<div id="scoped-access-warning" class="ui warning message center gt-hidden">
|
<div id="scoped-access-warning" class="ui warning message center tw-hidden">
|
||||||
{{ctx.Locale.Tr "settings.at_least_one_permission"}}
|
{{ctx.Locale.Tr "settings.at_least_one_permission"}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
</div>
|
</div>
|
||||||
</h4>
|
</h4>
|
||||||
<div class="ui attached segment">
|
<div class="ui attached segment">
|
||||||
<div class="{{if not .HasGPGError}}gt-hidden{{end}} tw-mb-4" id="add-gpg-key-panel">
|
<div class="{{if not .HasGPGError}}tw-hidden{{end}} tw-mb-4" id="add-gpg-key-panel">
|
||||||
<form class="ui form{{if .HasGPGError}} error{{end}}" action="{{.Link}}" method="post">
|
<form class="ui form{{if .HasGPGError}} error{{end}}" action="{{.Link}}" method="post">
|
||||||
{{.CsrfTokenHtml}}
|
{{.CsrfTokenHtml}}
|
||||||
<input type="hidden" name="title" value="none">
|
<input type="hidden" name="title" value="none">
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<div {{if not .HasPrincipalError}}class="gt-hidden"{{end}} id="add-ssh-principal-panel">
|
<div {{if not .HasPrincipalError}}class="tw-hidden"{{end}} id="add-ssh-principal-panel">
|
||||||
<h4 class="ui top attached header">
|
<h4 class="ui top attached header">
|
||||||
{{ctx.Locale.Tr "settings.add_new_principal"}}
|
{{ctx.Locale.Tr "settings.add_new_principal"}}
|
||||||
</h4>
|
</h4>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
</div>
|
</div>
|
||||||
</h4>
|
</h4>
|
||||||
<div class="ui attached segment">
|
<div class="ui attached segment">
|
||||||
<div class="{{if not .HasSSHError}}gt-hidden{{end}} tw-mb-4" id="add-ssh-key-panel">
|
<div class="{{if not .HasSSHError}}tw-hidden{{end}} tw-mb-4" id="add-ssh-key-panel">
|
||||||
<form class="ui form" action="{{.Link}}" method="post">
|
<form class="ui form" action="{{.Link}}" method="post">
|
||||||
{{.CsrfTokenHtml}}
|
{{.CsrfTokenHtml}}
|
||||||
<div class="field {{if .Err_Title}}error{{end}}">
|
<div class="field {{if .Err_Title}}error{{end}}">
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
{{.CsrfTokenHtml}}
|
{{.CsrfTokenHtml}}
|
||||||
<div class="required field {{if .Err_Name}}error{{end}}">
|
<div class="required field {{if .Err_Name}}error{{end}}">
|
||||||
<label for="username">{{ctx.Locale.Tr "username"}}
|
<label for="username">{{ctx.Locale.Tr "username"}}
|
||||||
<span class="text red gt-hidden" id="name-change-prompt"> {{ctx.Locale.Tr "settings.change_username_prompt"}}</span>
|
<span class="text red tw-hidden" id="name-change-prompt"> {{ctx.Locale.Tr "settings.change_username_prompt"}}</span>
|
||||||
<span class="text red gt-hidden" id="name-change-redirect-prompt"> {{ctx.Locale.Tr "settings.change_username_redirect_prompt"}}</span>
|
<span class="text red tw-hidden" id="name-change-redirect-prompt"> {{ctx.Locale.Tr "settings.change_username_redirect_prompt"}}</span>
|
||||||
</label>
|
</label>
|
||||||
<input id="username" name="name" value="{{.SignedUser.Name}}" data-name="{{.SignedUser.Name}}" autofocus required {{if or (not .SignedUser.IsLocal) .IsReverseProxy}}disabled{{end}} maxlength="40">
|
<input id="username" name="name" value="{{.SignedUser.Name}}" data-name="{{.SignedUser.Name}}" autofocus required {{if or (not .SignedUser.IsLocal) .IsReverseProxy}}disabled{{end}} maxlength="40">
|
||||||
{{if or (not .SignedUser.IsLocal) .IsReverseProxy}}
|
{{if or (not .SignedUser.IsLocal) .IsReverseProxy}}
|
||||||
|
|
|
@ -45,17 +45,17 @@ Gitea's private styles use `g-` prefix.
|
||||||
.interact-bg:active { background: var(--color-active) !important; }
|
.interact-bg:active { background: var(--color-active) !important; }
|
||||||
|
|
||||||
/*
|
/*
|
||||||
gt-hidden must win all other "display: xxx !important" classes to get the chance to "hide" an element.
|
tw-hidden must win all other "display: xxx !important" classes to get the chance to "hide" an element.
|
||||||
do not use:
|
do not use:
|
||||||
* "[hidden]" attribute: it's too weak, can not be applied to an element with "display: flex"
|
* "[hidden]" attribute: it's too weak, can not be applied to an element with "display: flex"
|
||||||
* ".hidden" class: it has been polluted by Fomantic UI in many cases
|
* ".hidden" class: it has been polluted by Fomantic UI in many cases
|
||||||
* inline style="display: none": it's difficult to tweak
|
* inline style="display: none": it's difficult to tweak
|
||||||
* jQuery's show/hide/toggle: it can not show/hide elements with "display: xxx !important"
|
* jQuery's show/hide/toggle: it can not show/hide elements with "display: xxx !important"
|
||||||
only use:
|
only use:
|
||||||
* this ".gt-hidden" class
|
* this ".tw-hidden" class
|
||||||
* showElem/hideElem/toggleElem functions in "utils/dom.js"
|
* showElem/hideElem/toggleElem functions in "utils/dom.js"
|
||||||
*/
|
*/
|
||||||
.gt-hidden.gt-hidden { display: none !important; }
|
.tw-hidden.tw-hidden { display: none !important; }
|
||||||
|
|
||||||
@media (max-width: 767.98px) {
|
@media (max-width: 767.98px) {
|
||||||
/* double selector so it wins over .tw-flex (old .gt-df) etc */
|
/* double selector so it wins over .tw-flex (old .gt-df) etc */
|
||||||
|
|
|
@ -68,13 +68,14 @@ It needs some tricks to tweak the left/right borders with active state */
|
||||||
border-left: 1px solid var(--color-secondary-dark-2);
|
border-left: 1px solid var(--color-secondary-dark-2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* TODO: these "tw-hidden" selectors are only used by "blame.tmpl" buttons: Raw/Normal View/History/Unescape, need to be refactored to a clear solution later */
|
||||||
.ui.buttons .button:first-child,
|
.ui.buttons .button:first-child,
|
||||||
.ui.buttons .button.gt-hidden:first-child + .button {
|
.ui.buttons .button.tw-hidden:first-child + .button {
|
||||||
border-left: 1px solid var(--color-light-border);
|
border-left: 1px solid var(--color-light-border);
|
||||||
}
|
}
|
||||||
|
|
||||||
.ui.buttons .button:last-child,
|
.ui.buttons .button:last-child,
|
||||||
.ui.buttons .button:nth-last-child(2):has(+ .button.gt-hidden) {
|
.ui.buttons .button:nth-last-child(2):has(+ .button.tw-hidden) {
|
||||||
border-right: 1px solid var(--color-light-border);
|
border-right: 1px solid var(--color-light-border);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -86,7 +86,7 @@
|
||||||
border-top: 1px solid var(--color-secondary);
|
border-top: 1px solid var(--color-secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Fomantic UI segment has default "padding: 1em", so here it removes the padding-top and padding-bottom accordingly (there might also be some `gt-hidden` siblings).
|
/* Fomantic UI segment has default "padding: 1em", so here it removes the padding-top and padding-bottom accordingly (there might also be some `tw-hidden` siblings).
|
||||||
Developers could also use "flex-space-fitted" class to remove the first item's padding-top and the last item's padding-bottom */
|
Developers could also use "flex-space-fitted" class to remove the first item's padding-top and the last item's padding-bottom */
|
||||||
.flex-list.flex-space-fitted > .flex-item:first-child,
|
.flex-list.flex-space-fitted > .flex-item:first-child,
|
||||||
.ui.segment > .flex-list > .flex-item:first-child {
|
.ui.segment > .flex-list > .flex-item:first-child {
|
||||||
|
|
|
@ -15,14 +15,14 @@ function updateExclusiveLabelEdit(form) {
|
||||||
$exclusiveField.removeClass('muted');
|
$exclusiveField.removeClass('muted');
|
||||||
$exclusiveField.removeAttr('aria-disabled');
|
$exclusiveField.removeAttr('aria-disabled');
|
||||||
if ($exclusiveCheckbox[0].checked && $exclusiveCheckbox.data('exclusive-warn')) {
|
if ($exclusiveCheckbox[0].checked && $exclusiveCheckbox.data('exclusive-warn')) {
|
||||||
$exclusiveWarning.removeClass('gt-hidden');
|
$exclusiveWarning.removeClass('tw-hidden');
|
||||||
} else {
|
} else {
|
||||||
$exclusiveWarning.addClass('gt-hidden');
|
$exclusiveWarning.addClass('tw-hidden');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$exclusiveField.addClass('muted');
|
$exclusiveField.addClass('muted');
|
||||||
$exclusiveField.attr('aria-disabled', 'true');
|
$exclusiveField.attr('aria-disabled', 'true');
|
||||||
$exclusiveWarning.addClass('gt-hidden');
|
$exclusiveWarning.addClass('tw-hidden');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ async function receiveUpdateCount(event) {
|
||||||
const data = JSON.parse(event.data);
|
const data = JSON.parse(event.data);
|
||||||
|
|
||||||
for (const count of document.querySelectorAll('.notification_count')) {
|
for (const count of document.querySelectorAll('.notification_count')) {
|
||||||
count.classList.toggle('gt-hidden', data.Count === 0);
|
count.classList.toggle('tw-hidden', data.Count === 0);
|
||||||
count.textContent = `${data.Count}`;
|
count.textContent = `${data.Count}`;
|
||||||
}
|
}
|
||||||
await updateNotificationTable();
|
await updateNotificationTable();
|
||||||
|
@ -179,9 +179,9 @@ async function updateNotificationCount() {
|
||||||
|
|
||||||
const $notificationCount = $('.notification_count');
|
const $notificationCount = $('.notification_count');
|
||||||
if (data.new === 0) {
|
if (data.new === 0) {
|
||||||
$notificationCount.addClass('gt-hidden');
|
$notificationCount.addClass('tw-hidden');
|
||||||
} else {
|
} else {
|
||||||
$notificationCount.removeClass('gt-hidden');
|
$notificationCount.removeClass('tw-hidden');
|
||||||
}
|
}
|
||||||
|
|
||||||
$notificationCount.text(`${data.new}`);
|
$notificationCount.text(`${data.new}`);
|
||||||
|
|
|
@ -42,8 +42,8 @@ function initRepoDiffFileViewToggle() {
|
||||||
$this.addClass('active');
|
$this.addClass('active');
|
||||||
|
|
||||||
const $target = $($this.data('toggle-selector'));
|
const $target = $($this.data('toggle-selector'));
|
||||||
$target.parent().children().addClass('gt-hidden');
|
$target.parent().children().addClass('tw-hidden');
|
||||||
$target.removeClass('gt-hidden');
|
$target.removeClass('tw-hidden');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@ export function initRepoDiffConversationNav() {
|
||||||
// Previous/Next code review conversation
|
// Previous/Next code review conversation
|
||||||
$(document).on('click', '.previous-conversation', (e) => {
|
$(document).on('click', '.previous-conversation', (e) => {
|
||||||
const $conversation = $(e.currentTarget).closest('.comment-code-cloud');
|
const $conversation = $(e.currentTarget).closest('.comment-code-cloud');
|
||||||
const $conversations = $('.comment-code-cloud:not(.gt-hidden)');
|
const $conversations = $('.comment-code-cloud:not(.tw-hidden)');
|
||||||
const index = $conversations.index($conversation);
|
const index = $conversations.index($conversation);
|
||||||
const previousIndex = index > 0 ? index - 1 : $conversations.length - 1;
|
const previousIndex = index > 0 ? index - 1 : $conversations.length - 1;
|
||||||
const $previousConversation = $conversations.eq(previousIndex);
|
const $previousConversation = $conversations.eq(previousIndex);
|
||||||
|
@ -129,7 +129,7 @@ export function initRepoDiffConversationNav() {
|
||||||
});
|
});
|
||||||
$(document).on('click', '.next-conversation', (e) => {
|
$(document).on('click', '.next-conversation', (e) => {
|
||||||
const $conversation = $(e.currentTarget).closest('.comment-code-cloud');
|
const $conversation = $(e.currentTarget).closest('.comment-code-cloud');
|
||||||
const $conversations = $('.comment-code-cloud:not(.gt-hidden)');
|
const $conversations = $('.comment-code-cloud:not(.tw-hidden)');
|
||||||
const index = $conversations.index($conversation);
|
const index = $conversations.index($conversation);
|
||||||
const nextIndex = index < $conversations.length - 1 ? index + 1 : 0;
|
const nextIndex = index < $conversations.length - 1 ? index + 1 : 0;
|
||||||
const $nextConversation = $conversations.eq(nextIndex);
|
const $nextConversation = $conversations.eq(nextIndex);
|
||||||
|
|
|
@ -57,9 +57,9 @@ export function initRepoGraphGit() {
|
||||||
ajaxUrl.searchParams.set('div-only', 'true');
|
ajaxUrl.searchParams.set('div-only', 'true');
|
||||||
window.history.replaceState({}, '', queryString ? `?${queryString}` : window.location.pathname);
|
window.history.replaceState({}, '', queryString ? `?${queryString}` : window.location.pathname);
|
||||||
$('#pagination').empty();
|
$('#pagination').empty();
|
||||||
$('#rel-container').addClass('gt-hidden');
|
$('#rel-container').addClass('tw-hidden');
|
||||||
$('#rev-container').addClass('gt-hidden');
|
$('#rev-container').addClass('tw-hidden');
|
||||||
$('#loading-indicator').removeClass('gt-hidden');
|
$('#loading-indicator').removeClass('tw-hidden');
|
||||||
(async () => {
|
(async () => {
|
||||||
const response = await GET(String(ajaxUrl));
|
const response = await GET(String(ajaxUrl));
|
||||||
const html = await response.text();
|
const html = await response.text();
|
||||||
|
@ -67,9 +67,9 @@ export function initRepoGraphGit() {
|
||||||
$('#pagination').html($div.find('#pagination').html());
|
$('#pagination').html($div.find('#pagination').html());
|
||||||
$('#rel-container').html($div.find('#rel-container').html());
|
$('#rel-container').html($div.find('#rel-container').html());
|
||||||
$('#rev-container').html($div.find('#rev-container').html());
|
$('#rev-container').html($div.find('#rev-container').html());
|
||||||
$('#loading-indicator').addClass('gt-hidden');
|
$('#loading-indicator').addClass('tw-hidden');
|
||||||
$('#rel-container').removeClass('gt-hidden');
|
$('#rel-container').removeClass('tw-hidden');
|
||||||
$('#rev-container').removeClass('gt-hidden');
|
$('#rev-container').removeClass('tw-hidden');
|
||||||
})();
|
})();
|
||||||
};
|
};
|
||||||
const dropdownSelected = params.getAll('branch');
|
const dropdownSelected = params.getAll('branch');
|
||||||
|
|
|
@ -18,7 +18,7 @@ function showContentHistoryDetail(issueBaseUrl, commentId, historyId, itemTitleH
|
||||||
${svg('octicon-x', 16, 'close icon inside')}
|
${svg('octicon-x', 16, 'close icon inside')}
|
||||||
<div class="header tw-flex tw-items-center tw-justify-between">
|
<div class="header tw-flex tw-items-center tw-justify-between">
|
||||||
<div>${itemTitleHtml}</div>
|
<div>${itemTitleHtml}</div>
|
||||||
<div class="ui dropdown dialog-header-options tw-mr-8 gt-hidden">
|
<div class="ui dropdown dialog-header-options tw-mr-8 tw-hidden">
|
||||||
${i18nTextOptions}
|
${i18nTextOptions}
|
||||||
${svg('octicon-triangle-down', 14, 'dropdown icon')}
|
${svg('octicon-triangle-down', 14, 'dropdown icon')}
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
|
@ -76,7 +76,7 @@ function showContentHistoryDetail(issueBaseUrl, commentId, historyId, itemTitleH
|
||||||
$dialog.find('.comment-diff-data').removeClass('is-loading').html(resp.diffHtml);
|
$dialog.find('.comment-diff-data').removeClass('is-loading').html(resp.diffHtml);
|
||||||
// there is only one option "item[data-option-item=delete]", so the dropdown can be entirely shown/hidden.
|
// there is only one option "item[data-option-item=delete]", so the dropdown can be entirely shown/hidden.
|
||||||
if (resp.canSoftDelete) {
|
if (resp.canSoftDelete) {
|
||||||
$dialog.find('.dialog-header-options').removeClass('gt-hidden');
|
$dialog.find('.dialog-header-options').removeClass('tw-hidden');
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error:', error);
|
console.error('Error:', error);
|
||||||
|
|
|
@ -222,7 +222,7 @@ export function initRepoIssueCodeCommentCancel() {
|
||||||
$(document).on('click', '.cancel-code-comment', (e) => {
|
$(document).on('click', '.cancel-code-comment', (e) => {
|
||||||
const $form = $(e.currentTarget).closest('form');
|
const $form = $(e.currentTarget).closest('form');
|
||||||
if ($form.length > 0 && $form.hasClass('comment-form')) {
|
if ($form.length > 0 && $form.hasClass('comment-form')) {
|
||||||
$form.addClass('gt-hidden');
|
$form.addClass('tw-hidden');
|
||||||
showElem($form.closest('.comment-code-cloud').find('button.comment-form-reply'));
|
showElem($form.closest('.comment-code-cloud').find('button.comment-form-reply'));
|
||||||
} else {
|
} else {
|
||||||
$form.closest('.comment-code-cloud').remove();
|
$form.closest('.comment-code-cloud').remove();
|
||||||
|
@ -397,7 +397,7 @@ export function initRepoIssueComments() {
|
||||||
export async function handleReply($el) {
|
export async function handleReply($el) {
|
||||||
hideElem($el);
|
hideElem($el);
|
||||||
const $form = $el.closest('.comment-code-cloud').find('.comment-form');
|
const $form = $el.closest('.comment-code-cloud').find('.comment-form');
|
||||||
$form.removeClass('gt-hidden');
|
$form.removeClass('tw-hidden');
|
||||||
|
|
||||||
const $textarea = $form.find('textarea');
|
const $textarea = $form.find('textarea');
|
||||||
let editor = getComboMarkdownEditor($textarea);
|
let editor = getComboMarkdownEditor($textarea);
|
||||||
|
@ -433,10 +433,10 @@ export function initRepoPullRequestReview() {
|
||||||
if ($diffHeader[0]) {
|
if ($diffHeader[0]) {
|
||||||
offset += $('.diff-detail-box').outerHeight() + $diffHeader.outerHeight();
|
offset += $('.diff-detail-box').outerHeight() + $diffHeader.outerHeight();
|
||||||
}
|
}
|
||||||
$(`#show-outdated-${id}`).addClass('gt-hidden');
|
$(`#show-outdated-${id}`).addClass('tw-hidden');
|
||||||
$(`#code-comments-${id}`).removeClass('gt-hidden');
|
$(`#code-comments-${id}`).removeClass('tw-hidden');
|
||||||
$(`#code-preview-${id}`).removeClass('gt-hidden');
|
$(`#code-preview-${id}`).removeClass('tw-hidden');
|
||||||
$(`#hide-outdated-${id}`).removeClass('gt-hidden');
|
$(`#hide-outdated-${id}`).removeClass('tw-hidden');
|
||||||
// if the comment box is folded, expand it
|
// if the comment box is folded, expand it
|
||||||
if ($ancestorDiffBox.attr('data-folded') && $ancestorDiffBox.attr('data-folded') === 'true') {
|
if ($ancestorDiffBox.attr('data-folded') && $ancestorDiffBox.attr('data-folded') === 'true') {
|
||||||
setFileFolding($ancestorDiffBox[0], $ancestorDiffBox.find('.fold-file')[0], false);
|
setFileFolding($ancestorDiffBox[0], $ancestorDiffBox.find('.fold-file')[0], false);
|
||||||
|
@ -452,19 +452,19 @@ export function initRepoPullRequestReview() {
|
||||||
$(document).on('click', '.show-outdated', function (e) {
|
$(document).on('click', '.show-outdated', function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
const id = $(this).data('comment');
|
const id = $(this).data('comment');
|
||||||
$(this).addClass('gt-hidden');
|
$(this).addClass('tw-hidden');
|
||||||
$(`#code-comments-${id}`).removeClass('gt-hidden');
|
$(`#code-comments-${id}`).removeClass('tw-hidden');
|
||||||
$(`#code-preview-${id}`).removeClass('gt-hidden');
|
$(`#code-preview-${id}`).removeClass('tw-hidden');
|
||||||
$(`#hide-outdated-${id}`).removeClass('gt-hidden');
|
$(`#hide-outdated-${id}`).removeClass('tw-hidden');
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on('click', '.hide-outdated', function (e) {
|
$(document).on('click', '.hide-outdated', function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
const id = $(this).data('comment');
|
const id = $(this).data('comment');
|
||||||
$(this).addClass('gt-hidden');
|
$(this).addClass('tw-hidden');
|
||||||
$(`#code-comments-${id}`).addClass('gt-hidden');
|
$(`#code-comments-${id}`).addClass('tw-hidden');
|
||||||
$(`#code-preview-${id}`).addClass('gt-hidden');
|
$(`#code-preview-${id}`).addClass('tw-hidden');
|
||||||
$(`#show-outdated-${id}`).removeClass('gt-hidden');
|
$(`#show-outdated-${id}`).removeClass('tw-hidden');
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on('click', 'button.comment-form-reply', async function (e) {
|
$(document).on('click', 'button.comment-form-reply', async function (e) {
|
||||||
|
|
|
@ -31,7 +31,7 @@ const {csrfToken} = window.config;
|
||||||
// if there are draft comments, confirm before reloading, to avoid losing comments
|
// if there are draft comments, confirm before reloading, to avoid losing comments
|
||||||
function reloadConfirmDraftComment() {
|
function reloadConfirmDraftComment() {
|
||||||
const commentTextareas = [
|
const commentTextareas = [
|
||||||
document.querySelector('.edit-content-zone:not(.gt-hidden) textarea'),
|
document.querySelector('.edit-content-zone:not(.tw-hidden) textarea'),
|
||||||
document.querySelector('#comment-form textarea'),
|
document.querySelector('#comment-form textarea'),
|
||||||
];
|
];
|
||||||
for (const textarea of commentTextareas) {
|
for (const textarea of commentTextareas) {
|
||||||
|
@ -197,15 +197,15 @@ export function initRepoCommentForm() {
|
||||||
$(this).parent().find('.item').each(function () {
|
$(this).parent().find('.item').each(function () {
|
||||||
if ($(this).hasClass('checked')) {
|
if ($(this).hasClass('checked')) {
|
||||||
listIds.push($(this).data('id'));
|
listIds.push($(this).data('id'));
|
||||||
$($(this).data('id-selector')).removeClass('gt-hidden');
|
$($(this).data('id-selector')).removeClass('tw-hidden');
|
||||||
} else {
|
} else {
|
||||||
$($(this).data('id-selector')).addClass('gt-hidden');
|
$($(this).data('id-selector')).addClass('tw-hidden');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (listIds.length === 0) {
|
if (listIds.length === 0) {
|
||||||
$noSelect.removeClass('gt-hidden');
|
$noSelect.removeClass('tw-hidden');
|
||||||
} else {
|
} else {
|
||||||
$noSelect.addClass('gt-hidden');
|
$noSelect.addClass('tw-hidden');
|
||||||
}
|
}
|
||||||
$($(this).parent().data('id')).val(listIds.join(','));
|
$($(this).parent().data('id')).val(listIds.join(','));
|
||||||
return false;
|
return false;
|
||||||
|
@ -234,9 +234,9 @@ export function initRepoCommentForm() {
|
||||||
}
|
}
|
||||||
|
|
||||||
$list.find('.item').each(function () {
|
$list.find('.item').each(function () {
|
||||||
$(this).addClass('gt-hidden');
|
$(this).addClass('tw-hidden');
|
||||||
});
|
});
|
||||||
$noSelect.removeClass('gt-hidden');
|
$noSelect.removeClass('tw-hidden');
|
||||||
$($(this).parent().data('id')).val('');
|
$($(this).parent().data('id')).val('');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -286,7 +286,7 @@ export function initRepoCommentForm() {
|
||||||
</a>
|
</a>
|
||||||
`);
|
`);
|
||||||
|
|
||||||
$(`.ui${select_id}.list .no-select`).addClass('gt-hidden');
|
$(`.ui${select_id}.list .no-select`).addClass('tw-hidden');
|
||||||
$(input_id).val($(this).data('id'));
|
$(input_id).val($(this).data('id'));
|
||||||
});
|
});
|
||||||
$menu.find('.no-select.item').on('click', function () {
|
$menu.find('.no-select.item').on('click', function () {
|
||||||
|
@ -307,7 +307,7 @@ export function initRepoCommentForm() {
|
||||||
}
|
}
|
||||||
|
|
||||||
$list.find('.selected').html('');
|
$list.find('.selected').html('');
|
||||||
$list.find('.no-select').removeClass('gt-hidden');
|
$list.find('.no-select').removeClass('tw-hidden');
|
||||||
$(input_id).val('');
|
$(input_id).val('');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,7 @@ export async function renderMermaid() {
|
||||||
iframe.srcdoc = `<html><head><style>${iframeCss}</style></head><body>${svg}</body></html>`;
|
iframe.srcdoc = `<html><head><style>${iframeCss}</style></head><body>${svg}</body></html>`;
|
||||||
|
|
||||||
const mermaidBlock = document.createElement('div');
|
const mermaidBlock = document.createElement('div');
|
||||||
mermaidBlock.classList.add('mermaid-block', 'is-loading', 'gt-hidden');
|
mermaidBlock.classList.add('mermaid-block', 'is-loading', 'tw-hidden');
|
||||||
mermaidBlock.append(iframe);
|
mermaidBlock.append(iframe);
|
||||||
|
|
||||||
const btn = makeCodeCopyButton();
|
const btn = makeCodeCopyButton();
|
||||||
|
@ -58,7 +58,7 @@ export async function renderMermaid() {
|
||||||
|
|
||||||
iframe.addEventListener('load', () => {
|
iframe.addEventListener('load', () => {
|
||||||
pre.replaceWith(mermaidBlock);
|
pre.replaceWith(mermaidBlock);
|
||||||
mermaidBlock.classList.remove('gt-hidden');
|
mermaidBlock.classList.remove('tw-hidden');
|
||||||
iframe.style.height = `${iframe.contentWindow.document.body.clientHeight}px`;
|
iframe.style.height = `${iframe.contentWindow.document.body.clientHeight}px`;
|
||||||
setTimeout(() => { // avoid flash of iframe background
|
setTimeout(() => { // avoid flash of iframe background
|
||||||
mermaidBlock.classList.remove('is-loading');
|
mermaidBlock.classList.remove('is-loading');
|
||||||
|
|
|
@ -213,7 +213,7 @@ export const SvgIcon = {
|
||||||
classes.push(...this.className.split(/\s+/).filter(Boolean));
|
classes.push(...this.className.split(/\s+/).filter(Boolean));
|
||||||
}
|
}
|
||||||
if (this.symbolId) {
|
if (this.symbolId) {
|
||||||
classes.push('gt-hidden', 'svg-symbol-container');
|
classes.push('tw-hidden', 'svg-symbol-container');
|
||||||
svgInnerHtml = `<symbol id="${this.symbolId}" viewBox="${attrs['^viewBox']}">${svgInnerHtml}</symbol>`;
|
svgInnerHtml = `<symbol id="${this.symbolId}" viewBox="${attrs['^viewBox']}">${svgInnerHtml}</symbol>`;
|
||||||
}
|
}
|
||||||
// create VNode
|
// create VNode
|
||||||
|
|
|
@ -22,11 +22,11 @@ function elementsCall(el, func, ...args) {
|
||||||
*/
|
*/
|
||||||
function toggleShown(el, force) {
|
function toggleShown(el, force) {
|
||||||
if (force === true) {
|
if (force === true) {
|
||||||
el.classList.remove('gt-hidden');
|
el.classList.remove('tw-hidden');
|
||||||
} else if (force === false) {
|
} else if (force === false) {
|
||||||
el.classList.add('gt-hidden');
|
el.classList.add('tw-hidden');
|
||||||
} else if (force === undefined) {
|
} else if (force === undefined) {
|
||||||
el.classList.toggle('gt-hidden');
|
el.classList.toggle('tw-hidden');
|
||||||
} else {
|
} else {
|
||||||
throw new Error('invalid force argument');
|
throw new Error('invalid force argument');
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@ export function toggleElem(el, force) {
|
||||||
|
|
||||||
export function isElemHidden(el) {
|
export function isElemHidden(el) {
|
||||||
const res = [];
|
const res = [];
|
||||||
elementsCall(el, (e) => res.push(e.classList.contains('gt-hidden')));
|
elementsCall(el, (e) => res.push(e.classList.contains('tw-hidden')));
|
||||||
if (res.length > 1) throw new Error(`isElemHidden doesn't work for multiple elements`);
|
if (res.length > 1) throw new Error(`isElemHidden doesn't work for multiple elements`);
|
||||||
return res[0];
|
return res[0];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue