Skip to content

Commit

Permalink
Merge branch 'dev' into mainnet
Browse files Browse the repository at this point in the history
  • Loading branch information
serefyarar committed May 22, 2024
2 parents cac82e7 + c1f78cd commit 32cb3a5
Show file tree
Hide file tree
Showing 29 changed files with 197 additions and 157 deletions.
26 changes: 8 additions & 18 deletions web-app/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ const nextConfig = {
async rewrites() {
return [
{
source: '/',
destination: '/home',
source: "/",
destination: "/home",
},
]
];
},
reactStrictMode: false,
images: {
Expand All @@ -22,29 +22,19 @@ const nextConfig = {
async headers() {
return [
{
source: "/fonts/Freizeit-Bold.woff2",
source: "/fonts/:font*",
headers: [
{
key: "Cache-Control",
value: "public, max-age=31536000, immutable",
},
],
},
{
source: "/fonts/Freizeit-Regular.woff2",
headers: [
{
key: "Cache-Control",
value: "public, max-age=31536000, immutable",
key: "Access-Control-Allow-Origin",
value: "*",
},
],
},
{
source: "/fonts/Roquefort-Standard.woff2",
headers: [
{
key: "Cache-Control",
value: "public, max-age=31536000, immutable",
key: "Access-Control-Allow-Methods",
value: "GET, OPTIONS",
},
],
},
Expand Down
21 changes: 15 additions & 6 deletions web-app/public/fonts/fonts.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,27 @@
}

@font-face {
font-family: Freizeit;
src: url("/fonts/Freizeit-Regular.woff2") format('woff2');
font-family: "Freizeit";
src:
url("/fonts/Freizeit-Regular.woff2") format("woff2"),
url("/fonts/Freizeit-Regular.woff") format("woff"),
url("/fonts/Freizeit-Regular.ttf") format("truetype");
font-weight: normal;
font-style: normal;
}

@font-face {
font-family: Freizeit;
font-family: "Freizeit";
src:
url("/fonts/Freizeit-Bold.woff2") format("woff2"),
url("/fonts/Freizeit-Bold.woff") format("woff"),
url("/fonts/Freizeit-Bold.ttf") format("truetype");
font-weight: 700;
src: url("/fonts/Freizeit-Bold.woff2") format('woff2');
font-style: normal;
}

@font-face {
font-family: Roquefort;
font-weight: 400;
src: url("/fonts/Roquefort-Standard.woff2") format('woff2');
}
src: url("/fonts/Roquefort-Standard.woff2") format("woff2");
}
28 changes: 0 additions & 28 deletions web-app/src/app/[id]/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,6 @@ html#app {
body.modal-open {
overflow: hidden;
}
.style_title__8UCKm {
cursor: pointer;
}

.style_title__Zi4pl,
.style_title__pqDBL {
font-family: Freizeit !important;
font-size: 16px;
}

article,
aside,
Expand Down Expand Up @@ -1443,7 +1434,6 @@ html#app {
h5,
h6 {
text-align: inherit;
font-family: Freizeit;
margin-bottom: 0;
margin-top: 0;
}
Expand Down Expand Up @@ -5107,23 +5097,6 @@ html#app {
}
}

@font-face {
font-family: Freizeit;
src: url(/fonts/Freizeit-Regular.woff2) format("woff2");
}

@font-face {
font-family: Freizeit;
font-weight: 700;
src: url(/fonts/Freizeit-Bold.woff2) format("woff2");
}

@font-face {
font-family: Roquefort;
font-weight: 400;
src: url(/fonts/Roquefort-Standard.woff2) format("woff2");
}

.idxflex {
display: flex;
}
Expand Down Expand Up @@ -9264,7 +9237,6 @@ html#app {

