-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'clean-up-merge-modal' of github.com:scalableminds/webkn…
…ossos into chunk-save-actions
- Loading branch information
Showing
56 changed files
with
4,802 additions
and
1,394 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// @flow | ||
import * as React from "react"; | ||
import moment from "moment"; | ||
import { Tooltip } from "antd"; | ||
|
||
const defaultTimeFormat = "YYYY-MM-DD HH:mm"; | ||
|
||
/** | ||
* Return current date and time. Please only use this function if you need | ||
* a pure string representation. In all other cases, please prefer the | ||
* <FormattedDate /> component below. | ||
*/ | ||
export function formatDateInLocalTimeZone(date?: number = Date.now()): string { | ||
return moment(date).format(defaultTimeFormat); | ||
} | ||
|
||
export default function FormattedDate({ | ||
timestamp, | ||
format, | ||
}: { | ||
timestamp: string | number, | ||
format?: string, | ||
}) { | ||
const _moment = moment.utc(timestamp); | ||
const _format = format || defaultTimeFormat; | ||
return ( | ||
<Tooltip | ||
title={ | ||
<span> | ||
The displayed time refers to your local timezone. In UTC, the time is:{" "} | ||
{_moment.format(_format)} | ||
</span> | ||
} | ||
> | ||
{_moment.local().format(_format)} | ||
</Tooltip> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// @flow | ||
/* eslint-disable import/prefer-default-export */ | ||
|
||
type SetDropzoneModalVisibilityActionType = { | ||
type: "SET_DROPZONE_MODAL_VISIBILITY_ACTION_TYPE", | ||
visible: boolean, | ||
}; | ||
|
||
export type UiActionType = SetDropzoneModalVisibilityActionType; | ||
|
||
export const setDropzoneModalVisibilityAction = ( | ||
visible: boolean, | ||
): SetDropzoneModalVisibilityActionType => ({ | ||
type: "SET_DROPZONE_MODAL_VISIBILITY_ACTION_TYPE", | ||
visible, | ||
}); |
Oops, something went wrong.