publish: refine new groups layout

This commit is contained in:
Liam Fitzgerald 2020-09-25 10:44:24 +10:00
parent 24c9067921
commit 65e0fa1eb8
4 changed files with 32 additions and 20 deletions

View File

@ -11,6 +11,7 @@
[%2 *]
[%3 *]
[%4 state-zero]
[%5 state-zero]
==
::
+$ state-zero
@ -20,7 +21,7 @@
==
--
::
=| [%4 state-zero]
=| [%5 state-zero]
=* state -
%- agent:dbug
^- agent:gall
@ -35,48 +36,49 @@
%_ new-state
tiles
%- ~(gas by *tiles:store)
%+ turn `(list term)`[%chat %publish %links %weather %clock %dojo ~]
%+ turn `(list term)`[%weather %clock %dojo ~]
|= =term
:- term
^- tile:store
?+ term [[%custom ~] %.y]
%chat [[%basic 'Chat' '/~landscape/img/Chat.png' '/~chat'] %.y]
%links [[%basic 'Links' '/~landscape/img/Links.png' '/~link'] %.y]
%dojo [[%basic 'Dojo' '/~landscape/img/Dojo.png' '/~dojo'] %.y]
%publish
[[%basic 'Publish' '/~landscape/img/Publish.png' '/~publish'] %.y]
==
tile-ordering [%chat %publish %links %weather %clock %dojo ~]
tile-ordering [%weather %clock %dojo ~]
==
[~ this(state [%4 new-state])]
[~ this(state [%5 new-state])]
::
++ on-save !>(state)
++ on-load
|= old=vase
^- (quip card _this)
=/ old-state !<(versioned-state old)
?: ?=(%4 -.old-state)
|-
?: ?&(=(1 2) ?=(?(%4 %5) -.old-state))
:- [%pass / %arvo %e %disconnect [~ /]]~
this(state old-state)
=. tiles.old-state
(~(del by tiles.old-state) %chat)
=. tiles.old-state
(~(del by tiles.old-state) %publish)
=. tiles.old-state
(~(del by tiles.old-state) %links)
=. tile-ordering.old-state
(skip tile-ordering.old-state |=(=term ?=(?(%links %chat %publish) term)))
this(state [%5 +.old-state])
=/ new-state *state-zero
=. new-state
%_ new-state
tiles
%- ~(gas by *tiles:store)
%+ turn `(list term)`[%chat %publish %links %weather %clock %dojo ~]
%+ turn `(list term)`[%weather %clock %dojo ~]
|= =term
:- term
^- tile:store
?+ term [[%custom ~] %.y]
%chat [[%basic 'Chat' '/~landscape/img/Chat.png' '/~chat'] %.y]
%links [[%basic 'Links' '/~landscape/img/Links.png' '/~link'] %.y]
%dojo [[%basic 'Dojo' '/~landscape/img/Dojo.png' '/~dojo'] %.y]
%publish
[[%basic 'Publish' '/~landscape/img/Publish.png' '/~publish'] %.y]
==
tile-ordering [%chat %publish %links %weather %clock %dojo ~]
tile-ordering [%weather %clock %dojo ~]
==
:_ this(state [%4 new-state])
:_ this(state [%5 new-state])
%+ welp
:~ [%pass / %arvo %e %disconnect [~ /]]
:* %pass /srv %agent [our.bowl %file-server]

View File

@ -1809,6 +1809,15 @@
"csstype": "^2.2.0"
}
},
"@types/react-dom": {
"version": "16.9.8",
"resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-16.9.8.tgz",
"integrity": "sha512-ykkPQ+5nFknnlU6lDd947WbQ6TE3NNzbQAkInC2EKY1qeYdTKp7onFusmYZb+ityzx2YviqT6BXSu+LyWWJwcA==",
"dev": true,
"requires": {
"@types/react": "*"
}
},
"@types/react-native": {
"version": "0.63.4",
"resolved": "https://registry.npmjs.org/@types/react-native/-/react-native-0.63.4.tgz",

View File

@ -54,6 +54,7 @@
"@babel/preset-typescript": "^7.10.1",
"@types/lodash": "^4.14.155",
"@types/react": "^16.9.38",
"@types/react-dom": "^16.9.8",
"@types/react-router-dom": "^5.1.5",
"@types/styled-components": "^5.1.2",
"@types/styled-system": "^5.1.10",

View File

@ -103,7 +103,7 @@ export class Notebook extends PureComponent<
gridColumnGap={3}
>
<Box display={["block", "none"]} gridColumn={["1/2", "1/3"]}>
<Link to={props.rootUrl}>{"<- All Notebooks"}</Link>
<Link to={this.props.rootUrl}>{"<- All Notebooks"}</Link>
</Box>
<Box>
<Text> {notebook?.title}</Text>
@ -171,7 +171,7 @@ export class Notebook extends PureComponent<
host={ship}
book={book}
contacts={notebookContacts}
hideNicknames={props.hideNicknames}
hideNicknames={hideNicknames}
/>
</TabPanel>
<TabPanel>
@ -193,7 +193,7 @@ export class Notebook extends PureComponent<
api={api}
notebook={notebook}
contacts={notebookContacts}
associations={props.associations}
associations={associations}
groups={groups}
/>
</TabPanel>