Add a docs button #90
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Add a help button on the left of the settings button inside a campaign
I'll start by exploring the codebase to find the settings button inside a campaign.
Now let me see how the docs page is opened elsewhere in the app.
Now I'll implement the change in the campaign top bar:
Now let me add a test alongside the existing docs entry-point test:
Done. Implemented Gitea issue #90.
What changed
frontend/app/components/viewer/TopBar.vue— a documentation button in the campaign top bar, on the left of the Settings button (Documentation·Settings·Exit):/docspage rather than a new window — the same destination the main menu already links to, and the same label (main-menu.documentation), so no new strings had to be added to theen/es/calocales./docsis a separate page (app/pages/docs/), and the campaign workspace holds its open notes only in memory (services/Content.js), so navigating in place would drop them. Only the campaign itself survives a reload (localStorage.selectedCampaignId). A new tab keeps the campaign exactly as it was;rel="noopener noreferrer"because the opened tab is not under the app's control..docs-buttonstyle block, because buttons are styled by the element selector inapp/assets/css/main.scss— an<a>gets nothing from it. This mirrors whatMainMenuWindow.vuealready does for its.docs-link, and usesvar(--color-border),var(--color-button-background),var(--color-button-hover),var(--color-button-active),var(--color-text)so both themes work.tests/docs.test.js— one test next to the existing "the main menu points at the documentation": the top bar links to/docsunder the same label, sits before the settings button, opens in a tab that cannot reach back, and carries its look in theme colours.Verification
npm testfrom the repository root: 331 tests, 331 pass, 0 fail. I also checked the new test against the pre-changeTopBar.vuefromgit show HEAD:and it fails there, so it does guard the behaviour.Frontend dev server /
pnpm --filter ./frontend run buildwere not run: no dependencies are installed in this checkout (node_modulesis absent at the root and infrontend/), so the visual result is unverified in a browser.One judgement call worth flagging
New tab versus staying in the app. The issue only says "add a help button on the left of the settings button"; I chose a new tab so reading the docs does not clear the note column. If the intent is to navigate to
/docsin place, like the main menu does, it is a one-line change (droptarget/rel).Not committed or pushed, as instructed.
Implementation is ready for review: #93