mirror of
https://github.com/penpot/penpot.git
synced 2025-06-02 20:21:38 +02: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;
|
$lh-133: 1.33;
|
||||||
$size-4: 1rem;
|
$size-4: 1rem;
|
||||||
|
|
||||||
:root {
|
|
||||||
--font-family: "worksans", "vazirmatn", sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background-color: var(--db-primary);
|
background-color: var(--db-primary);
|
||||||
color: var(--df-primary);
|
color: var(--df-primary);
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
font-family: var(--font-family);
|
font-family: "worksans", "vazirmatn", sans-serif;
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
|
@ -317,8 +317,7 @@
|
||||||
(effect [_ _ _]
|
(effect [_ _ _]
|
||||||
;; We prefer to keek some stuff in the storage like the current-team-id and the profile
|
;; We prefer to keek some stuff in the storage like the current-team-id and the profile
|
||||||
(swap! storage dissoc :redirect-url)
|
(swap! storage dissoc :redirect-url)
|
||||||
(set-current-team! nil)
|
(set-current-team! nil)))))
|
||||||
(i18n/reset-locale)))))
|
|
||||||
|
|
||||||
(defn logout
|
(defn logout
|
||||||
([] (logout {}))
|
([] (logout {}))
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
[app.common.data :as d]
|
[app.common.data :as d]
|
||||||
[app.common.logging :as log]
|
[app.common.logging :as log]
|
||||||
[app.config :as cfg]
|
[app.config :as cfg]
|
||||||
[app.util.dom :as dom]
|
|
||||||
[app.util.globals :as globals]
|
[app.util.globals :as globals]
|
||||||
[app.util.storage :refer [storage]]
|
[app.util.storage :refer [storage]]
|
||||||
[cuerdas.core :as str]
|
[cuerdas.core :as str]
|
||||||
|
@ -106,23 +105,6 @@
|
||||||
(swap! storage assoc ::locale lname)
|
(swap! storage assoc ::locale lname)
|
||||||
(reset! 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]
|
(deftype C [val]
|
||||||
IDeref
|
IDeref
|
||||||
(-deref [_] val))
|
(-deref [_] val))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue