Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
caleb531 committed Jan 23, 2022
2 parents edcaf6b + fe09b01 commit 71ffce4
Show file tree
Hide file tree
Showing 12 changed files with 248 additions and 3,061 deletions.
5 changes: 2 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
],
"parser": "@typescript-eslint/parser",
"extends": [
"next"
"plugin:react/recommended",
"plugin:react-hooks/recommended"
],
"settings": {
"react": {
Expand Down Expand Up @@ -76,8 +77,6 @@
"no-extra-semi": ["error"],
"no-floating-decimal": ["error"],
"no-global-assign": ["error"],
"@next/next/no-img-element": ["off"],
"import/no-anonymous-default-export": ["off"],
"no-implicit-coercion": ["error"],
"no-implicit-globals": ["error"],
"no-implied-eval": ["error"],
Expand Down
11 changes: 11 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Travis CI Configuration

language: node_js
node_js:
- "16"
install:
- npm install
before_script:
- next build
script:
- tsc --noEmit
1 change: 1 addition & 0 deletions components/app/AppHead.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ function AppHead() {
return (
<Head>
<title>Faith Dashboard</title>
<link rel="canonical" href="https://faithdashboard.com/" />
<meta property="og:title" content="Faith Dashboard" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://faithdashboard.com" />
Expand Down
1 change: 1 addition & 0 deletions components/generic/audio-player/AudioPlayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ function AudioPlayer({ audioElementKey, audioUrl, currentTime, setCurrentTime, i
<div className="audio-player">
<AudioPlayerPlayPause
audioElement={audioElement}
audioUrl={audioUrl}
isPlaying={isPlaying}
setIsPlaying={setIsPlaying} />
<AudioPlayerSeeker
Expand Down
6 changes: 3 additions & 3 deletions components/generic/audio-player/AudioPlayerPlayPause.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import React from 'react';
import LoadingIndicator from '../LoadingIndicator';
import useAudioPlayPause from './useAudioPlayPause';

type Props = { audioElement: HTMLAudioElement, isPlaying: boolean, setIsPlaying: (newIsPlaying: boolean) => void };
type Props = { audioElement: HTMLAudioElement, audioUrl: string, isPlaying: boolean, setIsPlaying: (newIsPlaying: boolean) => void };

function AudioPlayerPlayPause({ audioElement, isPlaying, setIsPlaying }: Props) {
function AudioPlayerPlayPause({ audioElement, audioUrl, isPlaying, setIsPlaying }: Props) {

function toggleAudioElementPlayback() {
if (audioElement.paused) {
Expand All @@ -18,7 +18,7 @@ function AudioPlayerPlayPause({ audioElement, isPlaying, setIsPlaying }: Props)

return (
<button className="audio-player-playpause" onClick={() => toggleAudioElementPlayback()} disabled={!audioElement.duration}>
{!audioElement.duration ? (
{!audioElement.duration || audioElement.src !== audioUrl ? (
<LoadingIndicator />
) : (audioElement.paused) ? (
<img
Expand Down
4 changes: 2 additions & 2 deletions components/generic/audio-player/AudioPlayerSeeker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ function AudioPlayerSeeker({ audioElement, audioUrl, currentTime, setCurrentTime
{...seekerProvided} />
<div className="audio-player-time-info">
<span className="audio-player-current-time">
{!audioElement.duration ?
{!audioElement.duration || audioElement.src !== audioUrl ?
'Loading...' :
audioElement.currentTime >= 1 ?
formatSecondsAsTimestamp(Math.floor(audioElement.currentTime)) :
'0:00'
}
</span>
<span className="audio-player-time-remaining">{audioElement.duration ?
<span className="audio-player-time-remaining">{audioElement.duration && audioElement.src === audioUrl ?
Math.round(audioElement.duration - audioElement.currentTime) > 0 ?
`-${formatSecondsAsTimestamp(audioElement.duration - audioElement.currentTime)}`
: '0:00'
Expand Down
2 changes: 1 addition & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const nextConfig = withPWA({
{
key: 'Content-Security-Policy',
/* eslint-disable-next-line quotes */
value: "default-src 'none'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com data:; img-src *; script-src 'self' https://storage.googleapis.com https://www.googletagmanager.com 'unsafe-inline' 'unsafe-eval'; child-src 'self'; connect-src 'self' https://fonts.googleapis.com https://fonts.gstatic.com https://www.google-analytics.com; manifest-src 'self'; media-src *;"
value: "default-src 'none'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com data:; img-src *; script-src 'self' https://storage.googleapis.com https://www.googletagmanager.com 'unsafe-inline' 'unsafe-eval'; child-src 'self'; connect-src *; manifest-src 'self'; media-src *;"
}
];
// The HSTS header should only be sent for HTTPS websites; because localhost is server over plain HTTP, we do not want to enable HSTS there
Expand Down
Loading

0 comments on commit 71ffce4

Please sign in to comment.