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

Dapp update #42

Merged
merged 109 commits into from
Sep 13, 2024
Merged
Changes from 1 commit
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
e4e0f1a
feat: add getProject function in project.ts
0xExp-po Sep 4, 2024
c39cd48
chore: add check project/select path function in set project page
0xExp-po Sep 4, 2024
80b8ab7
feat: add project info component commit page
0xExp-po Sep 4, 2024
600acac
refactor: update components file structure
0xExp-po Sep 4, 2024
e88e57c
feat: create modal component
0xExp-po Sep 4, 2024
0eed507
feat: add update config function
0xExp-po Sep 4, 2024
b4ca722
feat: add update config function in commit page
0xExp-po Sep 4, 2024
3c94b9e
chore: keep displaying connected wallet
0xExp-po Sep 4, 2024
6f472cd
Update dapp/src/components/ProjectInfo.astro
0xExp-po Sep 4, 2024
570f912
chore: update project link and remove console
0xExp-po Sep 4, 2024
3f7e912
Merge branch 'dapp-dev' of https://github.com/0xExp-po/soroban-versio…
0xExp-po Sep 4, 2024
3b05c21
Linter
tupui Sep 4, 2024
d599bef
chore: update project info component ui
0xExp-po Sep 5, 2024
23ad649
chore: update 'update config' button function
0xExp-po Sep 5, 2024
38309b6
chore: add theme props to loading component
0xExp-po Sep 5, 2024
78c9978
refactor: rename the file of project.ts and restruct
0xExp-po Sep 5, 2024
86283b9
chore: add commit history view in project info
0xExp-po Sep 5, 2024
812f952
Merge branch 'tupui:main' into dapp-dev
0xExp-po Sep 5, 2024
2340066
Merge branch 'dapp-dev' of https://github.com/0xExp-po/soroban-versio…
0xExp-po Sep 5, 2024
b3f26ac
style: set color theme as extend in tailwindconfig
0xExp-po Sep 5, 2024
b026f26
feat: create formatTime and Date function
0xExp-po Sep 5, 2024
a8a5153
feat: add commit history section
0xExp-po Sep 5, 2024
7d1b143
feat: create get commit function
0xExp-po Sep 5, 2024
2453634
chore: update github service
0xExp-po Sep 5, 2024
d482522
chore: update commit history table
0xExp-po Sep 5, 2024
6809121
chore: remove change project name function
0xExp-po Sep 6, 2024
4989e60
chore: highlight latest commit in history
0xExp-po Sep 6, 2024
a4c866b
chore: fix type script error
0xExp-po Sep 6, 2024
461eccd
chore: change scroll bar style
0xExp-po Sep 6, 2024
3731700
refactor: divide project service to state service
0xExp-po Sep 6, 2024
152fbbf
feat: create project repo info state variable
0xExp-po Sep 6, 2024
98cad04
feat: initialize state variables by local storage
0xExp-po Sep 6, 2024
2d7ab70
feat: divide project service to state service (2)
0xExp-po Sep 6, 2024
7e6b48c
chore: update ui of project info view
0xExp-po Sep 6, 2024
dda12e5
feat: fix bug wallet connection after set project
0xExp-po Sep 6, 2024
3069ad7
feat: create utils functions related get link
0xExp-po Sep 7, 2024
042a38f
chore: jump to latest commit
0xExp-po Sep 7, 2024
e27177d
chore: fix scroll bar error and jump delay time
0xExp-po Sep 9, 2024
f743a74
feat: add astro/react
0xExp-po Sep 9, 2024
4755873
feat: display real commit history
0xExp-po Sep 9, 2024
4c2010c
chore: delete commit history demo data
0xExp-po Sep 9, 2024
5dc8193
Merge branch 'tupui:main' into dapp-dev
0xExp-po Sep 9, 2024
2845f8f
chore: display update commit section only for maintainer
0xExp-po Sep 9, 2024
62ba7f0
Fix button handlers and re-registration, missing loadedProjectInfo an…
tupui Sep 9, 2024
91384c1
Merge branch 'dapp-dev' of https://github.com/0xExp-po/soroban-versio…
0xExp-po Sep 10, 2024
43ba04e
Fix button handlers, re-registration, missing loadedProjectInfo and h…
tupui Sep 9, 2024
e65bba2
Merge branch 'dapp-dev' of https://github.com/0xExp-po/soroban-versio…
0xExp-po Sep 10, 2024
323be3b
Fix buttons
tupui Sep 10, 2024
37f4293
fix:change registerProject function
0xExp-po Sep 10, 2024
8da7530
chore: create package-lock
0xExp-po Sep 10, 2024
ff704dd
Merge from origin/dapp-dev
0xExp-po Sep 10, 2024
deb7f0e
chore: change loadedProjectInfo name to loadProjectInfo
0xExp-po Sep 10, 2024
d35d037
fix: load project latestsha function invoking
0xExp-po Sep 10, 2024
5a51e2c
chore: update layout style
0xExp-po Sep 10, 2024
ba732d7
chore: update style set project page
0xExp-po Sep 10, 2024
ec978e4
chore: responsive padding
0xExp-po Sep 10, 2024
cabb609
chore: update style in navbar and footer
0xExp-po Sep 10, 2024
1bd7336
chore: submit by enter key down
0xExp-po Sep 10, 2024
431da61
feat: create primary button
0xExp-po Sep 10, 2024
d8ddb8a
chore: change button with pimary button
0xExp-po Sep 10, 2024
3755145
chore: change padding of primary button
0xExp-po Sep 10, 2024
e83b5d3
chore: exchange with primary button
0xExp-po Sep 10, 2024
876ef22
chore: change modal button with primary button
0xExp-po Sep 10, 2024
2c39acf
chore: update connect wallet button style
0xExp-po Sep 10, 2024
ceb6820
chore: connect wallet after set project
0xExp-po Sep 10, 2024
a59e673
chore: format code style in projectinfo
0xExp-po Sep 10, 2024
ea49f41
fix: scroll bar style
0xExp-po Sep 10, 2024
0f0ee28
chore: create modal Input box
0xExp-po Sep 10, 2024
80b09a3
chore: update components style
0xExp-po Sep 10, 2024
7623435
chore: update project info section style
0xExp-po Sep 10, 2024
ca41604
chore: update commit record style
0xExp-po Sep 10, 2024
bb7198a
chore: update get commit section style
0xExp-po Sep 10, 2024
6f37499
chore: update commit section style
0xExp-po Sep 10, 2024
aebfddf
Merge branch 'tupui:main' into dapp-update
0xExp-po Sep 10, 2024
f608901
Merge branch 'dapp-update' of https://github.com/0xExp-po/soroban-ver…
0xExp-po Sep 10, 2024
f9a6fb3
chore: commit record has popup updating
0xExp-po Sep 10, 2024
41b13be
fix: set hash length 64
0xExp-po Sep 10, 2024
2eaf2de
chore: change input to modalinput in register project section
0xExp-po Sep 10, 2024
1c20809
chore: remove console in commit history
0xExp-po Sep 11, 2024
3b9580c
chore: update style of modal
0xExp-po Sep 11, 2024
97b618d
feat: add config data variable in state service
0xExp-po Sep 11, 2024
fb718bd
chore: change project name to lowercase
0xExp-po Sep 11, 2024
c2ee164
feat: create fetch config function
0xExp-po Sep 11, 2024
9670ffa
feat: get config data in set project page
0xExp-po Sep 11, 2024
7714f4b
feat: add config data modal in project info section
0xExp-po Sep 11, 2024
3a58df5
chore: add maintainer badge to commit record
0xExp-po Sep 11, 2024
b2b56d2
chore: change the badge name
0xExp-po Sep 12, 2024
cf994bf
chore:remove verion from config data
0xExp-po Sep 12, 2024
03ce656
feat: add refresh state variable function
0xExp-po Sep 12, 2024
ceea420
chore: error alert when config data is empty
0xExp-po Sep 12, 2024
ecfea36
chore: ellipsis middle of publick key
0xExp-po Sep 12, 2024
1c38a5c
chore: add more icons in project info modal
0xExp-po Sep 12, 2024
e59c7fa
feat: add project list section
0xExp-po Sep 12, 2024
c7e3cf8
fix: life cycle error and add nanostore
0xExp-po Sep 12, 2024
f5b1d76
chore: add click function in project card
0xExp-po Sep 12, 2024
651d7c3
chore: separate to read and write contract services
0xExp-po Sep 12, 2024
d2b46fd
chore: remove unnecessary logs
0xExp-po Sep 12, 2024
f83159d
chore: remove button and show hash
0xExp-po Sep 12, 2024
6b79544
chore: set the latest sha as initial value of commit input
0xExp-po Sep 12, 2024
6f49841
fix: add nanostores in package
0xExp-po Sep 12, 2024
374f4be
chore: remove logo in project info modal
0xExp-po Sep 12, 2024
b91c621
fix: undefined error fix
0xExp-po Sep 13, 2024
3d2c91a
chore: update demo config data
0xExp-po Sep 13, 2024
f205696
fix: get latest sha error
0xExp-po Sep 13, 2024
25e2e2a
feat: add convert logo link function
0xExp-po Sep 13, 2024
b3da47e
chore: update demo config data
0xExp-po Sep 13, 2024
8675746
refactor: rebase utils functions structure
0xExp-po Sep 13, 2024
a719f09
fix: remove toast
0xExp-po Sep 13, 2024
08a32f3
feat: add dropdown, search box and register button
0xExp-po Sep 13, 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
Prev Previous commit
Next Next commit
chore: display update commit section only for maintainer
0xExp-po committed Sep 9, 2024
commit 2845f8f9179fdcbd7f0ec562467c9a993e4bb5d8
96 changes: 62 additions & 34 deletions dapp/src/components/Commit.astro
Original file line number Diff line number Diff line change
@@ -3,50 +3,65 @@ import Topic from "./utils/Topic.astro";
import Loading from "./utils/Loading.astro";
---

