Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WEB-2895] Add Twiist #1387

Draft
wants to merge 5 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions app/components/datasources/datasources.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,32 @@ export default withTranslation()(class DataSources extends Component {
height: 840,
},
},
{
id: 'oauth/twiist',
restrictedTokenCreate: {
paths: [
'/v1/oauth/twiist',
],
},
dataSourceFilter: {
providerType: 'oauth',
providerName: 'twiist',
},
content: {
description: t('Data will be synced from Twiist'),
connectButton: t('Connect'),
disconnectButton: t('Disconnect'),
},
classNames: {
logo: 'DataSource-logo-twiist',
connectButton: 'btn DataSource-action-button-connect-twiist',
disconnectButton: 'btn DataSource-action-button-disconnect-twiist',
},
popup: {
width: 1080,
height: 840,
},
},
];

this.state = {
Expand Down
20 changes: 20 additions & 0 deletions app/components/datasources/datasources.less
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,24 @@
.DataSource-action-button-disconnect-dexcom {
.DataSource-action-button-dexcom();
}

.DataSource-logo-twiist {
content: url('images/twiist-logo-80x45.png');
margin: -8px 0 4px -8px;
}

.DataSource-action-button-twiist {
.DataSource-action-button();
width: 200px;
height: 45px;
background-color: #ed3e95;
}

.DataSource-action-button-connect-twiist {
.DataSource-action-button-twiist();
}

.DataSource-action-button-disconnect-twiist {
.DataSource-action-button-twiist();
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/pages/oauth/OAuthConnection.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const OAuthConnection = (props) => {
const queryParams = new URLSearchParams(search)
const dispatch = useDispatch();
const [isCustodial, setIsCustodial] = useState();
const allowedProviderNames = ['dexcom'];
const allowedProviderNames = ['dexcom', 'twiist'];
const [authStatus, setAuthStatus] = useState();

const statusContent = {
Expand Down