Skip to content

Commit

Permalink
update/add to show if only the init is done.
Browse files Browse the repository at this point in the history
  • Loading branch information
leeduckgo committed Apr 27, 2023
1 parent 12f9a10 commit e33c8ed
Show file tree
Hide file tree
Showing 2 changed files with 112 additions and 108 deletions.
198 changes: 101 additions & 97 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -289,110 +289,114 @@ export default function Home() {
<br></br>
</>
)}
{hasAddrAggregator &&
<button
onClick={get_services}
className={
"btn btn-primary font-bold mt-4 text-white rounded p-4 shadow-lg"
}>
Refresh the Services Info
</button>
}

{hasAddrAggregator && (
<div className="overflow-x-auto mt-2">
{services.length > 0 && (
<>
<h3 className="text-center font-bold">Services</h3>
<div>{render_services_table()}</div>
</>
)}
<>
<button
onClick={get_services}
className={
"btn btn-primary font-bold mt-4 text-white rounded p-4 shadow-lg"
}>
Refresh the Services Info
</button>
<div className="overflow-x-auto mt-2">
{services.length > 0 && (
<>
<h3 className="text-center font-bold">Services</h3>
<div>{render_services_table()}</div>
</>
)}
<br></br>
</div>



<input
placeholder="service Name"
className="mt-8 p-4 input input-bordered input-primary w-1/4"
onChange={(e) => updateFormInput({ ...formInput, name: e.target.value })}
value={formInput.name}
/>
<br></br>
<input
placeholder="service Description"
className="mt-8 p-4 input input-bordered input-primary w-1/4"
onChange={(e) => updateFormInput({ ...formInput, description: e.target.value })}
value={formInput.description}
/>
<br></br>
<br></br>
<br></br>

<div className="inline-flex relative mr-3 formkit-field">
<p>https://github.com/</p>
<input
placeholder="github account"
className="p-4 input input-bordered input-primary ml-2"
onChange={(e) => updateFormInput({ ...formInput, github_acct: e.target.value })}
value={formInput.github_acct}
/>
</div>
)}
<br></br>
<br></br>
<br></br>
<div className="inline-flex relative mr-3 formkit-field">
<a href="https://docs.movedid.build/guides-for-the-scenarios-of-move-did/bind-github-and-movedid/" target="_blank">
<p className="underline">💡 How can I create a gist to verify my github acct?</p>
</a>
</div>
<br></br>

<input
placeholder="service Name"
className="mt-8 p-4 input input-bordered input-primary w-1/4"
onChange={(e) => updateFormInput({ ...formInput, name: e.target.value })}
value={formInput.name}
/>
<br></br>
<input
placeholder="service Description"
className="mt-8 p-4 input input-bordered input-primary w-1/4"
onChange={(e) => updateFormInput({ ...formInput, description: e.target.value })}
value={formInput.description}
/>
<br></br>
<br></br>
<br></br>
<div className="inline-flex relative mr-3 formkit-field">
<p>https://github.com/</p>
<div className="inline-flex relative mr-3 formkit-field">
<a href="https://gist.github.com" target="_blank">
<button className={'btn btn-primary font-bold mt-4 text-white rounded p-4 shadow-lg'}>
Create a gist!
</button>
</a>
</div>
<br></br>
<br></br>
<div className="inline-flex relative mr-3 formkit-field w-1/4">
<p>https://gist.github.com/{formInput.github_acct}/</p>
<input
placeholder="github account"
placeholder="gist Verification URL"
className="p-4 input input-bordered input-primary w-full ml-2"
onChange={(e) => updateFormInput({ ...formInput, gist_id: e.target.value })}
value={formInput.gist_id}
/>
</div>
<br></br>
<br></br>
<div className="inline-flex relative mr-3 formkit-field">
<p>0 means never expire: </p>
<input
placeholder="expired at"
className="p-4 input input-bordered input-primary ml-2"
onChange={(e) => updateFormInput({ ...formInput, github_acct: e.target.value })}
value={formInput.github_acct}
onChange={(e) => updateFormInput({ ...formInput, expired_at: parseInt(e.target.value) })}
placeholder="0"
value={formInput.expired_at}
/>
</div>
<br></br>
<br></br>
<div className="inline-flex relative mr-3 formkit-field">
<a href="https://docs.movedid.build/guides-for-the-scenarios-of-move-did/bind-github-and-movedid/" target="_blank">
<p className="underline">💡 How can I create a gist to verify my github acct?</p>
</a>
</div>
<br></br>
<div className="inline-flex relative mr-3 formkit-field">
<a href="https://gist.github.com" target="_blank">
<button className={'btn btn-primary font-bold mt-4 text-white rounded p-4 shadow-lg'}>
Create a gist!
</button>
</a>
</div>
<br></br>
<br></br>
<div className="inline-flex relative mr-3 formkit-field w-1/4">
<p>https://gist.github.com/{formInput.github_acct}/</p>
<input
placeholder="gist Verification URL"
className="p-4 input input-bordered input-primary w-full ml-2"
onChange={(e) => updateFormInput({ ...formInput, gist_id: e.target.value })}
value={formInput.gist_id}
/>
</div>
<br></br>
<br></br>
<div className="inline-flex relative mr-3 formkit-field">
<p>0 means never expire: </p>
<input
placeholder="expired at"
className="p-4 input input-bordered input-primary ml-2"
onChange={(e) => updateFormInput({ ...formInput, expired_at: parseInt(e.target.value) })}
</div>