.header-input {
border: none;
font-family: Freizeit;
font-weight: 700;
padding-left: 0 !important;
}
Expand Down
53 changes: 49 additions & 4 deletions web-app/src/app/globals.css
Original file line number Diff line number Diff line change
@@ -1,12 +1,57 @@
@font-face {
font-family: Freizeit;
src: url("/fonts/Freizeit-Regular.woff2") format("woff2");
font-family: Inter;
font-weight: 300;
src: url("/fonts/Inter-Light.woff2") format("woff2");
}

@font-face {
font-family: Freizeit;
font-family: Inter;
font-weight: 500;
src: url("/fonts/Inter-Medium.woff2") format("woff2");
}

@font-face {
font-family: Inter;
font-weight: 400;
src: url("/fonts/Inter-Regular.woff2") format("woff2");
}

@font-face {
font-family: Inter;
font-weight: 600;
src: url("/fonts/Inter-SemiBold.woff2") format("woff2");
}

@font-face {
font-family: Inter;
font-weight: 700;
src: url("/fonts/Inter-Bold.woff2") format("woff2");
}

@font-face {
font-family: Inter;
font-weight: 800;
src: url("/fonts/Inter-ExtraBold.woff2") format("woff2");
}

@font-face {
font-family: "Freizeit";
src:
url("/fonts/Freizeit-Regular.woff2") format("woff2"),
url("/fonts/Freizeit-Regular.woff") format("woff"),
url("/fonts/Freizeit-Regular.ttf") format("truetype");
font-weight: normal;
font-style: normal;
}

@font-face {
font-family: "Freizeit";
src:
url("/fonts/Freizeit-Bold.woff2") format("woff2"),
url("/fonts/Freizeit-Bold.woff") format("woff"),
url("/fonts/Freizeit-Bold.ttf") format("truetype");
font-weight: 700;
src: url("/fonts/Freizeit-Bold.woff2") format("woff2");
font-style: normal;
}

