sierraexplore v1
This commit is contained in:
parent
7599c57f45
commit
01f792a4ff
5
.gitignore
vendored
5
.gitignore
vendored
@ -1,3 +1,8 @@
|
|||||||
node_modules/
|
node_modules/
|
||||||
*/node_modules/
|
*/node_modules/
|
||||||
*/build/
|
*/build/
|
||||||
|
|
||||||
|
**/node_modules/
|
||||||
|
**/build/
|
||||||
|
.DS_Store
|
||||||
|
.env
|
||||||
File diff suppressed because one or more lines are too long
@ -8,9 +8,9 @@ const config = {
|
|||||||
bcrypt: {
|
bcrypt: {
|
||||||
saltRounds: 12,
|
saltRounds: 12,
|
||||||
},
|
},
|
||||||
admin_pass: '8751ebe2',
|
admin_pass: process.env.SUPERADMIN_PASSWORD || 'Sierraexplore@24',
|
||||||
user_pass: '3fa5dca544df',
|
user_pass: '3fa5dca544df',
|
||||||
admin_email: 'admin@flatlogic.com',
|
admin_email: process.env.SUPERADMIN_EMAIL || 'sierraexplorenow@gmail.com',
|
||||||
providers: {
|
providers: {
|
||||||
LOCAL: 'local',
|
LOCAL: 'local',
|
||||||
GOOGLE: 'google',
|
GOOGLE: 'google',
|
||||||
|
|||||||
@ -52,7 +52,7 @@ module.exports = {
|
|||||||
{
|
{
|
||||||
id: ids[3],
|
id: ids[3],
|
||||||
firstName: 'Super Admin',
|
firstName: 'Super Admin',
|
||||||
email: 'super_admin@flatlogic.com',
|
email: config.admin_email,
|
||||||
emailVerified: true,
|
emailVerified: true,
|
||||||
provider: config.providers.LOCAL,
|
provider: config.providers.LOCAL,
|
||||||
password: admin_hash,
|
password: admin_hash,
|
||||||
|
|||||||
1
frontend/json/runtimeError.json
Normal file
1
frontend/json/runtimeError.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
{}
|
||||||
@ -6,10 +6,10 @@ type Props = {
|
|||||||
|
|
||||||
export default function Logo({ className = '' }: Props) {
|
export default function Logo({ className = '' }: Props) {
|
||||||
return (
|
return (
|
||||||
<img
|
<div className={className}>
|
||||||
src={'https://flatlogic.com/logo.svg'}
|
<span className="font-serif text-2xl font-bold">Sierra</span>
|
||||||
className={className}
|
<span className="font-serif text-2xl font-bold text-green-700 ml-1">Explore</span>
|
||||||
alt={'Flatlogic logo'}
|
</div>
|
||||||
></img>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
|
import BaseIcon from '../BaseIcon';
|
||||||
|
import { mdiArrowLeft } from '@mdi/js';
|
||||||
import BaseButton from '../BaseButton';
|
import BaseButton from '../BaseButton';
|
||||||
import { humanize } from '../../helpers/humanize';
|
import { humanize } from '../../helpers/humanize';
|
||||||
import { useRouter } from 'next/router';
|
import { useRouter } from 'next/router';
|
||||||
@ -20,6 +22,9 @@ export default function WebSiteHeader({ projectName }: WebSiteHeaderProps) {
|
|||||||
const style = HeaderStyle.PAGES_RIGHT;
|
const style = HeaderStyle.PAGES_RIGHT;
|
||||||
|
|
||||||
const design = HeaderDesigns.DEFAULT_DESIGN;
|
const design = HeaderDesigns.DEFAULT_DESIGN;
|
||||||
|
<button onClick={() => router.back()} className="absolute top-4 left-4 z-10">
|
||||||
|
<BaseIcon path={mdiArrowLeft} size={24} />
|
||||||
|
</button>
|
||||||
return (
|
return (
|
||||||
<header id='websiteHeader' className='overflow-hidden'>
|
<header id='websiteHeader' className='overflow-hidden'>
|
||||||
<div
|
<div
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import BaseIcon from '../components/BaseIcon';
|
|||||||
import NavBar from '../components/NavBar';
|
import NavBar from '../components/NavBar';
|
||||||
import NavBarItemPlain from '../components/NavBarItemPlain';
|
import NavBarItemPlain from '../components/NavBarItemPlain';
|
||||||
import AsideMenu from '../components/AsideMenu';
|
import AsideMenu from '../components/AsideMenu';
|
||||||
import FooterBar from '../components/FooterBar';
|
import WebSiteFooter from '../components/WebPageComponents/Footer';
|
||||||
import { useAppDispatch, useAppSelector } from '../stores/hooks';
|
import { useAppDispatch, useAppSelector } from '../stores/hooks';
|
||||||
import Search from '../components/Search';
|
import Search from '../components/Search';
|
||||||
import { useRouter } from 'next/router';
|
import { useRouter } from 'next/router';
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
import React, { ReactNode } from 'react';
|
import React, { ReactNode } from 'react';
|
||||||
|
import WebSiteFooter from '../components/WebPageComponents/Footer';
|
||||||
import { useAppSelector } from '../stores/hooks';
|
import { useAppSelector } from '../stores/hooks';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
@ -12,6 +13,7 @@ export default function LayoutGuest({ children }: Props) {
|
|||||||
return (
|
return (
|
||||||
<div className={darkMode ? 'dark' : ''}>
|
<div className={darkMode ? 'dark' : ''}>
|
||||||
<div className={`${bgColor} dark:bg-slate-800 dark:text-slate-100`}>
|
<div className={`${bgColor} dark:bg-slate-800 dark:text-slate-100`}>
|
||||||
|
<WebSiteFooter projectName="Sierra Explore" />
|
||||||
{children}
|
{children}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -73,7 +73,11 @@ export default function Login() {
|
|||||||
// Redirect to dashboard if user is logged in
|
// Redirect to dashboard if user is logged in
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (currentUser?.id) {
|
if (currentUser?.id) {
|
||||||
router.push('/dashboard');
|
if (currentUser.email === 'sierraexplorenow@gmail.com') {
|
||||||
|
router.push('/dashboard/admin');
|
||||||
|
} else {
|
||||||
|
router.push('/dashboard');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}, [currentUser?.id, router]);
|
}, [currentUser?.id, router]);
|
||||||
// Show error message if there is one
|
// Show error message if there is one
|
||||||
@ -343,6 +347,12 @@ export default function Login() {
|
|||||||
color='info'
|
color='info'
|
||||||
disabled={isFetching}
|
disabled={isFetching}
|
||||||
/>
|
/>
|
||||||
|
<div className="my-2">
|
||||||
|
<a href="/api/auth/signin/google">
|
||||||
|
<BaseButton className="w-full" color="red" label="Sign in with Google" />
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
</BaseButtons>
|
</BaseButtons>
|
||||||
<br />
|
<br />
|
||||||
<p className={'text-center'}>
|
<p className={'text-center'}>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user