Skip to content
Extraits de code Groupes Projets
Valider 7dc45ca5 rédigé par Maverick Chardet's avatar Maverick Chardet
Parcourir les fichiers

Visual fixes for pedago

parent 6f4bf4b5
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -48,7 +48,7 @@ const App: FC<AppProps> = (props) => { ...@@ -48,7 +48,7 @@ const App: FC<AppProps> = (props) => {
</div> </div>
{hasPedago && isPedagoVisible && ( {hasPedago && isPedagoVisible && (
<Splitter <Splitter
className={styles.pedagoSplitter} className={styles.appPedagoSplitter}
layout={isHorizontal ? "vertical" : "horizontal"} layout={isHorizontal ? "vertical" : "horizontal"}
> >
<SplitterPanel minSize={15} size={30} className={styles.pedagoPanel}> <SplitterPanel minSize={15} size={30} className={styles.pedagoPanel}>
......
...@@ -4,9 +4,10 @@ ...@@ -4,9 +4,10 @@
grid-template-rows: auto 1fr; grid-template-rows: auto 1fr;
} }
.pedagoSplitter { .appPedagoSplitter {
height: 100%; height: 100%;
border: none; border: none;
border-radius: 0;
overflow-y: hidden; overflow-y: hidden;
} }
......
...@@ -35,17 +35,13 @@ const GradingNav: React.FC = () => { ...@@ -35,17 +35,13 @@ const GradingNav: React.FC = () => {
const handlePrev = () => { const handlePrev = () => {
if (studentList == null) return; if (studentList == null) return;
const i = studentList.findIndex( const i = studentList.findIndex((el) => (el.nid as number) == nid);
(el) => (el.nid as number) == nid,
);
if (i <= 0) return; if (i <= 0) return;
goToStudent(studentList[i - 1].nid); goToStudent(studentList[i - 1].nid);
}; };
const handleNext = () => { const handleNext = () => {
if (studentList == null) return; if (studentList == null) return;
const i = studentList.findIndex( const i = studentList.findIndex((el) => el.nid == nid);
(el) => el.nid == nid,
);
if (i < 0 || i >= studentList.length - 1) return; if (i < 0 || i >= studentList.length - 1) return;
goToStudent(studentList[i + 1].nid); goToStudent(studentList[i + 1].nid);
}; };
...@@ -85,16 +81,18 @@ const GradingNav: React.FC = () => { ...@@ -85,16 +81,18 @@ const GradingNav: React.FC = () => {
return ( return (
<div className="p-inputgroup flex-1"> <div className="p-inputgroup flex-1">
{nid != firstNid && ( <Button
<Button size="small"
size="small" icon="pi pi-chevron-left"
icon="pi pi-chevron-left" severity="secondary"
severity="secondary" onClick={handlePrev}
onClick={handlePrev} tooltip="Copie précédente"
tooltip="Copie précédente" tooltipOptions={{
outlined position: "left"
/> }}
)} disabled={nid == firstNid}
outlined
/>
<Dropdown <Dropdown
value={nid} value={nid}
options={options} options={options}
...@@ -103,16 +101,18 @@ const GradingNav: React.FC = () => { ...@@ -103,16 +101,18 @@ const GradingNav: React.FC = () => {
goToStudent(e.value); goToStudent(e.value);
}} }}
/> />
{nid != lastNid && ( <Button
<Button size="small"
size="small" icon="pi pi-chevron-right"
icon="pi pi-chevron-right" severity="secondary"
severity="secondary" onClick={handleNext}
onClick={handleNext} tooltip="Copie suivante"
tooltip="Copie suivante" tooltipOptions={{
outlined position: "right"
/> }}
)} disabled={nid == lastNid}
outlined
/>
</div> </div>
); );
}; };
......
...@@ -12,26 +12,48 @@ ...@@ -12,26 +12,48 @@
:global(.dark-theme) & { :global(.dark-theme) & {
background-color: var(--surface-50); background-color: var(--surface-50);
} }
& :global(.p-button-outlined), & :global(.p-button-text) { & :global(.p-button-outlined),
& :global(.p-button-text) {
color: var(--navbar-text-color); color: var(--navbar-text-color);
} }
& :global(.p-button-outlined) { & :global(.p-button-outlined) {
border-color: var(--navbar-text-color); border-color: var(--navbar-text-color);
} }
:global(.light-theme) & :global(.p-button.p-button-secondary:enabled:focus) { :global(.light-theme) & :global(.p-button.p-button-secondary:enabled:focus) {
box-shadow: 0 0 0 2px #1c2127, 0 0 0 4px rgba(255, 255, 255, 0.7), 0 1px 2px 0 rgba(0, 0, 0, 0); box-shadow:
0 0 0 2px #1c2127,
0 0 0 4px rgba(255, 255, 255, 0.7),
0 1px 2px 0 rgba(0, 0, 0, 0);
} }
:global(.light-theme) & :global(.p-button.p-button-warning:enabled:focus) { :global(.light-theme) & :global(.p-button.p-button-warning:enabled:focus) {
box-shadow: 0 0 0 2px #1c2127, 0 0 0 4px rgba(249, 115, 22, 0.7), 0 1px 2px 0 rgba(0, 0, 0, 0); box-shadow:
0 0 0 2px #1c2127,
0 0 0 4px rgba(249, 115, 22, 0.7),
0 1px 2px 0 rgba(0, 0, 0, 0);
} }
} }
.reviewNavbar { .reviewNavbar {
background-color: var(--surface-400); color-scheme: dark;
background-color: var(--surface-500);
--review-navbar-text-color: rgba(255, 255, 255, 0.95);
color: var(--review-navbar-text-color);
padding: 4px 16px; padding: 4px 16px;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
& :global(.p-button-secondary) {
border-color: var(--review-navbar-text-color);
color: var(--review-navbar-text-color);
}
& :global(.p-dropdown) {
border-color: var(--review-navbar-text-color);
border-left-width: 0;
border-right-width: 0;
}
:global(.dark-theme) & {
background-color: var(--surface-100);
}
} }
.navbarContainer { .navbarContainer {
...@@ -139,4 +161,4 @@ ...@@ -139,4 +161,4 @@
display: flex; display: flex;
gap: 8px; gap: 8px;
align-items: center; align-items: center;
} }
\ No newline at end of file
...@@ -36,6 +36,9 @@ ...@@ -36,6 +36,9 @@
border: none; border: none;
border-radius: 0; border-radius: 0;
background-color: var(--surface-0); background-color: var(--surface-0);
& > :global(.p-splitter-panel) {
overflow-y: hidden;
}
} }
.gradingPanel { .gradingPanel {
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter