🐛 Fix several issues in dashboard screens scroll

This commit is contained in:
Andrés Moya 2020-08-14 14:20:27 +02:00 committed by Andrey Antukh
parent 752038039c
commit 9d416cae4c
10 changed files with 285 additions and 288 deletions

View file

@ -41,8 +41,8 @@
(s/def ::is-shared ::us/boolean)
(s/def ::create-file
(s/keys :req-un [::profile-id ::name ::project-id ::is-shared]
:opt-un [::id]))
(s/keys :req-un [::profile-id ::name ::project-id]
:opt-un [::id ::is-shared]))
(sm/defmutation ::create-file
[{:keys [profile-id project-id] :as params}]
@ -61,7 +61,9 @@
:can-edit true}))
(defn create-file
[conn {:keys [id profile-id name project-id is-shared] :as params}]
[conn {:keys [id profile-id name project-id is-shared]
:or {is-shared false}
:as params}]
(let [id (or id (uuid/next))
file (db/insert! conn :file
{:id id

View file

@ -23,11 +23,12 @@
//#################################################
@import 'common/base';
@import 'main/layouts/main-layout';
@import 'main/layouts/login';
@import 'main/layouts/main-layout';
@import 'main/layouts/projects-page';
@import 'main/layouts/libraries-page';
@import 'main/layouts/recent-files-page';
@import 'main/layouts/search-page';
@import "main/layouts/not-found";
@import "main/layouts/viewer";

View file

@ -1,5 +1,6 @@
.libraries-page {
padding: 1rem;
height: 100%;
background-color: $color-white;
flex: 1 0 0;
overflow-y: auto;
}

View file

@ -31,6 +31,8 @@
.dashboard-content {
background-color: lighten($color-gray-10, 5%);
display: flex;
flex-direction: column;
}
.verify-token {

View file

@ -1,5 +1,6 @@
.projects-page {
padding: 1rem;
height: 100%;
background-color: $color-white;
flex: 1 0 0;
overflow-y: auto;
}

View file

@ -1,7 +1,7 @@
.recent-files-page {
overflow: scroll;
height: 100%;
background-color: $color-white;
flex: 1 0 0;
overflow-y: auto;
}
.recent-files-row {

View file

@ -1,3 +1,6 @@
.search-page {
padding: 1rem;
background-color: $color-white;
flex: 1 0 0;
overflow-y: auto;
}

View file

@ -6,10 +6,7 @@
// Copyright (c) 2015-2016 Juan de la Cruz <delacruzgarciajuan@gmail.com>
.dashboard-grid {
display: flex;
flex-direction: column;
font-size: $fs14;
height: 100%;
.dashboard-title {
position: relative;
@ -68,11 +65,6 @@
}
.dashboard-grid-content {
display: flex;
height: 100%;
width: 100%;
.dashboard-grid-row {
display: flex;
flex-wrap: wrap;
@ -350,8 +342,6 @@
}
}
// STYLES FOR LIBRARIES
&.library {
padding: $medium;
@ -476,7 +466,6 @@
height: fit-content;
margin: $size-4;
padding: 3rem;
width: 100%;
.grid-files-desc {
color: $color-gray-60;

View file

@ -141,7 +141,6 @@
(dom/prevent-default %)
(st/emit! (dsh/create-file id)))]
[:section.dashboard-grid
[:div.dashboard-grid-content
(if (> (count files) 0)
[:div.dashboard-grid-row
(when (not hide-new?)
@ -152,4 +151,4 @@
[:div.grid-files-empty
[:div.grid-files-desc (t locale "dashboard.grid.empty-files")]
[:div.grid-files-link
[:a.btn-secondary.btn-small {:on-click on-click} (t locale "ds.new-file")]]])]]))
[:a.btn-secondary.btn-small {:on-click on-click} (t locale "ds.new-file")]]])]))

View file

@ -33,7 +33,6 @@
[:section.search-page
[:section.dashboard-grid
[:div.dashboard-grid-content
(cond
(empty? search-term)
[:div.grid-files-empty
@ -48,5 +47,5 @@
[:div.grid-files-desc (t locale "dashboard.search.no-matches-for" search-term)]]
:else
[:& grid { :files search-result :hide-new? true}])]]]))
[:& grid { :files search-result :hide-new? true}])]]))