diff --git a/build/main.js b/build/main.js index 06c51d3..9e8770f 100644 --- a/build/main.js +++ b/build/main.js @@ -30280,10 +30280,21 @@ var Breadcrumb = (function (_Component) { _react2['default'].createElement( 'div', null, + _react2['default'].createElement('span', { onClick: this.goUp, className: 'icon-up' }), els ) ); } + }, { + key: 'goUp', + value: function goUp() { + var current = store.getState().get('cwd'); + var up = current.split('/').slice(0, -1).join('/'); + + if (up === current) return; + + store.dispatch((0, _actionsChangedir2['default'])(up)); + } }]); var _Breadcrumb = Breadcrumb; diff --git a/build/style.css b/build/style.css index 0a60ef6..20584e9 100644 --- a/build/style.css +++ b/build/style.css @@ -59,6 +59,19 @@ .icon-cross svg * { fill: white; } +.icon-up { + display: block; + display: inline-block; + border: 11px solid transparent; + border-right-color: #63b0cd; + border-top-width: 8px; + border-bottom-width: 8px; + border-radius: 3px; + margin-right: 0.5rem; + position: relative; + top: 2px; + right: 0.5rem; +} .regular-medium { font-weight: normal; } @@ -365,7 +378,9 @@ header button { background: none; border: none; width: 8rem; - height: 4rem; + height: 3rem; + padding-top: 1rem; + margin-top: -1rem; } header button::before { content: ''; diff --git a/design/userinterface.sketch b/design/userinterface.sketch index e5d10be..20e6622 100644 Binary files a/design/userinterface.sketch and b/design/userinterface.sketch differ diff --git a/releases/hawk-1.0.0.zip b/releases/hawk-1.0.0.zip index 271a518..889c6d3 100644 Binary files a/releases/hawk-1.0.0.zip and b/releases/hawk-1.0.0.zip differ diff --git a/src/js/components/breadcrumb.js b/src/js/components/breadcrumb.js index d96dd49..a40b4d4 100644 --- a/src/js/components/breadcrumb.js +++ b/src/js/components/breadcrumb.js @@ -41,11 +41,21 @@ export default class Breadcrumb extends Component { return (
+ {els}
); } + + goUp() { + let current = store.getState().get('cwd'); + let up = current.split('/').slice(0, -1).join('/'); + + if (up === current) return; + + store.dispatch(changedir(up)); + } } function props(state) { diff --git a/src/less/components/header.less b/src/less/components/header.less index eeadaa2..f0a3d3a 100644 --- a/src/less/components/header.less +++ b/src/less/components/header.less @@ -28,7 +28,9 @@ header { border: none; width: 8rem; - height: 4rem; + height: 3rem; + padding-top: 1rem; + margin-top: -1rem; &::before { content: ''; diff --git a/src/less/icons.less b/src/less/icons.less index 839d764..97f68a9 100644 --- a/src/less/icons.less +++ b/src/less/icons.less @@ -65,3 +65,20 @@ fill: white; } } + +.icon-up { + .icon; + display: inline-block; + + border: 11px solid transparent; + border-right-color: @blue; + border-top-width: 8px; + border-bottom-width: 8px; + border-radius: 3px; + + margin-right: 0.5rem; + + position: relative; + top: 2px; + right: 0.5rem; +}