mirror of
https://github.com/cpvalente/ontime.git
synced 2026-09-06 23:09:08 +00:00
Refactor/styles (#202)
* style: general micro improvements in editor * version bump
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ontime-ui",
|
"name": "ontime-ui",
|
||||||
"version": "1.7.1",
|
"version": "1.7.2",
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@chakra-ui/react": "^2.3.2",
|
"@chakra-ui/react": "^2.3.2",
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
display: grid;
|
display: grid;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
gap: 5px;
|
gap: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.timeContainer,
|
.timeContainer,
|
||||||
@@ -20,8 +20,8 @@
|
|||||||
'ind clk clk btn'
|
'ind clk clk btn'
|
||||||
'... sta fin btn';
|
'... sta fin btn';
|
||||||
grid-template-rows: 1fr auto;
|
grid-template-rows: 1fr auto;
|
||||||
grid-template-columns: 1.5em 2fr 2fr 6em;
|
grid-template-columns: 1.5em 1fr 1fr 5em;
|
||||||
gap: 5px;
|
gap: 4px;
|
||||||
justify-items: start;
|
justify-items: start;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,9 +20,10 @@ const areEqual = (prevProps, nextProps) => {
|
|||||||
|
|
||||||
const incrementProps = {
|
const incrementProps = {
|
||||||
size: 'sm',
|
size: 'sm',
|
||||||
width: '2.9em',
|
width: '2em',
|
||||||
colorScheme: 'white',
|
colorScheme: 'white',
|
||||||
variant: 'outline',
|
variant: 'outline',
|
||||||
|
fontSize: '12px',
|
||||||
};
|
};
|
||||||
|
|
||||||
const PlaybackTimer = (props) => {
|
const PlaybackTimer = (props) => {
|
||||||
|
|||||||
@@ -1,18 +1,16 @@
|
|||||||
@use '../../theme/main' as *;
|
@use '../../theme/main' as *;
|
||||||
|
|
||||||
.corner {
|
@mixin absolute-top-right($distance) {
|
||||||
display: none;
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 8px;
|
top: $distance;
|
||||||
right: 8px;
|
right: $distance;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: $ontime-pink;
|
color: $ontime-pink;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
.corner {
|
||||||
font-size: max(1.5em, 16px);
|
display: none;
|
||||||
color: $bg-gray-100;
|
@include absolute-top-right(8px);
|
||||||
padding-bottom: 0.25em;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.mainContainer {
|
.mainContainer {
|
||||||
@@ -21,15 +19,15 @@ h1 {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
color: $title-white;
|
color: $title-white;
|
||||||
padding: max(16px, 2vh);
|
padding: max(16px, 2vh) max(8px, 1vh);
|
||||||
|
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-rows: auto 1fr;
|
grid-template-rows: auto 1fr;
|
||||||
grid-template-columns: 40px 48em 31em auto;
|
grid-template-columns: 48px 46em 30em auto;
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
'sett even play info'
|
'sett even play info'
|
||||||
'sett even mess info';
|
'sett even mess info';
|
||||||
gap: max(16px, 2vh);
|
gap: 8px;
|
||||||
|
|
||||||
.editor,
|
.editor,
|
||||||
.playback,
|
.playback,
|
||||||
@@ -44,76 +42,12 @@ h1 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.mainContainer > div {
|
|
||||||
border-radius: 0.5em;
|
|
||||||
height: 100%;
|
|
||||||
background-color: $bg-gray-1000;
|
|
||||||
padding: 0.8em 1.5em;
|
|
||||||
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
|
|
||||||
.editor {
|
|
||||||
grid-area: even;
|
|
||||||
height: calc(100% - 3em);
|
|
||||||
|
|
||||||
.content {
|
|
||||||
height: calc(100% - 3em);
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.info {
|
|
||||||
grid-area: info;
|
|
||||||
min-width: 17em;
|
|
||||||
|
|
||||||
.content {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
height: calc(100% - 3em);
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.messages {
|
|
||||||
grid-area: mess;
|
|
||||||
}
|
|
||||||
|
|
||||||
.playback {
|
|
||||||
grid-area: play;
|
|
||||||
min-height: 320px;
|
|
||||||
max-height: 320px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.messages,
|
|
||||||
.playback {
|
|
||||||
min-width: 31em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mainContainer > .settings {
|
|
||||||
grid-area: sett;
|
|
||||||
background-color: transparent;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
width: fit-content;
|
|
||||||
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: 1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content {
|
|
||||||
padding-top: 0.5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* 2/3 window, hide info */
|
/* 2/3 window, hide info */
|
||||||
@media (max-width: 1450px) and (min-width: 1101px) {
|
@media (max-width: 1450px) and (min-height: 700px) {
|
||||||
.mainContainer {
|
.mainContainer {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
grid-template-rows: auto 1fr;
|
grid-template-rows: auto 1fr;
|
||||||
grid-template-columns: 40px 48em auto;
|
grid-template-columns: 48px 48em auto;
|
||||||
|
|
||||||
.info {
|
.info {
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
@@ -122,11 +56,13 @@ h1 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* 1/2 window, event list only */
|
/* 1/2 window, event list only */
|
||||||
@media (max-width: 1100px) and (min-width: 851px){
|
@media (max-width: 1100px) {
|
||||||
.mainContainer {
|
.mainContainer {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
grid-template-rows: 1fr auto;
|
grid-template-rows: 100%;
|
||||||
grid-template-columns: 40px 48em;
|
grid-template-columns: 48px 48em;
|
||||||
|
grid-template-areas:
|
||||||
|
'sett even';
|
||||||
|
|
||||||
.info,
|
.info,
|
||||||
.messages,
|
.messages,
|
||||||
@@ -141,7 +77,6 @@ h1 {
|
|||||||
.mainContainer {
|
.mainContainer {
|
||||||
grid-template-rows: auto 1fr;
|
grid-template-rows: auto 1fr;
|
||||||
grid-template-columns: 100%;
|
grid-template-columns: 100%;
|
||||||
column-gap: 0;
|
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
'play'
|
'play'
|
||||||
'mess';
|
'mess';
|
||||||
@@ -178,3 +113,92 @@ h1 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: max(1.5em, 16px);
|
||||||
|
color: $bg-gray-100;
|
||||||
|
padding-bottom: 0.25em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mainContainer {
|
||||||
|
.settings,
|
||||||
|
.editor,
|
||||||
|
.messages,
|
||||||
|
.playback,
|
||||||
|
.info {
|
||||||
|
border-radius: 8px;
|
||||||
|
height: 100%;
|
||||||
|
background-color: $bg-gray-1000;
|
||||||
|
padding: 0.8em 1.5em;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.eventEditor {
|
||||||
|
border-radius: 3px 3px 0 0;
|
||||||
|
background-color: $bg-gray-950;
|
||||||
|
border-top: 1px solid $bg-gray-900;
|
||||||
|
padding: 0.8em 1.5em;
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
width: 100vw;
|
||||||
|
max-height: 40vh;
|
||||||
|
left: 0;
|
||||||
|
z-index: 10;
|
||||||
|
color: white;
|
||||||
|
|
||||||
|
.header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.editor {
|
||||||
|
grid-area: even;
|
||||||
|
height: calc(100% - 3em);
|
||||||
|
|
||||||
|
.content {
|
||||||
|
height: calc(100% - 3em);
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.info {
|
||||||
|
grid-area: info;
|
||||||
|
min-width: 17em;
|
||||||
|
|
||||||
|
.content {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
height: calc(100% - 3em);
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.messages {
|
||||||
|
grid-area: mess;
|
||||||
|
}
|
||||||
|
|
||||||
|
.playback {
|
||||||
|
grid-area: play;
|
||||||
|
min-height: 320px;
|
||||||
|
max-height: 320px;
|
||||||
|
min-width: 480px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mainContainer > .settings {
|
||||||
|
grid-area: sett;
|
||||||
|
background-color: transparent;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0 8px 0 0;
|
||||||
|
width: fit-content;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
padding-top: 0.5em;
|
||||||
|
}
|
||||||
|
|||||||
@@ -7,34 +7,18 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
gap: 5%;
|
gap: 5%;
|
||||||
transition: height 0.15s ease;
|
|
||||||
margin: 2px 0;
|
margin: 2px 0;
|
||||||
|
|
||||||
* {
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.create {
|
.create {
|
||||||
padding: 0 0.5em;
|
background-color: rgba($bg-gray-1100, 0.85);
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-radius: 8px;
|
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 20px;
|
display: none;
|
||||||
margin: -8px 0;
|
|
||||||
transition: height 0.1s ease;
|
|
||||||
|
|
||||||
* {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
@include when-visible;
|
|
||||||
}
|
|
||||||
|
|
||||||
.createEvent,
|
.createEvent,
|
||||||
.createDelay,
|
.createDelay,
|
||||||
@@ -46,7 +30,7 @@
|
|||||||
vertical-align: center;
|
vertical-align: center;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
line-height: 21px;
|
line-height: 21px;
|
||||||
border-radius: 4px;
|
border-radius: 2px;
|
||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
@@ -91,8 +75,18 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.options {
|
.options {
|
||||||
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
opacity: 0.65;
|
|
||||||
|
label {
|
||||||
|
opacity: 0.65;
|
||||||
|
transition: opacity 0.15s;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.disabled {
|
.disabled {
|
||||||
@@ -104,4 +98,4 @@
|
|||||||
|
|
||||||
.create.visible {
|
.create.visible {
|
||||||
@include when-visible;
|
@include when-visible;
|
||||||
}
|
}
|
||||||
@@ -53,13 +53,13 @@
|
|||||||
/* Track */
|
/* Track */
|
||||||
::-webkit-scrollbar-track {
|
::-webkit-scrollbar-track {
|
||||||
background: rgba($light-bg, 0.15);
|
background: rgba($light-bg, 0.15);
|
||||||
border-radius: 4px;
|
border-radius: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Handle */
|
/* Handle */
|
||||||
::-webkit-scrollbar-thumb {
|
::-webkit-scrollbar-thumb {
|
||||||
background: rgba($light-bg, 0.35);
|
background: rgba($light-bg, 0.35);
|
||||||
border-radius: 4px;
|
border-radius: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Handle on hover */
|
/* Handle on hover */
|
||||||
|
|||||||
@@ -32,16 +32,16 @@ option {
|
|||||||
/* Track */
|
/* Track */
|
||||||
::-webkit-scrollbar-track {
|
::-webkit-scrollbar-track {
|
||||||
background: rgba(255, 255, 255, 0.01);
|
background: rgba(255, 255, 255, 0.01);
|
||||||
border-radius: 4px;
|
border-radius: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Handle */
|
/* Handle */
|
||||||
::-webkit-scrollbar-thumb {
|
::-webkit-scrollbar-thumb {
|
||||||
background: rgba(255, 255, 255, 0.15);
|
background: rgba(255, 255, 255, 0.15);
|
||||||
border-radius: 4px;
|
border-radius: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Handle on hover */
|
/* Handle on hover */
|
||||||
::-webkit-scrollbar-thumb:hover {
|
::-webkit-scrollbar-thumb:hover {
|
||||||
background: rgba(255, 255, 255, 0.35);
|
background: rgba(255, 255, 255, 0.23);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ $ontime-pink-variant: #ff6969;
|
|||||||
$ontime-roll: #2b6cb0;
|
$ontime-roll: #2b6cb0;
|
||||||
$ontime-delay: #dd6b20;
|
$ontime-delay: #dd6b20;
|
||||||
$action-blue: #3182ce;
|
$action-blue: #3182ce;
|
||||||
|
$opacity-disabled: 0.4;
|
||||||
|
|
||||||
//rgba(255, 255, 255, 0.39); - $bg-gray-700
|
//rgba(255, 255, 255, 0.39); - $bg-gray-700
|
||||||
//rgba(255, 255, 255, 0.13); - $bg-gray-900
|
//rgba(255, 255, 255, 0.13); - $bg-gray-900
|
||||||
|
|||||||
@@ -4,7 +4,44 @@ const theme = extendTheme({
|
|||||||
components: {
|
components: {
|
||||||
Button: {
|
Button: {
|
||||||
baseStyle: {
|
baseStyle: {
|
||||||
borderRadius: '4px',
|
borderRadius: '3px',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Input: {
|
||||||
|
baseStyle: {
|
||||||
|
field: {
|
||||||
|
borderRadius: 3,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
sizes: {},
|
||||||
|
variants: {
|
||||||
|
filled: {
|
||||||
|
field: {
|
||||||
|
backgroundColor: 'rgba(255, 255, 255, 0.03)',
|
||||||
|
_hover: {
|
||||||
|
backgroundColor: 'rgba(255, 255, 255, 0.13)',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
defaultProps: {
|
||||||
|
variant: null, // null here
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Textarea: {
|
||||||
|
baseStyle: {
|
||||||
|
borderRadius: 4,
|
||||||
|
},
|
||||||
|
variants: {
|
||||||
|
filled: {
|
||||||
|
backgroundColor: 'rgba(255, 255, 255, 0.03)',
|
||||||
|
_hover: {
|
||||||
|
backgroundColor: 'rgba(255, 255, 255, 0.13)',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
defaultProps: {
|
||||||
|
variant: null, // null here
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
+1
-1
@@ -91,7 +91,7 @@ function createWindow() {
|
|||||||
win = new BrowserWindow({
|
win = new BrowserWindow({
|
||||||
width: 1920,
|
width: 1920,
|
||||||
height: 1000,
|
height: 1000,
|
||||||
minWidth: 575,
|
minWidth: 525,
|
||||||
minHeight: 405,
|
minHeight: 405,
|
||||||
maxWidth: 1920,
|
maxWidth: 1920,
|
||||||
maxHeight: 1440,
|
maxHeight: 1440,
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ontime",
|
"name": "ontime",
|
||||||
"version": "1.7.1",
|
"version": "1.7.2",
|
||||||
"author": "Carlos Valente",
|
"author": "Carlos Valente",
|
||||||
"description": "Time keeping for live events",
|
"description": "Time keeping for live events",
|
||||||
"repository": "https://github.com/cpvalente/ontime",
|
"repository": "https://github.com/cpvalente/ontime",
|
||||||
|
|||||||
Reference in New Issue
Block a user