Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/milestone trustful zuzalu d app interface #18

Open
wants to merge 140 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
140 commits
Select commit Hold shift + click to select a range
60ca27c
feat: add trustful-context
heronlancellot Oct 22, 2024
7393c2d
feat: add getUserRole & update Role interface
heronlancellot Oct 23, 2024
b4ffd17
feat: add railway-trustful into .env
heronlancellot Oct 23, 2024
14d4e21
update: throw new error getUserRole
heronlancellot Oct 23, 2024
3c95c23
Merge pull request #1 from heronlancellot/feat/create-context-trustful
heronlancellot Oct 23, 2024
3875c05
feat: add capitalizeFirstLetter utils
heronlancellot Oct 23, 2024
bc4aa58
feat: add new type to Role ( No_Role ) && add spaceId enabled for tru…
heronlancellot Oct 23, 2024
d4074c0
feat: add TrustfulIcon
heronlancellot Oct 23, 2024
359727f
feat: add trustful-page
heronlancellot Oct 23, 2024
608e38b
update: application space-Id constant
heronlancellot Oct 24, 2024
0b36d0c
feat: add address into dependence array
heronlancellot Oct 25, 2024
a87c421
Merge pull request #2 from heronlancellot/feat/welcome-text-role
heronlancellot Oct 25, 2024
e91051c
feat: add give-badge section into reputation badge
heronlancellot Oct 31, 2024
0b8eb12
refactor: unused code
heronlancellot Oct 31, 2024
128113d
fix: remove unused structure
heronlancellot Nov 1, 2024
2a4ff0a
refactor: unused code
heronlancellot Nov 1, 2024
7bf89cd
update: give-badge
heronlancellot Nov 1, 2024
54bc546
fix: remove unused code
heronlancellot Nov 1, 2024
3f0881c
Merge pull request #4 from heronlancellot/feat/give-badge
heronlancellot Nov 1, 2024
d9e5860
fea: add share page
heronlancellot Nov 1, 2024
e27aec3
Merge pull request #5 from heronlancellot/feat/share
heronlancellot Nov 1, 2024
9bb134f
update: constants addressess
heronlancellot Nov 4, 2024
c221e4f
update: schemas name & variables & add new my-badges components
heronlancellot Nov 4, 2024
ab56c95
update: my-badges
heronlancellot Nov 4, 2024
36c8734
Merge pull request #6 from heronlancellot/feat/my-badges
heronlancellot Nov 4, 2024
257a148
feat: add my-badge details
heronlancellot Nov 4, 2024
2373735
Merge pull request #7 from heronlancellot/feat/my-badge-details
heronlancellot Nov 4, 2024
22ff5e3
feat: add smart-contract functions
heronlancellot Nov 4, 2024
a401eb4
update: icons with calendarTimeIcon
heronlancellot Nov 4, 2024
3f158f2
Merge pull request #8 from heronlancellot/feat/smart-contract-functions
heronlancellot Nov 4, 2024
92584e0
fix(qrcode): correctly set query parameter value in input field
hawkjr97 Nov 5, 2024
987ded9
feat: add admin section
heronlancellot Nov 5, 2024
94fd7a5
update villager bytes32
heronlancellot Nov 5, 2024
4996654
refactor: code improvement
heronlancellot Nov 5, 2024
55af5d2
update: reveokeRole
heronlancellot Nov 5, 2024
79a1791
feat: add admin-icon
heronlancellot Nov 5, 2024
76588da
update: index trustful service
heronlancellot Nov 5, 2024
882c8a2
update: abi & constants
heronlancellot Nov 6, 2024
5bbd13e
update: attest function
heronlancellot Nov 6, 2024
322f5fd
fix: attest & remove gasLimit
heronlancellot Nov 6, 2024
9f9de7e
Merge pull request #9 from hawkjr97/fix/shared-qrcode
heronlancellot Nov 6, 2024
d3ddbc2
Merge branch 'feat/milestone-trustful-zuzalu-dApp-interface' into fea…
heronlancellot Nov 6, 2024
8c90558
update: service smart-contract calls
heronlancellot Nov 6, 2024
72e16c4
feat: add new folder backend & smart-contracts service folder to mana…
heronlancellot Nov 6, 2024
df52d02
update: footer-navbar
heronlancellot Nov 6, 2024
ca76c20
update: dropdown-menu-admin
heronlancellot Nov 6, 2024
ed6372c
Merge pull request #10 from heronlancellot/feat/component-admin
heronlancellot Nov 6, 2024
aea2234
feat: add api calls backend
heronlancellot Nov 6, 2024
e4e36a5
update contract addressess & villager options
heronlancellot Nov 7, 2024
4f310b0
fix: userRole & getUserRole error
heronlancellot Nov 7, 2024
a3d7afb
update: dropdown-menu-admin
heronlancellot Nov 8, 2024
6afc149
fix: ui options admin-dropdown
heronlancellot Nov 8, 2024
202a6af
fix: comment checkout footer
heronlancellot Nov 8, 2024
3d46541
feat: add new functinos & update settings
heronlancellot Nov 8, 2024
3e776b6
update: service backend calls
heronlancellot Nov 8, 2024
cb8cfdb
update: dropdown-menu-admin
heronlancellot Nov 8, 2024
2fde866
fix: remove old contract zuzalu
heronlancellot Nov 8, 2024
b750877
Merge pull request #11 from heronlancellot/feat/service-api-backend-f…
heronlancellot Nov 8, 2024
608dd93
feat: add events footer
heronlancellot Nov 8, 2024
115506f
feat: add new pages trustful events - session
heronlancellot Nov 8, 2024
66d9360
feat: add services & create event card
heronlancellot Nov 8, 2024
95d3d52
update: backend-service functions
heronlancellot Nov 8, 2024
2d5b6cd
feat: add new pages & update data & calls
heronlancellot Nov 8, 2024
c369c0e
fix: error attest-response
heronlancellot Nov 8, 2024
a1404de
update: api-call-service & remove unused files
heronlancellot Nov 8, 2024
e10fce7
refactor: implement new style
hawkjr97 Nov 8, 2024
fdb0405
Merge pull request #1 from hawkjr97/feat/add-new-pages-fluxe-ui-user
heronlancellot Nov 8, 2024
3794d65
Merge branch 'feat/add-new-pages-fluxe-ui-user' of https://github.com…
heronlancellot Nov 8, 2024
8d9f584
fix: integration create event
hawkjr97 Nov 9, 2024
3d02d1a
Merge pull request #2 from hawkjr97/feat/add-new-pages-fluxe-ui-user
heronlancellot Nov 9, 2024
ec50c74
Merge pull request #12 from heronlancellot/feat/add-new-pages-fluxe-u…
heronlancellot Nov 9, 2024
23e8e06
refactor: implement new theme provider
hawkjr97 Nov 9, 2024
d2ae6aa
Merge pull request #14 from hawkjr97/refactor/dapp-style-badges
heronlancellot Nov 9, 2024
5bea4ee
fix: select text color
heronlancellot Nov 9, 2024
a5382c0
fix: style
heronlancellot Nov 9, 2024
c14a454
fix: createEvent type
heronlancellot Nov 9, 2024
10d03e1
update: create-event inputs
heronlancellot Nov 9, 2024
4fca0b5
fix: remove unused code
heronlancellot Nov 9, 2024
39ca8bd
fix: create-session
heronlancellot Nov 9, 2024
2ff09a1
fix: duplicated revoke-role
heronlancellot Nov 9, 2024
a302ac0
feat: add create-session
heronlancellot Nov 9, 2024
070d73f
fix: dropdown only with creat session
heronlancellot Nov 9, 2024
2335846
update events session
heronlancellot Nov 9, 2024
83ae9fa
feat: add card-sessions
heronlancellot Nov 9, 2024
87fc8ac
update: get-sessions & fix useEffect order
heronlancellot Nov 9, 2024
14caad2
update: dropdown-session details
heronlancellot Nov 9, 2024
409d211
update: dropdown-session-details import
heronlancellot Nov 9, 2024
2c87c18
Merge pull request #15 from heronlancellot/feat/application-improvements
heronlancellot Nov 10, 2024
b7653c5
update:card-sessions
heronlancellot Nov 10, 2024
112a106
update:card-sessions-details order
heronlancellot Nov 10, 2024
3f07b6f
feat:add badge special
heronlancellot Nov 10, 2024
1a5203c
feat:add badge special
heronlancellot Nov 10, 2024
a47811d
feat:add badge special
heronlancellot Nov 10, 2024
ee3fdb9
fix: correctly fetch and display badges in dropdown based on user rol…
hawkjr97 Nov 10, 2024
4355bfd
Merge pull request #3 from hawkjr97/fix/badge-special
heronlancellot Nov 10, 2024
a18639c
Merge pull request #16 from heronlancellot/fix/badge-special
heronlancellot Nov 10, 2024
b18e9d5
fix: remove all console.log
heronlancellot Nov 10, 2024
ddd3516
feat: add home-icon
heronlancellot Nov 11, 2024
6e16cb0
refactor: unused code & update imports & refactor variable names
heronlancellot Nov 12, 2024
855589c
Merge pull request #17 from heronlancellot/feat/milestone-trustful-zu…
heronlancellot Nov 12, 2024
6f6956c
Update .env.example
heronlancellot Nov 12, 2024
96718fc
update: action-options
heronlancellot Nov 12, 2024
cd776da
Update theme/lib/chakra-ui.ts
heronlancellot Nov 12, 2024
306b12b
Update app/spaces/[spaceid]/trustful/share/components/index.ts
heronlancellot Nov 12, 2024
bd9bc95
fix: remove use-ens-data
heronlancellot Nov 12, 2024
f954ebf
Merge branch 'blockful-io:feat/milestone-trustful-zuzalu-dApp-interfa…
heronlancellot Nov 12, 2024
37547d8
Update app/spaces/[spaceid]/trustful/service/backend/getAllEventsBySp…
heronlancellot Nov 12, 2024
dff3e62
Update app/spaces/[spaceid]/trustful/service/smart-contract/cannotRep…
heronlancellot Nov 12, 2024
64ab8e1
update: dropdown-menu-admin
heronlancellot Nov 12, 2024
be52da9
Merge branch 'blockful-io:feat/milestone-trustful-zuzalu-dApp-interfa…
heronlancellot Nov 12, 2024
8466ff3
fix: variable improvement
heronlancellot Nov 12, 2024
47659ee
Merge branch 'feat/milestone-trustful-zuzalu-dApp-interface' of https…
heronlancellot Nov 12, 2024
ca27563
Merge pull request #19 from heronlancellot/feat/milestone-trustful-zu…
heronlancellot Nov 12, 2024
d01061e
update: the-footer-navbar
heronlancellot Nov 12, 2024
8093584
fix: path undefined
heronlancellot Nov 12, 2024
2a5dbd3
update: admin-section footer
heronlancellot Nov 12, 2024
d2d63af
fix: unused code
heronlancellot Nov 12, 2024
eb9240f
refactor: remove unused code
heronlancellot Nov 12, 2024
0e448a6
fix: remove fetch-ens-data
heronlancellot Nov 12, 2024
27c6b02
update: dropdown-events
heronlancellot Nov 12, 2024
18672b6
Merge branch 'blockful-io:feat/milestone-trustful-zuzalu-dApp-interfa…
heronlancellot Nov 12, 2024
db9d97d
Merge pull request #20 from heronlancellot/feat/milestone-trustful-zu…
heronlancellot Nov 12, 2024
f01fc3e
update: events style
heronlancellot Nov 13, 2024
768689b
update session style
heronlancellot Nov 13, 2024
9eeaea9
update session style dropdown
heronlancellot Nov 13, 2024
f763196
Merge branch 'feat/milestone-trustful-zuzalu-dApp-interface' of https…
heronlancellot Nov 13, 2024
be7bde8
Merge pull request #21 from heronlancellot/feat/milestone-trustful-zu…
heronlancellot Nov 14, 2024
6b1f4f4
Merge branch 'main' into feat/milestone-trustful-zuzalu-dApp-interface
heronlancellot Nov 15, 2024
abdf290
Merge pull request #23 from heronlancellot/feat/milestone-trustful-zu…
heronlancellot Nov 15, 2024
62d996e
update: spaceid correctly
heronlancellot Nov 15, 2024
2c12c18
update: correctly zero-address bytes32 - givebadge
heronlancellot Nov 15, 2024
6282825
Merge branch 'feat/milestone-trustful-zuzalu-dApp-interface' of https…
heronlancellot Nov 15, 2024
8f5ae3f
update: spaceid-url-share-link
heronlancellot Nov 15, 2024
8a1a64c
Merge pull request #24 from heronlancellot/feat/milestone-trustful-zu…
heronlancellot Nov 15, 2024
c3590a6
fix: improve layout responsiveness and styling adjustments
hawkjr97 Nov 16, 2024
6aa48d5
Merge pull request #1 from hawkjr97/refactor/dapp-style-badge-details
hawkjr97 Nov 18, 2024
c47e5a9
refactor: improve toast design
hawkjr97 Nov 18, 2024
535f336
update:trustful-context
heronlancellot Nov 19, 2024
ce01a47
Merge pull request #5 from hawkjr97/refactor/toast
heronlancellot Nov 19, 2024
a441d32
Merge pull request #25 from heronlancellot/feat/milestone-trustful-zu…
heronlancellot Nov 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ BUCKET_FOLDER_PATH=
ENDPIONT=
NEXT_PUBLIC_SUPABASE_URL=
NEXT_PUBLIC_SUPABASE_ANON_KEY=
NEXT_PUBLIC_CONNECTOR_TOKEN=
NEXT_PUBLIC_CONNECTOR_TOKEN=
NEXT_PUBLIC_RAILWAY_TRUSTFUL=
62 changes: 51 additions & 11 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@ import React, { useEffect, useState } from 'react';
import { ZupassProvider } from '@/context/ZupassContext';
import '@/utils/yupExtensions';
import Dialog from '@/app/spaces/components/Modal/Dialog';
import { TrustfulContextProvider } from '@/context/TrustfulContext';
import { Toaster } from 'react-hot-toast';
import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
import { LitProvider } from '@/context/LitContext';
import { DialogProvider } from '@/components/dialog/DialogContext';
import { GlobalDialog } from '@/components/dialog/GlobalDialog';
import { ToastProvider } from '@/components/toast/ToastContext';
import { CheckIcon, InfoIcon } from '@chakra-ui/icons';

