Move timelord into separate file, make bigger.
This commit is contained in:
parent
024f1c570a
commit
0a363ef6f3
5 changed files with 45 additions and 37 deletions
|
@ -1,6 +1,5 @@
|
|||
import React, { useRef, useEffect, useState } from "react";
|
||||
import { shallowEqual, useDispatch, useSelector } from "react-redux";
|
||||
import Clock from "react-live-clock";
|
||||
|
||||
import {
|
||||
FaCircle,
|
||||
|
@ -28,6 +27,7 @@ import { getShowplan, setItemPlayed } from "../showplanner/state";
|
|||
import * as OptionsMenuState from "../optionsMenu/state";
|
||||
import { setChannelPFL } from "../mixer/state";
|
||||
import { secToHHMM, useInterval } from "../lib/utils";
|
||||
import { Timelord } from "./timelord";
|
||||
|
||||
function nicifyConnectionState(state: ConnectionStateEnum): string {
|
||||
switch (state) {
|
||||
|
@ -164,24 +164,7 @@ export function NavBarMain() {
|
|||
return (
|
||||
<>
|
||||
<ul className="nav navbar-nav navbar-left">
|
||||
<li
|
||||
className="btn rounded-0 py-2 nav-link nav-item"
|
||||
id="timelord"
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
window.open(
|
||||
"http://ury.org.uk/timelord/",
|
||||
"URY - Timelord",
|
||||
"resizable,status"
|
||||
);
|
||||
}}
|
||||
>
|
||||
<Clock
|
||||
format={"HH:mm:ss"}
|
||||
ticking={true}
|
||||
timezone={"europe/london"}
|
||||
/>
|
||||
</li>
|
||||
<Timelord />
|
||||
<SavingAlert />
|
||||
</ul>
|
||||
<ul className="nav navbar-nav navbar-right mr-0 pr-0">
|
||||
|
|
|
@ -285,23 +285,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
#timelord {
|
||||
background: black;
|
||||
border: red 1px solid;
|
||||
color: white;
|
||||
min-width: 85px;
|
||||
}
|
||||
|
||||
#timelord a {
|
||||
text-decoration: none;
|
||||
color: white;
|
||||
}
|
||||
|
||||
#timelord .time {
|
||||
font-weight: bold;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
.nav-link.connect {
|
||||
min-width: 90px;
|
||||
}
|
||||
|
|
16
src/navbar/timelord.scss
Normal file
16
src/navbar/timelord.scss
Normal file
|
@ -0,0 +1,16 @@
|
|||
#timelord {
|
||||
background: black;
|
||||
border: red 1px solid;
|
||||
color: white;
|
||||
min-width: 85px;
|
||||
}
|
||||
|
||||
#timelord a {
|
||||
text-decoration: none;
|
||||
color: white;
|
||||
}
|
||||
|
||||
#timelord time {
|
||||
font-weight: bold;
|
||||
font-size: 1.2em;
|
||||
}
|
26
src/navbar/timelord.tsx
Normal file
26
src/navbar/timelord.tsx
Normal file
|
@ -0,0 +1,26 @@
|
|||
import React from "react";
|
||||
import LiveClock from "react-live-clock";
|
||||
import "./timelord.scss";
|
||||
|
||||
export function Timelord() {
|
||||
return (
|
||||
<li
|
||||
className="btn rounded-0 py-2 nav-link nav-item"
|
||||
id="timelord"
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
window.open(
|
||||
"http://ury.org.uk/timelord/",
|
||||
"URY - Timelord",
|
||||
"resizable,status"
|
||||
);
|
||||
}}
|
||||
>
|
||||
<LiveClock
|
||||
format={"HH:mm:ss"}
|
||||
ticking={true}
|
||||
timezone={"europe/london"}
|
||||
/>
|
||||
</li>
|
||||
);
|
||||
}
|
|
@ -506,7 +506,7 @@ const Showplanner: React.FC<{ timeslotId: number }> = function({ timeslotId }) {
|
|||
isOpen={showWelcomeModal}
|
||||
close={() => setShowWelcomeModal(false)}
|
||||
/>
|
||||
<PisModal close={() => setShowPisModal(false)} isOpen={showPisModal} />
|
||||
|
||||
<MicLiveIndicator />
|
||||
</div>
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue