Skip to content

Commit aa3bb5d

Browse files
committed
tiny improvmeents
1 parent 9dee4ab commit aa3bb5d

File tree

7 files changed

+24
-15
lines changed

7 files changed

+24
-15
lines changed

src/blocks/googleCalendarBlock.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default function GoogleCalendarBlock(props) {
77
height: '100%',
88
borderRadius: "10px",
99
overflow: "hidden",
10-
background: "rgba(255, 255, 255, 10%)"
10+
background: "rgba(255, 255, 255)"
1111
}}>
1212
{props.calendarAccount != ""
1313
?

src/blocks/googlePhotosBlock.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,12 @@ export default function GooglePhotosBlock(props) {
5454
return (
5555
<div style={{
5656
width: "100%", height: "100%", padding: "10px", boxSizing: "border-box", display: "flex", alignItems: "center", justifyContent: "center",
57-
...(props.albumUrls.length == 0 && { background: window.themeColor, color: "white" })
57+
...(props.albumUrls.length == 0 && { background: `${window.themeColor}20`, color: "white" })
5858
}}>
5959
<div style={{
6060
fontWeight: "bold",
61-
...(props.albumUrls.length > 0 && { display: "none" })
61+
...(props.albumUrls.length > 0 && { display: "none" }),
62+
textShadow: "0px 0px 5px gray",
6263
}}>
6364
No Albums Added... <span role="img" aria-label='sad'>😢</span>
6465
</div>

src/blocks/weatherBlock.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ export default function WeatherBlock(props) {
2525
setRerender(!rerender);
2626
}, [props]);
2727
return (
28-
<div style={{ width: "100%", height: "100%", padding: "5px", boxSizing: "border-box" }}>
29-
28+
<div style={{ width: "100%", height: "100%", padding: "5px", boxSizing: "border-box", cursor: (props.editing ? "" : "pointer") }} onClick={() => { if (!props.editing) window.location.replace("https://weather.com/weather/today") }}>
3029
<Loader loaded={weatherData.status === "success"}>
3130

3231
<WeatherIconDefinitions />

src/components/blockContainer/blockContainer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ function BlockContainer({ id, focusedAndEditing, onMouseDown, editing, onDelete
6565
topLeft: <Handle />
6666
}}
6767
>
68-
<RenderBlocker editing={editing} block={block.blockProps.hoverToLoad || (block.blockProps.hideContentWhileEdit && editing)} humanName={realBlockFromJSON(block).getBlockHumanName()}>
68+
<RenderBlocker width={block.dragProps.width} height={block.dragProps.height} editing={editing} block={block.blockProps.hoverToLoad || (block.blockProps.hideContentWhileEdit && editing)} humanName={realBlockFromJSON(block).getBlockHumanName()}>
6969
{
70-
blockKindToComponent(block.kind, { width: block.dragProps.width, height: block.dragProps.width, id: block.id, editMode: true, backgroundTheme: window.background.themeColor, ...block.blockProps })
70+
blockKindToComponent(block.kind, { width: block.dragProps.width, height: block.dragProps.width, id: block.id, editing: editing, backgroundTheme: window.background.themeColor, ...block.blockProps })
7171
}
7272
</RenderBlocker>
7373

src/components/loader/loader.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
1-
import React from "react";
1+
import React, { useState, useEffect } from "react";
22
import "./loader.css";
3-
43
function Loader(props) {
4+
const [opacity, setOpacity] = useState(0);
5+
useEffect(() => {
6+
if (props.loaded) {
7+
setTimeout(() => {
8+
setOpacity(1);
9+
}, 0);
10+
}
11+
}, [props.loaded]);
12+
513
return (
614
<>
715
{props.loaded
816
&&
9-
<div style={{ ...(props.loaded ? { opacity: 1 } : { opacity: 0 }), transition: "opacity .1s", width: "100%", height: "100%" }}>
17+
<div style={{ ...(opacity ? { opacity: 1 } : { opacity: 0 }), transition: "opacity .2s", width: "100%", height: "100%" }}>
1018
{props.children}
1119
</div>
1220
}

src/components/renderBlocker/renderBlocker.css

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1+
div.block:has(.RenderBlocker){
2+
/* We have to target the parent element (the actual dragable block) when bluring the background */
3+
backdrop-filter: blur(5px);
4+
}
15
.RenderBlocker {
26
width: 100%;
37
height: 100%;
4-
backdrop-filter: blur(2px);
58

69
display: flex;
710
flex-direction: column;
@@ -12,12 +15,12 @@
1215
border-radius: 10px;
1316
}
1417
.blockMessage {
15-
opacity:.8;
18+
/* opacity:.8; */
1619
width:60%;
1720
height:20%;
1821
}
1922
.blockHumanName{
20-
opacity:.8;
23+
/* opacity:.8; */
2124
width:80%;
2225
height:30%;
2326

src/components/renderBlocker/renderBlocker.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ import React, { useState } from 'react';
22
import "./renderBlocker.css"
33

44
import { ResponsiveText } from '../responsiveText/responsiveTextSize';
5-
import { realBlockFromJSON } from '../../helpers/functions/BlockAPI';
6-
75
function RenderBlocker(props) {
86
const [hovered, setHovered] = useState(false);
97
return (

0 commit comments

Comments
 (0)