Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 2.0.4 #1334

Open
wants to merge 62 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
7595b7e
fix: connect modal close loop
wwills2 Sep 18, 2024
242d353
Merge branch 'develop' into 9-2024-bug-fixes-updates
wwills2 Sep 18, 2024
7252307
feat: dependency updates
wwills2 Sep 18, 2024
b36da10
fix: error if registry id does not exist in my projects page
wwills2 Sep 24, 2024
116e5d1
ci: Use Glue Action for requests instead of curl
Starttoaster Sep 24, 2024
cb3ca5d
feat: improved staging diff modal behavior
wwills2 Sep 26, 2024
86a1f27
Merge remote-tracking branch 'origin/9-2024-bug-fixes-updates' into 9…
wwills2 Sep 26, 2024
ca8b428
fix: split unit form
wwills2 Sep 27, 2024
d1bfe9d
fix: create and edit unit timestamp error
wwills2 Oct 1, 2024
cd1aaac
Merge pull request #1325 from Chia-Network/9-2024-bug-fixes-updates
TheLastCicada Oct 1, 2024
6a65b7e
fix: hardcoded api host in fila download fetch requests
wwills2 Oct 10, 2024
0e37faa
Merge pull request #1332 from Chia-Network/fix/download-buttons-hardc…
TheLastCicada Oct 10, 2024
0b9fea9
chore: version bump
TheLastCicada Oct 10, 2024
7684ff6
Merge pull request #1333 from Chia-Network/204
TheLastCicada Oct 10, 2024
8ba7cb8
fix: page query param set when navigating to a paginated page
wwills2 Oct 10, 2024
0849e8b
Merge pull request #1336 from Chia-Network/queryparam-hook-update
TheLastCicada Nov 18, 2024
3759962
ci: check for secrets and allow dependabot to build binaries
TheLastCicada Nov 18, 2024
1a063e8
Merge pull request #1342 from Chia-Network/dependabot-updates
TheLastCicada Nov 18, 2024
ecbaa56
chore(deps): bump cross-spawn from 7.0.3 to 7.0.6
dependabot[bot] Nov 18, 2024
1c4adb9
chore(deps): bump softprops/action-gh-release from 0.1.15 to 2.1.0
dependabot[bot] Nov 18, 2024
3a4c33c
chore(deps): bump Apple-Actions/import-codesign-certs from 1 to 3
dependabot[bot] Nov 18, 2024
f30b9e3
chore(deps): bump actions/download-artifact from 3 to 4
dependabot[bot] Nov 18, 2024
2aac55d
chore(deps): bump actions/upload-artifact from 3 to 4
dependabot[bot] Nov 18, 2024
5bdab08
Merge pull request #1248 from Chia-Network/dependabot/github_actions/…
TheLastCicada Nov 18, 2024
ea234a4
Merge pull request #1341 from Chia-Network/dependabot/github_actions/…
TheLastCicada Nov 18, 2024
1b23401
Merge pull request #1250 from Chia-Network/dependabot/github_actions/…
TheLastCicada Nov 18, 2024
e44be2e
Merge pull request #1249 from Chia-Network/dependabot/github_actions/…
TheLastCicada Nov 18, 2024
06ec71a
chore(deps): bump react-intl from 6.6.8 to 7.0.1
dependabot[bot] Nov 18, 2024
551efa2
chore(deps): bump cookie and express
dependabot[bot] Nov 18, 2024
73fb019
chore(deps): bump rollup from 4.21.3 to 4.27.3
dependabot[bot] Nov 18, 2024
e0b98fd
Merge pull request #1345 from Chia-Network/dependabot/npm_and_yarn/ro…
TheLastCicada Nov 25, 2024
27033bc
Merge pull request #1344 from Chia-Network/dependabot/npm_and_yarn/re…
TheLastCicada Nov 25, 2024
2c79426
Merge pull request #1343 from Chia-Network/dependabot/npm_and_yarn/cr…
TheLastCicada Nov 25, 2024
8bc363f
Merge pull request #1335 from Chia-Network/dependabot/npm_and_yarn/mu…
TheLastCicada Nov 25, 2024
a9beb4c
feat: removed unnecessary production express server
wwills2 Nov 26, 2024
78d7f2b
Merge branch 'develop' into remove-express-server-for-production-ui
wwills2 Nov 26, 2024
8a5827b
Merge pull request #1356 from Chia-Network/remove-express-server-for-…
TheLastCicada Nov 26, 2024
37c257e
fix: locked in flowbite-react version
wwills2 Dec 2, 2024
720f1db
Merge pull request #1357 from Chia-Network/lock-working-flowbite-ver
TheLastCicada Dec 2, 2024
00e2968
chore: address flowbite-react 0.8.0+ breaking changes
wwills2 Dec 2, 2024
4da3425
Merge pull request #1358 from Chia-Network/address-flowbite-breaking-…
TheLastCicada Dec 2, 2024
9eb7a86
chore(deps): bump diff from 5.2.0 to 7.0.0
dependabot[bot] Dec 2, 2024
c48dda4
chore(deps-dev): bump concurrently from 8.2.2 to 9.1.0
dependabot[bot] Dec 2, 2024
b648ce2
chore(deps-dev): bump wait-on from 7.2.0 to 8.0.1
dependabot[bot] Dec 3, 2024
5e52e89
fix: address breaking changes in flowbite datepicker
wwills2 Dec 5, 2024
9d0b0bc
Merge pull request #1361 from Chia-Network/fix-date-picker
TheLastCicada Dec 5, 2024
5c490b3
chore(deps-dev): bump prettier from 3.4.1 to 3.4.2
dependabot[bot] Dec 17, 2024
79d3ccd
chore(deps): bump @emotion/react from 11.13.5 to 11.14.0
dependabot[bot] Dec 17, 2024
1458fd2
chore: Update dependabot
ChiaAutomation Dec 19, 2024
0c4abc6
Merge pull request #1371 from Chia-Network/managed-files
TheLastCicada Dec 19, 2024
637e51c
Merge pull request #1346 from Chia-Network/dependabot/npm_and_yarn/di…
TheLastCicada Dec 19, 2024
7126669
Merge pull request #1368 from Chia-Network/dependabot/npm_and_yarn/em…
TheLastCicada Dec 19, 2024
1447705
chore(deps): bump @emotion/styled from 11.13.5 to 11.14.0
dependabot[bot] Dec 19, 2024
05ba108
ci: add rc workflow
TheLastCicada Dec 20, 2024
d3238e6
chore: dependency updates
TheLastCicada Dec 20, 2024
b49f6b8
chore: revert dependency updates
TheLastCicada Dec 20, 2024
d59f5af
ci: target develop branch for rc workflow
TheLastCicada Dec 20, 2024
8ec407d
Merge pull request #1373 from Chia-Network/rcrelease
TheLastCicada Dec 20, 2024
38cd01b
Merge pull request #1360 from Chia-Network/dependabot/npm_and_yarn/wa…
TheLastCicada Dec 20, 2024
9b2bdc9
Merge pull request #1351 from Chia-Network/dependabot/npm_and_yarn/co…
TheLastCicada Dec 20, 2024
00a83c3
Merge pull request #1366 from Chia-Network/dependabot/npm_and_yarn/pr…
TheLastCicada Dec 20, 2024
5782ccf
Merge pull request #1362 from Chia-Network/dependabot/npm_and_yarn/em…
TheLastCicada Dec 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/build-installers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,10 @@ jobs:
run: |
echo "TAGNAME=$(echo $GITHUB_REF | cut -d / -f 3)" >>$GITHUB_OUTPUT

