mirror of
https://github.com/penpot/penpot.git
synced 2025-01-09 08:20:45 -05:00
Merge pull request #4843 from penpot/eva-remove-unused-locale-fn
♻️ Remove unused locale fn
This commit is contained in:
commit
e492284abe
3 changed files with 2 additions and 25 deletions
|
@ -18,16 +18,12 @@ $lh-115: 1.15;
|
|||
$lh-133: 1.33;
|
||||
$size-4: 1rem;
|
||||
|
||||
:root {
|
||||
--font-family: "worksans", "vazirmatn", sans-serif;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: var(--db-primary);
|
||||
color: var(--df-primary);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
font-family: var(--font-family);
|
||||
font-family: "worksans", "vazirmatn", sans-serif;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
|
|
|
@ -317,8 +317,7 @@
|
|||
(effect [_ _ _]
|
||||
;; We prefer to keek some stuff in the storage like the current-team-id and the profile
|
||||
(swap! storage dissoc :redirect-url)
|
||||
(set-current-team! nil)
|
||||
(i18n/reset-locale)))))
|
||||
(set-current-team! nil)))))
|
||||
|
||||
(defn logout
|
||||
([] (logout {}))
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
[app.common.data :as d]
|
||||
[app.common.logging :as log]
|
||||
[app.config :as cfg]
|
||||
[app.util.dom :as dom]
|
||||
[app.util.globals :as globals]
|
||||
[app.util.storage :refer [storage]]
|
||||
[cuerdas.core :as str]
|
||||
|
@ -106,23 +105,6 @@
|
|||
(swap! storage assoc ::locale lname)
|
||||
(reset! locale lname))))
|
||||
|
||||
(defn reset-locale
|
||||
"Set the current locale to the browser detected one if it is
|
||||
supported or default locale if not."
|
||||
[]
|
||||
(swap! storage dissoc ::locale)
|
||||
(reset! locale (autodetect)))
|
||||
|
||||
(add-watch locale "browser-font"
|
||||
(fn [_ _ _ locale]
|
||||
(log/info :hint "locale changed" :locale locale)
|
||||
(dom/set-html-lang! locale)
|
||||
(let [node (dom/get-body)]
|
||||
(if (or (= locale "fa")
|
||||
(= locale "ar"))
|
||||
(dom/set-css-property! node "--font-family" "'vazirmatn', 'worksans', sans-serif")
|
||||
(dom/unset-css-property! node "--font-family")))))
|
||||
|
||||
(deftype C [val]
|
||||
IDeref
|
||||
(-deref [_] val))
|
||||
|
|
Loading…
Reference in a new issue