forked from friendsofagape/autographa
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
44 changed files
with
480 additions
and
30 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
export const environment = { | ||
production: false, | ||
APPLICATION_ID: 'autographa', | ||
JAVASCRIPT_KEY: 'translation2021', | ||
SERVER_URL: 'https://dev.autographa.org:1337/parse', | ||
}; |
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 @@ | ||
{ | ||
"compilerOptions": { | ||
"baseUrl": ".", | ||
"paths": { | ||
"@/components/*": [ | ||
"src/components/*" | ||
], | ||
"@/layouts/*": [ | ||
"src/layouts/*" | ||
], | ||
"@/modules/*": [ | ||
"src/modules/*" | ||
], | ||
} | ||
} | ||
} |
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,25 @@ | ||
/* eslint-disable react/prop-types */ | ||
import NProgress from 'nprogress'; | ||
import Router from 'next/router'; | ||
import '../../styles/nprogress.css'; | ||
import '../../styles/globals.css'; | ||
// import { initializeParse } from '@parse/react-ssr'; | ||
// import { environment } from '../environment'; | ||
|
||
// initializeParse( | ||
// environment.SERVER_URL, | ||
// environment.APPLICATION_ID, | ||
// environment.MASTER_KEY, | ||
// ); | ||
|
||
Router.events.on('routeChangeStart', () => NProgress.start()); | ||
Router.events.on('routeChangeComplete', () => NProgress.done()); | ||
Router.events.on('routeChangeError', () => NProgress.done()); | ||
|
||
function Autographa({ Component, pageProps }) { | ||
return ( | ||
<Component {...pageProps} /> | ||
); | ||
} | ||
|
||
export default Autographa; |
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,22 @@ | ||
import Document, { | ||
Html, Head, NextScript, Main, | ||
} from 'next/document'; | ||
|
||
export default class MyDocument extends Document { | ||
static async getInitialProps(ctx) { | ||
const initialProps = await Document.getInitialProps(ctx); | ||
return { ...initialProps }; | ||
} | ||
|
||
render() { | ||
return ( | ||
<Html> | ||
<Head /> | ||
<body> | ||
<Main /> | ||
<NextScript /> | ||
</body> | ||
</Html> | ||
); | ||
} | ||
} |
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,155 @@ | ||
import AuthenticationContextProvider from '@/components/Login/AuthenticationContextProvider'; | ||
import { Dialog, Transition } from '@headlessui/react'; | ||
import { Fragment, useRef, useState } from 'react'; | ||
|
||
import ProjectsLayout from '@/layouts/ProjectsLayout'; | ||
import SelectBook from '@/modules/reference/SelectBook'; | ||
import SelectVerse from '@/modules/reference/SelectVerse'; | ||
import Notifications from '@/modules/notifications/Notifications'; | ||
|
||
import { XIcon } from '@heroicons/react/solid'; | ||
|
||
export default function ReferenceSelector() { | ||
const [openBook, setOpenBook] = useState(false); | ||
const [openVerse, setOpenVerse] = useState(false); | ||
|
||
const [book, setBook] = useState(''); | ||
const [chapter, setChapter] = useState(''); | ||
const [verse, setVerse] = useState(''); | ||
const cancelButtonRef = useRef(null); | ||
|
||
function closeBooks() { | ||
setOpenBook(false); | ||
} | ||
|
||
function openBooks() { | ||
setOpenBook(true); | ||
} | ||
|
||
function closeVerses() { | ||
setOpenVerse(false); | ||
} | ||
|
||
function openVerses() { | ||
setOpenVerse(true); | ||
} | ||
|
||
function selectBook(book) { | ||
setBook(book); | ||
// console.log(book); | ||
setOpenBook(false); | ||
setOpenVerse(true); | ||
} | ||
|
||
function selectChapter(chapter) { | ||
setChapter(chapter); | ||
// console.log(chapter); | ||
} | ||
|
||
function selectVerse(verse) { | ||
setVerse(verse); | ||
// console.log(book, chapter, verse); | ||
} | ||
|
||
return ( | ||
<AuthenticationContextProvider> | ||
<ProjectsLayout title="New Project"> | ||
|
||
<div className="items-center justify-center"> | ||
<button | ||
type="button" | ||
onClick={openBooks} | ||
className="px-4 py-2 text-sm font-medium text-white bg-black rounded-md bg-opacity-20 hover:bg-opacity-30 focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75" | ||
> | ||
Books | ||
</button> | ||
{/* <button | ||
type="button" | ||
onClick={openVerses} | ||
className="px-4 py-2 text-sm font-medium text-white bg-black rounded-md bg-opacity-20 hover:bg-opacity-30 focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75" | ||
> | ||
Chapters | ||
</button> */} | ||
</div> | ||
|
||
<Transition | ||
show={openBook} | ||
as={Fragment} | ||
enter="transition duration-100 ease-out" | ||
enterFrom="transform scale-95 opacity-0" | ||
enterTo="transform scale-100 opacity-100" | ||
leave="transition duration-75 ease-out" | ||
leaveFrom="transform scale-100 opacity-100" | ||
leaveTo="transform scale-95 opacity-0" | ||
> | ||
<Dialog | ||
as="div" | ||
className="fixed inset-0 z-10 overflow-y-auto" | ||
initialFocus={cancelButtonRef} | ||
static | ||
open={openBook} | ||
onClose={closeBooks} | ||
> | ||
|
||
<Dialog.Overlay className="fixed inset-0 bg-black opacity-30" /> | ||
|
||
<div className="flex items-center justify-center h-screen "> | ||
|
||
<div className="w-5/12 m-auto z-50 shadow overflow-hidden sm:rounded-lg"> | ||
<SelectBook selectBook={selectBook}> | ||
<button | ||
type="button" | ||
className="w-9 h-9 bg-black p-2" | ||
onClick={closeBooks} | ||
> | ||
<XIcon /> | ||
</button> | ||
</SelectBook> | ||
</div> | ||
</div> | ||
|
||
</Dialog> | ||
</Transition> | ||
|
||
<Transition | ||
show={openVerse} | ||
as={Fragment} | ||
enter="transition duration-100 ease-out" | ||
enterFrom="transform scale-95 opacity-0" | ||
enterTo="transform scale-100 opacity-100" | ||
leave="transition duration-75 ease-out" | ||
leaveFrom="transform scale-100 opacity-100" | ||
leaveTo="transform scale-95 opacity-0" | ||
> | ||
<Dialog | ||
as="div" | ||
className="fixed inset-0 z-10 overflow-y-auto" | ||
initialFocus={cancelButtonRef} | ||
static | ||
open={openVerse} | ||
onClose={closeVerses} | ||
> | ||
|
||
<Dialog.Overlay className="fixed inset-0 bg-black opacity-30" /> | ||
<div className="flex items-center justify-center h-screen"> | ||
|
||
<div className=" w-3/12 m-auto z-50 bg-black text-white shadow overflow-hidden sm:rounded-lg"> | ||
<SelectVerse selectChapter={selectChapter} selectVerse={selectVerse}> | ||
<button | ||
type="button" | ||
className="w-9 h-9 bg-black p-2" | ||
onClick={closeVerses} | ||
> | ||
<XIcon /> | ||
</button> | ||
</SelectVerse> | ||
</div> | ||
</div> | ||
|
||
</Dialog> | ||
</Transition> | ||
|
||
</ProjectsLayout> | ||
</AuthenticationContextProvider> | ||
); | ||
} |
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,10 @@ | ||
import Profile from '@/modules/projects/Profile'; | ||
import AuthenticationContextProvider from '@/components/Login/AuthenticationContextProvider'; | ||
|
||
const profile = () => ( | ||
<AuthenticationContextProvider> | ||
<Profile /> | ||
</AuthenticationContextProvider> | ||
); | ||
|
||
export default profile; |
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,13 @@ | ||
import ProjectList from '@/modules/projects/ProjectList'; | ||
import AuthenticationContextProvider from '@/components/Login/AuthenticationContextProvider'; | ||
import AutographaContextProvider from '@/components/AutogrpahaContext/AutographaContext'; | ||
|
||
const projects = () => ( | ||
<AuthenticationContextProvider> | ||
<AutographaContextProvider> | ||
<ProjectList /> | ||
</AutographaContextProvider> | ||
</AuthenticationContextProvider> | ||
); | ||
|
||
export default projects; |
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,10 @@ | ||
import Sync from '@/modules/projects/Sync'; | ||
import AuthenticationContextProvider from '@/components/Login/AuthenticationContextProvider'; | ||
|
||
const projects = () => ( | ||
<AuthenticationContextProvider> | ||
<Sync /> | ||
</AuthenticationContextProvider> | ||
); | ||
|
||
export default projects; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.