<div class="relative flex flex-col items-center md:flex-row">
<Topic title="Commit" description="Update hash on-chain" />
</div>

<div
class="relative flex flex-col items-center md:flex-row my-6 bg-zinc-100 rounded-[45px]"
>
<div class="row items-center py-12 px-4 md:px-20 md:w-8/12 md:py-10">
<div class="space-y-8 md:w-full">
<label class="block mb-2 text-base font-medium text-black">
Commit hash
<input
type="text"
id="commit_hash"
name="commit_hash"
class="block p-3 w-full text-base text-black bg-white rounded-lg border shadow-sm focus:ring-black focus:border-black"
placeholder="Last commit hash"
required
minlength="40"
maxlength="40"
/>
</label>
<div id="wrap-commit-button">
<button
data-commit-hash
aria-controls="commit-hash"
class="w-full py-5 bg-zinc-900 rounded-[14px] justify-center gap-2.5 inline-flex"
>
<span class="text-center text-white text-xl font-normal leading-7"
>Commit on-chain</span
<div id="update-commit-section" class="hidden">
<div class="relative flex flex-col items-center md:flex-row">
<Topic title="Commit" description="Update hash on-chain" />
</div>

<div
class="relative flex flex-col items-center md:flex-row my-6 bg-zinc-100 rounded-[45px]"
>
<div class="row items-center py-12 px-4 md:px-20 md:w-8/12 md:py-10">
<div class="space-y-8 md:w-full">
<label class="block mb-2 text-base font-medium text-black">
Commit hash
<input
type="text"
id="commit_hash"
name="commit_hash"
class="block p-3 w-full text-base text-black bg-white rounded-lg border shadow-sm focus:ring-black focus:border-black"
placeholder="Last commit hash"
required
minlength="40"
maxlength="40"
/>
</label>
<div id="wrap-commit-button">
<button
data-commit-hash
aria-controls="commit-hash"
class="w-full py-5 bg-zinc-900 rounded-[14px] justify-center gap-2.5 inline-flex"
>
</button>
<span class="text-center text-white text-xl font-normal leading-7"
>Commit on-chain</span
>
</button>
</div>
</div>
<div id="wrap-commit-loader" class="hidden">
<Loading />
</div>
</div>
<div id="wrap-commit-loader" class="hidden">
<Loading />
</div>
</div>
</div>

