From c34dba5e6fbb834410712f086b0c88eaa1248d44 Mon Sep 17 00:00:00 2001 From: SuperCoolYun Date: Mon, 25 Mar 2024 13:57:05 -0400 Subject: [PATCH] near-handler agent remove, final touches to UI --- desk/app/near-gateways.hoon | 60 +++++--- desk/app/near-handler.hoon | 139 ------------------ desk/desk.bill | 3 +- desk/desk.docket-0 | 9 ++ desk/gen/acc.hoon | 15 -- .../{near-handler.hoon => near-gateways.hoon} | 50 ++----- desk/mar/near-handler/action.hoon | 14 -- desk/mar/near-handler/update.hoon | 14 -- desk/mar/near/action.hoon | 5 +- desk/mar/near/metadata.hoon | 2 +- desk/mar/near/scry.hoon | 4 +- .../{near-handler.hoon => near-gateways.hoon} | 13 +- desk/ted/glob.hoon | 7 +- ui/src/app.jsx | 12 +- ui/src/components/DeleteGateway.jsx | 19 +++ ui/src/components/HeardGateways.jsx | 13 +- ui/src/components/NewGateway.jsx | 1 - ui/src/components/PublishedGateways.jsx | 20 ++- ui/src/index.css | 112 +++++++++++--- 19 files changed, 218 insertions(+), 294 deletions(-) delete mode 100644 desk/app/near-handler.hoon create mode 100644 desk/desk.docket-0 delete mode 100644 desk/gen/acc.hoon rename desk/lib/{near-handler.hoon => near-gateways.hoon} (68%) delete mode 100644 desk/mar/near-handler/action.hoon delete mode 100644 desk/mar/near-handler/update.hoon rename desk/sur/{near-handler.hoon => near-gateways.hoon} (60%) create mode 100644 ui/src/components/DeleteGateway.jsx diff --git a/desk/app/near-gateways.hoon b/desk/app/near-gateways.hoon index 7a8597e70..5d29ad6fa 100644 --- a/desk/app/near-gateways.hoon +++ b/desk/app/near-gateways.hoon @@ -1,5 +1,5 @@ -/- *near-handler -/+ dbug, default-agent, *near-handler, gossip, server, schooner, verb +/- *near-gateways +/+ dbug, default-agent, *near-gateways, gossip, server, schooner, verb /$ grab-metadata %noun %near-metadata :: |% @@ -97,7 +97,7 @@ %- emil :~ [%pass /eyre/connect %arvo %e %connect [~ /apps/near] %near-gateways] - [%pass /publish-ui %agent [our.bowl %near-gateways] %poke %near-action !>([%publish 'ui-main' url])] + [%pass /publish-ui %agent [our.bowl %near-gateways] %poke %near-action !>([%publish 'ui-main' url ''])] == :: ++ load @@ -123,7 +123,7 @@ ?~ (find ~[metadata.act] ~(val by published)) =/ id=identifier [our.bowl (sham eny.bowl)] ~& ['publish id' id] - ?: =(metadata.act ['ui-main' url]) + ?: =(metadata.act ['ui-main' url '']) =. ui-glob [id *glob] %+ get-gateway-glob metadata.act @@ -139,6 +139,15 @@ %+ get-gateway-glob metadata.act identifier.act + :: + %delete + ?~ (~(get by published) identifier.act) + ~& >>> 'couldnt find in published gateways' + that + ~& > 'Deleted gateway' + =. published (~(del by published) identifier.act) + =. installed (~(del by installed) identifier.act) + that == == ++ dump [404 ~ [%plain "404 - Not Found"]] @@ -183,7 +192,7 @@ (slav %uv (snag 3 site.req)) ?. (~(has by installed) identifier) %- emil - %- send dump + %- send [404 ~ [%plain "Downoloading glob"]] =/ new-site %+ weld %+ slag 5 @@ -206,20 +215,20 @@ ++ from-glob |= [identifier=[=ship id=@uvH] request=request-line:server] ^- simple-payload:http - ~& identifier - ~& ['site.requset' site.request] =/ =glob ?: =(identifier [ship=~zod id=0v0]) +.ui-glob ?. (~(has by installed) identifier) ~ (~(got by installed) identifier) - ?: =(glob ~) not-found:gen:server + ?: =(glob ~) + :::_ `(as-octt:mimes:html "Downoloading %gateway glob") + :::- 404 ~ + not-found:gen:server =/ requested ?: (~(has by glob) site.request) site.request /index/html =/ =mime (~(got by glob) requested) - ~& 'got mime' =/ mime-type=@t (rsh 3 (crip )) =; headers [[200 headers] `q.mime] @@ -233,7 +242,8 @@ =/ tid `@ta`(cat 3 'near-' (scot %uv (sham eny.bowl))) =/ ta-now `@ta`(scot %da now.bowl) =/ ted-cage=cage :- %glob - !>(`url.data) + ::!>(`url.data) + !>(`[url.data about.data]) =/ cage :- %spider-start !>([~ `tid byk.bowl(r da+now.bowl) ted-cage]) =/ id-path @@ -274,7 +284,7 @@ %poke-ack ?~ p.sign that - ~& 'Poke ui failed' + ~& >>> 'Poke ui failed' that == :: @@ -294,7 +304,7 @@ ?(%poke-ack %watch-ack) ?~ p.sign that - ~& 'Thread failed to start' + ~& >>> 'Thread failed to start' that :: %fact @@ -303,21 +313,26 @@ ~& >>> ['Thread-failed to glob' (slag 2 `(list @ta)`wire)] =/ id (id-from-wire wire) =. published (~(del by published) id) + :: case for mirror gateway glob that's been deleted from s3-bucket + =. heard (~(del by heard) id) + ~& >> ['Deleted from heard or published, glob not exist at address' id] that :: %thread-done - ~& 'thread done fact got' - =/ glob !<(glob q.cage.sign) + =/ result !<([glob @t] q.cage.sign) + =/ glob -.result =/ id (id-from-wire wire) :: =/ had=metadata (~(got by published) id) =/ path ;; (list @ta) wire =/ got=metadata - :- (snag 2 path) + :* (snag 2 path) (snag 3 path) + +.result + == :: ?. =(url.had url.got) :: ~& >>> 'Glob url mismatch' :: that - ?: =(got ['ui-main' url]) + ?: =(got ['ui-main' url '']) =. ui-glob [-.ui-glob glob] that ~& > 'Gateway globbed successfully' @@ -356,6 +371,7 @@ [%x %heard ~] ``near-scry+!>([%heard heard]) [%x %published ~] ``near-scry+!>([%published published]) [%x %installed ~] ``near-scry+!>([%installed ~(tap in ~(key by installed))]) + [%x %installed @ ~] ``near-scry+!>([%find-id (find-id -.+.+.path)]) [%x %dbug %state ~] =- ``noun+!>(-) %_ state @@ -369,6 +385,16 @@ |=(=mime mime(q.q 1.337)) == == +++ find-id +|= name=@t +^- identifier +=/ gateway=(list [identifier metadata]) + %+ skim ~(tap by published) + |= [p=identifier q=metadata] + =(name name.q) +?~ gateway [~zod 0v0] +-:(rear gateway) + :: ::http{s}://{host}/~/scry/{app}{path}.{mark} -++ url 's3-bucket-ui' +++ url 'https://s3.lonhep-tamfeb.startram.io/bucket/lonhep-tamfeb/2024.3.11..21.56.12-glob-0v7.l3ulb.vme1j.g5lip.sbco7.v4hf0.glob' -- \ No newline at end of file diff --git a/desk/app/near-handler.hoon b/desk/app/near-handler.hoon deleted file mode 100644 index 04125d0f1..000000000 --- a/desk/app/near-handler.hoon +++ /dev/null @@ -1,139 +0,0 @@ -/- *near-handler -/+ dbug, default-agent, *near-handler -:: -|% -:: -+$ versioned-state - $% state-0 - == -:: -+$ state-0 - $: %0 - accs=(set acc) - == -:: -+$ card $+(card card:agent:gall) --- -:: -%- agent:dbug -=| state-0 -=* state - -:: -^- agent:gall -:: -=< - |_ =bowl:gall - +* this . - def ~(. (default-agent this %|) bowl) - hc ~(. +> [bowl ~]) - ++ on-init - ^- (quip card _this) - =^ cards state abet:init:hc - [cards this] - :: - ++ on-save - ^- vase - !>(state) - :: - ++ on-load - |= =vase - ^- (quip card _this) - =^ cards state abet:(load:hc vase) - [cards this] - :: - ++ on-poke - |= [=mark =vase] - ^- (quip card _this) - =^ cards state abet:(poke:hc mark vase) - [cards this] - :: - ++ on-peek peek:hc - :: - ++ on-watch - |= =path - ^- (quip card _this) - =^ cards state abet:(watch:hc path) - [cards this] - :: - ++ on-agent - |= [=wire =sign:agent:gall] - ^- (quip card _this) - =^ cards state abet:(agent:hc wire sign) - [cards this] - ++ on-arvo on-arvo:def - ++ on-fail on-fail:def - ++ on-leave on-leave:def - -- -|_ [=bowl:gall deck=(list card)] -+* that . -++ emit |=(=card that(deck [card deck])) -++ emil |=(lac=(list card) that(deck (welp lac deck))) -++ abet ^-((quip card _state) [(flop deck) state]) -:: -++ from-self =(our src):bowl -:: -++ init - ^+ that - that -:: -++ load - |= vaz=vase - ^+ that - ?> ?=([%0 *] q.vaz) - that(state !<(state-0 vaz)) -:: -++ poke - |= [=mark =vase] - ^+ that - ?+ mark that - %near-handler-action - ?> from-self - =+ !<(act=action vase) - ?- -.act - %add - =. accs (~(put in accs) +.act) - give-accs - :: - %del - =. accs (~(del in accs) +.act) - give-accs - :: - %poke - %- emit - [%pass /poke-to/[dude.act] %agent [our.bowl dude.act] %poke-as mark.act [%json !>((need json.act))]] - == -== -:: -++ peek - |= =path - ^- (unit (unit cage)) - ?+ path [~ ~] - [%x %accs ~] - ``near-handler-update+!>([%accs accs]) - == -:: -++ watch - |= =path - ^+ that - ?+ path ~|(bad-watch-path+path !!) - [%accs ~] - ?> from-self - give-accs - == -:: -++ agent - |= [=wire =sign:agent:gall] - ^+ that - ?+ wire ~|(bad-agent-wire+wire !!) - [%poke-to * ~] - ?. ?=(%poke-ack -.sign) that - ?~ p.sign that - %- (slog 'Failed to poke' `@t`(scot %tas -.+.wire) ~) - that - == -:: -++ give-accs - %- emit - [%give %fact ~[/accs] %near-handler-update !>([%accs accs])] -:: --- \ No newline at end of file diff --git a/desk/desk.bill b/desk/desk.bill index e86ee5efc..d6cf47232 100644 --- a/desk/desk.bill +++ b/desk/desk.bill @@ -1,3 +1,2 @@ -:~ %near-handler - %near-gateways +:~ %near-gateways == diff --git a/desk/desk.docket-0 b/desk/desk.docket-0 new file mode 100644 index 000000000..33527109c --- /dev/null +++ b/desk/desk.docket-0 @@ -0,0 +1,9 @@ +:~ + title+'Near' + info+'near gateway browser' + color+0x1f.ec98 + version+[0 0 1] + website+'https://github.com/Urbit' + license+'MIT' + site+/apps/near +== \ No newline at end of file diff --git a/desk/gen/acc.hoon b/desk/gen/acc.hoon deleted file mode 100644 index 1fa23adb5..000000000 --- a/desk/gen/acc.hoon +++ /dev/null @@ -1,15 +0,0 @@ -!: -:- %say -:: :near-handler +near-handler!acc %add 0x0 -|= $: [now=@da eny=@uvJ bec=beak] - $: act=?(%add %del %poke) - acc=@uxH - ~ - == - ~ - == -?- act -%del [%near-handler-action [%del acc]] -%add [%near-handler-action [%add acc]] -%poke [%near-handler-action [%poke-to [%test %test-action (need (de:json:html '{"poke":1}'))]]] -== \ No newline at end of file diff --git a/desk/lib/near-handler.hoon b/desk/lib/near-gateways.hoon similarity index 68% rename from desk/lib/near-handler.hoon rename to desk/lib/near-gateways.hoon index 55d154314..410afe371 100644 --- a/desk/lib/near-handler.hoon +++ b/desk/lib/near-gateways.hoon @@ -1,16 +1,9 @@ -/- *near-handler +/- *near-gateways /+ etch |% ++ enjs =, enjs:format |% - ++ update-json - |= =update - ^- json - ?- -.update - %accs - (accs +.update) - == :: ++ scry-json |= =scry @@ -22,20 +15,15 @@ (id-data +.scry) %installed (id-glob +.scry) + %find-id + (id +.scry) == - ++ accs - |= accs=(set acc) - ^- json - %- en-vase:etch - !> ^- (list @t) - %+ turn ~(tap in accs) - |=(=acc `@t`(scot %ux acc)) :: ++ id-data |= data=(map identifier metadata) ^- json %- en-vase:etch - !> ^- (list [identifier=[ship=@p id=@t] metadata=[name=@t url=@t]]) + !> ^- (list [identifier=[ship=@p id=@t] metadata=[name=@t url=@t about=@t]]) %+ turn ~(tap by data) |= arg=[=identifier =metadata] :- :- ship=ship.identifier.arg @@ -51,39 +39,30 @@ |= =identifier :- ship.identifier (scot %uv id.identifier) + :: + ++ id + |= =identifier + ^- json + %- en-vase:etch + !> ^- [ship=@p id=@t] + :- ship.identifier + (scot %uv id.identifier) -- :: ++ dejs !: =, dejs:format |% - ++ act - |= =json - ^- action - %. json - %- of - :~ [%add (se %ux)] - [%del (se %ux)] - [%poke poke] - == - :: - ++ poke - %- ot - :~ [%agent (se %tas)] - [%mark (se %tas)] - [%data some] - == :: ++ gateway-act |= =json - ~& > json - ~& 'json arm' ^- gateway-action %. json %- of :~ [%publish to-metadata] - [%install id-data] + [%install id-data] + [%delete to-identifier] == ++ id-data %- ot @@ -101,6 +80,7 @@ %- ot :~ [%name so] [%url so] + [%about so] == -- -- \ No newline at end of file diff --git a/desk/mar/near-handler/action.hoon b/desk/mar/near-handler/action.hoon deleted file mode 100644 index db6ca988a..000000000 --- a/desk/mar/near-handler/action.hoon +++ /dev/null @@ -1,14 +0,0 @@ -/- *near-handler -/+ *near-handler -|_ =action -++ grab - |% - ++ noun action - ++ json act:dejs - -- -++ grow - |% - ++ noun action - -- -++ grad %noun --- \ No newline at end of file diff --git a/desk/mar/near-handler/update.hoon b/desk/mar/near-handler/update.hoon deleted file mode 100644 index 85cc43662..000000000 --- a/desk/mar/near-handler/update.hoon +++ /dev/null @@ -1,14 +0,0 @@ -/- *near-handler -/+ *near-handler -|_ =update -++ grab - |% - ++ noun update - -- -++ grow - |% - ++ noun update - ++ json (update-json:enjs update) - -- -++ grad %noun --- \ No newline at end of file diff --git a/desk/mar/near/action.hoon b/desk/mar/near/action.hoon index 27b62877f..deab0d85e 100644 --- a/desk/mar/near/action.hoon +++ b/desk/mar/near/action.hoon @@ -1,11 +1,10 @@ -/- *near-handler -/+ *near-handler +/- *near-gateways +/+ *near-gateways |_ act=gateway-action ++ grab |% ++ noun gateway-action ++ json - ~& >>> 'poke to near-gateways json' gateway-act:dejs -- ++ grow diff --git a/desk/mar/near/metadata.hoon b/desk/mar/near/metadata.hoon index b74c59952..e165541d4 100644 --- a/desk/mar/near/metadata.hoon +++ b/desk/mar/near/metadata.hoon @@ -1,4 +1,4 @@ -/- *near-handler +/- *near-gateways |_ gateway=[identifier metadata] ++ grad %noun ++ grow diff --git a/desk/mar/near/scry.hoon b/desk/mar/near/scry.hoon index f092db7a9..b7d135b20 100644 --- a/desk/mar/near/scry.hoon +++ b/desk/mar/near/scry.hoon @@ -1,5 +1,5 @@ -/- *near-handler -/+ *near-handler +/- *near-gateways +/+ *near-gateways |_ =scry ++ grab |% diff --git a/desk/sur/near-handler.hoon b/desk/sur/near-gateways.hoon similarity index 60% rename from desk/sur/near-handler.hoon rename to desk/sur/near-gateways.hoon index 8b9b0538f..020a27933 100644 --- a/desk/sur/near-handler.hoon +++ b/desk/sur/near-gateways.hoon @@ -1,23 +1,16 @@ |% -+$ acc @uxH +$ glob (map path mime) -+$ metadata [name=@t url=@t] ++$ metadata [name=@t url=@t about=@t] +$ identifier [=ship id=@uvH] -+$ action - $% [%add =acc] - [%del =acc] - [%poke [=dude:gall =mark json=(unit json)]] - == -+$ update - $% [%accs accs=(set acc)] - == +$ gateway-action $% [%publish =metadata] [%install =identifier =metadata] + [%delete =identifier] == +$ scry $% [%heard =(map identifier metadata)] [%published =(map identifier metadata)] [%installed =(list identifier)] + [%find-id =identifier] == -- \ No newline at end of file diff --git a/desk/ted/glob.hoon b/desk/ted/glob.hoon index e1b082fa6..87934fbaf 100644 --- a/desk/ted/glob.hoon +++ b/desk/ted/glob.hoon @@ -1,11 +1,12 @@ -/- spider, *near-handler +/- spider, *near-gateway /+ strandio =, strand=strand:spider ^- thread:spider |= arg=vase =/ m (strand ,vase) ^- form:m -=+ !<([~ url=@t] arg) +::=+ !<([~ url=@t] arg) +=+ !<([~ url=@t about=@t] arg) ;< =glob bind:m %+ (retry:strandio ,glob) `5 =/ n (strand ,(unit glob)) @@ -14,4 +15,4 @@ %- mole |. ;;(=glob (cue cord)) -(pure:m !>(glob)) +(pure:m !>([glob about])) diff --git a/ui/src/app.jsx b/ui/src/app.jsx index bdea67fd0..c6bceb82a 100644 --- a/ui/src/app.jsx +++ b/ui/src/app.jsx @@ -8,30 +8,24 @@ export function App() { const api = new Urbit('', '', 'near-handler'); api.ship = window.ship; - // const api = new Urbit( - // 'http://localhost:80', - // 'lidlut-tabwed-pillex-ridrup', - // 'near-handler' - // ) - //api.ship = 'zod' - - const [heard, setHeard] = useState([]) const [published, setPublished] = useState([]) const [installed, setInstalled] = useState([]) const [loading, setLoading] = useState(true) async function scryToGateways() { - console.log('scrying to %near-gateways') + console.log('scrying to gateways') let scryPublish = await api.scry({ app: 'near-gateways', path: '/published' }) + console.log(scryPublish) setPublished(scryPublish) let scryInstalled = await api.scry({ app: 'near-gateways', path: '/installed' }) + console.log(scryInstalled) setInstalled(scryInstalled) let scryHeard = await api.scry({ app: 'near-gateways', path: '/heard' }) setHeard(scryHeard) diff --git a/ui/src/components/DeleteGateway.jsx b/ui/src/components/DeleteGateway.jsx new file mode 100644 index 000000000..f6a3afefe --- /dev/null +++ b/ui/src/components/DeleteGateway.jsx @@ -0,0 +1,19 @@ +import React from 'react' + +function DeleteGateway(props) { + const setShowDelete = props.setShowDelete + const gateway = props.gateway + const deleteGateway = props.deleteGateway + + + return( +

