cmd: prettier -w src/
This commit is contained in:
@@ -3,11 +3,7 @@ import { useEffect, useRef, useState } from 'preact/hooks'
|
||||
import _ from 'lodash'
|
||||
import { differenceInMinutes, startOfDay } from 'date-fns'
|
||||
|
||||
import {
|
||||
WEEK_DAYS_SHORT,
|
||||
prettyCourseName,
|
||||
usePersistentState,
|
||||
} from '../../utils.jsx'
|
||||
import { WEEK_DAYS_SHORT, prettyCourseName, usePersistentState } from '../../utils.jsx'
|
||||
import { layoutEvents, layoutIntervals } from '../../interval-layout.js'
|
||||
import { Popup } from '../Popup.jsx'
|
||||
import { Icon } from '../Icon.jsx'
|
||||
@@ -17,28 +13,23 @@ const TransposePopup = ({ onClose }) => {
|
||||
<Popup
|
||||
title={
|
||||
<>
|
||||
<Icon name="info" /> Attenzione! La tabella è stata
|
||||
trasposta!
|
||||
<Icon name="info" /> Attenzione! La tabella è stata trasposta!
|
||||
</>
|
||||
}
|
||||
onClose={onClose}
|
||||
>
|
||||
<p>A grande richiesta popolare abbiamo trasposto la tabella dell'orario!</p>
|
||||
|
||||
<p>
|
||||
A grande richiesta popolare abbiamo trasposto la tabella
|
||||
dell'orario!
|
||||
Assicurati quindi di leggerla correttamente (dall'alto verso il basso
|
||||
invece che da sinistra verso destra).
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Assicurati quindi di leggerla correttamente (dall'alto verso il
|
||||
basso invece che da sinistra verso destra).
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Se preferisci utilizzare la versione vecchia, puoi utilizzare il
|
||||
pulsante Trasponi{' '}
|
||||
<Icon name="switch_left" style="transform: rotate(-45deg)" />{' '}
|
||||
nell'origine della tabella per trasporla. Questa scelta verrà
|
||||
salvata nei cookie e verrà ricordata in futuro
|
||||
Se preferisci utilizzare la versione vecchia, puoi utilizzare il pulsante
|
||||
Trasponi <Icon name="switch_left" style="transform: rotate(-45deg)" />{' '}
|
||||
nell'origine della tabella per trasporla. Questa scelta verrà salvata nei
|
||||
cookie e verrà ricordata in futuro
|
||||
</p>
|
||||
</Popup>
|
||||
)
|
||||
@@ -49,8 +40,8 @@ const NoCourseWarning = () => {
|
||||
<div class="warning">
|
||||
<p>Non hai ancora selezionato nessun corso.</p>
|
||||
<p>
|
||||
Clicca sui corsi nelle altre visuali per selezionarli e
|
||||
visualizzarli nell'orario
|
||||
Clicca sui corsi nelle altre visuali per selezionarli e visualizzarli
|
||||
nell'orario
|
||||
</p>
|
||||
</div>
|
||||
)
|
||||
@@ -75,13 +66,10 @@ const Layout = ({ layout, day, colors }) => {
|
||||
style={{
|
||||
'--block-size': block.end - block.start,
|
||||
'--size': event.end - event.start,
|
||||
'--relative-start':
|
||||
event.start - block.start,
|
||||
'--relative-start': event.start - block.start,
|
||||
'--index': event.index,
|
||||
'--of': block.layers,
|
||||
'--color': `var(--event-${
|
||||
colors[event.id]
|
||||
})`,
|
||||
'--color': `var(--event-${colors[event.id]})`,
|
||||
}}
|
||||
>
|
||||
<div class="event">
|
||||
@@ -118,16 +106,11 @@ const ScheduleGrid = ({
|
||||
class="small"
|
||||
onClick={() =>
|
||||
setOrientation(
|
||||
orientation === 'original'
|
||||
? 'transposed'
|
||||
: 'original'
|
||||
orientation === 'original' ? 'transposed' : 'original'
|
||||
)
|
||||
}
|
||||
>
|
||||
<Icon
|
||||
name="switch_left"
|
||||
style="transform: rotate(-45deg)"
|
||||
/>
|
||||
<Icon name="switch_left" style="transform: rotate(-45deg)" />
|
||||
</button>
|
||||
</div>
|
||||
{[1, 2, 3, 4, 5].map(n => (
|
||||
@@ -215,20 +198,9 @@ export const Schedule = ({ timetables, selection }) => {
|
||||
'transpose_info',
|
||||
'false'
|
||||
)
|
||||
const [orientation, setOrientation] = usePersistentState(
|
||||
'orientation',
|
||||
'original'
|
||||
)
|
||||
const [orientation, setOrientation] = usePersistentState('orientation', 'original')
|
||||
|
||||
const colorList = [
|
||||
'red',
|
||||
'purple',
|
||||
'blue',
|
||||
'yellow',
|
||||
'green',
|
||||
'orange',
|
||||
'lightblue',
|
||||
]
|
||||
const colorList = ['red', 'purple', 'blue', 'yellow', 'green', 'orange', 'lightblue']
|
||||
|
||||
const allEvents = timetables['tutti']
|
||||
const selectionSet = new Set(selection)
|
||||
|
||||
Reference in New Issue
Block a user