mirror of
https://github.com/urbit/shrub.git
synced 2025-01-07 13:37:36 +03:00
Various fixes and improvements.
This commit is contained in:
parent
e216eb1f36
commit
5b5054e8f6
@ -97,6 +97,6 @@
|
||||
++ peer-sole |=(* abet:show:seen) :: console subscribe
|
||||
++ poke-sole-action |=(sole-action abet:(work +<)) :: console input
|
||||
++ prep |= (unit (pair (list move) axon)) :: update self
|
||||
abet:?~(+< +> (heal +<+>))) ::
|
||||
abet:?~(+< +> wild:(heal +<+>)) ::
|
||||
++ pull-sole |=(* abet:sawn) :: console unsubscribe
|
||||
--
|
||||
|
@ -109,7 +109,7 @@
|
||||
++ poke-sole-action |=(sole-action abet:(work +<)) :: console input
|
||||
++ poke-oct3-move |=(point abet:wild:(kick +<)) :: urbit move
|
||||
++ prep |= (unit (pair (list move) axon)) :: update self
|
||||
abet:?~(+< +> (heal +<+>))) ::
|
||||
abet:?~(+< +> wild:(heal +<+>)) ::
|
||||
++ pull-oct3 |=(* abet:(hail |)) :: urbit unsubscribe
|
||||
++ pull-sole |=(* abet:sawn) :: console unsubscribe
|
||||
--
|
||||
|
@ -1644,7 +1644,7 @@
|
||||
(weld " " txt)
|
||||
::
|
||||
%app
|
||||
"[{(trip p.sep)}] {(trip q.sep)}"
|
||||
"[{(trip p.sep)}]: {(trip q.sep)}"
|
||||
==
|
||||
--
|
||||
::
|
||||
|
@ -970,7 +970,7 @@
|
||||
?~ s.mob
|
||||
%+ flag
|
||||
(norm ska mob)
|
||||
(flaw cof leaf/"beam unavailable" (smyt (tope bem)) ~)
|
||||
(flaw cof leaf/"blank path" (smyt (tope bem)) ~)
|
||||
^$(s.mob t.s.mob, mer [i.s.mob mer])
|
||||
::
|
||||
++ link :: translate
|
||||
|
@ -200,7 +200,6 @@
|
||||
::
|
||||
++ poke-start ::
|
||||
|= wel=well
|
||||
~& [%poke-well wel]
|
||||
=< se-abet =< se-view
|
||||
(se-born wel)
|
||||
::
|
||||
@ -211,7 +210,6 @@
|
||||
::
|
||||
++ reap-phat ::
|
||||
|= [way=wire saw=(unit tang)]
|
||||
~& [%reap-phat way saw]
|
||||
=< se-abet =< se-view
|
||||
=+ gyl=(drum-phat way)
|
||||
?~ saw
|
||||
@ -272,7 +270,7 @@
|
||||
%= $
|
||||
yar t.yar
|
||||
+>
|
||||
=. +>.$ (se-text "with {(trip p.i.yar)}/{(trip q.i.yar)}")
|
||||
=. +>.$ (se-text "activated app {(trip p.i.yar)}/{(trip q.i.yar)}")
|
||||
%- se-emit(fur (~(put by fur) q.i.yar ~))
|
||||
[ost %conf [%drum p.i.yar q.i.yar ~] [our q.i.yar] %load our p.i.yar]
|
||||
==
|
||||
|
@ -159,6 +159,8 @@
|
||||
::
|
||||
++ spam |*(* %_(+> ..auto (^spam +<)))
|
||||
++ start
|
||||
=. . %- spam
|
||||
[leaf/"activated sync from {<sud>} on {<her>} to {<syd>}" ~]
|
||||
%- blab :_ ~
|
||||
:* ost %warp
|
||||
/kiln/sync/[syd]/(scot %p her)/[sud]
|
||||
@ -169,7 +171,7 @@
|
||||
|= rot=riot
|
||||
?~ rot
|
||||
%^ spam
|
||||
leaf/"bad %writ response on autosync"
|
||||
leaf/"bad %writ response on sync"
|
||||
leaf/"from {<sud>} on {<her>} to {<syd>}"
|
||||
~
|
||||
=. let ?. ?=(%w p.p.u.rot) let ((hard ,@ud) q.q.r.u.rot)
|
||||
@ -188,9 +190,10 @@
|
||||
=. +>.$
|
||||
%- spam
|
||||
?: ?=(%& -.mes)
|
||||
[leaf/"autosync succeeded from {<sud>} on {<her>} to {<syd>}" ~]
|
||||
~
|
||||
:: [leaf/"sync succeeded from {<sud>} on {<her>} to {<syd>}" ~]
|
||||
?+ p.p.mes
|
||||
:* leaf/"autosync failed from {<sud>} on {<her>} to {<syd>}"
|
||||
:* leaf/"sync failed from {<sud>} on {<her>} to {<syd>}"
|
||||
leaf/"please manually merge the desks with"
|
||||
leaf/":+merge %{(trip syd)} {(scow %p her)} %{(trip sud)}"
|
||||
leaf/""
|
||||
@ -199,8 +202,8 @@
|
||||
==
|
||||
::
|
||||
%no-ali-desk
|
||||
:~ leaf/"{<sud>} on {<her>} does not exist, so the sync"
|
||||
leaf/"into {<syd>} will begin automatically when it does"
|
||||
:~ leaf/"sync activated from {<sud>} on {<her>} to {<syd>}"
|
||||
leaf/"note: {<sud>} on {<her>} is a blank desk"
|
||||
==
|
||||
==
|
||||
%- blab :_ ~
|
||||
@ -303,7 +306,7 @@
|
||||
?: =(%meld gem)
|
||||
?: ?=(%& -.are)
|
||||
?. auto
|
||||
=+ "successfully merged with strategy {<gem>}"
|
||||
=+ "merged with strategy {<gem>}"
|
||||
win:(spam leaf/- ?~(p.are ~ [>`(set path)`p.are< ~]))
|
||||
=+ "mashing conflicts"
|
||||
=> .(+>.$ (spam leaf/- ~))
|
||||
@ -329,7 +332,7 @@
|
||||
=+ "failed to merge with strategy {<p.p.are>}"
|
||||
lose:(spam leaf/- q.p.are)
|
||||
?: ?=(%& -.are)
|
||||
=+ "successfully merged with strategy {<gem>}"
|
||||
=+ "merged with strategy {<gem>}"
|
||||
win:(spam leaf/- ?~(p.are ~ [>`(set path)`p.are< ~]))
|
||||
?. auto
|
||||
=+ "failed to merge with strategy {<p.p.are>}"
|
||||
|
@ -1,6 +1,6 @@
|
||||
::
|
||||
::
|
||||
:::: /hook/hymn/fab/octo/pub/
|
||||
:::: /hook/hymn/fab/oct3/pub/
|
||||
::
|
||||
^- manx
|
||||
;html
|
||||
@ -9,8 +9,8 @@
|
||||
;script(type "text/javascript", src "//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.js");
|
||||
;script(type "text/javascript", src "/~~/~/at/base/lib/urb.js");
|
||||
;link(type "text/css", rel "stylesheet", href "/home/lib/base.css");
|
||||
;link(type "text/css", rel "stylesheet", href "/home/pub/octo/src/main.css");
|
||||
;title: :octo
|
||||
;link(type "text/css", rel "stylesheet", href "/home/pub/oct3/src/main.css");
|
||||
;title: :oct3
|
||||
==
|
||||
;body
|
||||
;div#what
|
||||
@ -26,6 +26,6 @@
|
||||
==
|
||||
;div#bord;
|
||||
;div#audi;
|
||||
;script(type "text/javascript", src "/home/pub/octo/src/main.js");
|
||||
;script(type "text/javascript", src "/home/pub/oct3/src/main.js");
|
||||
==
|
||||
==
|
37
base/pub/oct3/src/main.css
Normal file
37
base/pub/oct3/src/main.css
Normal file
@ -0,0 +1,37 @@
|
||||
#what, #bord, #audi { width: 600px; text-align: center; position: absolute;
|
||||
left: 50%; margin-left: -300px; }
|
||||
#what { height: 36px; top: 18px; }
|
||||
#bord { height: 600px; position: absolute; top: 111px; opacity: .3; }
|
||||
#audi { top: 760px; }
|
||||
.turn #bord { opacity: 1; }
|
||||
#message { position:absolute; left: 0; top: 0; width: 100%; height: 90px;
|
||||
line-height: 90px; background-color: #000; color: #fff;
|
||||
text-align: center; }
|
||||
#message .ship { display: inline; }
|
||||
#what { font-family: "bau"; }
|
||||
#what div { display: inline-block; }
|
||||
.ship { padding: .3rem; font-weight: 400; letter-spacing: 1px;
|
||||
text-transform: uppercase; line-height:2rem; }
|
||||
.ship:before { content: "~"; font-weight: 500; font-size: 1rem; }
|
||||
.waiting.ship:before { content: "Waiting"; color: #ccc; }
|
||||
#what #x, #what #o { border: 2px solid #fff; }
|
||||
.x #what #x, .o #what #o { border: 2px solid red; }
|
||||
#what #ship, #what #user { padding: .6rem; }
|
||||
#what .as { width: 1.6rem; }
|
||||
#audi h1,
|
||||
#vs { margin: 0 1rem; padding: .3rem; color: #fff; background-color: #000; }
|
||||
#audi h1 { font-size: .9rem; text-transform: uppercase; display:
|
||||
inline-block; background-color: #ccc; }
|
||||
#audi h1:after { content: ""; margin: 0; }
|
||||
#audi .ship { color: #ccc; }
|
||||
.spac { font-size: 100px; line-height: 200px; }
|
||||
.spac { width: 198px; height: 198px; border: 1px solid #000;
|
||||
text-align: center; float: left; cursor: pointer; }
|
||||
.spac[data-index="0-0"], .spac[data-index="1-0"], .spac[data-index="2-0"]
|
||||
{ border-left: 0; }
|
||||
.spac[data-index="0-0"], .spac[data-index="0-1"], .spac[data-index="0-2"]
|
||||
{ border-top: 0; }
|
||||
.spac[data-index="2-0"], .spac[data-index="2-1"], .spac[data-index="2-2"]
|
||||
{ border-bottom: 0; }
|
||||
.spac[data-index="0-2"], .spac[data-index="1-2"], .spac[data-index="2-2"]
|
||||
{ border-right: 0; }
|
@ -53,20 +53,23 @@ $(function() {
|
||||
state.plo = ""
|
||||
if(!state.plx)
|
||||
state.plx = ""
|
||||
$('#o .ship').toggleClass('waiting', (state.plo=="")).text(state.plo.slice(1))
|
||||
$('#x .ship').toggleClass('waiting', (state.plx=="")).text(state.plx.slice(1))
|
||||
$('#o .ship').toggleClass('waiting', (state.plo=="")).
|
||||
text(state.plo.slice(1))
|
||||
$('#x .ship').toggleClass('waiting', (state.plx=="")).
|
||||
text(state.plx.slice(1))
|
||||
}
|
||||
|
||||
message = function(mess) {
|
||||
mess = mess.split('"')[1]
|
||||
mess = mess.split("=")
|
||||
mess = "<div class='ship'>"+mess[0].slice(1)+"</div> ["+symb[lett.indexOf(mess[1].toLowerCase())+1]+"] WINS"
|
||||
mess = "<div class='ship'>"+mess[0].slice(1) +
|
||||
"</div> ["+symb[lett.indexOf(mess[1].toLowerCase())+1]+"] WINS"
|
||||
$('body').append('<div id="message">'+mess+'</div>')
|
||||
setTimeout(function() { $('#message').fadeOut().remove(); }, 2000)
|
||||
}
|
||||
|
||||
urb.appl = 'octo'
|
||||
urb.bind('/octo', function(err,res) {
|
||||
urb.appl = 'oct3'
|
||||
urb.bind('/oct3', function(err,res) {
|
||||
if(typeof(res.data) == 'string')
|
||||
return message(res.data)
|
||||
assign(res.data)
|
||||
@ -81,6 +84,6 @@ $(function() {
|
||||
data = $.map(
|
||||
$t.attr('data-index').split('-'),
|
||||
function(i) { return Number(i); })
|
||||
urb.send({mark:'octo-move',data:data})
|
||||
urb.send({mark:'oct3-move',data:data})
|
||||
})
|
||||
})
|
@ -1,151 +0,0 @@
|
||||
#what,
|
||||
#bord,
|
||||
#audi {
|
||||
width: 600px;
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
margin-left: -300px;
|
||||
}
|
||||
|
||||
#what {
|
||||
height: 36px;
|
||||
top: 18px;
|
||||
}
|
||||
|
||||
#bord {
|
||||
height: 600px;
|
||||
position: absolute;
|
||||
top: 111px;
|
||||
opacity: .3;
|
||||
}
|
||||
|
||||
#audi {
|
||||
top: 760px;
|
||||
}
|
||||
|
||||
.turn #bord {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
#message {
|
||||
position:absolute;
|
||||
left: 0; top: 0;
|
||||
width: 100%; height: 90px;
|
||||
line-height: 90px;
|
||||
background-color: #000;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#message .ship {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
#what {
|
||||
font-family: "bau";
|
||||
}
|
||||
|
||||
#what div {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.ship {
|
||||
padding: .3rem;
|
||||
font-weight: 400;
|
||||
letter-spacing: 1px;
|
||||
text-transform: uppercase;
|
||||
line-height:2rem;
|
||||
}
|
||||
|
||||
.ship:before {
|
||||
content: "~";
|
||||
font-weight: 500;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.waiting.ship:before {
|
||||
content: "Waiting";
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
#what #x,
|
||||
#what #o {
|
||||
border: 2px solid #fff;
|
||||
}
|
||||
|
||||
.x #what #x,
|
||||
.o #what #o {
|
||||
border: 2px solid red;
|
||||
}
|
||||
|
||||
#what #ship,
|
||||
#what #user {
|
||||
padding: .6rem;
|
||||
}
|
||||
|
||||
#what .as {
|
||||
width: 1.6rem;
|
||||
}
|
||||
|
||||
#audi h1,
|
||||
#vs {
|
||||
margin: 0 1rem;
|
||||
padding: .3rem;
|
||||
color: #fff;
|
||||
background-color: #000;
|
||||
}
|
||||
|
||||
#audi h1 {
|
||||
font-size: .9rem;
|
||||
text-transform: uppercase;
|
||||
display: inline-block;
|
||||
background-color: #ccc;
|
||||
}
|
||||
|
||||
#audi h1:after {
|
||||
content: "";
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#audi .ship {
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.spac {
|
||||
font-size: 100px;
|
||||
line-height: 200px;
|
||||
}
|
||||
|
||||
.spac {
|
||||
width: 198px;
|
||||
height: 198px;
|
||||
border: 1px solid #000;
|
||||
text-align: center;
|
||||
float: left;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.spac[data-index="0-0"],
|
||||
.spac[data-index="1-0"],
|
||||
.spac[data-index="2-0"] {
|
||||
border-left: 0;
|
||||
}
|
||||
|
||||
.spac[data-index="0-0"],
|
||||
.spac[data-index="0-1"],
|
||||
.spac[data-index="0-2"] {
|
||||
border-top: 0;
|
||||
}
|
||||
|
||||
.spac[data-index="2-0"],
|
||||
.spac[data-index="2-1"],
|
||||
.spac[data-index="2-2"] {
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.spac[data-index="0-2"],
|
||||
.spac[data-index="1-2"],
|
||||
.spac[data-index="2-2"] {
|
||||
border-right: 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user