mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-21 12:44:49 -05:00
Fixes that the settings button moves in the overflow menu
and the add more button is on the right This fix moves the settings button back to the right and the add more button back to the left.
This commit is contained in:
parent
27fa12427c
commit
fb5e36bc6f
2 changed files with 15 additions and 1 deletions
|
@ -177,7 +177,7 @@
|
||||||
{{$highlightSettings := true}}
|
{{$highlightSettings := true}}
|
||||||
{{if and .SignedUser.EnableRepoUnitHints (not (.Repository.AllUnitsEnabled ctx))}}
|
{{if and .SignedUser.EnableRepoUnitHints (not (.Repository.AllUnitsEnabled ctx))}}
|
||||||
{{$highlightSettings = false}}
|
{{$highlightSettings = false}}
|
||||||
<a id="settings-btn" class="{{if .PageIsRepoSettingsUnits}}active {{end}}right item" href="{{.RepoLink}}/settings/units">
|
<a class="{{if .PageIsRepoSettingsUnits}}active {{end}}item" href="{{.RepoLink}}/settings/units">
|
||||||
{{svg "octicon-diff-added"}} {{ctx.Locale.Tr "repo.settings.units.add_more"}}
|
{{svg "octicon-diff-added"}} {{ctx.Locale.Tr "repo.settings.units.add_more"}}
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
@ -22,6 +22,20 @@ test.describe('desktop viewport', () => {
|
||||||
await expect(page.locator('.overflow-menu-button')).toHaveCount(0);
|
await expect(page.locator('.overflow-menu-button')).toHaveCount(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('Settings button on right of repo header also when add more button is shown', async ({browser}, workerInfo) => {
|
||||||
|
await login_user(browser, workerInfo, 'user12');
|
||||||
|
const context = await load_logged_in_context(browser, workerInfo, 'user12');
|
||||||
|
const page = await context.newPage();
|
||||||
|
|
||||||
|
await page.goto('/user12/repo10');
|
||||||
|
|
||||||
|
const settingsBtn = page.locator('.overflow-menu-items>#settings-btn');
|
||||||
|
await expect(settingsBtn).toBeVisible();
|
||||||
|
await expect(settingsBtn).toHaveClass(/right/);
|
||||||
|
|
||||||
|
await expect(page.locator('.overflow-menu-button')).toHaveCount(0);
|
||||||
|
});
|
||||||
|
|
||||||
test('Settings button on right of org header', async ({browser}, workerInfo) => {
|
test('Settings button on right of org header', async ({browser}, workerInfo) => {
|
||||||
const context = await load_logged_in_context(browser, workerInfo, 'user2');
|
const context = await load_logged_in_context(browser, workerInfo, 'user2');
|
||||||
const page = await context.newPage();
|
const page = await context.newPage();
|
||||||
|
|
Loading…
Reference in a new issue