Skip to content

Commit

Permalink
1.x updates, cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
erquhart committed Feb 2, 2018
1 parent 7b4ed27 commit 0dd1495
Show file tree
Hide file tree
Showing 11 changed files with 48 additions and 116 deletions.
10 changes: 5 additions & 5 deletions src/actions/editorialWorkflow.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function unpublishedEntryLoading(collection, slug) {
function unpublishedEntryLoaded(collection, entry) {
return {
type: UNPUBLISHED_ENTRY_SUCCESS,
payload: {
payload: {
collection: collection.get('name'),
entry,
},
Expand All @@ -65,7 +65,7 @@ function unpublishedEntryLoaded(collection, entry) {
function unpublishedEntryRedirected(collection, slug) {
return {
type: UNPUBLISHED_ENTRY_REDIRECT,
payload: {
payload: {
collection: collection.get('name'),
slug,
},
Expand Down Expand Up @@ -111,7 +111,7 @@ function unpublishedEntryPersisting(collection, entry, transactionID) {
function unpublishedEntryPersisted(collection, entry, transactionID, slug) {
return {
type: UNPUBLISHED_ENTRY_PERSIST_SUCCESS,
payload: {
payload: {
collection: collection.get('name'),
entry,
slug,
Expand All @@ -132,7 +132,7 @@ function unpublishedEntryPersistedFail(error, transactionID) {
function unpublishedEntryStatusChangeRequest(collection, slug, oldStatus, newStatus, transactionID) {
return {
type: UNPUBLISHED_ENTRY_STATUS_CHANGE_REQUEST,
payload: {
payload: {
collection,
slug,
oldStatus,
Expand All @@ -145,7 +145,7 @@ function unpublishedEntryStatusChangeRequest(collection, slug, oldStatus, newSta
function unpublishedEntryStatusChangePersisted(collection, slug, oldStatus, newStatus, transactionID) {
return {
type: UNPUBLISHED_ENTRY_STATUS_CHANGE_SUCCESS,
payload: {
payload: {
collection,
slug,
oldStatus,
Expand Down
6 changes: 3 additions & 3 deletions src/backends/bitbucket/API.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import LocalForage from "localforage";
import { Base64 } from "js-base64";
import FormData from "form-data";
import AssetProxy from "../../valueObjects/AssetProxy";
import { SIMPLE } from "../../constants/publishModes";
import { APIError } from "../../valueObjects/errors";
import AssetProxy from "ValueObjects/AssetProxy";
import { APIError } from "ValueObjects/errors";
import { SIMPLE } from "Constants/publishModes";

export default class API {
constructor(config) {
Expand Down
12 changes: 0 additions & 12 deletions src/backends/bitbucket/AuthenticationPage.css

This file was deleted.

27 changes: 13 additions & 14 deletions src/backends/bitbucket/AuthenticationPage.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import React from 'react';
import Button from 'react-toolbox/lib/button';
import Authenticator from '../../lib/netlify-auth';
import { Icon } from '../../components/UI';
import { Notifs } from 'redux-notifications';
import { Toast } from '../../components/UI/index';
import styles from './AuthenticationPage.css';
import PropTypes from 'prop-types';
import Authenticator from 'Lib/netlify-auth';
import { Icon } from 'UI';

export default class AuthenticationPage extends React.Component {
static propTypes = {
onLogin: React.PropTypes.func.isRequired,
onLogin: PropTypes.func.isRequired,
inProgress: PropTypes.bool,
};

state = {};
Expand All @@ -32,18 +30,19 @@ export default class AuthenticationPage extends React.Component {

render() {
const { loginError } = this.state;
const { inProgress } = this.props;

return (
<section className={styles.root}>
<Notifs CustomComponent={Toast} />
<section className="nc-githubAuthenticationPage-root">
<Icon className="nc-githubAuthenticationPage-logo" size="500px" type="netlify-cms"/>
{loginError && <p>{loginError}</p>}
<Button
className={styles.button}
raised
<button
className="nc-githubAuthenticationPage-button"
disabled={inProgress}
onClick={this.handleLogin}
>
<Icon type="bitbucket" /> Login with Bitbucket
</Button>
<Icon type="bitbucket" /> {inProgress ? "Logging in..." : "Login with Bitbucket"}
</button>
</section>
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/backends/bitbucket/__tests__/API.spec.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import fetchMock from 'fetch-mock';
import { curry, escapeRegExp, isMatch, merge } from 'lodash';
import { Map } from 'immutable';
import AssetProxy from "../../../valueObjects/AssetProxy";
import AssetProxy from "ValueObjects/AssetProxy";
import API from '../API';

const compose = (...fns) => val => fns.reduceRight((newVal, fn) => fn(newVal), val);
Expand Down
4 changes: 2 additions & 2 deletions src/backends/bitbucket/implementation.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import semaphore from "semaphore";
import AuthenticationPage from "./AuthenticationPage";
import API from "./API";
import { fileExtension } from '../../lib/pathHelper';
import { EDITORIAL_WORKFLOW } from "../../constants/publishModes";
import { fileExtension } from 'Lib/pathHelper';
import { EDITORIAL_WORKFLOW } from "Constants/publishModes";

const MAX_CONCURRENT_DOWNLOADS = 10;

Expand Down
2 changes: 2 additions & 0 deletions src/components/UI/Icon/images/_index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import iconAdd from './add.svg';
import iconAddWith from './add-with.svg';
import iconArrow from './arrow.svg';
import iconBitbucket from './bitbucket.svg';
import iconBold from './bold.svg';
import iconCheck from './check.svg';
import iconChevron from './chevron.svg';
Expand Down Expand Up @@ -43,6 +44,7 @@ const images = {
'add': iconAdd,
'add-with': iconAddWith,
'arrow': iconArrow,
'bitbucket': iconBitbucket,
'bold': iconBold,
'check': iconCheck,
'chevron': iconChevron,
Expand Down
3 changes: 3 additions & 0 deletions src/components/UI/Icon/images/bitbucket.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 0 additions & 24 deletions src/components/UI/icon/Icon.css

This file was deleted.

48 changes: 0 additions & 48 deletions src/components/UI/icon/Icon.js

This file was deleted.

26 changes: 19 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3140,6 +3140,14 @@ fbjs@^0.8.16, fbjs@^0.8.9:
setimmediate "^1.0.5"
ua-parser-js "^0.7.9"

fetch-mock@^5.12.1:
version "5.13.1"
resolved "https://registry.yarnpkg.com/fetch-mock/-/fetch-mock-5.13.1.tgz#955794a77f3d972f1644b9ace65a0fdfd60f1df7"
dependencies:
glob-to-regexp "^0.3.0"
node-fetch "^1.3.3"
path-to-regexp "^1.7.0"

figures@^1.3.5, figures@^1.7.0:
version "1.7.0"
resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e"
Expand Down Expand Up @@ -3280,17 +3288,17 @@ forever-agent@~0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91"

form-data@~2.1.1:
version "2.1.4"
resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.4.tgz#33c183acf193276ecaa98143a69e94bfee1750d1"
form-data@^2.2.0, form-data@~2.3.1:
version "2.3.1"
resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.1.tgz#6fb94fbd71885306d73d15cc497fe4cc4ecd44bf"
dependencies:
asynckit "^0.4.0"
combined-stream "^1.0.5"
mime-types "^2.1.12"

form-data@~2.3.1:
version "2.3.1"
resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.1.tgz#6fb94fbd71885306d73d15cc497fe4cc4ecd44bf"
form-data@~2.1.1:
version "2.1.4"
resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.4.tgz#33c183acf193276ecaa98143a69e94bfee1750d1"
dependencies:
asynckit "^0.4.0"
combined-stream "^1.0.5"
Expand Down Expand Up @@ -3444,6 +3452,10 @@ glob-parent@^2.0.0:
dependencies:
is-glob "^2.0.0"

glob-to-regexp@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab"

glob@^6.0.1:
version "6.0.4"
resolved "https://registry.yarnpkg.com/glob/-/glob-6.0.4.tgz#0f08860f6a155127b2fadd4f9ce24b1aab6e4d22"
Expand Down Expand Up @@ -5560,7 +5572,7 @@ node-emoji@^1.0.3:
dependencies:
lodash.toarray "^4.4.0"

node-fetch@^1.0.1:
node-fetch@^1.0.1, node-fetch@^1.3.3:
version "1.7.3"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef"
dependencies:
Expand Down

0 comments on commit 0dd1495

Please sign in to comment.