Merge master to develop for 0.2.1

This commit is contained in:
WithoutPants 2020-06-10 11:51:31 +10:00 committed by GitHub
commit 32011aa86f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 25 additions and 4 deletions

View file

@ -1,7 +1,7 @@
import React from "react";
import { useChangelogStorage } from "src/hooks";
import Version from "./Version";
import { V010, V011, V020 } from "./versions";
import { V010, V011, V020, V021 } from "./versions";
const Changelog: React.FC = () => {
const [{ data, loading }, setOpenState] = useChangelogStorage();
@ -21,6 +21,15 @@ const Changelog: React.FC = () => {
return (
<>
<h1 className="mb-4">Changelog:</h1>
<Version
version="v0.2.1"
date="2020-06-10"
openState={openState}
setOpenState={setVersionOpenState}
defaultOpen
>
<V021 />
</Version>
<Version
version="v0.2.0"
date="2020-06-06"

View file

@ -1,3 +1,4 @@
export { default as V010 } from "./v010";
export { default as V011 } from "./v011";
export { default as V020 } from "./v020";
export { default as V021 } from "./v021";

View file

@ -0,0 +1,11 @@
import React from "react";
import ReactMarkdown from "react-markdown";
const markup = `
### 🐛 Bug fixes
* Fix max loop duration not working.
* Fix URL sanitization on non-Chrome browsers.
`;
export default () => <ReactMarkdown source={markup} />;

View file

@ -107,7 +107,7 @@ export class ScenePlayerImpl extends React.Component<
}
private shouldRepeat(scene: GQL.SceneDataFragment) {
const maxLoopDuration = this.state?.config.maximumLoopDuration ?? 0;
const maxLoopDuration = this.props?.config?.maximumLoopDuration ?? 0;
return (
!!scene.file.duration &&
!!maxLoopDuration &&

View file

@ -119,11 +119,11 @@ const sanitiseURL = (url?: string, siteURL?: URL) => {
if (siteURL) {
// if url starts with the site host, then prepend the protocol
if (url.startsWith(siteURL.host)) {
return siteURL.protocol + url;
return `${siteURL.protocol}//${url}`;
}
// otherwise, construct the url from the protocol, host and passed url
return `${siteURL.protocol}${siteURL.host}/${url}`;
return `${siteURL.protocol}//${siteURL.host}/${url}`;
}
// just prepend the protocol - assume https