-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into major_protocol_upgrade_rebase
- Loading branch information
Showing
96 changed files
with
2,214 additions
and
1,017 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -114,3 +114,6 @@ __pycache__/ | |
|
||
# whitepaper | ||
|
||
# Ignoring new Bridge UI work for the moment | ||
packages/bridge-ui-v2 |
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,12 +1,12 @@ | ||
{ | ||
".": "0.9.0", | ||
".": "0.10.0", | ||
"packages/branding": "0.1.1", | ||
"packages/bridge-ui": "0.4.0", | ||
"packages/eventindexer": "0.2.0", | ||
"packages/protocol": "0.6.0", | ||
"packages/relayer": "0.4.0", | ||
"packages/status-page": "0.5.0", | ||
"packages/bridge-ui": "0.5.0", | ||
"packages/eventindexer": "0.2.1", | ||
"packages/protocol": "0.6.1", | ||
"packages/relayer": "0.4.1", | ||
"packages/status-page": "0.6.0", | ||
"packages/tokenomics": "0.1.0", | ||
"packages/website": "0.5.0", | ||
"packages/website": "0.6.0", | ||
"packages/whitepaper": "1.3.0" | ||
} |
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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,93 @@ | ||
<script lang="ts"> | ||
export let totalPages: number; | ||
export let page: number; | ||
const DISABLED_BUTTON_LABEL = '...'; | ||
function getPageButtons(pages: number) { | ||
if (pages <= 5) { | ||
return new Array(pages).fill(0).map((_, index) => ({ | ||
label: index + 1, | ||
onClick: () => (page = index + 1), | ||
value: index + 1, | ||
})); | ||
} else { | ||
return [ | ||
{ | ||
label: 1, | ||
onClick: () => (page = 1), | ||
value: 1, | ||
}, | ||
{ | ||
label: 2, | ||
onClick: () => (page = 2), | ||
value: 2, | ||
}, | ||
{ | ||
label: DISABLED_BUTTON_LABEL, | ||
onClick: () => { | ||
// do nothing | ||
}, | ||
}, | ||
{ | ||
label: pages - 1, | ||
onClick: () => (page = pages - 2), | ||
value: pages - 1, | ||
}, | ||
{ | ||
label: pages, | ||
onClick: () => (page = pages - 1), | ||
value: pages, | ||
}, | ||
]; | ||
} | ||
} | ||
function makeButtons(pages) { | ||
return [ | ||
{ | ||
label: '<<', | ||
onClick: () => (page = 1), | ||
}, | ||
{ | ||
label: '<', | ||
onClick: () => { | ||
if (page > 1) { | ||
page -= 1; | ||
} | ||
}, | ||
}, | ||
...getPageButtons(pages), | ||
{ | ||
label: '>', | ||
onClick: () => { | ||
if (page < totalPages) { | ||
page += 1; | ||
} | ||
}, | ||
}, | ||
{ | ||
label: '>>', | ||
onClick: () => (page = pages), | ||
}, | ||
]; | ||
} | ||
$: buttons = makeButtons(totalPages); | ||
</script> | ||
|
||
<div class="btn-group pagination justify-center mt-4"> | ||
{#each buttons as button} | ||
<button | ||
class={`btn btn-xs md:btn-md ${ | ||
button.value === page ? 'btn-active text-white' : '' | ||
} ${button.label === DISABLED_BUTTON_LABEL ? 'btn-disabled' : ''}`} | ||
on:click={button.onClick}>{button.label}</button> | ||
{/each} | ||
</div> | ||
|
||
<style> | ||
.pagination .btn-active { | ||
color: white; | ||
background-color: hsla(var(--af) / var(--tw-bg-opacity, 1)); | ||
} | ||
</style> |
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
Oops, something went wrong.