mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-24 23:44:56 +03:00
various: remove trailing whitespace
This commit is contained in:
parent
16ae3b7298
commit
fcf1846b6f
@ -77,7 +77,7 @@
|
||||
?+ -.sign (on-agent:def wire sign)
|
||||
%watch-ack
|
||||
=^ cards state
|
||||
(watch-ack:cc wire p.sign)
|
||||
(watch-ack:cc wire p.sign)
|
||||
[cards this]
|
||||
::
|
||||
%kick
|
||||
|
@ -137,7 +137,7 @@
|
||||
==
|
||||
==
|
||||
::
|
||||
++ on-arvo
|
||||
++ on-arvo
|
||||
|= [=wire =sign-arvo]
|
||||
^- (quip card _this)
|
||||
?. ?=(%bound +<.sign-arvo)
|
||||
@ -176,7 +176,7 @@
|
||||
=/ pax t.t.t.t.site.url
|
||||
=/ envelopes (envelope-scry [(scot %ud start) (scot %ud end) pax])
|
||||
%- json-response:gen
|
||||
%- json-to-octs
|
||||
%- json-to-octs
|
||||
%- update-to-json
|
||||
[%messages pax start end envelopes]
|
||||
::
|
||||
|
@ -12,12 +12,12 @@
|
||||
<link rel="stylesheet" href="/~chat/css/index.css" />
|
||||
<link rel="icon" type="image/png" href="/~launch/img/Favicon.png">
|
||||
<link rel="manifest"
|
||||
href='data:application/manifest+json,{
|
||||
"name": "Chat",
|
||||
"short_name": "Chat",
|
||||
"description": "A%20Chat%20application%20for%20your%20Urbit%20ship.",
|
||||
"display": "standalone",
|
||||
"background_color": "%23FFFFFF",
|
||||
href='data:application/manifest+json,{
|
||||
"name": "Chat",
|
||||
"short_name": "Chat",
|
||||
"description": "A%20Chat%20application%20for%20your%20Urbit%20ship.",
|
||||
"display": "standalone",
|
||||
"background_color": "%23FFFFFF",
|
||||
"theme_color": "%23000000"}' />
|
||||
|
||||
</head>
|
||||
|
@ -538,7 +538,7 @@
|
||||
$poke
|
||||
%- he-card(poy ~)
|
||||
:* %pass
|
||||
/poke
|
||||
/poke
|
||||
%agent
|
||||
p.p.mad
|
||||
%poke
|
||||
@ -1141,11 +1141,11 @@
|
||||
:: If couldn't search (eg cursor not in appropriate position), do
|
||||
:: nothing.
|
||||
::
|
||||
?: ?=(~ tl)
|
||||
?: ?=(~ tl)
|
||||
res
|
||||
:: If no options, ring the bell
|
||||
::
|
||||
?: =([~ ~] tl)
|
||||
?: =([~ ~] tl)
|
||||
(he-diff %bel ~)
|
||||
:: If only one option, don't print unless the option is already
|
||||
:: typed in.
|
||||
|
@ -1,4 +1,4 @@
|
||||
:: group-store: data store for groups of ships
|
||||
:: group-store: data store for groups of ships
|
||||
::
|
||||
/- *group-store
|
||||
/+ default-agent
|
||||
@ -27,7 +27,7 @@
|
||||
|_ =bowl:gall
|
||||
+* this .
|
||||
group-core +>
|
||||
gc ~(. group-core bowl)
|
||||
gc ~(. group-core bowl)
|
||||
def ~(. (default-agent this %|) bowl)
|
||||
::
|
||||
++ on-init on-init:def
|
||||
@ -75,9 +75,9 @@
|
||||
[%x *] ``noun+!>((~(get by groups) t.path))
|
||||
==
|
||||
::
|
||||
++ on-agent on-agent:def
|
||||
++ on-arvo on-arvo:def
|
||||
++ on-fail on-fail:def
|
||||
++ on-agent on-agent:def
|
||||
++ on-arvo on-arvo:def
|
||||
++ on-fail on-fail:def
|
||||
--
|
||||
::
|
||||
|_ bol=bowl:gall
|
||||
|
@ -83,7 +83,7 @@
|
||||
%+ give-simple-payload:app eyre-id.u.job.state
|
||||
[[200 ~] `(as-octt:mimes:html "\"Imported data\"")]
|
||||
::
|
||||
[%export ~]
|
||||
[%export ~]
|
||||
?+ -.sign (on-agent:def wire sign)
|
||||
%watch-ack
|
||||
?~ p.sign
|
||||
|
@ -243,7 +243,7 @@
|
||||
++ write-file
|
||||
=, space:userlib
|
||||
|= [pax=path cay=cage]
|
||||
^- card
|
||||
^- card
|
||||
=. pax (weld our-beak pax)
|
||||
[%pass (weld /write-file pax) %arvo %c %info (foal pax cay)]
|
||||
::
|
||||
|
@ -101,7 +101,7 @@
|
||||
=/ lismov [%pass /[(scot %da now.bol)] %arvo %i %request req out]~
|
||||
?~ timer
|
||||
:- [[%pass /timer %arvo %b %wait (add now.bol ~h3)] lismov]
|
||||
%= state
|
||||
%= state
|
||||
location str
|
||||
timer `(add now.bol ~h3)
|
||||
==
|
||||
|
@ -312,11 +312,11 @@
|
||||
++ take-agent
|
||||
|= [=wire =sign:agent:gall]
|
||||
?+ wire ~|([%kiln-bad-take-agent wire -.sign] !!)
|
||||
[%kiln %fancy *] ?> ?=(%poke-ack -.sign)
|
||||
[%kiln %fancy *] ?> ?=(%poke-ack -.sign)
|
||||
(take-coup-fancy t.t.wire p.sign)
|
||||
[%kiln %reload *] ?> ?=(%poke-ack -.sign)
|
||||
(take-coup-reload t.t.wire p.sign)
|
||||
[%kiln %spam *] ?> ?=(%poke-ack -.sign)
|
||||
[%kiln %spam *] ?> ?=(%poke-ack -.sign)
|
||||
(take-coup-spam t.t.wire p.sign)
|
||||
==
|
||||
::
|
||||
|
@ -117,7 +117,7 @@
|
||||
:- "%_"
|
||||
"""
|
||||
$\{1:target}
|
||||
$\{2:wing} $\{3:new-value}
|
||||
$\{2:wing} $\{3:new-value}
|
||||
==
|
||||
"""
|
||||
:- "%."
|
||||
@ -139,7 +139,7 @@
|
||||
:- "%*"
|
||||
"""
|
||||
$\{1:target-wing} $\{2:from}
|
||||
$\{3:wing} $\{4:new-value}
|
||||
$\{3:wing} $\{4:new-value}
|
||||
==
|
||||
"""
|
||||
:- "%^"
|
||||
@ -164,7 +164,7 @@
|
||||
:- "%="
|
||||
"""
|
||||
$\{1:target}
|
||||
$\{2:wing} $\{3:new-value}
|
||||
$\{2:wing} $\{3:new-value}
|
||||
==
|
||||
"""
|
||||
::
|
||||
@ -422,7 +422,7 @@
|
||||
:- "?-"
|
||||
"""
|
||||
$\{1:case}
|
||||
$\{2:type} $\{3:value}
|
||||
$\{2:type} $\{3:value}
|
||||
==
|
||||
"""
|
||||
:- "?:"
|
||||
@ -455,8 +455,8 @@
|
||||
"""
|
||||
:- "?+"
|
||||
"""
|
||||
$\{1:case} $\{2:else}
|
||||
$\{3:type} $\{4:value}
|
||||
$\{1:case} $\{2:else}
|
||||
$\{3:type} $\{4:value}
|
||||
==
|
||||
"""
|
||||
:- "?&"
|
||||
|
@ -83,7 +83,7 @@
|
||||
++ wush
|
||||
|= [wid=@u tan=tang]
|
||||
^- tape
|
||||
%- of-wall:format
|
||||
%- of-wall:format
|
||||
%+ turn (flop tan)
|
||||
|= =tank
|
||||
~! wid
|
||||
|
@ -4,7 +4,7 @@
|
||||
++ grab
|
||||
|%
|
||||
++ noun chat-action
|
||||
++ json
|
||||
++ json
|
||||
|= jon=^json
|
||||
(json-to-action jon)
|
||||
--
|
||||
|
@ -19,7 +19,7 @@
|
||||
++ add-owned
|
||||
%- ot
|
||||
:~ [%path pa]
|
||||
[%security sec]
|
||||
[%security sec]
|
||||
[%allow-history bo]
|
||||
==
|
||||
::
|
||||
|
@ -4,7 +4,7 @@
|
||||
++ grab
|
||||
|%
|
||||
++ noun chat-view-action
|
||||
++ json
|
||||
++ json
|
||||
|= jon=^json
|
||||
(json-to-view-action jon)
|
||||
--
|
||||
|
@ -4,7 +4,7 @@
|
||||
++ grab
|
||||
|%
|
||||
++ noun invite-action
|
||||
++ json
|
||||
++ json
|
||||
|= jon=^json
|
||||
(json-to-action jon)
|
||||
--
|
||||
|
@ -4,7 +4,7 @@
|
||||
++ grab
|
||||
|%
|
||||
++ noun permission-action
|
||||
++ json
|
||||
++ json
|
||||
|= jon=^json
|
||||
=< (parse-permission-action jon)
|
||||
|%
|
||||
|
@ -4,7 +4,7 @@
|
||||
++ grab
|
||||
|%
|
||||
++ noun permission-group-hook-action
|
||||
++ json
|
||||
++ json
|
||||
|= jon=^json
|
||||
(json-to-perm-group-hook-action jon)
|
||||
--
|
||||
|
@ -43,10 +43,10 @@
|
||||
:* %+ rash creator.txs
|
||||
;~(pfix (jest 'creator: ~') fed:ag)
|
||||
::
|
||||
%+ rash collection.txs
|
||||
%+ rash collection.txs
|
||||
;~(pfix (jest 'collection: ') (cook crip (star next)))
|
||||
::
|
||||
%+ rash post.txs
|
||||
%+ rash post.txs
|
||||
;~(pfix (jest 'post: ') (cook crip (star next)))
|
||||
::
|
||||
%+ rash date-created.txs
|
||||
|
@ -46,10 +46,10 @@
|
||||
:* %+ rash owner.txs
|
||||
;~(pfix (jest 'owner: ~') fed:ag)
|
||||
::
|
||||
%+ rash title.txs
|
||||
%+ rash title.txs
|
||||
;~(pfix (jest 'title: ') (cook crip (star next)))
|
||||
::
|
||||
%+ rash filename.txs
|
||||
%+ rash filename.txs
|
||||
;~(pfix (jest 'filename: ') (cook crip (star next)))
|
||||
::
|
||||
%+ rash comments.txs
|
||||
|
@ -13,14 +13,14 @@
|
||||
%+ frond -.rum
|
||||
?- -.rum
|
||||
%collection
|
||||
%- pairs
|
||||
%- pairs
|
||||
:~ [%coll s+col.rum]
|
||||
[%who (ship who.rum)]
|
||||
[%data (collection-build-to-json dat.rum)]
|
||||
==
|
||||
::
|
||||
%post
|
||||
%- pairs
|
||||
%- pairs
|
||||
:~ [%coll s+col.rum]
|
||||
[%post s+pos.rum]
|
||||
[%who (ship who.rum)]
|
||||
@ -28,7 +28,7 @@
|
||||
==
|
||||
::
|
||||
%comments
|
||||
%- pairs
|
||||
%- pairs
|
||||
:~ [%coll s+col.rum]
|
||||
[%post s+pos.rum]
|
||||
[%who (ship who.rum)]
|
||||
|
@ -2,7 +2,7 @@
|
||||
/+ publish
|
||||
/= result
|
||||
/^ (list comment:publish)
|
||||
/;
|
||||
/;
|
||||
|= comments=(map knot comment:publish)
|
||||
^- (list [comment-info:publish @t])
|
||||
%+ sort ~(val by comments)
|
||||
|
@ -3,7 +3,7 @@
|
||||
/= args /$ ,[beam *]
|
||||
/= result
|
||||
/^ [post-info:publish manx @t]
|
||||
/;
|
||||
/;
|
||||
|= $: post-front=(map knot cord)
|
||||
post-content=manx
|
||||
post-raw=wain
|
||||
|
@ -5,7 +5,7 @@
|
||||
:: if ship is foreign, delete any local
|
||||
:: group at that path and mirror the
|
||||
:: foreign group at our local path
|
||||
::
|
||||
::
|
||||
[%remove =path] :: remove the path.
|
||||
==
|
||||
--
|
||||
|
@ -637,7 +637,7 @@
|
||||
this.outstandingSubscriptions.set(
|
||||
id,
|
||||
{
|
||||
err: connectionErrFunc,
|
||||
err: connectionErrFunc,
|
||||
event: eventFunc,
|
||||
quit: quitFunc
|
||||
}
|
||||
|
@ -141,8 +141,8 @@
|
||||
++ test-list-murn
|
||||
%+ expect-eq
|
||||
!> ~[6 10]
|
||||
!> %+ murn `(list @)`~[2 3 4 5]
|
||||
|= [x=@]
|
||||
!> %+ murn `(list @)`~[2 3 4 5]
|
||||
|= [x=@]
|
||||
^- (unit)
|
||||
?: =((mod x 2) 0) ~
|
||||
(some (mul x 2))
|
||||
|
@ -308,7 +308,7 @@
|
||||
:~ :* duct=~[/http-blah] %give %response
|
||||
[%start [200 ['content-type' 'text/html']~] ~ %.n]
|
||||
== == ==
|
||||
|
||||
|
||||
;: weld
|
||||
results1
|
||||
results2
|
||||
|
@ -144,7 +144,7 @@ gulp.task('urbit-copy', function () {
|
||||
gulp.task('js-bundle-dev', gulp.series('jsx-transform', 'js-imports'));
|
||||
gulp.task('tile-js-bundle-dev', gulp.series('tile-jsx-transform', 'tile-js-imports'));
|
||||
gulp.task('js-bundle-prod', gulp.series('jsx-transform', 'js-imports', 'js-minify'))
|
||||
gulp.task('tile-js-bundle-prod',
|
||||
gulp.task('tile-js-bundle-prod',
|
||||
gulp.series('tile-jsx-transform', 'tile-js-imports', 'tile-js-minify'));
|
||||
|
||||
gulp.task('bundle-dev',
|
||||
|
@ -14,7 +14,7 @@ class UrbitApi {
|
||||
add: this.groupAdd.bind(this),
|
||||
remove: this.groupRemove.bind(this)
|
||||
};
|
||||
|
||||
|
||||
this.chat = {
|
||||
message: this.chatMessage.bind(this),
|
||||
read: this.chatRead.bind(this)
|
||||
@ -25,7 +25,7 @@ class UrbitApi {
|
||||
delete: this.chatViewDelete.bind(this),
|
||||
join: this.chatViewJoin.bind(this),
|
||||
};
|
||||
|
||||
|
||||
this.invite = {
|
||||
accept: this.inviteAccept.bind(this),
|
||||
decline: this.inviteDecline.bind(this),
|
||||
@ -36,7 +36,7 @@ class UrbitApi {
|
||||
bind(path, method, ship = this.authTokens.ship, app, success, fail, quit) {
|
||||
this.bindPaths = _.uniq([...this.bindPaths, path]);
|
||||
|
||||
window.subscriptionId = window.urb.subscribe(ship, app, path,
|
||||
window.subscriptionId = window.urb.subscribe(ship, app, path,
|
||||
(err) => {
|
||||
fail(err);
|
||||
},
|
||||
@ -59,7 +59,7 @@ class UrbitApi {
|
||||
window.urb.poke(ship, appl, mark, data,
|
||||
(json) => {
|
||||
resolve(json);
|
||||
},
|
||||
},
|
||||
(err) => {
|
||||
reject(err);
|
||||
});
|
||||
@ -142,7 +142,7 @@ class UrbitApi {
|
||||
}
|
||||
|
||||
chatViewJoin(ship, path, askHistory) {
|
||||
this.chatViewAction({
|
||||
this.chatViewAction({
|
||||
join: {
|
||||
ship, path,
|
||||
'ask-history': askHistory
|
||||
@ -153,9 +153,9 @@ class UrbitApi {
|
||||
inviteAction(data) {
|
||||
this.action("invite-store", "json", data);
|
||||
}
|
||||
|
||||
|
||||
inviteInvite(path, ship) {
|
||||
this.action("invite-hook", "json",
|
||||
this.action("invite-hook", "json",
|
||||
{
|
||||
invite: {
|
||||
path: '/chat',
|
||||
@ -180,7 +180,7 @@ class UrbitApi {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
inviteDecline(uid) {
|
||||
this.inviteAction({
|
||||
decline: {
|
||||
|
@ -64,7 +64,7 @@ export class ChatInput extends Component {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
bindShortcuts() {
|
||||
Mousetrap(this.textareaRef.current).bind('enter', e => {
|
||||
e.preventDefault();
|
||||
@ -173,7 +173,7 @@ export class ChatInput extends Component {
|
||||
const { props, state } = this;
|
||||
|
||||
this.bindShortcuts();
|
||||
|
||||
|
||||
return (
|
||||
<div className="pa3 cf flex black bt b--gray4" style={{ flexGrow: 1 }}>
|
||||
<div
|
||||
|
@ -23,12 +23,12 @@ export class ChatTabBar extends Component {
|
||||
setColor = 'gray3';
|
||||
}
|
||||
|
||||
(props.location.pathname.includes('/popout'))
|
||||
(props.location.pathname.includes('/popout'))
|
||||
? popout = "popout/"
|
||||
: popout = "";
|
||||
|
||||
let hidePopoutIcon = (this.props.popout)
|
||||
? "dn-m dn-l dn-xl"
|
||||
let hidePopoutIcon = (this.props.popout)
|
||||
? "dn-m dn-l dn-xl"
|
||||
: "dib-m dib-l dib-xl";
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@ export class SidebarSwitcher extends Component {
|
||||
let popoutSwitcher = this.props.popout
|
||||
? "dn-m dn-l dn-xl"
|
||||
: "dib-m dib-l dib-xl";
|
||||
|
||||
|
||||
return (
|
||||
<div className="pt2">
|
||||
<a
|
||||
|
@ -3,7 +3,7 @@ import React, { Component } from 'react';
|
||||
export class IconSpinner extends Component {
|
||||
render() {
|
||||
return (
|
||||
<div className="spinner-pending"></div>
|
||||
<div className="spinner-pending"></div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
import React, { Component } from 'react';
|
||||
import { sigil, reactRenderer } from 'urbit-sigil-js';
|
||||
|
||||
|
||||
|
||||
export class Sigil extends Component {
|
||||
render() {
|
||||
const { props } = this;
|
||||
|
@ -14,8 +14,8 @@ export class Message extends Component {
|
||||
let letter = props.msg.letter;
|
||||
|
||||
if ('code' in letter) {
|
||||
let outputElement =
|
||||
(!!letter.code.output &&
|
||||
let outputElement =
|
||||
(!!letter.code.output &&
|
||||
letter.code.output.length && letter.code.output.length > 0) ?
|
||||
(
|
||||
<pre className="clamp-attachment pa1 mt0 mb0">
|
||||
@ -70,7 +70,7 @@ export class Message extends Component {
|
||||
&& (chatroom[0] === letter.text))) { // entire message is room name?
|
||||
return (
|
||||
<Link
|
||||
className="bb b--black f7 mono lh-copy v-top"
|
||||
className="bb b--black f7 mono lh-copy v-top"
|
||||
to={"/~chat/join/" + chatroom.input}>
|
||||
{letter.text}
|
||||
</Link>
|
||||
@ -108,9 +108,9 @@ export class Message extends Component {
|
||||
<Sigil
|
||||
ship={props.msg.author}
|
||||
size={24}
|
||||
color={((props.msg.author === window.ship)
|
||||
color={((props.msg.author === window.ship)
|
||||
|| (props.msg.author.substr(1) === window.ship))
|
||||
? "#4330FC"
|
||||
? "#4330FC"
|
||||
: "#000000"}
|
||||
/>
|
||||
</div>
|
||||
|
@ -37,7 +37,7 @@ export class SidebarItem extends Component {
|
||||
|
||||
getLetter(lett) {
|
||||
if ('text' in lett) {
|
||||
return lett.text;
|
||||
return lett.text;
|
||||
} else if ('url' in lett) {
|
||||
return lett.url;
|
||||
} else if ('code' in lett) {
|
||||
@ -50,8 +50,8 @@ export class SidebarItem extends Component {
|
||||
render() {
|
||||
const { props, state } = this;
|
||||
|
||||
let unreadElem = !!props.unread
|
||||
? "fw7 green2"
|
||||
let unreadElem = !!props.unread
|
||||
? "fw7 green2"
|
||||
: "";
|
||||
|
||||
let title = props.title.substr(1);
|
||||
@ -59,7 +59,7 @@ export class SidebarItem extends Component {
|
||||
let description = this.getLetter(props.description);
|
||||
|
||||
let selectedCss = !!props.selected ? 'bg-gray5' : 'bg-white pointer';
|
||||
|
||||
|
||||
return (
|
||||
<div
|
||||
className={"z1 pa3 pt4 pb4 bb b--gray4 " + selectedCss}
|
||||
|
@ -51,8 +51,8 @@ export class MemberScreen extends Component {
|
||||
|
||||
let writeListMembers = writeGroup.map((mem) => {
|
||||
return (
|
||||
<MemberElement
|
||||
key={mem}
|
||||
<MemberElement
|
||||
key={mem}
|
||||
owner={deSig(props.match.params.ship)}
|
||||
ship={mem}
|
||||
path={`/chat${state.station}/write`}
|
||||
@ -63,8 +63,8 @@ export class MemberScreen extends Component {
|
||||
|
||||
let readListMembers = readGroup.map((mem) => {
|
||||
return (
|
||||
<MemberElement
|
||||
key={mem}
|
||||
<MemberElement
|
||||
key={mem}
|
||||
owner={deSig(props.match.params.ship)}
|
||||
ship={mem}
|
||||
path={`/chat${state.station}/read`}
|
||||
|
@ -28,7 +28,7 @@ export class NewScreen extends Component {
|
||||
componentDidUpdate(prevProps, prevState) {
|
||||
const { props, state } = this;
|
||||
|
||||
if (prevProps !== props) {
|
||||
if (prevProps !== props) {
|
||||
let station = `/~${window.ship}/${state.idName}`;
|
||||
if (station in props.inbox) {
|
||||
props.history.push('/~chat/room' + station);
|
||||
@ -81,7 +81,7 @@ export class NewScreen extends Component {
|
||||
let invalidChara = new RegExp(/[^a-z0-9/-]/);
|
||||
|
||||
let invalid = (
|
||||
(!state.idName) || (state.idName.startsWith("/")) ||
|
||||
(!state.idName) || (state.idName.startsWith("/")) ||
|
||||
(state.idName.includes("//")) || (invalidChara.test(state.idName))
|
||||
);
|
||||
|
||||
@ -132,7 +132,7 @@ export class NewScreen extends Component {
|
||||
|
||||
// TODO: don't do this, it's shitty
|
||||
let writeAud;
|
||||
let readAud;
|
||||
let readAud;
|
||||
|
||||
if (state.security === 'village') {
|
||||
aud.push(`~${window.ship}`);
|
||||
@ -202,7 +202,7 @@ export class NewScreen extends Component {
|
||||
<p className="f9 gray2 db mb4">
|
||||
Lowercase alphanumeric characters, dashes, and slashes only
|
||||
</p>
|
||||
<textarea
|
||||
<textarea
|
||||
className="f7 ba b--gray3 pa3 db w-100"
|
||||
placeholder="secret-chat"
|
||||
rows={1}
|
||||
|
@ -37,7 +37,7 @@ export class Root extends Component {
|
||||
let unreads = {};
|
||||
Object.keys(state.inbox).forEach((stat) => {
|
||||
let envelopes = state.inbox[stat].envelopes;
|
||||
|
||||
|
||||
if (envelopes.length === 0) {
|
||||
messagePreviews[stat] = false;
|
||||
} else {
|
||||
@ -47,7 +47,7 @@ export class Root extends Component {
|
||||
unreads[stat] =
|
||||
state.inbox[stat].config.length > state.inbox[stat].config.read;
|
||||
});
|
||||
|
||||
|
||||
let invites = '/chat' in state.invites ?
|
||||
state.invites['/chat'] : {};
|
||||
|
||||
|
@ -6,12 +6,12 @@ import { HeaderBar } from '/components/lib/header-bar.js';
|
||||
export class Skeleton extends Component {
|
||||
render() {
|
||||
|
||||
let sidebarHide = (!this.props.sidebarShown || this.props.popout)
|
||||
? "dn"
|
||||
let sidebarHide = (!this.props.sidebarShown || this.props.popout)
|
||||
? "dn"
|
||||
: "";
|
||||
|
||||
let sidebarHideOnMobile = this.props.sidebarHideOnMobile
|
||||
? "dn-s"
|
||||
let sidebarHideOnMobile = this.props.sidebarHideOnMobile
|
||||
? "dn-s"
|
||||
: "";
|
||||
|
||||
let chatHideOnMobile = this.props.chatHideonMobile
|
||||
@ -21,16 +21,16 @@ export class Skeleton extends Component {
|
||||
return (
|
||||
<div className="h-100 w-100 absolute">
|
||||
<HeaderBar spinner={this.props.spinner} popout={this.props.popout} />
|
||||
<div className={`cf w-100 absolute flex ` +
|
||||
((this.props.chatHideonMobile)
|
||||
<div className={`cf w-100 absolute flex ` +
|
||||
((this.props.chatHideonMobile)
|
||||
? "h-100 "
|
||||
: "h-100-minus-48-s ") +
|
||||
: "h-100-minus-48-s ") +
|
||||
((this.props.popout)
|
||||
? "h-100"
|
||||
: "h-100-minus-48-m h-100-minus-48-l h-100-minus-48-xl")}>
|
||||
<div className={
|
||||
`fl h-100 br b--gray4 overflow-x-hidden
|
||||
flex-basis-full-s flex-basis-300-m flex-basis-300-l
|
||||
`fl h-100 br b--gray4 overflow-x-hidden
|
||||
flex-basis-full-s flex-basis-300-m flex-basis-300-l
|
||||
flex-basis-300-xl ` +
|
||||
sidebarHide + " " +
|
||||
sidebarHideOnMobile
|
||||
|
@ -26,9 +26,9 @@ export class ChatUpdateReducer {
|
||||
messages(json, state) {
|
||||
let data = _.get(json, 'messages', false);
|
||||
if (data) {
|
||||
state.inbox[data.path].envelopes =
|
||||
state.inbox[data.path].envelopes =
|
||||
data.envelopes.concat(state.inbox[data.path].envelopes);
|
||||
state.inbox[data.path].config.length =
|
||||
state.inbox[data.path].config.length =
|
||||
state.inbox[data.path].config.length + data.envelopes.length;
|
||||
}
|
||||
}
|
||||
@ -60,7 +60,7 @@ export class ChatUpdateReducer {
|
||||
delete state.inbox[data.path];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
pending(json, state) {
|
||||
let msg = _.get(json, 'message', false);
|
||||
if (!msg || !state.pendingMessages.has(msg.path)) {
|
||||
@ -76,6 +76,6 @@ export class ChatUpdateReducer {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -46,6 +46,6 @@ export class PermissionUpdateReducer {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -18,12 +18,12 @@ export default class App extends Component {
|
||||
return (
|
||||
<BrowserRouter>
|
||||
<div>
|
||||
<Route exact path="/"
|
||||
<Route exact path="/"
|
||||
render={ (props) => {
|
||||
return (
|
||||
<Home
|
||||
<Home
|
||||
{...props}
|
||||
data={this.state}
|
||||
data={this.state}
|
||||
keys={new Set(Object.keys(this.state))}
|
||||
/>
|
||||
);
|
||||
|
@ -12,7 +12,7 @@ export default class Header extends Component {
|
||||
super(props);
|
||||
this.interval = null;
|
||||
this.timeout = null;
|
||||
|
||||
|
||||
this.state = {
|
||||
moment: moment()
|
||||
};
|
||||
@ -20,7 +20,7 @@ export default class Header extends Component {
|
||||
|
||||
componentDidMount() {
|
||||
let sec = parseInt(moment().format("s"), 10);
|
||||
|
||||
|
||||
this.timeout = setTimeout(() => {
|
||||
this.setState({
|
||||
moment: moment()
|
||||
@ -32,7 +32,7 @@ export default class Header extends Component {
|
||||
}, 60000);
|
||||
}, (60 - sec) * 1000);
|
||||
}
|
||||
|
||||
|
||||
componentWillUnmount() {
|
||||
clearTimeout(this.timeout);
|
||||
clearInterval(this.interval);
|
||||
|
@ -15,7 +15,7 @@ export default class Tile extends Component {
|
||||
return (
|
||||
<div className="fl ma2 bg-white overflow-hidden"
|
||||
style={{ height: '234px', width: '234px' }}>
|
||||
{ !!SpecificTile ?
|
||||
{ !!SpecificTile ?
|
||||
<SpecificTile data={this.props.data} />
|
||||
: <div></div>
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
class Api {
|
||||
bind(app, path, success, fail, ship) {
|
||||
window.urb.subscribe(ship, app, path,
|
||||
window.urb.subscribe(ship, app, path,
|
||||
(err) => {
|
||||
fail(err, app, path, ship);
|
||||
},
|
||||
@ -25,7 +25,7 @@ class Api {
|
||||
window.urb.poke(ship, appl, mark, data,
|
||||
(json) => {
|
||||
resolve(json);
|
||||
},
|
||||
},
|
||||
(err) => {
|
||||
reject(err);
|
||||
});
|
||||
|
@ -145,7 +145,7 @@ gulp.task('urbit-copy', function () {
|
||||
gulp.task('js-bundle-dev', gulp.series('jsx-transform', 'js-imports'));
|
||||
gulp.task('tile-js-bundle-dev', gulp.series('tile-jsx-transform', 'tile-js-imports'));
|
||||
gulp.task('js-bundle-prod', gulp.series('jsx-transform', 'js-imports', 'js-minify'))
|
||||
gulp.task('tile-js-bundle-prod',
|
||||
gulp.task('tile-js-bundle-prod',
|
||||
gulp.series('tile-jsx-transform', 'tile-js-imports', 'tile-js-minify'));
|
||||
|
||||
gulp.task('bundle-dev',
|
||||
|
@ -12,7 +12,7 @@ class UrbitApi {
|
||||
bind(path, method, ship = this.authTokens.ship, appl = "publish", success, fail) {
|
||||
this.bindPaths = _.uniq([...this.bindPaths, path]);
|
||||
|
||||
window.urb.subscribe(ship, appl, path,
|
||||
window.urb.subscribe(ship, appl, path,
|
||||
(err) => {
|
||||
fail(err);
|
||||
},
|
||||
|
@ -54,7 +54,7 @@ export class Blog extends Component {
|
||||
awaiting: false,
|
||||
pathData: [
|
||||
{ text: "Home", url: "/~publish/recent" },
|
||||
{ text: blog.info.title,
|
||||
{ text: blog.info.title,
|
||||
url: `/~publish/${blog.info.owner}/${blog.info.filename}` }
|
||||
],
|
||||
});
|
||||
@ -62,7 +62,7 @@ export class Blog extends Component {
|
||||
this.props.setSpinner(false);
|
||||
} else if (diff.data.remove) {
|
||||
if (diff.data.remove.post) {
|
||||
// XX TODO
|
||||
// XX TODO
|
||||
} else {
|
||||
this.props.history.push("/~publish/recent");
|
||||
}
|
||||
@ -203,7 +203,7 @@ export class Blog extends Component {
|
||||
blogHost: blog.info.owner,
|
||||
pathData: [
|
||||
{ text: "Home", url: "/~publish/recent" },
|
||||
{ text: blog.info.title,
|
||||
{ text: blog.info.title,
|
||||
url: `/~publish/${blog.info.owner}/${blog.info.filename}` }
|
||||
],
|
||||
};
|
||||
@ -279,7 +279,7 @@ export class Blog extends Component {
|
||||
let viewSettings = (this.props.ship === window.ship)
|
||||
? this.viewSettings
|
||||
: null;
|
||||
|
||||
|
||||
if (this.state.view === 'notes') {
|
||||
return (
|
||||
<div>
|
||||
|
@ -10,7 +10,7 @@ export class BlogNotes extends Component {
|
||||
|
||||
render() {
|
||||
if (!this.props.posts ||
|
||||
((this.props.posts.length === 0) &&
|
||||
((this.props.posts.length === 0) &&
|
||||
(this.props.ship === window.ship))) {
|
||||
let link = {
|
||||
pathname: "/~publish/new-post",
|
||||
|
@ -79,7 +79,7 @@ export class BlogSettings extends Component {
|
||||
|
||||
render() {
|
||||
let back = '<- Back to notes'
|
||||
let enableSave = ((this.state.title !== '') &&
|
||||
let enableSave = ((this.state.title !== '') &&
|
||||
(this.state.title !== this.props.title) &&
|
||||
!this.state.awaitingTitleChange);
|
||||
return (
|
||||
@ -93,7 +93,7 @@ export class BlogSettings extends Component {
|
||||
</p>
|
||||
<div className="flex">
|
||||
<div className="flex-col w-100">
|
||||
<p className="body-regular-400">Delete Notebook</p>
|
||||
<p className="body-regular-400">Delete Notebook</p>
|
||||
<p className="gray-50 label-small-2" style={{marginTop:12, marginBottom:8}}>
|
||||
Permanently delete this notebook
|
||||
</p>
|
||||
@ -102,7 +102,7 @@ export class BlogSettings extends Component {
|
||||
</button>
|
||||
</div>
|
||||
<div className="flex-col w-100">
|
||||
<p className="body-regular-400">Rename</p>
|
||||
<p className="body-regular-400">Rename</p>
|
||||
<p className="gray-50 label-small-2" style={{marginTop:12, marginBottom:23}}>
|
||||
Change the name of this notebook
|
||||
</p>
|
||||
|
@ -51,7 +51,7 @@ export class BlogSubs extends Component {
|
||||
.split(/[\s,]+/)
|
||||
.map(t => t.trim());
|
||||
|
||||
let valid = tokens.reduce((valid, s) =>
|
||||
let valid = tokens.reduce((valid, s) =>
|
||||
valid && ((s !== '~') && urbitOb.isValidPatp(s) && s.includes('~')), true);
|
||||
|
||||
if (valid) {
|
||||
@ -86,7 +86,7 @@ export class BlogSubs extends Component {
|
||||
|
||||
render() {
|
||||
let back = '<- Back to notes'
|
||||
|
||||
|
||||
let subscribers = this.props.subs.map((sub, i) => {
|
||||
return (
|
||||
<div className="flex w-100" key={i+1}>
|
||||
@ -113,7 +113,7 @@ export class BlogSubs extends Component {
|
||||
</p>
|
||||
<div className="flex">
|
||||
<div className="flex-col w-100">
|
||||
<p className="body-regular-400">Members</p>
|
||||
<p className="body-regular-400">Members</p>
|
||||
<p className="gray-50 label-small-2"
|
||||
style={{marginTop:12, marginBottom: 23}}>
|
||||
Everyone subscribed to this notebook
|
||||
@ -121,7 +121,7 @@ export class BlogSubs extends Component {
|
||||
{subscribers}
|
||||
</div>
|
||||
<div className="flex-col w-100">
|
||||
<p className="body-regular-400">Invite</p>
|
||||
<p className="body-regular-400">Invite</p>
|
||||
<p className="gray-50 label-small-2"
|
||||
style={{marginTop:12, marginBottom: 23}}>
|
||||
Invite people to subscribe to this notebook
|
||||
|
@ -52,7 +52,7 @@ export class CommentBox extends Component {
|
||||
? "body-regular-400 w-100"
|
||||
: "body-regular-400 w-100 gray-30";
|
||||
return (
|
||||
<div className="cb w-100 flex"
|
||||
<div className="cb w-100 flex"
|
||||
style={{paddingBottom: 8, marginTop: 32}}>
|
||||
<div className="fl" style={{marginRight: 10}}>
|
||||
<Sigil ship={this.props.our} size={36}/>
|
||||
@ -67,10 +67,10 @@ export class CommentBox extends Component {
|
||||
onChange={this.commentChange}
|
||||
disabled={(!this.props.enabled)}>
|
||||
</textarea>
|
||||
<PostButton
|
||||
post={this.props.post}
|
||||
<PostButton
|
||||
post={this.props.post}
|
||||
enabled={(Boolean(this.props.content) && this.props.enabled)}
|
||||
/>
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
@ -12,7 +12,7 @@ export class Comments extends Component {
|
||||
commentBody: '',
|
||||
awaiting: false,
|
||||
}
|
||||
|
||||
|
||||
this.toggleDisplay = this.toggleDisplay.bind(this);
|
||||
this.commentChange = this.commentChange.bind(this);
|
||||
this.postComment = this.postComment.bind(this);
|
||||
|
@ -30,7 +30,7 @@ export class HeaderMenu extends Component {
|
||||
<div className="fl bb b-gray-30 w-16" >
|
||||
</div>
|
||||
|
||||
<NavLink exact
|
||||
<NavLink exact
|
||||
className="header-menu-item"
|
||||
to="/~publish/recent"
|
||||
activeStyle={{
|
||||
@ -44,7 +44,7 @@ export class HeaderMenu extends Component {
|
||||
<div className="fl bb b-gray-30 w-16" >
|
||||
</div>
|
||||
|
||||
<NavLink exact
|
||||
<NavLink exact
|
||||
className="header-menu-item"
|
||||
to="/~publish/subs"
|
||||
activeStyle={{
|
||||
@ -58,7 +58,7 @@ export class HeaderMenu extends Component {
|
||||
<div className="fl bb b-gray-30 w-16" >
|
||||
</div>
|
||||
|
||||
<NavLink exact
|
||||
<NavLink exact
|
||||
className="header-menu-item"
|
||||
to="/~publish/pubs"
|
||||
activeStyle={{
|
||||
|
@ -3,7 +3,7 @@ import React, { Component } from 'react';
|
||||
export class IconSpinner extends Component {
|
||||
render() {
|
||||
return (
|
||||
<div className="spinner-pending"></div>
|
||||
<div className="spinner-pending"></div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
import React, { Component } from 'react';
|
||||
import { sigil, reactRenderer } from 'urbit-sigil-js';
|
||||
|
||||
|
||||
|
||||
export class Sigil extends Component {
|
||||
render() {
|
||||
const { props } = this;
|
||||
|
@ -57,7 +57,7 @@ class Preview extends Component {
|
||||
|
||||
let date = moment(previewProps.date).fromNow();
|
||||
let authorDate = `${previewProps.author} • ${date}`
|
||||
let collLink = "/~publish/" +
|
||||
let collLink = "/~publish/" +
|
||||
previewProps.blogOwner + "/" +
|
||||
previewProps.collectionName;
|
||||
let postLink = collLink + "/" + previewProps.postName;
|
||||
|
@ -32,7 +32,7 @@ export class PathControl extends Component {
|
||||
(last.lastMatch === '/~publish/:ship/:blog')){
|
||||
blog = (last.lastParams.ship.slice(1) == window.ship)
|
||||
? _.get(this.props, `pubs["${last.lastParams.blog}"]`, false)
|
||||
: _.get(this.props,
|
||||
: _.get(this.props,
|
||||
`subs["${last.lastParams.ship.slice(1)}"]["${last.lastParams.blog}"]`, false);
|
||||
}
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ export class PostBody extends Component {
|
||||
let page = this.parseContent(this.props.body.c,
|
||||
this.props.body.gn,
|
||||
this.props.body.ga,
|
||||
null);
|
||||
null);
|
||||
return page;
|
||||
}
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ export class PostPreview extends Component {
|
||||
: `${this.props.post.numComments} comments`;
|
||||
let date = moment(this.props.post.date).fromNow();
|
||||
let authorDate = `${this.props.post.author} • ${date}`
|
||||
let collLink = "/~publish/" +
|
||||
let collLink = "/~publish/" +
|
||||
this.props.post.blogOwner + "/" +
|
||||
this.props.post.collectionName;
|
||||
let postLink = collLink + "/" + this.props.post.postName;
|
||||
|
@ -38,7 +38,7 @@ export class RecentPreview extends Component {
|
||||
: `${this.props.post.numComments} comments`;
|
||||
let date = moment(this.props.post.date).fromNow();
|
||||
let authorDate = `~${this.props.post.author} • ${date}`
|
||||
let collLink = "/~publish/~" +
|
||||
let collLink = "/~publish/~" +
|
||||
this.props.post.blogOwner + "/" +
|
||||
this.props.post.collectionName;
|
||||
let postLink = collLink + "/" + this.props.post.postName;
|
||||
|
@ -5,7 +5,7 @@ import _ from 'lodash';
|
||||
const ReactSVGComponents = {
|
||||
svg: p => {
|
||||
return (
|
||||
<svg key={Math.random()}
|
||||
<svg key={Math.random()}
|
||||
version={'1.1'}
|
||||
xmlns={'http://www.w3.org/2000/svg'}
|
||||
{...p.attr}>
|
||||
@ -15,7 +15,7 @@ const ReactSVGComponents = {
|
||||
},
|
||||
circle: p => {
|
||||
return (
|
||||
<circle
|
||||
<circle
|
||||
key={Math.random()} {...p.attr}>
|
||||
{ _.map(_.get(p, 'children', []), child => ReactSVGComponents[child.tag](child)) }
|
||||
</circle>
|
||||
@ -23,8 +23,8 @@ const ReactSVGComponents = {
|
||||
},
|
||||
rect: p => {
|
||||
return (
|
||||
<rect
|
||||
key={Math.random()}
|
||||
<rect
|
||||
key={Math.random()}
|
||||
{...p.attr}>
|
||||
{ _.map(_.get(p, 'children', []), child => ReactSVGComponents[child.tag](child)) }
|
||||
</rect>
|
||||
@ -33,7 +33,7 @@ const ReactSVGComponents = {
|
||||
path: p => {
|
||||
return (
|
||||
<path
|
||||
key={Math.random()}
|
||||
key={Math.random()}
|
||||
{...p.attr}>
|
||||
{ _.map(_.get(p, 'children', []), child => ReactSVGComponents[child.tag](child)) }
|
||||
</path>
|
||||
@ -42,7 +42,7 @@ const ReactSVGComponents = {
|
||||
g: p => {
|
||||
return (
|
||||
<g
|
||||
key={Math.random()}
|
||||
key={Math.random()}
|
||||
{...p.attr}>
|
||||
{ _.map(_.get(p, 'children', []), child => ReactSVGComponents[child.tag](child)) }
|
||||
</g>
|
||||
@ -51,7 +51,7 @@ const ReactSVGComponents = {
|
||||
polygon: p => {
|
||||
return (
|
||||
<polygon
|
||||
key={Math.random()}
|
||||
key={Math.random()}
|
||||
{...p.attr}>
|
||||
{ _.map(_.get(p, 'children', []), child => ReactSVGComponents[child.tag](child)) }
|
||||
</polygon>
|
||||
@ -60,7 +60,7 @@ const ReactSVGComponents = {
|
||||
line: p => {
|
||||
return (
|
||||
<line
|
||||
key={Math.random()}
|
||||
key={Math.random()}
|
||||
{...p.attr}>
|
||||
{ _.map(_.get(p, 'children', []), child => ReactSVGComponents[child.tag](child)) }
|
||||
</line>
|
||||
@ -69,7 +69,7 @@ const ReactSVGComponents = {
|
||||
polyline: p => {
|
||||
return (
|
||||
<polyline
|
||||
key={Math.random()}
|
||||
key={Math.random()}
|
||||
{...p.attr}>
|
||||
{ _.map(_.get(p, 'children', []), child => ReactSVGComponents[child.tag](child)) }
|
||||
</polyline>
|
||||
|
@ -81,7 +81,7 @@ export class NewBlog extends Component {
|
||||
this.setState({
|
||||
awaiting: blogId
|
||||
});
|
||||
|
||||
|
||||
this.props.setSpinner(true);
|
||||
|
||||
this.props.api.action("publish", "publish-action", makeBlog);
|
||||
@ -92,7 +92,7 @@ export class NewBlog extends Component {
|
||||
if (this.state.awaiting) {
|
||||
if (this.props.pubs[this.state.awaiting]) {
|
||||
this.props.setSpinner(false);
|
||||
|
||||
|
||||
if (this.state.redirect === 'new-post') {
|
||||
this.props.history.push("/~publish/new-post",
|
||||
{
|
||||
@ -125,7 +125,7 @@ export class NewBlog extends Component {
|
||||
.split(/[\s,]+/)
|
||||
.map(t => t.trim());
|
||||
|
||||
let valid = tokens.reduce((valid, s) =>
|
||||
let valid = tokens.reduce((valid, s) =>
|
||||
valid && (((s !== '~') && urbitOb.isValidPatp(s) && s.includes('~')) ||
|
||||
(s === '')), true);
|
||||
|
||||
@ -167,7 +167,7 @@ export class NewBlog extends Component {
|
||||
className="header-2 b--none w-100"
|
||||
style={{resize:"none", height: this.titleHeight}}
|
||||
rows={1}
|
||||
type="text"
|
||||
type="text"
|
||||
name="blogName"
|
||||
placeholder="Add a Title"
|
||||
onChange={this.titleChange}>
|
||||
@ -217,7 +217,7 @@ export class NewBlog extends Component {
|
||||
className="header-2 b--none w-100"
|
||||
style={{resize:"none", height: this.titleHeight}}
|
||||
rows={1}
|
||||
type="text"
|
||||
type="text"
|
||||
name="blogName"
|
||||
placeholder="Add a Title"
|
||||
onChange={this.titleChange}>
|
||||
|
@ -63,7 +63,7 @@ class Error extends Component {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export class NewPost extends Component {
|
||||
constructor(props){
|
||||
super(props);
|
||||
@ -235,7 +235,7 @@ export class NewPost extends Component {
|
||||
post: this.state.posted.postId,
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
this.props.api.action("publish", "publish-action", del);
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@ export class NotFound extends Component {
|
||||
<div className="absolute w-100" style={{top:124}}>
|
||||
<div className="mw-688 center w-100">
|
||||
{back}
|
||||
<h2>Page Not Found</h2>
|
||||
<h2>Page Not Found</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -107,7 +107,7 @@ export class Post extends Component {
|
||||
editPost() {
|
||||
this.setState({mode: 'edit'});
|
||||
}
|
||||
|
||||
|
||||
savePost() {
|
||||
if (this.state.title == this.state.titleOriginal &&
|
||||
this.state.body == this.state.bodyOriginal) {
|
||||
@ -126,7 +126,7 @@ export class Post extends Component {
|
||||
who: [],
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
let data = {
|
||||
"edit-post": {
|
||||
who: this.state.ship,
|
||||
@ -157,7 +157,7 @@ export class Post extends Component {
|
||||
let postId = this.props.postId;
|
||||
|
||||
if (ship !== window.ship) {
|
||||
|
||||
|
||||
let blog = _.get(this.props, `subs["${ship}"]["${blogId}"]`, false);
|
||||
|
||||
if (blog) {
|
||||
@ -455,7 +455,7 @@ export class Post extends Component {
|
||||
<div className="mb4">
|
||||
<p className="fl label-small gray-50">{authorDate}</p>
|
||||
<Admin
|
||||
enabled={adminEnabled}
|
||||
enabled={adminEnabled}
|
||||
mode="view"
|
||||
editPost={this.editPost}
|
||||
deletePost={this.deletePost}
|
||||
@ -464,14 +464,14 @@ export class Post extends Component {
|
||||
|
||||
<div className="cb">
|
||||
<PostBody
|
||||
body={this.state.post.body}
|
||||
body={this.state.post.body}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<hr className="gray-50 w-680 mt4"/>
|
||||
<NextPrev blog={this.state.blog} postId={this.props.postId} />
|
||||
|
||||
<Comments comments={this.state.comments}
|
||||
|
||||
<Comments comments={this.state.comments}
|
||||
api={this.props.api}
|
||||
ship={this.props.ship}
|
||||
blogId={this.props.blogId}
|
||||
@ -511,7 +511,7 @@ export class Post extends Component {
|
||||
<div className="mb4">
|
||||
<p className="fl label-small gray-50">{authorDate}</p>
|
||||
<Admin
|
||||
enabled={adminEnabled}
|
||||
enabled={adminEnabled}
|
||||
mode="edit"
|
||||
savePost={this.savePost}
|
||||
deletePost={this.deletePost}
|
||||
@ -528,8 +528,8 @@ export class Post extends Component {
|
||||
|
||||
<hr className="gray-50 w-680 mt4"/>
|
||||
<NextPrev blog={this.state.blog} postId={this.props.postId} />
|
||||
|
||||
<Comments comments={this.state.comments}
|
||||
|
||||
<Comments comments={this.state.comments}
|
||||
api={this.props.api}
|
||||
ship={this.props.ship}
|
||||
blogId={this.props.blogId}
|
||||
|
@ -77,7 +77,7 @@ export class Pubs extends Component {
|
||||
|
||||
let invites = (this.props.invites.length > 0);
|
||||
let unread = (this.props.unread.length > 0);
|
||||
|
||||
|
||||
return (
|
||||
<div>
|
||||
<HM invites={invites} unread={unread}/>
|
||||
|
@ -14,7 +14,7 @@ export class Recent extends Component {
|
||||
buildRecent() {
|
||||
var recent = [];
|
||||
var group = {
|
||||
date: new Date(),
|
||||
date: new Date(),
|
||||
posts: [],
|
||||
};
|
||||
|
||||
|
@ -73,7 +73,7 @@ export class Root extends Component {
|
||||
<Skeleton
|
||||
spinner={this.state.spinner}
|
||||
children={
|
||||
<NewBlog api={api}
|
||||
<NewBlog api={api}
|
||||
{...this.state}
|
||||
setSpinner={this.setSpinner}
|
||||
{...props}/>
|
||||
|
@ -121,7 +121,7 @@ export class Subs extends Component {
|
||||
<p className="fl body-regular-400" style={{flexBasis:336}}>
|
||||
{data.lastUpdated}
|
||||
</p>
|
||||
<p className="fl body-regular-400 pointer"
|
||||
<p className="fl body-regular-400 pointer"
|
||||
style={{flexBasis:336}}
|
||||
onClick={this.unsubscribe.bind(this, data.host, data.blogId)}>
|
||||
Unsubscribe
|
||||
@ -148,12 +148,12 @@ export class Subs extends Component {
|
||||
<p className="fl body-regular-400" style={{flexBasis:336}}>
|
||||
</p>
|
||||
<p className="fl body-regular-400" style={{flexBasis:336}}>
|
||||
<span className="green underline pointer"
|
||||
<span className="green underline pointer"
|
||||
onClick={this.accept.bind(this, data.host, data.blogId)}>
|
||||
Accept
|
||||
</span>
|
||||
<span> </span>
|
||||
<span className="red underline pointer"
|
||||
<span className="red underline pointer"
|
||||
onClick={this.reject.bind(this, data.host, data.blogId)}>
|
||||
Reject
|
||||
</span>
|
||||
|
@ -6,7 +6,7 @@ export function stringToSymbol(str) {
|
||||
( (n >= 48) && (n <= 57) ))
|
||||
{
|
||||
result += str[i];
|
||||
} else if ( (n >= 65) && (n <= 90) )
|
||||
} else if ( (n >= 65) && (n <= 90) )
|
||||
{
|
||||
result += String.fromCharCode(n + 32);
|
||||
} else {
|
||||
|
@ -21,7 +21,7 @@ export class RumorReducer {
|
||||
if (json.who === window.ship) {
|
||||
if (json.post) {
|
||||
this.removePost(json, state);
|
||||
delete state.pubs[json.coll].posts[json.post];
|
||||
delete state.pubs[json.coll].posts[json.post];
|
||||
} else {
|
||||
|
||||
let postIds = Object.keys(state.pubs[json.coll].posts);
|
||||
@ -38,7 +38,7 @@ export class RumorReducer {
|
||||
} else {
|
||||
if (json.post) {
|
||||
this.removePost(json, state);
|
||||
delete state.subs[json.who][json.coll].posts[json.post];
|
||||
delete state.subs[json.who][json.coll].posts[json.post];
|
||||
} else {
|
||||
let postIds = Object.keys(state.subs[json.who][json.coll].posts);
|
||||
postIds.forEach((postId) => {
|
||||
@ -74,7 +74,7 @@ export class RumorReducer {
|
||||
if (state.pubs[json.coll]) {
|
||||
let pinIdx = state.pubs[json.coll].order.pin.indexOf(json.post);
|
||||
let unpinIdx = state.pubs[json.coll].order.unpin.indexOf(json.post);
|
||||
|
||||
|
||||
if (pinIdx != -1) {
|
||||
_.pullAt(state.pubs[json.coll].order.pin, [pinIdx]);
|
||||
}
|
||||
@ -84,11 +84,11 @@ export class RumorReducer {
|
||||
}
|
||||
} else {
|
||||
if (state.subs[json.who][json.coll]) {
|
||||
let pinIdx =
|
||||
let pinIdx =
|
||||
state.subs[json.who][json.coll].order.pin.indexOf(json.post);
|
||||
let unpinIdx =
|
||||
let unpinIdx =
|
||||
state.subs[json.who][json.coll].order.unpin.indexOf(json.post);
|
||||
|
||||
|
||||
if (pinIdx != -1) {
|
||||
_.pullAt(state.subs[json.who][json.coll].order.pin, [pinIdx]);
|
||||
}
|
||||
@ -167,7 +167,7 @@ export class RumorReducer {
|
||||
return;
|
||||
}
|
||||
|
||||
this.insertLatest(json, state);
|
||||
this.insertLatest(json, state);
|
||||
this.insertUnread(json, state);
|
||||
this.insertOrder(json, state);
|
||||
}
|
||||
|
@ -146,7 +146,7 @@ gulp.task('urbit-copy', function () {
|
||||
gulp.task('js-bundle-dev', gulp.series('jsx-transform', 'js-imports'));
|
||||
gulp.task('tile-js-bundle-dev', gulp.series('tile-jsx-transform', 'tile-js-imports'));
|
||||
gulp.task('js-bundle-prod', gulp.series('jsx-transform', 'js-imports', 'js-minify'))
|
||||
gulp.task('tile-js-bundle-prod',
|
||||
gulp.task('tile-js-bundle-prod',
|
||||
gulp.series('tile-jsx-transform', 'tile-js-imports', 'tile-js-minify'));
|
||||
|
||||
gulp.task('bundle-dev',
|
||||
|
@ -6,8 +6,8 @@ p, input {
|
||||
font-family: "Source Code Pro", monospace;
|
||||
}
|
||||
|
||||
textarea, select, input, button {
|
||||
outline: none;
|
||||
textarea, select, input, button {
|
||||
outline: none;
|
||||
-webkit-appearance: none;
|
||||
border: none;
|
||||
background-color: #fff;
|
||||
|
@ -11,7 +11,7 @@ class UrbitApi {
|
||||
bind(path, method, ship = this.authTokens.ship, appl = "dojo", success, fail) {
|
||||
this.bindPaths = _.uniq([...this.bindPaths, path]);
|
||||
|
||||
window.subscriptionId = window.urb.subscribe(ship, appl, path,
|
||||
window.subscriptionId = window.urb.subscribe(ship, appl, path,
|
||||
(err) => {
|
||||
fail(err);
|
||||
},
|
||||
@ -30,7 +30,7 @@ class UrbitApi {
|
||||
}
|
||||
|
||||
soto(data) {
|
||||
this.action("dojo", "sole-action",
|
||||
this.action("dojo", "sole-action",
|
||||
{id: this.authTokens.dojoId, dat: data}
|
||||
);
|
||||
}
|
||||
@ -40,7 +40,7 @@ class UrbitApi {
|
||||
window.urb.poke(ship, appl, mark, data,
|
||||
(json) => {
|
||||
resolve(json);
|
||||
},
|
||||
},
|
||||
(err) => {
|
||||
reject(err);
|
||||
});
|
||||
|
@ -4,7 +4,7 @@ export class History extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
}
|
||||
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div className="flex flex-column-reverse overflow-container"
|
||||
@ -18,5 +18,5 @@ export class History extends Component {
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export default History;
|
@ -12,7 +12,7 @@ export class Input extends Component {
|
||||
componentDidUpdate() {
|
||||
this.inputRef.current.setSelectionRange(this.props.cursor, this.props.cursor);
|
||||
}
|
||||
|
||||
|
||||
keyPress = (e) => {
|
||||
e.preventDefault();
|
||||
|
||||
@ -47,7 +47,7 @@ export class Input extends Component {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// tab completion
|
||||
else if (e.key === "Tab") {
|
||||
api.soto({tab: this.props.cursor});
|
||||
@ -68,8 +68,8 @@ render() {
|
||||
<span id="prompt">
|
||||
{this.props.prompt}
|
||||
</span>
|
||||
<input
|
||||
autoCorrect="false"
|
||||
<input
|
||||
autoCorrect="false"
|
||||
autoFocus={true}
|
||||
className="mono ml1 flex-auto dib w-100"
|
||||
cursor={this.props.cursor}
|
||||
|
@ -3,7 +3,7 @@ import React, { Component } from 'react';
|
||||
export class IconSpinner extends Component {
|
||||
render() {
|
||||
return (
|
||||
<div className="spinner-pending"></div>
|
||||
<div className="spinner-pending"></div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -12,11 +12,11 @@ export class Share {
|
||||
this.leg = leg;
|
||||
}
|
||||
|
||||
abet() {
|
||||
return { buf:this.buf,
|
||||
leg:this.leg.slice(),
|
||||
ven:this.ven.slice()
|
||||
};
|
||||
abet() {
|
||||
return { buf:this.buf,
|
||||
leg:this.leg.slice(),
|
||||
ven:this.ven.slice()
|
||||
};
|
||||
}
|
||||
|
||||
apply(ted){
|
||||
@ -59,7 +59,7 @@ export class Share {
|
||||
case 'ins': if ((at < dex.ins.at) ||
|
||||
((at === dex.ins.at) && !(cha <= dex.ins.cha))) {
|
||||
dex.ins.at++;
|
||||
}
|
||||
}
|
||||
else if (at >= dex.ins.at) {
|
||||
dex.ins.at = at; //NOTE possibly unpredictable behaviour
|
||||
dex.ins.at++; // for sole inserts that aren't tabs
|
||||
@ -82,9 +82,9 @@ export class Share {
|
||||
switch (false) {
|
||||
case 'nop' !== ted: return ted;
|
||||
case !ted.map:
|
||||
return ted.map( tad => {
|
||||
const res = this.inverse(tad);
|
||||
this.apply(tad);
|
||||
return ted.map( tad => {
|
||||
const res = this.inverse(tad);
|
||||
this.apply(tad);
|
||||
return res;
|
||||
}).reverse();
|
||||
default: switch (Object.keys(ted)[0]) {
|
||||
@ -97,18 +97,18 @@ export class Share {
|
||||
}
|
||||
|
||||
receive({ler,ted}){
|
||||
if (!(ler[1] === this.ven[1])) {
|
||||
if (!(ler[1] === this.ven[1])) {
|
||||
throw `-out-of-sync.[${str(ler)} ${str(this.ven)}]`;
|
||||
}
|
||||
this.leg = this.leg.slice((this.leg.length + ler[0]) - this.ven[0]);
|
||||
this.leg = this.leg.slice((this.leg.length + ler[0]) - this.ven[0]);
|
||||
const dat = this.transmute(this.leg, ted);
|
||||
this.ven[1]++;
|
||||
this.apply(dat);
|
||||
this.ven[1]++;
|
||||
this.apply(dat);
|
||||
return dat;
|
||||
}
|
||||
|
||||
remit() {
|
||||
throw 'stub';
|
||||
remit() {
|
||||
throw 'stub';
|
||||
}
|
||||
|
||||
transmit(ted){
|
||||
@ -126,12 +126,12 @@ export class Share {
|
||||
transpose(ted,pos){
|
||||
if (pos === undefined) {
|
||||
return this.transpose(this.leg, ted);
|
||||
}
|
||||
}
|
||||
else {
|
||||
let left;
|
||||
return ((left =
|
||||
return ((left =
|
||||
(this.transmute(
|
||||
ted, {ins: {at: pos}})).ins) != null ?
|
||||
ted, {ins: {at: pos}})).ins) != null ?
|
||||
left : { at:0 }
|
||||
).at;
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ export class Store {
|
||||
this.sync = this.sync.bind(this);
|
||||
this.print = this.print.bind(this);
|
||||
}
|
||||
|
||||
|
||||
handleEvent(data) {
|
||||
// recursive handler
|
||||
if (data.data) {
|
||||
@ -23,10 +23,10 @@ export class Store {
|
||||
var dojoReply = data;
|
||||
}
|
||||
// %mor sole-effects are nested, so throw back to handler
|
||||
if (dojoReply.map) {
|
||||
if (dojoReply.map) {
|
||||
return dojoReply.map(reply => this.handleEvent(reply));
|
||||
}
|
||||
|
||||
|
||||
switch(Object.keys(dojoReply)[0]) {
|
||||
case 'txt':
|
||||
return this.print(dojoReply.txt);
|
||||
@ -53,25 +53,25 @@ export class Store {
|
||||
default: console.log(dojoReply);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
doEdit(ted) {
|
||||
let detSend = buffer.transmit(ted);
|
||||
this.sync(ted);
|
||||
return api.soto({det: detSend});
|
||||
}
|
||||
|
||||
|
||||
print(txt) {
|
||||
let textLog = this.state.txt;
|
||||
textLog.push(txt);
|
||||
return this.setState({ txt: textLog });
|
||||
}
|
||||
|
||||
|
||||
sync(ted) {
|
||||
return this.setState({ input: buffer.buf,
|
||||
cursor: buffer.transpose(ted, this.state.cursor)
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
setStateHandler(setState) {
|
||||
this.setState = setState;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
class Api {
|
||||
bind(app, path, success, fail, ship) {
|
||||
window.urb.subscribe(ship, app, path,
|
||||
window.urb.subscribe(ship, app, path,
|
||||
(err) => {
|
||||
fail(err, app, path, ship);
|
||||
},
|
||||
@ -29,7 +29,7 @@ class Api {
|
||||
window.urb.poke(ship, appl, mark, data,
|
||||
(json) => {
|
||||
resolve(json);
|
||||
},
|
||||
},
|
||||
(err) => {
|
||||
reject(err);
|
||||
});
|
||||
|
@ -7,7 +7,7 @@ export default class Flashing extends Component {
|
||||
this.state = { color: "black" };
|
||||
}
|
||||
|
||||
//memory cleanup
|
||||
//memory cleanup
|
||||
componentWillUnmount() {
|
||||
this.alive = false;
|
||||
}
|
||||
@ -19,7 +19,7 @@ export default class Flashing extends Component {
|
||||
else if(this.state.color == "white") { this.setState({color: "black"}) }
|
||||
}
|
||||
},400);
|
||||
|
||||
|
||||
return <div style={{ color: this.state.color }}>
|
||||
{this.props.children}
|
||||
</div>
|
||||
|
@ -18,7 +18,7 @@ export default class VolumeIcon extends Component {
|
||||
this.toggleSound()}}>
|
||||
<img src=
|
||||
{
|
||||
on
|
||||
on
|
||||
?
|
||||
"~timer/img/volume-high.png"
|
||||
:
|
||||
|
@ -48,10 +48,10 @@ export default class TimerTile extends Component {
|
||||
}
|
||||
else if(props.data == "alarm" ) {
|
||||
//api still delivers alarm events for cancelled timers, so make sure that it's actually time to fire the alarm before doing so
|
||||
if( this.state && this.state.mode == "running" && this.state.time < 500 ) {
|
||||
if( this.state && this.state.mode == "running" && this.state.time < 500 ) {
|
||||
return {mode: "alarm", time:0};
|
||||
}
|
||||
else {
|
||||
else {
|
||||
if(!this.state) { return {mode: "waiting", time: timerLength} }
|
||||
else {
|
||||
//no change
|
||||
@ -64,7 +64,7 @@ export default class TimerTile extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
componentWillReceiveProps(newProps) {
|
||||
componentWillReceiveProps(newProps) {
|
||||
this.setState(this.getStateFromProps(newProps));
|
||||
}
|
||||
|
||||
@ -78,7 +78,7 @@ export default class TimerTile extends Component {
|
||||
|
||||
var easedRatio = ( -( Math.cos( Math.PI * ratio ) - 1 ) / 4) + (ratio/2);
|
||||
//from here https://easings.net/en#easeInOutSine
|
||||
|
||||
|
||||
|
||||
//define scale based on time elapsed
|
||||
var easedRatioCubic = ratio < 0.5 ?
|
||||
@ -94,13 +94,13 @@ export default class TimerTile extends Component {
|
||||
|
||||
var rotation = ((ratio+easedRatio)/2) * -1 * Math.PI;
|
||||
|
||||
//generate star shape thing
|
||||
//generate star shape thing
|
||||
var points = [];
|
||||
for(var i = 0; i < 14; i++) {
|
||||
var deg = i * (Math.PI / 7);
|
||||
var p = ptc( i % 2 == 0 ? 15 : 40, deg);
|
||||
|
||||
|
||||
|
||||
points[i] = p;
|
||||
}
|
||||
|
||||
@ -130,7 +130,7 @@ export default class TimerTile extends Component {
|
||||
ye = y + h, // y-end
|
||||
xm = x + w / 2, // x-middle
|
||||
ym = y + h / 2; // y-middle
|
||||
|
||||
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(x, ym);
|
||||
ctx.bezierCurveTo(x, ym - oy, xm - ox, y, xm, y);
|
||||
@ -140,7 +140,7 @@ export default class TimerTile extends Component {
|
||||
//ctx.closePath(); // not used correctly, see comments (use to close off open path)
|
||||
ctx.fill();
|
||||
}
|
||||
|
||||
|
||||
drawEllipse(ctx,-5,-5,10,10);
|
||||
|
||||
ctx.restore()
|
||||
@ -159,7 +159,7 @@ export default class TimerTile extends Component {
|
||||
ctx.beginPath();
|
||||
ctx.arc(outerSize/2, outerSize/2, innerSize/2, 0, 2 * Math.PI);
|
||||
ctx.fill();
|
||||
|
||||
|
||||
//draw line separating top from bottom
|
||||
ctx.strokeStyle = "black";
|
||||
ctx.beginPath();
|
||||
@ -169,13 +169,13 @@ export default class TimerTile extends Component {
|
||||
|
||||
this.greenPart(ctx);
|
||||
|
||||
if(this.state.mode == "running") {
|
||||
if(this.state.mode == "running") {
|
||||
var time = -1 * ((new Date()).getTime() - this.state.startTime);
|
||||
//javascript time can be ahead of the urbit alarm, so we dont want to show negative nubmers
|
||||
if(time < 0) { time = 0; }
|
||||
this.setState({time: time})
|
||||
}
|
||||
window.requestAnimationFrame(this.animate)
|
||||
window.requestAnimationFrame(this.animate)
|
||||
|
||||
}
|
||||
|
||||
@ -217,7 +217,7 @@ export default class TimerTile extends Component {
|
||||
|
||||
var interaction;
|
||||
var interactionStyle = "link underline black hover-white";
|
||||
if(this.state.mode == "running") {
|
||||
if(this.state.mode == "running") {
|
||||
interaction = <a className={interactionStyle} onClick={this.stopTimer}>Stop</a>;
|
||||
}
|
||||
else if(this.state.mode == "alarm") {
|
||||
@ -227,13 +227,13 @@ export default class TimerTile extends Component {
|
||||
interaction = <a className={interactionStyle} onClick={this.startTimer}>Start</a>;
|
||||
|
||||
}
|
||||
|
||||
|
||||
return this.renderWrapper((
|
||||
<div style={{ position: "relative",
|
||||
fontFamily: "-apple-system,BlinkMacSystemFont,avenir next,avenir,helvetica neue,helvetica,ubuntu,roboto,noto,segoe ui,arial,sans-serif"
|
||||
}}>
|
||||
<canvas id="timer-canvas" width={outerSize} height={outerSize}></canvas>
|
||||
|
||||
|
||||
<div id="timer-display" style={{
|
||||
width: "100%",
|
||||
textAlign: "center",
|
||||
@ -243,12 +243,12 @@ export default class TimerTile extends Component {
|
||||
fontSize:"28px",
|
||||
fontWeight:"300"
|
||||
}}>
|
||||
{this.state.mode == "running" ? this.formatTime(this.state.time) :
|
||||
{this.state.mode == "running" ? this.formatTime(this.state.time) :
|
||||
this.state.mode == "alarm" ?
|
||||
<div>
|
||||
<Flashing>00:00</Flashing>
|
||||
{
|
||||
this.state.playSound
|
||||
this.state.playSound
|
||||
?
|
||||
<audio src="http://maxwellsfoley.com/ding.mp3" loop={true} autoPlay/>
|
||||
:
|
||||
|
@ -145,7 +145,7 @@ gulp.task('tile-js-bundle-dev', gulp.series('tile-jsx-transform', 'tile-js-impor
|
||||
gulp.task('tile-js-bundle-prod',
|
||||
gulp.series('tile-jsx-transform', 'tile-js-imports', 'tile-js-minify'));
|
||||
|
||||
gulp.task('bundle-prod',
|
||||
gulp.task('bundle-prod',
|
||||
gulp.series('tile-js-bundle-prod', 'rename-tile-min', 'clean-min', 'urbit-copy'));
|
||||
|
||||
gulp.task('default', gulp.series('tile-js-bundle-dev', 'urbit-copy'));
|
||||
|
@ -8,14 +8,14 @@ class IconWithData extends Component {
|
||||
|
||||
return (
|
||||
<div className='mt2'>
|
||||
<img
|
||||
src={'/~weather/img/' + props.icon + '.png'}
|
||||
width={20}
|
||||
<img
|
||||
src={'/~weather/img/' + props.icon + '.png'}
|
||||
width={20}
|
||||
height={20}
|
||||
className="dib mr2" />
|
||||
<p className="label-small dib white">{props.text}</p>
|
||||
</div>
|
||||
);
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -87,7 +87,7 @@ export default class WeatherTile extends Component {
|
||||
let secureCheck;
|
||||
let error;
|
||||
if (this.state.error === true) {
|
||||
error = <p
|
||||
error = <p
|
||||
className="label-small red pt1">
|
||||
Incorrect latitude/longitude formatting. Please try again. <br/>
|
||||
(eg. "29.558107, -95.089023")
|
||||
@ -101,7 +101,7 @@ export default class WeatherTile extends Component {
|
||||
}
|
||||
return this.renderWrapper((
|
||||
<div>
|
||||
<a style={{"color": "white", "cursor": "pointer"}}
|
||||
<a style={{"color": "white", "cursor": "pointer"}}
|
||||
onClick={() => this.setState({manualEntry: !this.state.manualEntry})}>
|
||||
<-
|
||||
</a>
|
||||
@ -110,16 +110,16 @@ export default class WeatherTile extends Component {
|
||||
Please enter your <a className="white" href="https://latitudeandlongitude.org/" target="_blank">latitude and longitude</a>.</p>
|
||||
{error}
|
||||
<form className="flex absolute" style={{"bottom": 0, "left": 8}}>
|
||||
<input id="gps"
|
||||
className="white pa1 bg-transparent outline-0 bn bb-ns b--white"
|
||||
<input id="gps"
|
||||
className="white pa1 bg-transparent outline-0 bn bb-ns b--white"
|
||||
style={{width: "86%"}}
|
||||
type="text"
|
||||
placeholder="29.558107, -95.089023"
|
||||
type="text"
|
||||
placeholder="29.558107, -95.089023"
|
||||
onKeyDown={this.keyPress.bind(this)}>
|
||||
</input>
|
||||
<input className="bg-transparent inter white w-20 outliner-0 bn pointer"
|
||||
type="submit"
|
||||
onClick={() => this.manualLocationSubmit()}
|
||||
</input>
|
||||
<input className="bg-transparent inter white w-20 outliner-0 bn pointer"
|
||||
type="submit"
|
||||
onClick={() => this.manualLocationSubmit()}
|
||||
value="->">
|
||||
</input>
|
||||
</form>
|
||||
@ -156,12 +156,12 @@ export default class WeatherTile extends Component {
|
||||
onClick={() => this.setState({manualEntry: !this.state.manualEntry})}>Update location -></a>
|
||||
<div className="w-100 mb2 mt2 absolute"
|
||||
style={{left: 18, top: 28}}>
|
||||
<img
|
||||
src={'/~weather/img/' + c.icon + '.png'}
|
||||
width={64}
|
||||
<img
|
||||
src={'/~weather/img/' + c.icon + '.png'}
|
||||
width={64}
|
||||
height={64}
|
||||
className="dib" />
|
||||
<h2
|
||||
<h2
|
||||
className="dib ml2 white"
|
||||
style={{
|
||||
fontSize: 72,
|
||||
@ -173,24 +173,24 @@ export default class WeatherTile extends Component {
|
||||
<div className="w-100 cf absolute"
|
||||
style={{ left: 18, top: 118 }}>
|
||||
<div className="fl w-50">
|
||||
<IconWithData
|
||||
<IconWithData
|
||||
icon='winddirection'
|
||||
text={c.windBearing + '°'} />
|
||||
<IconWithData
|
||||
<IconWithData
|
||||
icon='chancerain'
|
||||
text={(c.precipProbability * 100) + '%'} />
|
||||
<IconWithData
|
||||
<IconWithData
|
||||
icon='windspeed'
|
||||
text={Math.round(c.windSpeed) + ' mph'} />
|
||||
</div>
|
||||
<div className="fr w-50">
|
||||
<IconWithData
|
||||
<IconWithData
|
||||
icon='sunset'
|
||||
text={da} />
|
||||
<IconWithData
|
||||
<IconWithData
|
||||
icon='low'
|
||||
text={Math.round(d.temperatureLow) + '°'} />
|
||||
<IconWithData
|
||||
<IconWithData
|
||||
icon='high'
|
||||
text={Math.round(d.temperatureHigh) + '°'} />
|
||||
</div>
|
||||
|
@ -24,7 +24,7 @@ u3wfu_fish(u3_noun cor)
|
||||
return pro;
|
||||
}
|
||||
else {
|
||||
pro = u3n_nock_on(u3k(cor), u3k(u3x_at(u3x_bat, cor)));
|
||||
pro = u3n_nock_on(u3k(cor), u3k(u3x_at(u3x_bat, cor)));
|
||||
return u3z_save(key, pro);
|
||||
}
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ _test_ames(void)
|
||||
u3_lane lan_u;
|
||||
lan_u.pip_w = 0x7f000001;
|
||||
lan_u.por_s = 12345;
|
||||
|
||||
|
||||
u3_noun lan = u3_ames_encode_lane(lan_u);
|
||||
u3_lane nal_u = u3_ames_decode_lane(u3k(lan));
|
||||
u3_lane nal_u2 = u3_ames_decode_lane(lan);
|
||||
|
@ -529,7 +529,7 @@ _cttp_creq_free(u3_creq* ceq_u)
|
||||
c3_free(ceq_u);
|
||||
}
|
||||
|
||||
/* _cttp_creq_new(): create a u3_creq from an +http-request
|
||||
/* _cttp_creq_new(): create a u3_creq from an +http-request
|
||||
*
|
||||
* If we were rewriting all of this from scratch, this isn't how we'd do it.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@ c3_w u3_readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result)
|
||||
{
|
||||
errno = 0;
|
||||
struct dirent * tmp_u = readdir(dirp);
|
||||
|
||||
|
||||
if (NULL == tmp_u){
|
||||
*result = NULL;
|
||||
return (errno); // either success or error code
|
||||
@ -27,10 +27,10 @@ c3_w u3_readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result)
|
||||
memcpy(entry, tmp_u, sizeof(struct dirent));
|
||||
*result = entry;
|
||||
}
|
||||
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* _unix_down(): descend path.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user