From 1136b693fddb0a8f86aba59dc39fcea8d58d5f62 Mon Sep 17 00:00:00 2001 From: William Petit Date: Fri, 11 Sep 2015 16:25:45 +0200 Subject: [PATCH] Edition via drag & drop des items --- README.md | 2 +- css/style.css | 70 +++++++++- default-profile.json | 4 +- img/default-icon.svg | 62 ++++++++- img/hourglass.svg | 155 ++++++++++++++++++++- index.html | 3 +- js/app.jsx | 9 +- js/components/common/app-icon.jsx | 4 +- js/components/edit/desktop-app-item.jsx | 38 ++++- js/components/edit/desktop-app-list.jsx | 30 ++-- js/components/edit/edit-view.jsx | 45 +++++- js/components/edit/icon-theme-selector.jsx | 8 +- js/components/edit/item-form.jsx | 16 +++ js/components/edit/profile-tree.jsx | 67 +++++++++ js/components/edit/tree-item.jsx | 86 ++++++++++++ js/components/launcher/launcher-view.jsx | 2 +- js/components/mixins/lazy-load.js | 2 +- js/{ => store}/actions/edit.js | 24 +++- js/{ => store}/actions/index.js | 0 js/{ => store}/actions/launcher.js | 2 +- js/store/index.js | 4 +- js/store/middlewares/logger.js | 15 ++ js/store/reducers/desktop-apps.js | 4 +- js/store/reducers/profile.js | 67 ++++++++- js/util/debug.js | 11 +- package.json | 2 + 26 files changed, 665 insertions(+), 67 deletions(-) create mode 100644 js/components/edit/item-form.jsx create mode 100644 js/components/edit/profile-tree.jsx create mode 100644 js/components/edit/tree-item.jsx rename js/{ => store}/actions/edit.js (62%) rename js/{ => store}/actions/index.js (100%) rename js/{ => store}/actions/launcher.js (97%) create mode 100644 js/store/middlewares/logger.js diff --git a/README.md b/README.md index 57238a9..7b28bee 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ git clone https://forge.cadoles.com/wpetit/pitaya.git cd pitaya git checkout develop npm install -npm start +DEBUG=pitaya* npm start ``` ## Options diff --git a/css/style.css b/css/style.css index 3ad4842..f6656b7 100644 --- a/css/style.css +++ b/css/style.css @@ -6,7 +6,6 @@ html, body { padding: 0; margin: 0; font-family: 'Droid Sans', 'Ubuntu Sans', sans-serif; - background: url('../img/background.png') no-repeat; background-size: contain; background-position: center; background-color: rgb(34, 107, 160); @@ -16,6 +15,11 @@ html, body { overflow-x: hidden; } +.alert.alert-default { + border-radius: 4px; + border: 1px solid #ddd; +} + /* Launcher View */ .launcher { @@ -23,6 +27,7 @@ html, body { width: 100%; height: 100%; flex-direction: column; + background: url('../img/background.png') no-repeat; } .launcher .category-header { @@ -109,27 +114,80 @@ html, body { width: 100%; height: 100%; flex-direction: column; - align-items: flex-start; } -.edit ul.desktop-apps { +.edit .workspace { + display: flex; + flex-direction: row; + padding: 10px; +} + +.edit .left-menu { + display: flex; + flex-direction: column; + flex: 1; +} + +.edit .item-form { + display: flex; + flex-direction: row; + flex: 1; +} + +.edit .apps-list .icon-theme-selector > select { + width: 100%; +} + +.edit .apps-list ul.desktop-apps { list-style: none; padding: 0; overflow-y: auto; + height: 100%; + margin: 10px 0 0 0; + padding: 0 10px 0 0; } -.edit li.desktop-app { +.edit .apps-list li.desktop-app { } .edit .desktop-app > .app-icon { - height: 50px; - width: 50px; + height: 35px; + width: 35px; display: inline-block; vertical-align: middle; margin-right: 10px; } +.edit .profile-tree { + flex: 3; + padding: 0 5px; +} + +.edit .profile-tree ul { + list-style: none; + margin: 0; +} + +.edit .profile-tree > .tree-item > ul { + padding: 0; +} + +.edit .profile-tree .tree-item .alert { + padding: 5px; + margin-bottom: 2px; +} + +.edit .profile-tree .tree-item .app-icon { + height: 25px; + margin-right: 5px; +} + +.edit .app-item-edit { + flex: 1; + padding: 0 5px; +} + /* Animations */ .pulse { diff --git a/default-profile.json b/default-profile.json index 864289a..76d3279 100644 --- a/default-profile.json +++ b/default-profile.json @@ -9,7 +9,7 @@ "icon": "chromium-browser", "items": [ { - "label": "Chromium Browser", + "label": "Chromium Browser 1", "icon": "chromium-browser", "exec": "/usr/bin/chromium-browser" } @@ -24,7 +24,7 @@ "icon": "chromium-browser", "items": [ { - "label": "Chromium Browser", + "label": "Chromium Browser 2", "icon": "chromium-browser", "exec": "/usr/bin/chromium-browser" } diff --git a/img/default-icon.svg b/img/default-icon.svg index 142398b..a1f872c 100644 --- a/img/default-icon.svg +++ b/img/default-icon.svg @@ -1 +1,61 @@ - + + + + + + image/svg+xml + + + + + + + + + diff --git a/img/hourglass.svg b/img/hourglass.svg index 5a3e56c..f73d114 100644 --- a/img/hourglass.svg +++ b/img/hourglass.svg @@ -1 +1,154 @@ - \ No newline at end of file + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/index.html b/index.html index aad2c75..af268f4 100644 --- a/index.html +++ b/index.html @@ -2,12 +2,13 @@ Lanceur - Pitaya +
- +