- name: Gets JWT Token from GitHub
uses: Chia-Network/actions/github/jwt@main

- name: Trigger apt repo update
run: |
curl -s -XPOST -H "Authorization: Bearer ${{ env.JWT_TOKEN }}" --data '{"cadt_repo":"cadt-ui","release_version":"${{ steps.tag-name.outputs.TAGNAME }}"}' ${{ secrets.GLUE_API_URL }}/api/v1/cadt/${{ github.sha }}/start
curl -s -XPOST -H "Authorization: Bearer ${{ env.JWT_TOKEN }}" --data '{"cadt_repo":"cadt-ui","release_version":"${{ steps.tag-name.outputs.TAGNAME }}"}' ${{ secrets.GLUE_API_URL }}/api/v1/cadt/${{ github.sha }}/success/deploy
uses: Chia-Network/actions/github/glue@main
with:
json_data: '{"cadt_repo":"cadt-ui","release_version":"${{ steps.tag-name.outputs.TAGNAME }}"}'
glue_url: ${{ secrets.GLUE_API_URL }}
glue_project: "cadt"
glue_path: "trigger"
1,053 changes: 544 additions & 509 deletions package-lock.json

Large diffs are not rendered by default.

39 changes: 20 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "cadt-ui",
"private": true,
"version": "2.0.3",
"version": "2.0.4",
"type": "module",
"main": "build/main.js",
"engineStrict": true,
Expand All @@ -26,64 +26,65 @@
"electron:package:linux": "npm run clean && npm run build && electron-builder -l -c.extraMetadata.main=build/main.js"
},
"dependencies": {
"@emotion/react": "^11.13.0",
"@emotion/react": "^11.13.3",
"@emotion/styled": "^11.13.0",
"@mui/material": "^5.16.7",
"@reduxjs/toolkit": "^2.2.7",
"@tailwindcss/aspect-ratio": "^0.4.2",
"@tailwindcss/forms": "^0.5.7",
"@tailwindcss/forms": "^0.5.9",
"@types/styled-components": "^5.1.34",
"@xterm/xterm": "^5.5.0",
"components": "^0.1.0",
"dayjs": "^1.11.12",
"dayjs": "^1.11.13",
"diff": "^5.2.0",
"express": "^4.19.2",
"express": "^4.21.0",
"flowbite": "^2.5.1",
"flowbite-react": "^0.7.8",
"flowbite-typography": "^1.0.3",
"formik": "^2.4.6",
"lodash": "^4.17.21",
"qrcode.react": "^3.1.0",
"qrcode.react": "^3.2.0",
"react": "^18.3.1",
"react-content-loader": "^7.0.2",
"react-dom": "^18.3.1",
"react-intl": "^6.6.8",
"react-redux": "^9.1.2",
"react-router-dom": "^6.26.1",
"react-router-dom": "^6.26.2",
"react-webview": "^0.1.0",
"redux-persist": "^6.0.0",
"simplebar": "^6.2.7",
"simplebar-react": "^3.2.6",
"styled-components": "^6.1.12",
"styled-components": "^6.1.13",
"tailwind-scrollbar": "^3.1.0",
"uuid": "^9.0.1",
"yup": "^1.4.0"
},
"devDependencies": {
"@commitlint/config-conventional": "^19.2.2",
"@types/react": "^18.3.3",
"@commitlint/config-conventional": "^19.5.0",
"@types/react": "^18.3.7",
"@types/react-dom": "^18.3.0",
"@types/react-router-dom": "^5.3.3",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"@vitejs/plugin-react-swc": "^3.7.0",
"autoprefixer": "^10.4.20",
"commitlint": "^19.4.0",
"commitlint": "^19.5.0",
"concurrently": "^8.2.2",
"cross-env": "^7.0.3",
"electron": "^28.3.3",
"electron-builder": "^24.13.3",
"eslint": "^8.57.0",
"eslint": "^8.57.1",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-refresh": "^0.4.9",
"husky": "^9.1.4",
"lint-staged": "^15.2.9",
"postcss": "^8.4.41",
"eslint-plugin-react-refresh": "^0.4.12",
"husky": "^9.1.6",
"lint-staged": "^15.2.10",
"postcss": "^8.4.47",
"prettier": "^3.3.3",
"prettier-eslint": "^16.3.0",
"standard-version": "^9.5.0",
"tailwindcss": "^3.4.10",
"typescript": "^5.5.4",
"vite": "^5.4.1",
"tailwindcss": "^3.4.12",
"typescript": "^5.6.2",
"vite": "^5.4.6",
"wait-on": "^7.2.0"
},
"standard-version": {
Expand Down
1 change: 1 addition & 0 deletions src/renderer/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ function App() {
}, [appStore.apiHost, appStore.configFileLoaded, fetchedConfig, configFileLoading, dispatch]);

