diff --git a/client/src/components/BoardPage/BoardPage.tsx b/client/src/components/BoardPage/BoardPage.tsx index bfcc8d1..68aeda2 100644 --- a/client/src/components/BoardPage/BoardPage.tsx +++ b/client/src/components/BoardPage/BoardPage.tsx @@ -92,7 +92,9 @@ export class BoardPage extends React.Component { renderNewCardModal() { const { newCardModalActive, newCardLaneID } = this.state; const { board } = this.props; - if (!board || !newCardLaneID) return null; + + if (!board || newCardLaneID === undefined) return null; + return (
diff --git a/client/src/sass/_base.scss b/client/src/sass/_base.scss index 6e27c9f..8d158ef 100644 --- a/client/src/sass/_base.scss +++ b/client/src/sass/_base.scss @@ -11,6 +11,10 @@ html, body { margin-top: $size-normal; } +.has-padding-small { + padding: 1rem; +} + #app { display: flex; flex-direction: column; diff --git a/client/src/store/sagas/issues.ts b/client/src/store/sagas/issues.ts index 6871df4..a53d197 100644 --- a/client/src/store/sagas/issues.ts +++ b/client/src/store/sagas/issues.ts @@ -76,14 +76,9 @@ export function* createIssueSaga(action: any) { const labels = yield call(gitea.fetchProjectLabels.bind(gitea), project); const giteaLabel = labels.find((l: any) => l.name === label) - if (!giteaLabel) { - yield put({ type: CREATE_ISSUE_FAILURE, error: new Error(`Label "${label}" not found !`) }); - return; - } - let issue; try { - issue = yield call(gitea.createIssue.bind(gitea), project, title, body, giteaLabel.id); + issue = yield call(gitea.createIssue.bind(gitea), project, title, body, giteaLabel ? giteaLabel.id : null); } catch(error) { yield put({ type: CREATE_ISSUE_FAILURE, error }); return; diff --git a/client/src/util/gitea.ts b/client/src/util/gitea.ts index 910e369..8cfd785 100644 --- a/client/src/util/gitea.ts +++ b/client/src/util/gitea.ts @@ -61,7 +61,7 @@ export class GiteaClient { body: JSON.stringify({ title, body, - labels: [labelID], + labels: labelID ? [labelID] : undefined, }), }) .then(this.assertAuthorization)