mirror of
https://github.com/penpot/penpot.git
synced 2025-05-11 08:56:37 +02:00
🐛 Fix several issues in dashboard screens scroll
This commit is contained in:
parent
752038039c
commit
9d416cae4c
10 changed files with 285 additions and 288 deletions
|
@ -41,8 +41,8 @@
|
||||||
|
|
||||||
(s/def ::is-shared ::us/boolean)
|
(s/def ::is-shared ::us/boolean)
|
||||||
(s/def ::create-file
|
(s/def ::create-file
|
||||||
(s/keys :req-un [::profile-id ::name ::project-id ::is-shared]
|
(s/keys :req-un [::profile-id ::name ::project-id]
|
||||||
:opt-un [::id]))
|
:opt-un [::id ::is-shared]))
|
||||||
|
|
||||||
(sm/defmutation ::create-file
|
(sm/defmutation ::create-file
|
||||||
[{:keys [profile-id project-id] :as params}]
|
[{:keys [profile-id project-id] :as params}]
|
||||||
|
@ -61,7 +61,9 @@
|
||||||
:can-edit true}))
|
:can-edit true}))
|
||||||
|
|
||||||
(defn create-file
|
(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))
|
(let [id (or id (uuid/next))
|
||||||
file (db/insert! conn :file
|
file (db/insert! conn :file
|
||||||
{:id id
|
{:id id
|
||||||
|
|
|
@ -23,11 +23,12 @@
|
||||||
//#################################################
|
//#################################################
|
||||||
|
|
||||||
@import 'common/base';
|
@import 'common/base';
|
||||||
@import 'main/layouts/main-layout';
|
|
||||||
@import 'main/layouts/login';
|
@import 'main/layouts/login';
|
||||||
|
@import 'main/layouts/main-layout';
|
||||||
@import 'main/layouts/projects-page';
|
@import 'main/layouts/projects-page';
|
||||||
@import 'main/layouts/libraries-page';
|
@import 'main/layouts/libraries-page';
|
||||||
@import 'main/layouts/recent-files-page';
|
@import 'main/layouts/recent-files-page';
|
||||||
|
@import 'main/layouts/search-page';
|
||||||
@import "main/layouts/not-found";
|
@import "main/layouts/not-found";
|
||||||
@import "main/layouts/viewer";
|
@import "main/layouts/viewer";
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
.libraries-page {
|
.libraries-page {
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
height: 100%;
|
|
||||||
background-color: $color-white;
|
background-color: $color-white;
|
||||||
|
flex: 1 0 0;
|
||||||
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,6 +31,8 @@
|
||||||
|
|
||||||
.dashboard-content {
|
.dashboard-content {
|
||||||
background-color: lighten($color-gray-10, 5%);
|
background-color: lighten($color-gray-10, 5%);
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
.verify-token {
|
.verify-token {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
.projects-page {
|
.projects-page {
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
height: 100%;
|
|
||||||
background-color: $color-white;
|
background-color: $color-white;
|
||||||
|
flex: 1 0 0;
|
||||||
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
.recent-files-page {
|
.recent-files-page {
|
||||||
overflow: scroll;
|
|
||||||
height: 100%;
|
|
||||||
background-color: $color-white;
|
background-color: $color-white;
|
||||||
|
flex: 1 0 0;
|
||||||
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.recent-files-row {
|
.recent-files-row {
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
.search-page {
|
.search-page {
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
|
background-color: $color-white;
|
||||||
|
flex: 1 0 0;
|
||||||
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,10 +6,7 @@
|
||||||
// Copyright (c) 2015-2016 Juan de la Cruz <delacruzgarciajuan@gmail.com>
|
// Copyright (c) 2015-2016 Juan de la Cruz <delacruzgarciajuan@gmail.com>
|
||||||
|
|
||||||
.dashboard-grid {
|
.dashboard-grid {
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
font-size: $fs14;
|
font-size: $fs14;
|
||||||
height: 100%;
|
|
||||||
|
|
||||||
.dashboard-title {
|
.dashboard-title {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -68,11 +65,6 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.dashboard-grid-content {
|
|
||||||
display: flex;
|
|
||||||
height: 100%;
|
|
||||||
width: 100%;
|
|
||||||
|
|
||||||
.dashboard-grid-row {
|
.dashboard-grid-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
@ -350,8 +342,6 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// STYLES FOR LIBRARIES
|
// STYLES FOR LIBRARIES
|
||||||
&.library {
|
&.library {
|
||||||
padding: $medium;
|
padding: $medium;
|
||||||
|
@ -476,7 +466,6 @@
|
||||||
height: fit-content;
|
height: fit-content;
|
||||||
margin: $size-4;
|
margin: $size-4;
|
||||||
padding: 3rem;
|
padding: 3rem;
|
||||||
width: 100%;
|
|
||||||
|
|
||||||
.grid-files-desc {
|
.grid-files-desc {
|
||||||
color: $color-gray-60;
|
color: $color-gray-60;
|
||||||
|
|
|
@ -141,7 +141,6 @@
|
||||||
(dom/prevent-default %)
|
(dom/prevent-default %)
|
||||||
(st/emit! (dsh/create-file id)))]
|
(st/emit! (dsh/create-file id)))]
|
||||||
[:section.dashboard-grid
|
[:section.dashboard-grid
|
||||||
[:div.dashboard-grid-content
|
|
||||||
(if (> (count files) 0)
|
(if (> (count files) 0)
|
||||||
[:div.dashboard-grid-row
|
[:div.dashboard-grid-row
|
||||||
(when (not hide-new?)
|
(when (not hide-new?)
|
||||||
|
@ -152,4 +151,4 @@
|
||||||
[:div.grid-files-empty
|
[:div.grid-files-empty
|
||||||
[:div.grid-files-desc (t locale "dashboard.grid.empty-files")]
|
[:div.grid-files-desc (t locale "dashboard.grid.empty-files")]
|
||||||
[:div.grid-files-link
|
[: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")]]])]))
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
|
|
||||||
[:section.search-page
|
[:section.search-page
|
||||||
[:section.dashboard-grid
|
[:section.dashboard-grid
|
||||||
[:div.dashboard-grid-content
|
|
||||||
(cond
|
(cond
|
||||||
(empty? search-term)
|
(empty? search-term)
|
||||||
[:div.grid-files-empty
|
[:div.grid-files-empty
|
||||||
|
@ -48,5 +47,5 @@
|
||||||
[:div.grid-files-desc (t locale "dashboard.search.no-matches-for" search-term)]]
|
[:div.grid-files-desc (t locale "dashboard.search.no-matches-for" search-term)]]
|
||||||
|
|
||||||
:else
|
:else
|
||||||
[:& grid { :files search-result :hide-new? true}])]]]))
|
[:& grid { :files search-result :hide-new? true}])]]))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue