Skip to content

Commit

Permalink
Cleaning up the web code and other fixes too (#387)
Browse files Browse the repository at this point in the history
* Removed unused web code

* Updated from material-ui v4 to mui v5 and also removed the unwanted files/codes

* Improved the component loading

* Re-arranged the UI and fixed the issue with tN loading
  • Loading branch information
vipinpaul authored Dec 12, 2024
1 parent 629e838 commit cd0d38c
Show file tree
Hide file tree
Showing 114 changed files with 473 additions and 5,314 deletions.
1 change: 0 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"plugin:import/errors",
"plugin:import/warnings",
"plugin:jsx-a11y/recommended",
"plugin:react-hooks/recommended",
"airbnb",
"next"
],
Expand Down
Binary file removed app/favicon.ico
Binary file not shown.
13 changes: 0 additions & 13 deletions app/head.js

This file was deleted.

22 changes: 0 additions & 22 deletions app/home/layout.jsx

This file was deleted.

12 changes: 0 additions & 12 deletions app/home/page.jsx

This file was deleted.

16 changes: 0 additions & 16 deletions app/layout.js

This file was deleted.

7 changes: 0 additions & 7 deletions app/loading.js

This file was deleted.

5 changes: 0 additions & 5 deletions app/login/page.jsx

This file was deleted.

10 changes: 0 additions & 10 deletions app/newproject/page.js

This file was deleted.

7 changes: 0 additions & 7 deletions app/page.js

This file was deleted.

12 changes: 0 additions & 12 deletions app/profile/page.js

This file was deleted.

12 changes: 0 additions & 12 deletions app/projects/page.jsx

This file was deleted.

26 changes: 0 additions & 26 deletions app/providers.js

This file was deleted.

12 changes: 0 additions & 12 deletions app/resource/page.jsx

This file was deleted.

8 changes: 0 additions & 8 deletions app/signup/page.jsx

This file was deleted.

11 changes: 0 additions & 11 deletions app/sync/page.js

This file was deleted.

2 changes: 1 addition & 1 deletion e2e-tests/base.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ test("Click the view users button and delete the playwright user from the active
await archiveDiv.nth(i).click()
}
await window.locator('//*[@id="active-tab"]').click()
await window.locator(`//*[@dataId="${userName.toLowerCase()}"]`).click()
await window.locator(`//*[@data-id="${userName.toLowerCase()}"]`).click()
break
}
}
Expand Down
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,6 @@
"@heroicons/react": "^2.0.14",
"@ionic/react": "^7.0.0",
"@ionic/react-router": "^7.0.0",
"@material-ui/core": "^4.12.4",
"@material-ui/icons": "^4.11.3",
"@material-ui/lab": "4.0.0-alpha.57",
"@mui/lab": "^5.0.0-alpha.104",
"@mui/material": "^5.15.15",
Expand All @@ -153,7 +151,6 @@
"@radix-ui/react-dialog": "^1.0.3",
"@radix-ui/react-dropdown-menu": "^2.0.4",
"@react-pdf/renderer": "^3.4.0",
"@supabase/supabase-js": "^2.26.0",
"@tailwindcss/forms": "^0.5.2",
"@tailwindcss/typography": "^0.5.9",
"@types/jest": "^29.5.5",
Expand Down
2 changes: 1 addition & 1 deletion renderer/pages/_document.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default class MyDocument extends Document {
return (
<Html>
<Head>
<link rel="stylesheet" />
<link />
</Head>
<body>
<Main />
Expand Down
11 changes: 0 additions & 11 deletions renderer/pages/signup.js

This file was deleted.

2 changes: 1 addition & 1 deletion renderer/src/Meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const Meta = () => (
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta charSet="utf-8" />
{/* <link rel="shortcut icon" href="/static/favicon.png" /> */}
<link rel="stylesheet" type="text/css" href="/static/nprogress.css" />
<link type="text/css" />
<title>{i18n.t('app-name')}</title>
</Head>
);
Expand Down
33 changes: 0 additions & 33 deletions renderer/src/WebHome.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ const EditorPage = ({
};
export default EditorPage;
EditorPage.propTypes = {
content: PropTypes.object,
content: PropTypes.oneOfType([PropTypes.array, PropTypes.object]),
onChangeVerse: PropTypes.any,
verse: PropTypes.string,
location: PropTypes.string,
Expand Down
11 changes: 6 additions & 5 deletions renderer/src/components/AudioRecorder/components/WaveForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import MicrophonePlugin from 'wavesurfer.js/dist/plugin/wavesurfer.microphone.js

// eslint-disable-next-line prefer-const
let microphone = MicrophonePlugin.create();
const AudioWaveForm = (props) => {
const AudioWaveForm = ((props, ref) => {
const {
height,
waveColor,
Expand Down Expand Up @@ -38,6 +38,7 @@ const AudioWaveForm = (props) => {
// eslint-disable-next-line prefer-const
// let microphone = useRef(null);
const [playing, setPlaying] = useState(false);
const combinedRef = ref || waveformRef;
const formWaveSurferOptions = (ref) => ({
container: ref || '#waveform',
waveColor,
Expand All @@ -59,7 +60,7 @@ const AudioWaveForm = (props) => {
});

const createForm = async (currentUrl) => {
const options = formWaveSurferOptions(waveformRef.current);
const options = formWaveSurferOptions(combinedRef.current);
wavesurfer.current = WaveSurfer.create(options);
// Below url is for testing/development purpose
// const currentUrl = 'https://www.mfiles.co.uk/mp3-downloads/brahms-st-anthony-chorale-theme-two-pianos.mp3';
Expand All @@ -85,7 +86,7 @@ const AudioWaveForm = (props) => {
};

const createRecForm = async () => {
const options = formWaveSurferOptions(waveformRef.current);
const options = formWaveSurferOptions(combinedRef.current);
wavesurfer.current = WaveSurfer.create(options);
wavesurfer.current?.microphone.on('deviceReady', (stream) => {
// eslint-disable-next-line no-console
Expand Down Expand Up @@ -208,7 +209,7 @@ const AudioWaveForm = (props) => {
&& (
<>
<div className="w-full">
<div id="waveform" ref={waveformRef} />
<div id="waveform" ref={combinedRef} />
</div>
{show
&& (
Expand All @@ -234,7 +235,7 @@ const AudioWaveForm = (props) => {
)}
</div>
);
};
});
export default forwardRef(AudioWaveForm);
AudioWaveForm.propTypes = {
height: PropTypes.number,
Expand Down
18 changes: 0 additions & 18 deletions renderer/src/components/AutoCompleteSearch/AutoComplete.test.js

This file was deleted.

Loading

0 comments on commit cd0d38c

Please sign in to comment.