Skip to content
This repository was archived by the owner on Sep 29, 2021. It is now read-only.

Commit 0d1eec5

Browse files
author
John Jones
committed
added better column handling
1 parent 61720e7 commit 0d1eec5

File tree

3 files changed

+7
-12
lines changed

3 files changed

+7
-12
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "inbrief",
3-
"version": "2.0.0-beta.6",
3+
"version": "2.0.0-beta.7",
44
"author": "John Jones <johnjones4@gmail.com>",
55
"description": " InBrief is a personal briefing app and dashboard.",
66
"private": true,

src/ui/widgets/Twitter.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ class Twitter extends Widget {
6161
if (!data) {
6262
return null
6363
}
64-
if (this.getWidgetConfig().merge) {
64+
const config = this.getWidgetConfig()
65+
if (config.merge) {
6566
const all = []
6667
data.forEach(tweets => {
6768
tweets.tweets.forEach(tweet => {
@@ -106,8 +107,10 @@ class Twitter extends Widget {
106107
}
107108

108109
renderTweets (tweets, i) {
110+
const config = this.getWidgetConfig()
111+
const width = Math.floor(100.0 / (config.layout.w || 0)) + '%'
109112
return (
110-
<div className='twitter-feed' key={i}>
113+
<div className='twitter-feed' style={{width}} key={i}>
111114
{tweets.title && (
112115
<div className='twitter-feed-title widget-subhead'>
113116
{tweets.title}
@@ -180,7 +183,7 @@ class Twitter extends Widget {
180183
tempConfig.credentials.access.tokenSecret ? (
181184
<div>
182185
<label>
183-
<input type='checkbox' name='merge' checked={this.getWidgetTempConfig().merge || false} onClick={(event) => this.setTempConfigValue('merge', event.target.checked)} />
186+
<input type='checkbox' name='merge' checked={this.getWidgetTempConfig().merge || false} onChange={(event) => this.setTempConfigValue('merge', event.target.checked)} />
184187
Merge Lists
185188
</label>
186189
<button className='destructive pull-right' onClick={() => this.setAccessCredentials(null)}>Deauthorize</button>

src/ui/widgets/Twitter.scss

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
@import '../vars_mixins.scss';
22

33
.twitter-feed {
4-
width: 50%;
54
float: left;
65
padding-right: 0.5em;
76
margin-bottom: 1em;
@@ -40,13 +39,6 @@
4039
float: right;
4140
}
4241

43-
@media (max-width: 1900px) {
44-
.twitter-feed {
45-
width: auto;
46-
float: none;
47-
}
48-
}
49-
5042
.twitter-feed-tweet-name {
5143
margin-right: 0.25em;
5244
color: $widget_body_strong_text_color;

0 commit comments

Comments
 (0)