const queryClient = new QueryClient();

Expand All @@ -33,7 +36,7 @@ function RootLayout({
children: React.ReactNode;
}>) {
const [isClient, setIsClient] = useState(false);
// const [show, setShow] = useState(true);
const [show, setShow] = useState(true);

useEffect(() => {
setIsClient(true);
Expand All @@ -58,12 +61,13 @@ function RootLayout({
<CeramicProvider>
<WalletProvider>
<ZupassProvider>
<AppContextProvider>
<ReactQueryDevtools initialIsOpen={false} />
<Header />
{isClient && <AuthPrompt />}
<GlobalDialog />
{/* {isClient && (
<TrustfulContextProvider>
<AppContextProvider>
<ReactQueryDevtools initialIsOpen={false} />
<Header />
{isClient && <AuthPrompt />}
<GlobalDialog />
{/* {isClient && (
<Dialog
title="Upgrading Ceramic Node"
message="We are currently upgrading our Ceramic node. Some data may be temporarily unavailable or inconsistent. We apologize for any inconvenience."
Expand All @@ -72,10 +76,46 @@ function RootLayout({
onConfirm={() => setShow(false)}
/>
)} */}
<div style={{ minHeight: `calc(100vh - 50px)` }}>
{children}
</div>
</AppContextProvider>
<div style={{ minHeight: `calc(100vh - 50px)` }}>
{children}
</div>
<Toaster
position="top-right"
toastOptions={{
duration: 4000,

style: {
padding: '16px',
borderRadius: '8px',
color: '#ffffff',
fontSize: '14px',
},

success: {
style: {
background: '#4CAF50',
},
icon: <CheckIcon color="#FFFFFF" />,
iconTheme: {
primary: '#4CAF50',
secondary: '#FFFFFF',
},
},

error: {
style: {
background: '#F44336',
},
icon: <InfoIcon color="#FFFFFF" />,
iconTheme: {
primary: '#F44336',
secondary: '#FFFFFF',
},
},
}}
/>
</AppContextProvider>
</TrustfulContextProvider>
</ZupassProvider>
</WalletProvider>
</CeramicProvider>
Expand Down
45 changes: 45 additions & 0 deletions app/spaces/[spaceid]/trustful/admin/components/AdminSection.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
'use client';

/* eslint-disable react-hooks/exhaustive-deps */
import { useEffect } from 'react';
import { useParams, useRouter } from 'next/navigation';
import { useAccount } from 'wagmi';
import toast from 'react-hot-toast';
import { DropdownMenuAdmin } from '@/app/spaces/[spaceid]/trustful/admin/components';
import { Box, ChakraProvider } from '@chakra-ui/react';
import { TheFooterNavbar } from '@/app/spaces/[spaceid]/trustful/components';
import chakraTheme from '@/theme/lib/chakra-ui';

export const AdminSection = () => {
const { address, chain } = useAccount();
const { push } = useRouter();
const params = useParams();

const actualURL = `/spaces/${params.spaceid}/trustful`;

// const { villagerAttestationCount } = useContext(WalletContext);
const villagerAttestationCount = Number(1);
Comment on lines +20 to +21

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be an open TODO


useEffect(() => {
if (villagerAttestationCount === 0) {
heronlancellot marked this conversation as resolved.
Show resolved Hide resolved
toast.error(
<span className="flex flex-col">
<strong>You have not checked in.</strong>{' '}
<p>Please check-in first.</p>
</span>,
);
push('/pre-checkin');
}
}, [villagerAttestationCount]);

return (
<div>
<ChakraProvider theme={chakraTheme}>
<DropdownMenuAdmin />
</ChakraProvider>
<Box className="fixed bottom-0 left-1/2 transform -translate-x-1/2 w-full items-center">
<TheFooterNavbar />
</Box>
</div>
);
};
Loading