0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-11 01:28:30 -05:00

🎉 Add search section title

This commit is contained in:
elhombretecla 2020-12-09 22:39:37 +01:00 committed by Alonso Torres
parent 686e9b64ef
commit dbf67dc47b
3 changed files with 37 additions and 20 deletions

View file

@ -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" : {

View file

@ -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;

View file

@ -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,6 +31,11 @@
(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})))
[:*
[:header.dashboard-header
[:div.dashboard-title
[:h1 (t locale "dashboard.title-search")]]]
[:section.dashboard-container.search [:section.dashboard-container.search
(cond (cond
(empty? search-term) (empty? search-term)
@ -49,4 +55,4 @@
:else :else
[:& grid {:files result [:& grid {:files result
:hide-new? true}])])) :hide-new? true}])]]))