Are you sure you want to delete {gateway.name}?

+
+ + +
+
+ ) + +} +export default DeleteGateway \ No newline at end of file diff --git a/ui/src/components/HeardGateways.jsx b/ui/src/components/HeardGateways.jsx index ec803541b..801f6689f 100644 --- a/ui/src/components/HeardGateways.jsx +++ b/ui/src/components/HeardGateways.jsx @@ -1,15 +1,16 @@ import React, { useState, useEffect } from 'react' -function HeardGateways(arg) { - const api= arg.api - const heard = arg.heard - const installed = arg.installed - const loading = arg.loading +function HeardGateways(props) { + const api= props.api + const heard = props.heard + const installed = props.installed + const loading = props.loading const [installedGateways, setInstalledGateways] = useState([]) const [newGateways, setNewGateways] = useState([]) async function pokeInstall(gateway) { + console.log(gateway) console.log({'install': { 'identifier' : {'ship' : gateway.ship, 'id' : gateway.id}, @@ -37,6 +38,7 @@ function HeardGateways(arg) { for (let i = 0; i < heard.length; i++){ let gateway = heard[i] let isInstalled = installed.find(instGateway => instGateway.id === gateway.id) + console.log(installed.find(instGateway => instGateway.id === gateway.id)) if (isInstalled !== undefined){ console.log('gateway installed', gateway) setInstalledGateways(current => [...current, gateway]) @@ -65,7 +67,6 @@ function HeardGateways(arg) {
{installedGateways.map((gateway, index) => { let name = gateway.name - //let url = 'http://localhost:80/apps/near/' + gateway.ship + '/' + gateway.id + '/gateway/' let url = './near/' + gateway.ship + '/' + gateway.id + '/gateway/' return(
diff --git a/ui/src/components/NewGateway.jsx b/ui/src/components/NewGateway.jsx index f8f394604..c816ff383 100644 --- a/ui/src/components/NewGateway.jsx +++ b/ui/src/components/NewGateway.jsx @@ -29,7 +29,6 @@ function NewGateway(props) {
3. Publish gateway through form below.
- ------

diff --git a/ui/src/components/PublishedGateways.jsx b/ui/src/components/PublishedGateways.jsx index f617cf4d3..269147475 100644 --- a/ui/src/components/PublishedGateways.jsx +++ b/ui/src/components/PublishedGateways.jsx @@ -1,13 +1,26 @@ import React, { useState } from 'react' import NewGateway from './NewGateway.jsx' +import DeleteGateway from './DeleteGateway.jsx' function PublishedGateways(props) { const [showNew, setShowNew] = useState(false) + const [showDelete, setShowDelete] = useState(false) + const [delGateway, setDelGateway] = useState({}) const published = props.published const loading = props.loading const api = props.api + async function deleteGateway(gateway) { + api.poke({ + app: "near-gateways", + mark: "near-action", + json: {"delete": {"ship": gateway.ship, "id": gateway.id}}, + onSuccess: () => {setDelGateway({}), window.location.reload(), setShowDelete(false)}, + onError: () => setError('Failed to delete gateway') + }) + } + return(
@@ -15,26 +28,27 @@ function PublishedGateways(props) {
:
} + {showDelete ?
:
}
{(published !== null) && !loading ?
{published.map((gateway, index) => { let name = gateway.name let url = './near/' + gateway.ship + '/' + gateway.id + '/gateway/' - //let url = 'http://localhost:80/apps/near/' + gateway.ship + '/' + gateway.id + '/gateway/' return(

{name}

-

{ship}

+

{gateway.ship}

{gateway.about}

+ Gateway
)}) } -
{setShowNew(true)}}> +
{setShowNew(true), setDelGateway({}), setShowDelete(false)}}>

+

Upload Your Gateway

diff --git a/ui/src/index.css b/ui/src/index.css index 0b161933b..9af45a108 100644 --- a/ui/src/index.css +++ b/ui/src/index.css @@ -20,10 +20,12 @@ button{ body{ background-color: #141915; } +input{ + padding:4px; +} input, textarea{ border:#141915 1px solid; border-radius: 0.375rem; - padding:4px; } .containerBody { display: grid; @@ -34,7 +36,10 @@ input, textarea{ .containerNav{ grid-column-start: 4; grid-column-end: 6; + /* display:grid; + grid-template-columns: repeat(3, minmax(0, 1fr)); */ justify-items:stretch; + /* gap: 4px; */ margin-top: 6px; } .headers{ @@ -101,7 +106,7 @@ input, textarea{ border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; border:.5px solid #ABE68D ; - background-color: #141915; + background-color: #ffffff; padding:1px; margin-bottom: 0; } @@ -147,7 +152,7 @@ input, textarea{ .git{ display: flex; flex-direction: row; - justify-content: center; + justify-content:space-around; min-height: 33px; height:auto; margin-top: auto; @@ -179,7 +184,7 @@ input, textarea{ .newGateway{ z-index:100; } -.formContainer{ +.formContainer, .deleteGateway{ position: fixed; display: grid; grid-template-columns: 10% auto 10% [end]; @@ -192,48 +197,59 @@ input, textarea{ right: 0; margin-left: auto; margin-right: auto; - top:10%; - width:60%; + /* top:10%; */ padding:3%; } +.formContainer{ + top:30%; + width:60%; +} .paragraph{ + margin:auto; + margin-bottom: 10px; grid-column-start: 2; - grid-column-end: 4; + grid-column-end: 3; grid-row-start: 2; grid-row-end: 3; } .formStyle{ align-self: center; - grid-column-start: 2; + grid-column-start: 1; grid-column-end: 4; grid-row-start: 3; grid-row-end: end; display: grid; - grid-template-columns: 10% auto auto 10% [end]; + /* grid-template-columns: 10% auto auto 10% [end]; */ + grid-template-columns: auto auto [end]; grid-template-rows: auto auto auto ; gap: 5px 4%; place-content: center; } .nameForm{ - grid-column-start: 2; - grid-column-end: 3; + grid-column-start: 1; + /* grid-column-start: 2; */ + /* grid-column-end: 3; */ + grid-column-end: 2; grid-row-start: 1; grid-row-end: 2; } .urlForm{ - grid-column-start: 3; - grid-column-end: 4; + grid-column-start: 2; + grid-column-end: 3; grid-row-start: 1; grid-row-end: 2; } .aboutForm{ - grid-column-start: 2; - grid-column-end: 4; + grid-column-start: 1; + grid-column-end: 3; + /* grid-column-start: 2; + grid-column-end: 4; */ grid-row-start: 2; grid-row-end: 3; } .aboutForm textarea{ + padding:1px; resize: none; width:100%; height: 70px; @@ -246,7 +262,7 @@ input, textarea{ } .btnStyle, .closeNewBtn{ - margin:5px; + /* margin:5px; */ color:#ABE68D; background-color: #141915; padding:5px; @@ -255,8 +271,8 @@ input, textarea{ font-family: urbitSans; } .btnStyle{ - grid-column-start: 2; - grid-column-end: 4; + grid-column-start: 1; + grid-column-end: 3; grid-row-start: 3; grid-row-end: end; } @@ -268,7 +284,7 @@ input, textarea{ right: 90%; font-size: 18px; margin-left: auto; - grid-column-start: 5; + /* grid-column-start: 6; */ grid-column-end: end; grid-row-start: 1; grid-row-end: 2; @@ -276,4 +292,60 @@ input, textarea{ .btnStyle:hover, .closeNewBtn:hover{ color: #141915; background-color: #ABE68D; -} \ No newline at end of file +} +.deleteGateway{ + top: 45%; + width:50%; + text-align: center; +} +.delButtons{ + align-self: center; + grid-column-start: 1; + grid-column-end: 4; + grid-row-start: 3; + grid-row-end: end; + display: flex; + justify-content: space-around; +} +.deleteGateway button{ + margin-top:15px; + padding-right: 20px; + padding-left: 20px; + color:#ABE68D; + background-color: #141915; + border:#ABE68D 1px solid; + border-radius: 0.375rem; + font-family: urbitSans; +} +.deleteGateway button:hover{ + color: #141915; + background-color: #ABE68D; +} +@media only screen and (max-width: 390px) { + .flexBox{ + place-content: center; + } + .nameForm, .urlForm{ + grid-column-start: 1; + grid-column-end: 3; + } + .urlForm{ + grid-row-start: 2; + grid-row-end: 3; + } + .aboutForm{ + grid-row-start: 3; + grid-row-end: 4; + } + .nameForm input, .urlForm input{ + width:100%; + font-size: 1.17em; + padding-left: 1px; + padding-top: 4px; + padding-bottom: 4px; + } + .btnStyle{ + grid-row-start: 4; + grid-row-end: 5; + } + } \ No newline at end of file