Skip to content

Commit

Permalink
Make today's date number readable
Browse files Browse the repository at this point in the history
Change ttt urlPattern and calendar button colors
  • Loading branch information
Alf-Melmac committed Dec 14, 2023
1 parent 984fdf4 commit edc2e8b
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/contexts/Theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ const advancedGuilds: AdvancedGuild[] = [
},
{
guild: Guild.DAA,
urlPattern: /.*deutsche-arma-allianz.*/,
urlPattern: /.*deutsche-arma-allianz.de.*/,
},
{
guild: Guild.TTT,
urlPattern: /.*localhost.*/,
urlPattern: /.*tacticalteam.de.*/,
},
];

Expand Down
8 changes: 7 additions & 1 deletion src/features/event/calendar/EventCalendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@ import dayjs from 'dayjs';
import slotbotServerClient from '../../../hooks/slotbotServerClient';
import {isGerman} from '../../../contexts/language/Language';
import {hidden} from '../../../contexts/CommonStylings';
import {JSX} from 'react';
import {JSX, lazy, Suspense} from 'react';
import {EventTooltip} from './EventTooltip';
import './eventCalendar.css';
import {getGuild, Guild} from '../../../contexts/Theme';

const useStyles = createStyles((theme) => ({
today: {
height: 26,
width: 26,
color: theme.colorScheme !== 'dark' ? 'white' : undefined,
backgroundColor: theme.colors.red[8],
borderRadius: '50%',
display: 'inline-block',
Expand Down Expand Up @@ -66,6 +68,7 @@ type EventCalendarProps = {
export function EventCalendar(props: Readonly<EventCalendarProps>): JSX.Element {
const {toggleVisible, onFailure} = props;
const {classes} = useStyles();
const TTTTheme = lazy(() => import('./ttt/EventCalendarTTTTheme'));

const eventContent = (arg: EventContentArg) => {
const {event, backgroundColor} = arg;
Expand All @@ -87,6 +90,9 @@ export function EventCalendar(props: Readonly<EventCalendarProps>): JSX.Element

return (
<>
<Suspense fallback={<></>}>
{getGuild() === Guild.TTT && <TTTTheme/>}
</Suspense>
{useCheckAccess(ApplicationRoles.ROLE_EVENT_MANAGE) &&
<AddButton label={'event.add'} to={'new'} mb={'sm'}/>
}
Expand Down
7 changes: 7 additions & 0 deletions src/features/event/calendar/ttt/EventCalendarTTTTheme.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import {JSX} from 'react';

import('./eventCalendar-ttt.css');

export default function EventCalendarTTTTheme(): JSX.Element {
return <></>;
}
4 changes: 4 additions & 0 deletions src/features/event/calendar/ttt/eventCalendar-ttt.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
:root {
--fc-button-bg-color: #a10f2b;
--fc-button-border-color: #a10f2b;
}

0 comments on commit edc2e8b

Please sign in to comment.