Remove dead normalizeIssue function and make legal pages linkable
All checks were successful
Build & Push Container Image / build (push) Successful in 8s
All checks were successful
Build & Push Container Image / build (push) Successful in 8s
- Remove unused normalizeIssue and JIRA_STORY_POINTS_FIELD env var - Add URL routing for /terms, /privacy, /support pages Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
620547c78c
commit
047d0de485
3 changed files with 10 additions and 16 deletions
|
|
@ -8,5 +8,4 @@ JIRA_CLIENT_SECRET=
|
|||
JIRA_OAUTH_REDIRECT_URI=http://localhost:4010/api/jira/oauth/callback
|
||||
JIRA_SCOPES="offline_access read:jira-work write:jira-work read:me"
|
||||
JWT_SECRET=change-me-to-a-random-secret
|
||||
JIRA_STORY_POINTS_FIELD=customfield_10016
|
||||
JIRA_MOCK_FALLBACK=true
|
||||
|
|
|
|||
|
|
@ -193,20 +193,8 @@ async function jiraFetch(jiraAccountId, path, options = {}) {
|
|||
return response.json();
|
||||
}
|
||||
|
||||
function normalizeIssue(issue) {
|
||||
return {
|
||||
id: issue.id,
|
||||
key: issue.key,
|
||||
title: issue.fields?.summary || issue.key,
|
||||
description: issue.fields?.description || null,
|
||||
estimate: issue.fields?.[process.env.JIRA_STORY_POINTS_FIELD || 'customfield_10016'] || 0,
|
||||
status: issue.fields?.status?.name || 'Unknown',
|
||||
reporter: issue.fields?.reporter?.displayName || null
|
||||
};
|
||||
}
|
||||
|
||||
export async function getSprintIssues(jiraAccountId, sprintId, boardId) {
|
||||
let spField = process.env.JIRA_STORY_POINTS_FIELD || 'customfield_10016';
|
||||
let spField = 'customfield_10016';
|
||||
if (boardId) {
|
||||
try {
|
||||
const config = await jiraFetch(jiraAccountId, `/rest/agile/1.0/board/${boardId}/configuration`);
|
||||
|
|
|
|||
|
|
@ -21,7 +21,10 @@ function useDarkMode() {
|
|||
}
|
||||
|
||||
export default function App() {
|
||||
const [view, setView] = useState('loading');
|
||||
const [view, setView] = useState(() => {
|
||||
const legalPages = { '/terms': 'legal-terms', '/privacy': 'legal-privacy', '/support': 'legal-support' };
|
||||
return legalPages[window.location.pathname] || 'loading';
|
||||
});
|
||||
const [user, setUser] = useState(null);
|
||||
const [activeRoom, setActiveRoom] = useState(null);
|
||||
const [prevView, setPrevView] = useState('login');
|
||||
|
|
@ -92,12 +95,16 @@ export default function App() {
|
|||
|
||||
function showLegal(page) {
|
||||
setPrevView(view);
|
||||
window.history.pushState({}, '', `/${page}`);
|
||||
setView(`legal-${page}`);
|
||||
}
|
||||
|
||||
if (view.startsWith('legal-')) {
|
||||
const page = view.replace('legal-', '');
|
||||
return <LegalPage page={page} dark={dark} onBack={() => setView(prevView)} />;
|
||||
return <LegalPage page={page} dark={dark} onBack={() => {
|
||||
window.history.replaceState({}, '', '/');
|
||||
setView(prevView);
|
||||
}} />;
|
||||
}
|
||||
|
||||
if (view === 'login') {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue