Skip to content

Commit a9adf6e

Browse files
committed
Merge branch 'release/v3.4.4'
2 parents 5a419dc + 55e28b4 commit a9adf6e

File tree

5 files changed

+22
-32
lines changed

5 files changed

+22
-32
lines changed

app/media/styles/modules/home.less

+1-15
Original file line numberDiff line numberDiff line change
@@ -49,21 +49,7 @@
4949
}
5050

5151
.ant-card-meta-description {
52-
h2 {
53-
margin: 0;
54-
padding: 0;
55-
font-size: 13px;
56-
color: fade(@heading-color, 75%);
57-
}
58-
59-
img {
60-
height: @font-size-base;
61-
display: inline;
62-
}
63-
64-
s {
65-
text-decoration: none;
66-
}
52+
color: fade(@heading-color, 70%);
6753
}
6854
}
6955

app/modules/home/containers/recent-news.jsx

+18-14
Original file line numberDiff line numberDiff line change
@@ -38,23 +38,22 @@ class RecentNews extends React.Component {
3838

3939
constructor() {
4040
super(...arguments);
41-
const twitterUrl = workspaceSettings.getUrl('twitter');
42-
this.props.loadLatestTweets(twitterUrl.substring(twitterUrl.lastIndexOf('/') + 1));
41+
const linkedInUrl = workspaceSettings.getUrl('linkedin');
42+
this.props.loadLatestTweets(
43+
linkedInUrl.substring(linkedInUrl.lastIndexOf('/') + 1)
44+
);
4345
}
4446

4547
onClickItem(e, item) {
4648
e.preventDefault();
47-
if (item.entries.urls.length) {
48-
return this.props.osOpenUrl(item.entries.urls[0]);
49-
}
50-
return this.props.osOpenUrl(item.tweetUrl);
49+
return this.props.osOpenUrl(item.permalink);
5150
}
5251

5352
render() {
5453
return (
5554
<div className="recent-news">
5655
<Divider>
57-
<a onClick={() => this.props.osOpenUrl(workspaceSettings.getUrl('twitter'))}>
56+
<a onClick={() => this.props.osOpenUrl(workspaceSettings.getUrl('linkedin'))}>
5857
Recent News
5958
</a>
6059
</Divider>
@@ -101,8 +100,8 @@ class RecentNews extends React.Component {
101100
}
102101
const item = this.props.items[itemIndex];
103102
let coverUrl = workspaceSettings.get('companyLogoSrc');
104-
if (item.entries.photos.length) {
105-
coverUrl = item.entries.photos[0];
103+
if (item.content.thumbnail) {
104+
coverUrl = item.content?.thumbnail?.url;
106105
}
107106
const title = (
108107
<ul className="list-inline">
@@ -111,19 +110,24 @@ class RecentNews extends React.Component {
111110
<Icon type="pushpin" title="Pinned news" />
112111
</li>
113112
)}
114-
<li>{item.timeFormatted}</li>
115-
<li>
116-
<Icon type="twitter" />
117-
</li>
118113
<li>{item.author}</li>
114+
<li>&bull;</li>
115+
<li>{item.timeFormatted}</li>
119116
</ul>
120117
);
121118
const cover = <div style={{ backgroundImage: `url(${coverUrl})` }} />;
122119
return (
123120
<Card hoverable cover={cover} onClick={(e) => this.onClickItem(e, item)}>
124121
<Card.Meta
125122
title={title}
126-
description={<span dangerouslySetInnerHTML={{ __html: item.text }} />}
123+
description={
124+
<span
125+
dangerouslySetInnerHTML={{
126+
__html: item.text.replace(/[\n]+/g, '\n<br />'),
127+
}}
128+
/>
129+
}
130+
style={{ color: 'red !important' }}
127131
/>
128132
</Card>
129133
);

app/modules/home/sagas.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function* watchLoadLatestTweets() {
3333
try {
3434
items = yield call(backendFetchData, {
3535
query: 'misc.load_latest_tweets',
36-
params: [`https://news.platformio.org/tweets/${username}/data.json`],
36+
params: [`https://news.platformio.org/liupdates/${username}/data.json`],
3737
});
3838
} catch (err) {
3939
items = err;

app/workspace/aceinna/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
const urls = {
1818
home: 'https://www.aceinna.com/',
1919
welcome: 'https://github.com/Aceinna/platform-aceinna_imu#description',
20-
linkedin: 'https://www.linkedin.com/company/aceinna/',
20+
linkedin: 'https://www.linkedin.com/company/aceinna',
2121
twitter: 'https://twitter.com/MEMSsensortech',
2222
github: 'https://github.com/aceinna',
2323
weibo: 'https://weibo.com/',

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "platformio-home",
3-
"version": "3.4.3",
3+
"version": "3.4.4",
44
"description": "PlatformIO Home",
55
"repository": {
66
"type": "git",

0 commit comments

Comments
 (0)