value={formInput.expired_at}
/>
</div>
<br></br>
<button onClick={add_service} className={'btn btn-primary font-bold mt-4 text-white rounded p-4 shadow-lg'}>
Add Service
</button>
<br></br>
<button onClick={update_service} className={'btn btn-primary font-bold mt-4 text-white rounded p-4 shadow-lg'}>
Update Service
</button>
<br></br>
<input
placeholder="service Name"
className="mt-8 p-4 input input-bordered input-primary w-1/4"
onChange={(e) => updateFormInput({ ...formInput, name: e.target.value })}
value={formInput.name}
/>
<br></br>
<button onClick={delete_service} className={'btn btn-primary font-bold mt-4 text-white rounded p-4 shadow-lg'}>
Delete Service
</button>
<br></br>
<button onClick={add_service} className={'btn btn-primary font-bold mt-4 text-white rounded p-4 shadow-lg'}>
Add Service
</button>
<br></br>
<button onClick={update_service} className={'btn btn-primary font-bold mt-4 text-white rounded p-4 shadow-lg'}>
Update Service
</button>
<br></br>
<input
placeholder="service Name"
className="mt-8 p-4 input input-bordered input-primary w-1/4"
onChange={(e) => updateFormInput({ ...formInput, name: e.target.value })}
value={formInput.name}
/>
<br></br>
<button onClick={delete_service} className={'btn btn-primary font-bold mt-4 text-white rounded p-4 shadow-lg'}>
Delete Service
</button>
</>
)}
</center>
</div>
);
Expand Down
22 changes: 11 additions & 11 deletions src/pages/service_manager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -317,17 +317,16 @@ export default function Home() {
<br></br>
</>
)}
{hasAddrAggregator &&
<button
onClick={get_services}
className={
"btn btn-primary font-bold mt-4 text-white rounded p-4 shadow-lg"
}>
Refresh the Services Info
</button>
}

{hasAddrAggregator && (
<>
<button
onClick={get_services}
className={
"btn btn-primary font-bold mt-4 text-white rounded p-4 shadow-lg"
}>
Refresh the Services Info
</button>

<div className="overflow-x-auto mt-2">
{services.length > 0 && (
<>
Expand All @@ -336,7 +335,6 @@ export default function Home() {
</>
)}
</div>
)}
<br></br>
<input
placeholder="service Name"
Expand Down Expand Up @@ -391,6 +389,8 @@ export default function Home() {
<button onClick={delete_service} className={'btn btn-primary font-bold mt-4 text-white rounded p-4 shadow-lg'}>
Delete Service
</button>
</>
)}
</div>
);
}

0 comments on commit e33c8ed

Please sign in to comment.