Merge branch 'apps' of https://github.com/urbit/urbit into work

Conflicts:
	urb/zod/ape/work.hoon
This commit is contained in:
Philip C Monk 2015-08-20 16:51:11 -04:00
commit 1709676d15
7 changed files with 60 additions and 29 deletions

View File

@ -144,7 +144,7 @@
:_ |
?~ existing-task from
(~(uni in audience.u.existing-task) from)
=. sort ?~(existing-task sort [id.action sort])
=. sort ?~(existing-task sort [id.tax.action sort])
[~ +>.$]
::
%claim
@ -240,7 +240,7 @@
initialize
=^ mof +>.$
?- -.cod
%new abet:create:(at +.cod)
%new abet:create:(at [+ -]:+.cod)
%old abet:(process-update:(at (~(got by tasks) id.cod)) dif.cod)
%sort ~|(%not-implemented !!)
==

View File

@ -49,10 +49,10 @@
==
++ id (ci (slat %uv) so)
++ ship (su fed:ag)
++ coma (of new/new old/(ot id/id dif/uppd ~) sort/(ar id) ~)
++ new (ot task/task audience/audi ~)
++ coma (of new/task old/(ot id/id dif/uppd ~) sort/(ar id) ~)
++ task
%- ot :~
audience/audi
id/id date-created/di
version/ni date-modified/di
owner/ship status/(ci (soft status) so)
@ -60,7 +60,8 @@
done/(mu di) title/so
description/so discussion/(ar (ot date/di ship/ship body/so ~))
==
++ audi (as (ot ship/ship span/so ~))
++ audi (as stan)
++ stan (su ;~((glue fas) ;~(pfix sig fed:ag) urs:ab))
++ uppd
%- of :~
own/(of announce/ul claim/ul ~)

View File

@ -17,7 +17,8 @@ module.exports =
title:''
description:''
discussion:[]
Persistence.put "new": task:item, audience:[]
audience:[window.util.talk.mainStationPath window.urb.ship]
Persistence.put "new":item
Dispatcher.handleViewAction {type:'newItem', index, item}
setFilter: (key,val) ->
@ -39,7 +40,7 @@ module.exports =
to:to
removeItem: (index,id) ->
Persistence.put old:{id,dif:set:done:Date.now()}
Persistence.put old:{id,dif:set:done:true}
Dispatcher.handleViewAction
type:'removeItem'
index:index

View File

@ -22,13 +22,11 @@ module.exports = {
tags: [],
title: '',
description: '',
discussion: []
discussion: [],
audience: [window.util.talk.mainStationPath(window.urb.ship)]
};
Persistence.put({
"new": {
task: item,
audience: []
}
"new": item
});
return Dispatcher.handleViewAction({
type: 'newItem',
@ -63,7 +61,7 @@ module.exports = {
id: id,
dif: {
set: {
done: Date.now()
done: true
}
}
}
@ -1065,8 +1063,8 @@ _list = [
"date-created": new Date('2015-8-18'),
"date-modified": new Date('2015-8-18'),
"date-due": null,
owner: "~talsur-todres",
audience: ["doznec/urbit-meta", "doznec/tlon"],
owner: "talsur-todres",
audience: ["~doznec/urbit-meta", "~doznec/tlon"],
status: "working",
tags: ['food', 'office'],
title: 'get groceries',
@ -1084,8 +1082,8 @@ _list = [
"date-created": new Date('2015-8-18'),
"date-modified": new Date('2015-8-18'),
"date-due": null,
owner: "~talsur-todres",
audience: ["doznec/tlon"],
owner: "talsur-todres",
audience: ["~doznec/tlon"],
status: "working",
tags: ['home', 'office'],
title: 'eat',
@ -1097,8 +1095,8 @@ _list = [
"date-created": new Date('2015-8-18'),
"date-modified": new Date('2015-8-18'),
"date-due": null,
owner: "~talsur-todres",
audience: ["doznec/tlon"],
owner: "talsur-todres",
audience: ["~doznec/tlon"],
status: "working",
tags: ['home'],
title: 'sleep',
@ -1200,8 +1198,7 @@ WorkStore = assign({}, EventEmitter.prototype, {
var _item, index, item;
index = arg.index, item = arg.item;
_item = _.extend({
sort: index,
audience: []
sort: index
}, item);
_item["date-created"] = new Date(item["date-created"]);
_item["date-modified"] = new Date(item["date-modified"]);
@ -1269,6 +1266,25 @@ module.exports = {
} else {
return $('body').removeClass('scrolling');
}
},
talk: {
mainStations: ["court", "floor", "porch"],
mainStationPath: function(user) {
return "~" + user + "/" + (window.util.talk.mainStation(user));
},
mainStation: function(user) {
if (!user) {
user = window.urb.user;
}
switch (user.length) {
case 3:
return "court";
case 6:
return "floor";
case 13:
return "porch";
}
}
}
};

View File

@ -8,8 +8,8 @@ _list = [
"date-created":new Date('2015-8-18')
"date-modified":new Date('2015-8-18')
"date-due":null
owner:"~talsur-todres"
audience:["doznec/urbit-meta","doznec/tlon"]
owner:"talsur-todres"
audience:["~doznec/urbit-meta","~doznec/tlon"]
status:"working"
tags:['food','office']
title:'get groceries'
@ -27,8 +27,8 @@ _list = [
"date-created":new Date('2015-8-18')
"date-modified":new Date('2015-8-18')
"date-due":null
owner:"~talsur-todres"
audience:["doznec/tlon"]
owner:"talsur-todres"
audience:["~doznec/tlon"]
status:"working"
tags:['home','office']
title:'eat'
@ -40,8 +40,8 @@ _list = [
"date-created":new Date('2015-8-18')
"date-modified":new Date('2015-8-18')
"date-due":null
owner:"~talsur-todres"
audience:["doznec/tlon"]
owner:"talsur-todres"
audience:["~doznec/tlon"]
status:"working"
tags:['home']
title:'sleep'
@ -100,7 +100,7 @@ WorkStore = assign {},EventEmitter.prototype,{
_sorts[key] = val
newItem: ({index,item}) ->
_item = _.extend {sort:index,audience:[]}, item
_item = _.extend {sort:index}, item
_item["date-created"]=new Date item["date-created"]
_item["date-modified"]=new Date item["date-modified"]
_list.splice index,0,_item

View File

@ -23,3 +23,16 @@ module.exports =
$('body').addClass 'scrolling'
else
$('body').removeClass 'scrolling'
talk:
mainStations: ["court","floor","porch"]
mainStationPath: (user) -> "~#{user}/#{window.util.talk.mainStation(user)}"
mainStation: (user) ->
if not user then user = window.urb.user
switch user.length
when 3
return "court"
when 6
return "floor"
when 13
return "porch"

View File

@ -29,7 +29,7 @@
==
++ status ?(%announced %released %accepted)
++ command
$% [%new task audience=(set station:talk)]
$% [%new audience=(set station:talk) task]
[%old id=@uvH dif=update]
[%sort p=(list ,@uvH)]
==