mirror of
https://github.com/penpot/penpot.git
synced 2025-02-10 17:18:21 -05:00
🎉 Add search section title
This commit is contained in:
parent
686e9b64ef
commit
dbf67dc47b
3 changed files with 37 additions and 20 deletions
|
@ -460,6 +460,16 @@
|
||||||
"es" : "+ Nuevo proyecto"
|
"es" : "+ Nuevo proyecto"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"dashboard.title-search" : {
|
||||||
|
"used-in" : [ "src/app/main/ui/dashboard/search.cljs:37" ],
|
||||||
|
"translations" : {
|
||||||
|
"en" : "Search results",
|
||||||
|
"fr" : "Résultats de recherche",
|
||||||
|
"ru" : "Результаты поиска",
|
||||||
|
"es" : "Resultados de búsqueda"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
"dashboard.no-matches-for" : {
|
"dashboard.no-matches-for" : {
|
||||||
"used-in" : [ "src/app/main/ui/dashboard/search.cljs:48" ],
|
"used-in" : [ "src/app/main/ui/dashboard/search.cljs:48" ],
|
||||||
"translations" : {
|
"translations" : {
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border: 1px solid $color-gray-10;
|
border: 1px solid $color-gray-10;
|
||||||
border-radius: 6px;
|
border-radius: $br-medium;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -254,13 +254,14 @@
|
||||||
|
|
||||||
.sidebar-search {
|
.sidebar-search {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
background-color: $color-white;
|
||||||
border: 1px solid $color-gray-10;
|
border: 1px solid $color-gray-10;
|
||||||
border-radius: 4px;
|
border-radius: $br-medium;
|
||||||
display: flex;
|
display: flex;
|
||||||
margin: 5px 15px;
|
margin: 5px 15px;
|
||||||
|
|
||||||
.input-text {
|
.input-text {
|
||||||
background: $color-white;
|
background: transparent;
|
||||||
border: 0;
|
border: 0;
|
||||||
color: $color-gray-60;
|
color: $color-gray-60;
|
||||||
font-size: $fs14;
|
font-size: $fs14;
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
[okulary.core :as l]
|
[okulary.core :as l]
|
||||||
[rumext.alpha :as mf]))
|
[rumext.alpha :as mf]))
|
||||||
|
|
||||||
|
|
||||||
(def result-ref
|
(def result-ref
|
||||||
(l/derived (l/in [:dashboard-local :search-result]) st/state))
|
(l/derived (l/in [:dashboard-local :search-result]) st/state))
|
||||||
|
|
||||||
|
@ -30,23 +31,28 @@
|
||||||
(st/emitf (dd/search-files {:team-id (:id team)
|
(st/emitf (dd/search-files {:team-id (:id team)
|
||||||
:search-term search-term})))
|
:search-term search-term})))
|
||||||
|
|
||||||
[:section.dashboard-container.search
|
[:*
|
||||||
(cond
|
[:header.dashboard-header
|
||||||
(empty? search-term)
|
[:div.dashboard-title
|
||||||
[:div.grid-empty-placeholder
|
[:h1 (t locale "dashboard.title-search")]]]
|
||||||
[:div.icon i/search]
|
|
||||||
[:div.text (t locale "dashboard.type-something")]]
|
|
||||||
|
|
||||||
(nil? result)
|
[:section.dashboard-container.search
|
||||||
[:div.grid-empty-placeholder
|
(cond
|
||||||
[:div.icon i/search]
|
(empty? search-term)
|
||||||
[:div.text (t locale "dashboard.searching-for" search-term)]]
|
[:div.grid-empty-placeholder
|
||||||
|
[:div.icon i/search]
|
||||||
|
[:div.text (t locale "dashboard.type-something")]]
|
||||||
|
|
||||||
(empty? result)
|
(nil? result)
|
||||||
[:div.grid-empty-placeholder
|
[:div.grid-empty-placeholder
|
||||||
[:div.icon i/search]
|
[:div.icon i/search]
|
||||||
[:div.text (t locale "dashboard.no-matches-for" search-term)]]
|
[:div.text (t locale "dashboard.searching-for" search-term)]]
|
||||||
|
|
||||||
:else
|
(empty? result)
|
||||||
[:& grid {:files result
|
[:div.grid-empty-placeholder
|
||||||
:hide-new? true}])]))
|
[:div.icon i/search]
|
||||||
|
[:div.text (t locale "dashboard.no-matches-for" search-term)]]
|
||||||
|
|
||||||
|
:else
|
||||||
|
[:& grid {:files result
|
||||||
|
:hide-new? true}])]]))
|
||||||
|
|
Loading…
Add table
Reference in a new issue