<script>
import { commitHash } from "../service/ProjectService";
import { loadedProjectInfo } from "../service/StateService";
import { loadedPublicKey } from "./stellar-wallets-kit";

document.addEventListener("astro:page-load", () => {
const projectInfo = loadedProjectInfo();

if (projectInfo) {
const connectedPublicKey = loadedPublicKey();

const isMaintainer = connectedPublicKey ? projectInfo.maintainers.includes(connectedPublicKey) : false;
const updateCommitSection = document.getElementById("update-commit-section");
if (updateCommitSection) {
updateCommitSection.classList.toggle("hidden", !isMaintainer);
}
}
const commit_hash = document.getElementById(
"commit_hash",
) as HTMLInputElement;
@@ -78,5 +93,18 @@ import Loading from "./utils/Loading.astro";
console.error(e);
}
});

window.addEventListener('walletConnected', (_event: Event) => {
const projectInfo = loadedProjectInfo();

if (projectInfo) {
const connectedPublicKey = loadedPublicKey();
const isMaintainer = connectedPublicKey ? projectInfo.maintainers.includes(connectedPublicKey) : false;
const updateCommitSection = document.getElementById("update-commit-section");
if (updateCommitSection) {
updateCommitSection.classList.toggle("hidden", !isMaintainer);
}
}
});
});
</script>