Skip to content

Commit

Permalink
Merge branch 'release/v3.4.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
ivankravets committed May 15, 2023
2 parents 5a419dc + 55e28b4 commit a9adf6e
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 32 deletions.
16 changes: 1 addition & 15 deletions app/media/styles/modules/home.less
Original file line number Diff line number Diff line change
Expand Up @@ -49,21 +49,7 @@
}

.ant-card-meta-description {
h2 {
margin: 0;
padding: 0;
font-size: 13px;
color: fade(@heading-color, 75%);
}

img {
height: @font-size-base;
display: inline;
}

s {
text-decoration: none;
}
color: fade(@heading-color, 70%);
}
}

Expand Down
32 changes: 18 additions & 14 deletions app/modules/home/containers/recent-news.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,22 @@ class RecentNews extends React.Component {

constructor() {
super(...arguments);
const twitterUrl = workspaceSettings.getUrl('twitter');
this.props.loadLatestTweets(twitterUrl.substring(twitterUrl.lastIndexOf('/') + 1));
const linkedInUrl = workspaceSettings.getUrl('linkedin');
this.props.loadLatestTweets(
linkedInUrl.substring(linkedInUrl.lastIndexOf('/') + 1)
);
}

onClickItem(e, item) {
e.preventDefault();
if (item.entries.urls.length) {
return this.props.osOpenUrl(item.entries.urls[0]);
}
return this.props.osOpenUrl(item.tweetUrl);
return this.props.osOpenUrl(item.permalink);
}

render() {
return (
<div className="recent-news">
<Divider>
<a onClick={() => this.props.osOpenUrl(workspaceSettings.getUrl('twitter'))}>
<a onClick={() => this.props.osOpenUrl(workspaceSettings.getUrl('linkedin'))}>
Recent News
</a>
</Divider>
Expand Down Expand Up @@ -101,8 +100,8 @@ class RecentNews extends React.Component {
}
const item = this.props.items[itemIndex];
let coverUrl = workspaceSettings.get('companyLogoSrc');
if (item.entries.photos.length) {
coverUrl = item.entries.photos[0];
if (item.content.thumbnail) {
coverUrl = item.content?.thumbnail?.url;
}
const title = (
<ul className="list-inline">
Expand All @@ -111,19 +110,24 @@ class RecentNews extends React.Component {
<Icon type="pushpin" title="Pinned news" />
</li>
)}
<li>{item.timeFormatted}</li>
<li>
<Icon type="twitter" />
</li>
<li>{item.author}</li>
<li>&bull;</li>
<li>{item.timeFormatted}</li>
</ul>
);
const cover = <div style={{ backgroundImage: `url(${coverUrl})` }} />;
return (
<Card hoverable cover={cover} onClick={(e) => this.onClickItem(e, item)}>
<Card.Meta
title={title}
description={<span dangerouslySetInnerHTML={{ __html: item.text }} />}
description={
<span
dangerouslySetInnerHTML={{
__html: item.text.replace(/[\n]+/g, '\n<br />'),
}}
/>
}
style={{ color: 'red !important' }}
/>
</Card>
);
Expand Down
2 changes: 1 addition & 1 deletion app/modules/home/sagas.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function* watchLoadLatestTweets() {
try {
items = yield call(backendFetchData, {
query: 'misc.load_latest_tweets',
params: [`https://news.platformio.org/tweets/${username}/data.json`],
params: [`https://news.platformio.org/liupdates/${username}/data.json`],
});
} catch (err) {
items = err;
Expand Down
2 changes: 1 addition & 1 deletion app/workspace/aceinna/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
const urls = {
home: 'https://www.aceinna.com/',
welcome: 'https://github.com/Aceinna/platform-aceinna_imu#description',
linkedin: 'https://www.linkedin.com/company/aceinna/',
linkedin: 'https://www.linkedin.com/company/aceinna',
twitter: 'https://twitter.com/MEMSsensortech',
github: 'https://github.com/aceinna',
weibo: 'https://weibo.com/',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "platformio-home",
"version": "3.4.3",
"version": "3.4.4",
"description": "PlatformIO Home",
"repository": {
"type": "git",
Expand Down

0 comments on commit a9adf6e

Please sign in to comment.