@font-face {
Expand Down
32 changes: 13 additions & 19 deletions web-app/src/components/ai/empty-screen.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import IconLightbulb from "components/base/Icon/IconLightbulb";
import Freizeit from "@/fonts/loader";
import Flex from "components/layout/base/Grid/Flex";
import Image from "next/image";
import Text from "../base/Text";

export function EmptyScreen({
Expand All @@ -20,32 +21,26 @@ export function EmptyScreen({
className="container-empty-screen pt-2"
>
<div className="inner-container-empty-screen">
<img
<Image
src="/images/index-chat-empty-screen.png"
width={202}
height={202}
alt="Illustration of trees"
/>
<Text fontFamily="freizeit" size="xl" className="text" fontWeight={700}>
<Text
size="xl"
className={`${Freizeit.className} text`}
fontWeight={700}
>
Your responses will align with {contextMessage}
</Text>
</div>
<div className="example-messages-empty-screen">
{indexIds && indexIds.length > 0
? defaultQuestions?.map((message, i) => (
<ExampleMessageBox
key={i}
message={message}
setInput={setInput}
/>
))
: defaultQuestions?.map((message, i) => (
<ExampleMessageBox
key={i}
message={message}
setInput={setInput}
/>
))}
{indexIds &&
indexIds.length > 0 &&
defaultQuestions?.map((message, i) => (
<ExampleMessageBox key={i} message={message} setInput={setInput} />
))}
</div>
</Flex>
);
Expand All @@ -62,7 +57,6 @@ const ExampleMessageBox = ({
onClick={() => setInput(message)}
className="example-message-box-empty-screen"
>
<IconLightbulb className="icon-empty-screen" />
<Text className="truncate-text" fontWeight={500}>
{message}
</Text>
Expand Down
3 changes: 2 additions & 1 deletion web-app/src/components/ai/no-indexes.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useApp } from "@/context/AppContext";
import Freizeit from "@/fonts/loader";
import { useRouteParams } from "@/hooks/useRouteParams";
import Button from "components/base/Button";
import Image from "next/image";
Expand Down Expand Up @@ -36,8 +37,8 @@ export default function NoIndexesChat({ isSelfDid }: { isSelfDid?: boolean }) {
style={{
display: "flex",
flexDirection: "column",
fontFamily: "freizeit",
}}
className={Freizeit.className}
>
<Text size="xl" fontWeight={700}>
{isSelfDid
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ type IndexConversationContextType = {
) => Promise<void>;
loading: boolean;
setLoading: (loading: boolean) => void;
searchLoading: boolean;
setSearchLoading: (loading: boolean) => void;
addItem: (item: IndexItem) => void;
removeItem: (itemId: string) => void;
loadMoreItems: () => void;
Expand All @@ -70,6 +72,7 @@ export const IndexConversationProvider = ({ children }: { children: any }) => {
cursor: undefined,
});
const [loading, setLoading] = useState(false);
const [searchLoading, setSearchLoading] = useState(false);

const { api, ready: apiReady } = useApi();
const { viewedIndex, fetchIndex } = useApp();
Expand All @@ -94,7 +97,7 @@ export const IndexConversationProvider = ({ children }: { children: any }) => {

fetchingIndexItems.current = true;

// setLoading(true);
setSearchLoading(true);
try {
const itemParams: GetItemQueryParams = {};

Expand Down Expand Up @@ -124,7 +127,7 @@ export const IndexConversationProvider = ({ children }: { children: any }) => {
} catch (err: any) {
console.error("Error fetching index links", err);
} finally {
// setLoading(false);
setSearchLoading(false);
fetchingIndexItems.current = false;
}
},
Expand Down Expand Up @@ -213,11 +216,13 @@ export const IndexConversationProvider = ({ children }: { children: any }) => {
value={{
itemsState,
loading,
setLoading,
searchLoading,
setSearchLoading,
addItem,
removeItem,
loadMoreItems,
setItemsState,
setLoading,
fetchIndexItems,
fetchMoreIndexItems,
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export default function IndexItemsTabSection() {
setItemsState,
loading,
setLoading,
searchLoading,
fetchIndexItems,
fetchMoreIndexItems,
} = useIndexConversation();
Expand Down Expand Up @@ -57,7 +58,7 @@ export default function IndexItemsTabSection() {
setSearch(searchQuery);
fetchIndexItems(viewedIndex?.id, {
resetCursor: true,
// query: searchQuery,
params: { query: searchQuery },
});
},
[fetchIndexItems],
Expand Down Expand Up @@ -171,11 +172,11 @@ export default function IndexItemsTabSection() {
<FlexRow className={"mt-6"}>
<Col className="idxflex-grow-1">
<SearchInput
// loading={loading}
onSearch={handleSearch}
debounceTime={300}
showClear
defaultValue={search}
loading={searchLoading}
placeholder="Search in this index"
/>
</Col>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import Freizeit from "@/fonts/loader";
import cc from "classcat";
import Avatar from "components/base/Avatar";
import Button from "components/base/Button";
import Header from "components/base/Header";
Expand Down Expand Up @@ -30,7 +32,7 @@ const CreatorRule = ({ rule, handleRemove }: CreatorRuleProps) =>
flexdirection={"column"}
>
<Row>
<Text fontFamily="Freizeit" fontWeight={500}>
<Text className={Freizeit.className}>
{rule.ruleType === "nftOwner"
? rule.standardContractType === "ERC721" && rule.tokenId
? "NFT OWNER"
Expand Down Expand Up @@ -64,10 +66,8 @@ const CreatorRule = ({ rule, handleRemove }: CreatorRuleProps) =>
}}
>
<Text
fontFamily={"Freizeit"}
fontWeight={500}
className={cc([Freizeit.className, "mr-1"])}
size={"sm"}
className={"mr-1"}
>
{maskAddress(
rule?.walletAddress || rule?.contractAddress,
Expand Down
Loading

0 comments on commit 32cb3a5

Please sign in to comment.