Merge pull request 'Fix bad spacing on new release page' (#5261) from maltejur/forgejo:push-nnnyrrvzlqqy into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5261 Reviewed-by: Otto <otto@codeberg.org>
This commit is contained in:
commit
742991abca
4 changed files with 30 additions and 30 deletions
|
@ -99,9 +99,9 @@
|
||||||
{{ctx.Locale.Tr "remove"}}
|
{{ctx.Locale.Tr "remove"}}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<a class="ui mini button tw-float-right tw-mb-4 tw-mt-2" id="add-external-link">
|
<button type="button" class="ui mini button tw-float-right tw-mb-4 tw-mt-2" id="add-external-link">
|
||||||
{{ctx.Locale.Tr "repo.release.add_external_asset"}}
|
{{ctx.Locale.Tr "repo.release.add_external_asset"}}
|
||||||
</a>
|
</button>
|
||||||
{{if .IsAttachmentEnabled}}
|
{{if .IsAttachmentEnabled}}
|
||||||
<div class="field">
|
<div class="field">
|
||||||
{{template "repo/upload" .}}
|
{{template "repo/upload" .}}
|
||||||
|
@ -111,32 +111,28 @@
|
||||||
<div class="divider"></div>
|
<div class="divider"></div>
|
||||||
<div class="ui">
|
<div class="ui">
|
||||||
<div>
|
<div>
|
||||||
{{if not .PageIsEditRelease}}
|
<fieldset>
|
||||||
<div class="tag-message field">
|
{{if not .PageIsEditRelease}}
|
||||||
<div class="ui checkbox">
|
<label>
|
||||||
<input type="checkbox" name="add_tag_msg">
|
<input type="checkbox" name="add_tag_msg">
|
||||||
<label><strong>{{ctx.Locale.Tr "repo.release.add_tag_msg"}}</strong></label>
|
{{ctx.Locale.Tr "repo.release.add_tag_msg"}}
|
||||||
</div>
|
</label>
|
||||||
</div>
|
{{else}}
|
||||||
{{else}}
|
<input type="hidden" name="add_tag_msg" value="false">
|
||||||
<input type="hidden" name="add_tag_msg" value="false">
|
{{end}}
|
||||||
{{end}}
|
<label>
|
||||||
<div class="prerelease field">
|
|
||||||
<div class="ui checkbox">
|
|
||||||
<input type="checkbox" name="prerelease" {{if .prerelease}}checked{{end}}>
|
<input type="checkbox" name="prerelease" {{if .prerelease}}checked{{end}}>
|
||||||
<label><strong>{{ctx.Locale.Tr "repo.release.prerelease_desc"}}</strong></label>
|
{{ctx.Locale.Tr "repo.release.prerelease_desc"}}
|
||||||
</div>
|
<span class="help">{{ctx.Locale.Tr "repo.release.prerelease_helper"}}</span>
|
||||||
</div>
|
</label>
|
||||||
<span class="help">{{ctx.Locale.Tr "repo.release.prerelease_helper"}}</span>
|
{{if not .DisableDownloadSourceArchives}}
|
||||||
{{if not .DisableDownloadSourceArchives}}
|
<label>
|
||||||
<div class="field">
|
|
||||||
<div class="ui checkbox">
|
|
||||||
<input type="checkbox" name="hide_archive_links" {{if .hide_archive_links}}checked{{end}}>
|
<input type="checkbox" name="hide_archive_links" {{if .hide_archive_links}}checked{{end}}>
|
||||||
<label><strong>{{ctx.Locale.Tr "repo.release.hide_archive_links"}}</strong></label>
|
{{ctx.Locale.Tr "repo.release.hide_archive_links"}}
|
||||||
</div>
|
<span class="help">{{ctx.Locale.Tr "repo.release.hide_archive_links_helper"}}</span>
|
||||||
</div>
|
</label>
|
||||||
<span class="help">{{ctx.Locale.Tr "repo.release.hide_archive_links_helper"}}</span>
|
{{end}}
|
||||||
{{end}}
|
</fieldset>
|
||||||
<div class="divider tw-mt-0"></div>
|
<div class="divider tw-mt-0"></div>
|
||||||
<div class="tw-flex tw-justify-end button-row">
|
<div class="tw-flex tw-justify-end button-row">
|
||||||
{{if .PageIsEditRelease}}
|
{{if .PageIsEditRelease}}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
// @ts-check
|
// @ts-check
|
||||||
import {expect} from '@playwright/test';
|
import {expect} from '@playwright/test';
|
||||||
import {test, login_user, save_visual, load_logged_in_context} from './utils_e2e.js';
|
import {test, login_user, save_visual, load_logged_in_context} from './utils_e2e.js';
|
||||||
|
import {validate_form} from './shared/forms.js';
|
||||||
|
|
||||||
test.beforeAll(async ({browser}, workerInfo) => {
|
test.beforeAll(async ({browser}, workerInfo) => {
|
||||||
await login_user(browser, workerInfo, 'user2');
|
await login_user(browser, workerInfo, 'user2');
|
||||||
|
@ -23,6 +24,7 @@ test('External Release Attachments', async ({browser, isMobile}, workerInfo) =>
|
||||||
|
|
||||||
// Fill out form and create new release
|
// Fill out form and create new release
|
||||||
await expect(page).toHaveURL('/user2/repo2/releases/new');
|
await expect(page).toHaveURL('/user2/repo2/releases/new');
|
||||||
|
await validate_form({page}, 'fieldset');
|
||||||
await page.fill('input[name=tag_name]', '2.0');
|
await page.fill('input[name=tag_name]', '2.0');
|
||||||
await page.fill('input[name=title]', '2.0');
|
await page.fill('input[name=title]', '2.0');
|
||||||
await page.click('#add-external-link');
|
await page.click('#add-external-link');
|
||||||
|
@ -43,6 +45,7 @@ test('External Release Attachments', async ({browser, isMobile}, workerInfo) =>
|
||||||
|
|
||||||
// Validate edit page and edit the release
|
// Validate edit page and edit the release
|
||||||
await expect(page).toHaveURL('/user2/repo2/releases/edit/2.0');
|
await expect(page).toHaveURL('/user2/repo2/releases/edit/2.0');
|
||||||
|
await validate_form({page}, 'fieldset');
|
||||||
await expect(page.locator('.attachment_edit:visible')).toHaveCount(2);
|
await expect(page.locator('.attachment_edit:visible')).toHaveCount(2);
|
||||||
await expect(page.locator('.attachment_edit:visible').nth(0)).toHaveValue('Test');
|
await expect(page.locator('.attachment_edit:visible').nth(0)).toHaveValue('Test');
|
||||||
await expect(page.locator('.attachment_edit:visible').nth(1)).toHaveValue('https://forgejo.org/');
|
await expect(page.locator('.attachment_edit:visible').nth(1)).toHaveValue('https://forgejo.org/');
|
||||||
|
|
|
@ -10,6 +10,7 @@ fieldset legend {
|
||||||
|
|
||||||
fieldset label {
|
fieldset label {
|
||||||
display: block;
|
display: block;
|
||||||
|
margin-bottom: 0.6em;
|
||||||
}
|
}
|
||||||
|
|
||||||
fieldset label:has(input[type="text"]),
|
fieldset label:has(input[type="text"]),
|
||||||
|
@ -19,7 +20,11 @@ fieldset label:has(input[type="number"]) {
|
||||||
|
|
||||||
fieldset .help {
|
fieldset .help {
|
||||||
font-weight: var(--font-weight-normal);
|
font-weight: var(--font-weight-normal);
|
||||||
display: block !important; /* overrides another rule in this file, remove when obsolete */
|
}
|
||||||
|
|
||||||
|
.form fieldset .help { /* overrides other .form .help rules in this file, remove when obsolete */
|
||||||
|
display: block !important;
|
||||||
|
padding-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
fieldset input[type="checkbox"],
|
fieldset input[type="checkbox"],
|
||||||
|
|
|
@ -99,10 +99,6 @@
|
||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.repository.new.release .prerelease.field {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 438px) {
|
@media (max-width: 438px) {
|
||||||
.repository.new.release .field button,
|
.repository.new.release .field button,
|
||||||
.repository.new.release .field input {
|
.repository.new.release .field input {
|
||||||
|
|
Loading…
Reference in a new issue