Skip to content

Commit 84ef527

Browse files
committed
use tw-hidden instead of display:none
1 parent 48b4be2 commit 84ef527

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

templates/repo/create.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444
<div class="inline required field {{if .Err_RepoName}}error{{end}}">
4545
<label for="repo_name">{{ctx.Locale.Tr "repo.repo_name"}}</label>
4646
<input id="repo_name" name="repo_name" value="{{.repo_name}}" autofocus required maxlength="100">
47-
<span id="repo_name_public_profile_hint" style="display:none" class="help">{{ctx.Locale.Tr "repo.repo_name_public_profile_hint"}}</span>
48-
<span id="repo_name_private_profile_hint" style="display:none" class="help">{{ctx.Locale.Tr "repo.repo_name_private_profile_hint"}}</span>
47+
<span id="repo_name_public_profile_hint" class="help tw-hidden">{{ctx.Locale.Tr "repo.repo_name_public_profile_hint"}}</span>
48+
<span id="repo_name_private_profile_hint" class="help tw-hidden">{{ctx.Locale.Tr "repo.repo_name_private_profile_hint"}}</span>
4949
<span class="help">{{ctx.Locale.Tr "repo.repo_name_helper"}}</span>
5050
</div>
5151
<div class="inline field">

web_src/js/features/repo-create.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ const repoPrivateHint = document.querySelector<HTMLInputElement>('#repo_name_pri
55
export function initRepoCreate() {
66
repoName?.addEventListener('input', () => {
77
if (repoName?.value === '.profile') {
8-
repoPublicHint.style.display = 'inline-block';
8+
repoPublicHint.classList.remove('tw-hidden');
99
} else {
10-
repoPublicHint.style.display = 'none';
10+
repoPublicHint.classList.add('tw-hidden');
1111
}
1212
if (repoName?.value === '.profile-private') {
13-
repoPrivateHint.style.display = 'inline-block';
13+
repoPrivateHint.classList.remove('tw-hidden');
1414
} else {
15-
repoPrivateHint.style.display = 'none';
15+
repoPrivateHint.classList.add('tw-hidden');
1616
}
1717
});
1818
}

0 commit comments

Comments
 (0)