useEffect(() => {
// give the setConfigFileLoaded action time to dispatch
if (!configFileLoading) setTimeout(() => setAppLoading(false), 400);
}, [configFileLoading]);

Expand Down
8 changes: 7 additions & 1 deletion src/renderer/components/blocks/buttons/ConnectButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ const ConnectButton: React.FC = () => {
setTimeout(() => window.location.reload(), 0);
};

const onClose = () => {
refetch();
setTimeout(() => setActive(false));
setTimeout(() => window.location.reload(), 0);
};

return (
<>
<Button
Expand All @@ -45,7 +51,7 @@ const ConnectButton: React.FC = () => {
>
{!serverHealth?.isHealthy ? <FormattedMessage id="connect" /> : <FormattedMessage id="disconnect" />}
</Button>
{isActive && <ConnectModal onClose={() => setActive(false)} />}
{isActive && <ConnectModal onClose={onClose} />}
</>
);
};
Expand Down
10 changes: 7 additions & 3 deletions src/renderer/components/blocks/buttons/FormButton.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Button, Spinner } from '@/components';
import { Button } from '@/components';

interface FormButtonProps {
isSubmitting: boolean;
Expand All @@ -9,8 +9,12 @@ interface FormButtonProps {

const FormButton: React.FC<FormButtonProps> = ({ isSubmitting, formikErrors, children }) => {
return (
<Button type="submit" disabled={isSubmitting || Boolean(Object.keys(formikErrors).length)}>
{isSubmitting ? <Spinner size="sm" light={true} /> : children}
<Button
type="submit"
disabled={isSubmitting || Boolean(Object.keys(formikErrors).length)}
isProcessing={isSubmitting}
>
{children}
</Button>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { Button } from '@/components';
import { AiOutlineDeliveredProcedure } from 'react-icons/ai';
import { Alert } from 'flowbite-react';
import { FormattedMessage } from 'react-intl';
import { useSelector } from 'react-redux';
import { RootState } from '@/store';

interface Props {
disabled?: boolean;
Expand All @@ -11,6 +13,7 @@ interface Props {
const ProjectOfferFileDownloadButton: React.FC<Props> = ({ disabled }) => {
const [downloadLoading, setDownloadLoading] = useState(false);
const [showDownLoadFailedAlert, setShowDownloadFailedAlert] = useState<boolean>(false);
const appStore = useSelector((state: RootState) => state.app);

useEffect(() => {
if (showDownLoadFailedAlert) {
Expand All @@ -33,9 +36,20 @@ const ProjectOfferFileDownloadButton: React.FC<Props> = ({ disabled }) => {
const handleClickDownload = async () => {
setDownloadLoading(true);
try {
const url = new URL('http://localhost:31310/v1/offer');
const url = new URL(`${appStore.apiHost}/v1/offer`);
const headers = {
Accept: '*/*',
};

if (appStore?.apiKey) {
headers['X-Api-Key'] = appStore.apiKey;
}

const downloadResponse: Response = await fetch(url, {
mode: 'cors',
headers,
});

const downloadResponse: Response = await fetch(url);
if (!downloadResponse?.ok) {
setShowDownloadFailedAlert(true);
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { Button } from '@/components';
import { useUploadProjectsXlsMutation } from '@/api';
import { Alert } from 'flowbite-react';
import { FormattedMessage } from 'react-intl';
import { useSelector } from 'react-redux';
import { RootState } from '@/store';

interface XlsUploadDownloadButtonsProps {
orgUid: string;
Expand All @@ -20,6 +22,7 @@ const ProjectXlsUploadDownloadButtons: React.FC<XlsUploadDownloadButtonsProps> =
}: XlsUploadDownloadButtonsProps) => {
// upload hooks and state
const [triggerUploadProjectXls] = useUploadProjectsXlsMutation();
const appStore = useSelector((state: RootState) => state.app);
const fileInputRef = useRef<HTMLInputElement>(null);
const [showUploadFailedAlert, setShowUploadFailedAlert] = useState<boolean>(false);

Expand Down Expand Up @@ -63,13 +66,25 @@ const ProjectXlsUploadDownloadButtons: React.FC<XlsUploadDownloadButtonsProps> =
const handleClickDownload = async () => {
setDownloadLoading(true);
try {
const url = new URL('http://localhost:31310/v1/projects');
const url = new URL(`${appStore.apiHost}/v1/projects`);
url.searchParams.append('xls', 'true');
orgUid && url.searchParams.append('orgUid', orgUid);
search && url.searchParams.append('search', search);
order && url.searchParams.append('order', order);

const downloadResponse: Response = await fetch(url);
const headers = {
Accept: '*/*',
};

if (appStore?.apiKey) {
headers['X-Api-Key'] = appStore.apiKey;
}

const downloadResponse: Response = await fetch(url, {
mode: 'cors',
headers,
});

if (!downloadResponse?.ok) {
setShowDownloadFailedAlert(true);
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { Button } from '@/components';
import { useUploadUnitsXlsMutation } from '@/api';
import { Alert } from 'flowbite-react';
import { FormattedMessage } from 'react-intl';
import { useSelector } from 'react-redux';
import { RootState } from '@/store';

interface XlsUploadDownloadButtonsProps {
orgUid: string;
Expand All @@ -20,6 +22,7 @@ const UnitXlsUploadDownloadButtons: React.FC<XlsUploadDownloadButtonsProps> = ({
}: XlsUploadDownloadButtonsProps) => {
// upload hooks and state
const [triggerUploadUnitXls] = useUploadUnitsXlsMutation();
const appStore = useSelector((state: RootState) => state.app);
const fileInputRef = useRef<HTMLInputElement>(null);
const [showUploadFailedAlert, setShowUploadFailedAlert] = useState<boolean>(false);
const [downloadLoading, setDownloadLoading] = useState(false);
Expand Down Expand Up @@ -63,13 +66,25 @@ const UnitXlsUploadDownloadButtons: React.FC<XlsUploadDownloadButtonsProps> = ({
const handleClickDownload = async () => {
setDownloadLoading(true);
try {
const url = new URL('http://localhost:31310/v1/units');
const url = new URL(`${appStore.apiHost}/v1/units`);
url.searchParams.append('xls', 'true');
orgUid && url.searchParams.append('orgUid', orgUid);
search && url.searchParams.append('search', search);
order && url.searchParams.append('order', order);

const downloadResponse: Response = await fetch(url);
const headers = {
Accept: '*/*',
};

if (appStore?.apiKey) {
headers['X-Api-Key'] = appStore.apiKey;
}

const downloadResponse: Response = await fetch(url, {
mode: 'cors',
headers,
});

if (!downloadResponse?.ok) {
setShowDownloadFailedAlert(true);
return;
Expand Down
10 changes: 5 additions & 5 deletions src/renderer/components/blocks/forms/CreateOrganizationForm.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { useCallback } from 'react';
import { ErrorMessage, Field, Form, Formik } from 'formik';
import * as yup from 'yup';
import { Button, FloatingLabel, Spinner } from '@/components';
import { IntlShape, useIntl } from 'react-intl';
import { FloatingLabel, FormButton } from '@/components';
import { FormattedMessage, IntlShape, useIntl } from 'react-intl';

const validationSchema = yup.object({
name: yup.string().required('Name is required'),
Expand Down Expand Up @@ -42,9 +42,9 @@ const CreateOrganizationForm: React.FC<FormProps> = ({ onSubmit }) => {
</Field>
{touched.name && <ErrorMessage name="name" component="div" className="text-red-600" />}
</div>
<Button type="submit" disabled={isSubmitting}>
{isSubmitting ? <Spinner size="sm" light={true} /> : 'Submit'}
</Button>
<FormButton isSubmitting={isSubmitting} formikErrors={errors}>
<FormattedMessage id="submit" />
</FormButton>
</Form>
)}
</Formik>
Expand Down
10 changes: 5 additions & 5 deletions src/renderer/components/blocks/forms/ImportOrganizationForm.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { useCallback } from 'react';
import { ErrorMessage, Field, Form, Formik } from 'formik';
import * as yup from 'yup';
import { Button, FloatingLabel, Spinner } from '@/components';
import { IntlShape, useIntl } from 'react-intl';
import { FloatingLabel, FormButton } from '@/components';
import { FormattedMessage, IntlShape, useIntl } from 'react-intl';

const validationSchema = yup.object({
orgUid: yup.string().length(64).required('OrgUid is required'),
Expand Down Expand Up @@ -43,9 +43,9 @@ const ImportOrganizationForm: React.FC<FormProps> = ({ onSubmit }) => {
</Field>
{touched.orgUid && <ErrorMessage name="orgUid" component="div" className="text-red-600" />}
</div>
<Button type="submit" disabled={isSubmitting}>
{isSubmitting ? <Spinner size="sm" light={true} /> : 'Submit'}
</Button>
<FormButton isSubmitting={isSubmitting} formikErrors={errors}>
<FormattedMessage id="submit" />
</FormButton>
</Form>
)}
</Formik>
Expand Down
Loading
Loading