sawa 0.0.23 → 0.0.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 652379ac4b3382579fe045c1957f6cf4ebfdb845
4
- data.tar.gz: bb8e50bd04ce776b18a84d3a0102f552d08de601
3
+ metadata.gz: 4ce584694d5b0086c16cdfbb019d0fb73aa92536
4
+ data.tar.gz: 3c9bd94348dc092cf1867c3e7631136fa570c707
5
5
  SHA512:
6
- metadata.gz: 9b45c3e3308bc3111732aefb1d5df9ece40e6176e732e308599ab0dcd7357c2d47d5665cc672ee9df646f106c52c8feafc1f4eaf1d6fd5cac6177b64e721bae0
7
- data.tar.gz: bc142b7ff81c6e67d605eadfd857384f764a28ddbf098f04f42f56732863213e6470293d6fd8e95233d579f7644d6f96ad5564f31161399d92daadab8a1046d9
6
+ metadata.gz: 07daf224cab2b3367ff3896f5c799145c725b7f59c08648f45ab0d293313b401127ee11e0b65ba4a468f77b29f9e66b8d5f3722141d32329f7acd33d475acb9f
7
+ data.tar.gz: 6cfe1dc21b650f7605aacfb0224cdd9afe63376b569e1ed500f88f0cdd2a01950c865127b95ff040c84a73d454d4726a7a0bae87d711d20ca6728440759d39cd
@@ -1,18 +1,19 @@
1
1
  import React, { Component } from 'react';
2
2
  import CustomMenu from './components/CustomMenu';
3
3
  import { Link } from 'react-router-dom'
4
- import { Menu, Button } from 'semantic-ui-react'
4
+ import { Menu, Button, Dropdown } from 'semantic-ui-react'
5
5
 
6
6
  class Toolbar extends Component {
7
7
 
8
8
  constructor (props) {
9
9
  super(props)
10
10
  this.handleItemClick = (e, { name }) => this.setState({ activeItem: name })
11
- this.state = {activeItem: ""}
11
+ this.handleMastMenuClick = (e, { name }) => this.setState({ activeItem: name, activeTitle : e.target.text })
12
+ this.state = {activeItem: "", activeTitle: "テーブル管理"}
12
13
  }
13
14
 
14
15
  render() {
15
- const { activeItem } = this.state
16
+ const { activeItem, activeTitle } = this.state
16
17
  if(this.props.user === undefined || this.props.user === null){
17
18
  return (<Menu inverted pointing secondary>
18
19
  <Menu.Menu position='right'>
@@ -28,10 +29,14 @@ class Toolbar extends Component {
28
29
  const admin = this.props.user.role === "ADMIN"
29
30
  return(
30
31
  <Menu inverted pointing secondary>
32
+ <CustomMenu activeItem={activeItem} onClick={this.handleItemClick} user={this.props.user} />
33
+ <Dropdown item text={activeTitle} >
34
+ <Dropdown.Menu>
31
35
  {{# sheet_arr}}
32
- <Menu.Item style={ {display: admin ? 'block' : 'none'} } name='{{resource_path}}' active={activeItem === '{{resource_path}}'} as={Link} to='/{{resource_path}}' onClick={this.handleItemClick} >{{model_title}}</Menu.Item>
36
+ <Menu.Item style={ {display: admin ? 'block' : 'none'} } name='{{resource_path}}' active={activeItem === '{{resource_path}}'} as={Link} to='/{{resource_path}}' onClick={this.handleMastMenuClick} >{{model_title}}</Menu.Item>
33
37
  {{/ sheet_arr}}
34
- <CustomMenu activeItem={activeItem} onClick={this.handleItemClick} user={this.props.user} />
38
+ </Dropdown.Menu>
39
+ </Dropdown>
35
40
  <Menu.Menu position='right'>
36
41
  <Menu.Item as={Link} to='/logout'>
37
42
  <Button primary >Sign out</Button>
data/lib/sawa/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class Sawa
2
- VERSION = "0.0.23"
2
+ VERSION = "0.0.24"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sawa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.23
4
+ version: 0.0.24
5
5
  platform: ruby
6
6
  authors:
7
7
  - shouaya
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-19 00:00:00.000000000 Z
11
+ date: 2017-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler