Skip to content

Commit ce7a7eb

Browse files
committed
Added dark mode, styling changes, card database logo identifier
1 parent 814a3ae commit ce7a7eb

24 files changed

+1336
-83
lines changed

app/assets/mongo-icon-color.png

20.2 KB
Loading

app/assets/mongo-icon-green-light.png

14.6 KB
Loading

app/assets/mongo-icon-green.png

14.6 KB
Loading

app/assets/mongo-icon-white.png

32.7 KB
Loading

app/assets/postgres-icon-white.png

11.2 KB
Loading
5.25 KB
Loading

app/assets/postgres-icon-yellow.png

5.26 KB
Loading

app/components/Applications.tsx

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,11 @@ const Applications: React.FC = React.memo((props) => {
4646
};
4747

4848
const useStyles = makeStyles(theme => ({
49-
// card: myPostgres, myMongo, ToddDB buttons
49+
// cards: myPostgres, myMongo, ToddDB
5050
paper: {
5151
height: 280,
5252
width: 280,
5353
textAlign: 'center',
54-
color: '#3788fc',
5554
whiteSpace: 'nowrap',
5655
backgroundColor: '#ffffff',
5756
borderRadius: 3,
@@ -60,8 +59,11 @@ const Applications: React.FC = React.memo((props) => {
6059
'&:hover, &.Mui-focusVisible': {
6160
backgroundColor: `#3788fc`,
6261
},
62+
'&:active': {
63+
backgroundColor: `#3788fc`,
64+
},
6365
},
64-
hover: {
66+
iconbutton: {
6567
position: 'relative',
6668
bottom: 20,
6769
right: 47,
@@ -70,10 +72,10 @@ const Applications: React.FC = React.memo((props) => {
7072
backgroundColor: 'transparent',
7173
},
7274
fontStyles: {
73-
fontSize: '16px',
75+
color: '#444d56',
76+
fontSize: '22px',
7477
[theme.breakpoints.up('lg')]: {
75-
fontSize: '18px',
76-
// MAIN PAGE SQUARE BUTTON FONTS
78+
fontSize: '22px',
7779
fontFamily: 'Roboto',
7880
fontWeight: 100,
7981
},
@@ -82,6 +84,8 @@ const Applications: React.FC = React.memo((props) => {
8284

8385
const classes = useStyles();
8486

87+
console.log('Applications.tsx: applications', applications)
88+
8589
return (
8690
<>
8791
{applications.map((app: string[], i: number | any | string | undefined) => (
@@ -97,7 +101,7 @@ const Applications: React.FC = React.memo((props) => {
97101
avatar={
98102
<IconButton
99103
ref={element => (delRef.current[i] = element)}
100-
className={classes.hover}
104+
className={classes.iconbutton}
101105
aria-label="Delete"
102106
onClick={event => confirmDelete(event, app[0], i)}
103107
>

app/components/Occupied.tsx

Lines changed: 65 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,14 @@ import SearchIcon from '@material-ui/icons/Search';
2323
import DashboardIcon from '@material-ui/icons/Dashboard';
2424
import NotificationsIcon from '@material-ui/icons/Notifications';
2525
import PersonIcon from '@material-ui/icons/Person';
26+
import UpdateIcon from '@material-ui/icons/Update';
2627

2728
// MODALS
2829
import AddModal from '../modals/AddModal';
2930
import ServicesModal from '../modals/ServicesModal';
3031

3132
// STYLESHEETS
33+
// import '../stylesheets/Occupied.scss';
3234
import '../stylesheets/Occupied.scss';
3335

3436
// DASHBOARD CONTEXT
@@ -75,54 +77,55 @@ const Occupied = React.memo(() => {
7577
};
7678

7779
const useStyles = makeStyles<Theme, StyleProps>(theme => ({
78-
// "+" Card Only
80+
// ALL CARDS
7981
paper: {
82+
display: 'flex',
83+
flexDirection: 'column',
84+
alignContent: 'center',
85+
alignItems: 'center',
86+
position: 'relative',
87+
overflow: 'visible',
8088
height: 280,
8189
width: 280,
8290
textAlign: 'center',
83-
color: '#3788fc',
91+
color: '#888888',
8492
whiteSpace: 'nowrap',
8593
backgroundColor: '#ffffff',
8694
borderRadius: 3,
8795
border: '0',
8896
boxShadow: '0 6px 6px 0 rgba(153, 153, 153, 0.14), 0 6px 6px -2px rgba(153, 153, 153, 0.2), 0 6px 8px 0 rgba(153, 153, 153, 0.12)',
8997
'&:hover, &.Mui-focusVisible': {
9098
backgroundColor: `#3788fc`,
91-
color: '#fff',
92-
fontWeight: 300,
99+
color: '#ffffff',
100+
fontWeight: 600,
93101
},
94102
},
95103
iconbutton: {
96104
boxShadow: 'none',
97105
color: 'none',
98-
'&:hover, &.Mui-focusVisible': {
99-
backgroundColor: `#3788fc`,
100-
color: '#fff',
101-
}
106+
visibility: 'hidden',
102107
},
103108
btnStyle: {
104109
position: 'absolute',
105110
top: -10,
106-
left: -10,
111+
left: -72,
107112
margin: '0',
108113
color: '#eeeeee',
109114
borderRadius: '0',
110115
backgroundColor: 'none',
111-
'&:hover' : {
112-
backgroundColor: 'none'
113-
}
116+
visibility: 'visible',
114117
},
115118
icon: {
116119
width: '75px',
117120
height: '75px',
118121
boxShadow: 'none',
119122
},
120-
// EACH CARD CONTENT
123+
// ALL CARDS: CONTENT
121124
fontStyles: {
122-
fontSize: '16px',
125+
fontSize: '18px',
123126
fontFamily: 'Roboto',
124-
fontWeight: 100,
125-
color: '#444d56'
127+
fontWeight: 300,
128+
color: '#444d56',
126129
}
127130
}));
128131

@@ -146,9 +149,20 @@ const Occupied = React.memo(() => {
146149
<SearchIcon className="icon" id="searchIcon" />
147150
</button>
148151
</form>
149-
<DashboardIcon className="sideIcon" id="dashboardIcon" />
150-
<NotificationsIcon className="sideIcon" id="notificationsIcon" />
151-
<PersonIcon className="sideIcon" id="personIcon" />
152+
<div className="dashboardIconArea">
153+
<span className="dashboardTooltip">You have {applications.length} active databases</span>
154+
<DashboardIcon className="navIcon" id="dashboardIcon" />
155+
</div>
156+
157+
<div className="notificationsIconArea">
158+
<span className="notificationsTooltip">You have no new alerts</span>
159+
< NotificationsIcon className="navIcon" id="notificationsIcon" />
160+
</div>
161+
162+
<div className="personIconArea">
163+
<span className="personTooltip">You are not logged in</span>
164+
<PersonIcon className="navIcon" id="personIcon" />
165+
</div>
152166
</section>
153167
</header>
154168

@@ -166,21 +180,41 @@ const Occupied = React.memo(() => {
166180
variant="outlined"
167181
onClick={event => handleClick(event, app[0], i)}
168182
>
169-
<CardHeader
170-
avatar={
171-
<IconButton
172-
ref={element => (delRef.current[i] = element)}
173-
className={classes.iconbutton}
174-
aria-label="Delete"
175-
onClick={event => confirmDelete(event, app[0], i)}
176-
>
177-
<HighlightOffIcon className={classes.btnStyle} id="deleteIcon" />
178-
</IconButton>
179-
}
180-
></CardHeader>
183+
184+
<div className="databaseIconContainer">
185+
<div className="databaseIconHeader">
186+
<img className="databaseIcon" src="../assets/mongo-icon-white.png" alt="MongoDB"></img>
187+
</div>
188+
</div>
189+
190+
<CardHeader
191+
avatar={
192+
<IconButton
193+
id="iconButton"
194+
ref={element => (delRef.current[i] = element)}
195+
className={classes.iconbutton}
196+
aria-label="Delete"
197+
onClick={event => confirmDelete(event, app[0], i)}
198+
>
199+
<HighlightOffIcon
200+
className={classes.btnStyle}
201+
id="deleteIcon"
202+
ref={element => (delRef.current[i] = element)}
203+
/>
204+
</IconButton>
205+
}
206+
>
207+
</CardHeader>
181208
<CardContent>
209+
<p id="databaseName">Database Name:</p>
182210
<Typography className={classes.fontStyles}>{app[0]}</Typography>
183211
</CardContent>
212+
<hr className="cardLine"/>
213+
214+
<div className="cardFooter">
215+
<UpdateIcon className="cardFooterIcon"/>
216+
<em><p id="cardFooterText">Just updated</p></em>
217+
</div>
184218
</Card>
185219
</div>
186220
))}

0 commit comments

Comments
 (0)