mirror of
https://github.com/janishutz/fundamentals-of-webengineering.git
synced 2025-11-25 13:54:25 +00:00
Compare commits
1 Commits
fd8ec668b4
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 88127c6107 |
@@ -126,16 +126,21 @@ function App () {
|
|||||||
} );
|
} );
|
||||||
|
|
||||||
// Updating fileInfo requires more effort since blob doesn't have the metadata
|
// Updating fileInfo requires more effort since blob doesn't have the metadata
|
||||||
setLoading( false );
|
|
||||||
setData( data );
|
setData( data );
|
||||||
|
setLoading( false );
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Layout>
|
<Layout>
|
||||||
|
<div className={'loading-spinner' + ( loading ? ' active' : '' )}>
|
||||||
|
<div aria-busy="true" >
|
||||||
|
Loading...
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<CSVCard handleChange={handleFileUpload} formRef={formRef}></CSVCard>
|
<CSVCard handleChange={handleFileUpload} formRef={formRef}></CSVCard>
|
||||||
<FileCard fileList={fileList as responseObject} fileChangeHandle={handleFileChange}></FileCard>
|
<FileCard fileList={fileList as responseObject} fileChangeHandle={handleFileChange}></FileCard>
|
||||||
<InfoCard info={info}></InfoCard>
|
<InfoCard info={info}></InfoCard>
|
||||||
<DataTable data={data} loading={loading}></DataTable>
|
<DataTable data={data}></DataTable>
|
||||||
</Layout>
|
</Layout>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import {
|
|||||||
|
|
||||||
const DataTable = ( props: {
|
const DataTable = ( props: {
|
||||||
'data': CSV_Data,
|
'data': CSV_Data,
|
||||||
'loading': boolean
|
|
||||||
} ) => {
|
} ) => {
|
||||||
if ( props.data.length == 0 ) return <></>;
|
if ( props.data.length == 0 ) return <></>;
|
||||||
|
|
||||||
@@ -57,7 +56,7 @@ const DataTable = ( props: {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<article className="table-container">
|
<article className="table-container">
|
||||||
<header aria-busy={props.loading}>
|
<header>
|
||||||
<h2>Data table</h2>
|
<h2>Data table</h2>
|
||||||
</header>
|
</header>
|
||||||
<div className="table-scroll-wrapper">
|
<div className="table-scroll-wrapper">
|
||||||
|
|||||||
@@ -49,8 +49,44 @@ article.wide {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
font-size: 18px;
|
font-size: 1rem;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
padding: 5px;
|
||||||
|
|
||||||
|
i {
|
||||||
|
transition: color 0.2s linear;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: var(--pico-primary-hover);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.loading-spinner {
|
||||||
|
display: flex;
|
||||||
|
background-color: rgb(40, 40, 40, 0.3);
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
|
color: white;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
z-index: 1000;
|
||||||
|
transform: scale(0);
|
||||||
|
transition: transform 0.1s linear;
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
transform: scale(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
div {
|
||||||
|
background-color: rgb(40, 40, 40, 0.6);
|
||||||
|
border-radius: 20px;
|
||||||
|
padding: 30px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
body>main {
|
body>main {
|
||||||
|
|||||||
Reference in New Issue
Block a user