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/
|
||||
*/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: {
|
||||
saltRounds: 12,
|
||||
},
|
||||
admin_pass: '8751ebe2',
|
||||
admin_pass: process.env.SUPERADMIN_PASSWORD || 'Sierraexplore@24',
|
||||
user_pass: '3fa5dca544df',
|
||||
admin_email: 'admin@flatlogic.com',
|
||||
admin_email: process.env.SUPERADMIN_EMAIL || 'sierraexplorenow@gmail.com',
|
||||
providers: {
|
||||
LOCAL: 'local',
|
||||
GOOGLE: 'google',
|
||||
|
||||
@ -52,7 +52,7 @@ module.exports = {
|
||||
{
|
||||
id: ids[3],
|
||||
firstName: 'Super Admin',
|
||||
email: 'super_admin@flatlogic.com',
|
||||
email: config.admin_email,
|
||||
emailVerified: true,
|
||||
provider: config.providers.LOCAL,
|
||||
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) {
|
||||
return (
|
||||
<img
|
||||
src={'https://flatlogic.com/logo.svg'}
|
||||
className={className}
|
||||
alt={'Flatlogic logo'}
|
||||
></img>
|
||||
<div className={className}>
|
||||
<span className="font-serif text-2xl font-bold">Sierra</span>
|
||||
<span className="font-serif text-2xl font-bold text-green-700 ml-1">Explore</span>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
import React from 'react';
|
||||
import Link from 'next/link';
|
||||
import BaseIcon from '../BaseIcon';
|
||||
import { mdiArrowLeft } from '@mdi/js';
|
||||
import BaseButton from '../BaseButton';
|
||||
import { humanize } from '../../helpers/humanize';
|
||||
import { useRouter } from 'next/router';
|
||||
@ -20,6 +22,9 @@ export default function WebSiteHeader({ projectName }: WebSiteHeaderProps) {
|
||||
const style = HeaderStyle.PAGES_RIGHT;
|
||||
|
||||
const design = HeaderDesigns.DEFAULT_DESIGN;
|
||||
<button onClick={() => router.back()} className="absolute top-4 left-4 z-10">
|
||||
<BaseIcon path={mdiArrowLeft} size={24} />
|
||||
</button>
|
||||
return (
|
||||
<header id='websiteHeader' className='overflow-hidden'>
|
||||
<div
|
||||
|
||||
@ -8,7 +8,7 @@ import BaseIcon from '../components/BaseIcon';
|
||||
import NavBar from '../components/NavBar';
|
||||
import NavBarItemPlain from '../components/NavBarItemPlain';
|
||||
import AsideMenu from '../components/AsideMenu';
|
||||
import FooterBar from '../components/FooterBar';
|
||||
import WebSiteFooter from '../components/WebPageComponents/Footer';
|
||||
import { useAppDispatch, useAppSelector } from '../stores/hooks';
|
||||
import Search from '../components/Search';
|
||||
import { useRouter } from 'next/router';
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import React, { ReactNode } from 'react';
|
||||
import WebSiteFooter from '../components/WebPageComponents/Footer';
|
||||
import { useAppSelector } from '../stores/hooks';
|
||||
|
||||
type Props = {
|
||||
@ -12,6 +13,7 @@ export default function LayoutGuest({ children }: Props) {
|
||||
return (
|
||||
<div className={darkMode ? 'dark' : ''}>
|
||||
<div className={`${bgColor} dark:bg-slate-800 dark:text-slate-100`}>
|
||||
<WebSiteFooter projectName="Sierra Explore" />
|
||||
{children}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -73,8 +73,12 @@ export default function Login() {
|
||||
// Redirect to dashboard if user is logged in
|
||||
useEffect(() => {
|
||||
if (currentUser?.id) {
|
||||
if (currentUser.email === 'sierraexplorenow@gmail.com') {
|
||||
router.push('/dashboard/admin');
|
||||
} else {
|
||||
router.push('/dashboard');
|
||||
}
|
||||
}
|
||||
}, [currentUser?.id, router]);
|
||||
// Show error message if there is one
|
||||
useEffect(() => {
|
||||
@ -343,6 +347,12 @@ export default function Login() {
|
||||
color='info'
|
||||
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>
|
||||
<br />
|
||||
<p className={'text-center'}>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user