feat(frontend): remove sablono usage

This commit is contained in:
Andrey Antukh 2019-06-20 22:34:27 +02:00
parent c234b01dee
commit a26f480d02
8 changed files with 39 additions and 48 deletions

View file

@ -6,9 +6,7 @@
;; Copyright (c) 2015-2016 Juan de la Cruz <delacruzgarciajuan@gmail.com>
(ns uxbox.main.ui.dashboard.elements
(:require [sablono.core :as html :refer-macros [html]]
[rum.core :as rum]
[potok.core :as ptk]
(:require [potok.core :as ptk]
[uxbox.main.data.dashboard :as dd]
[uxbox.main.data.lightbox :as udl]
[uxbox.builtins.icons :as i]

View file

@ -1,5 +1,5 @@
(ns uxbox.main.ui.navigation
(:require [sablono.core :as html :refer-macros [html]]
(:require [rumext.core :refer-macros [html]]
[goog.events :as events]
[uxbox.util.dom :as dom]))

View file

@ -6,14 +6,12 @@
;; Copyright (c) 2015-2016 Juan de la Cruz <delacruzgarciajuan@gmail.com>
(ns uxbox.main.ui.settings
(:require [sablono.core :as html :refer-macros [html]]
[rum.core :as rum]
[cuerdas.core :as str]
[uxbox.util.router :as r]
(:require [cuerdas.core :as str]
[potok.core :as ptk]
[uxbox.builtins.icons :as i]
[rumext.core :as mx :include-macros true]
[uxbox.builtins.icons :as i]
[uxbox.util.dom :as dom]
[uxbox.util.router :as r]
[uxbox.main.ui.settings.profile :as profile]
[uxbox.main.ui.settings.password :as password]
[uxbox.main.ui.settings.notifications :as notifications]

View file

@ -6,9 +6,7 @@
;; Copyright (c) 2016 Juan de la Cruz <delacruzgarciajuan@gmail.com>
(ns uxbox.main.ui.settings.notifications
(:require [sablono.core :as html :refer-macros [html]]
[rum.core :as rum]
[cuerdas.core :as str]
(:require [cuerdas.core :as str]
[uxbox.util.router :as r]
[potok.core :as ptk]
[uxbox.builtins.icons :as i]

View file

@ -6,8 +6,7 @@
;; Copyright (c) 2015-2017 Juan de la Cruz <delacruzgarciajuan@gmail.com>
(ns uxbox.main.ui.workspace.rules
(:require [sablono.core :refer-macros [html]]
[cuerdas.core :as str]
(:require [cuerdas.core :as str]
[beicon.core :as rx]
[uxbox.main.store :as s]
[uxbox.main.constants :as c]
@ -66,7 +65,7 @@
;; --- Horizontal Text Label
(defn- horizontal-text-label
(mx/defc horizontal-text-label
[zoom value]
(let [big-ticks-mod (big-ticks-mod zoom)
pos (+ (* value zoom)
@ -74,17 +73,16 @@
(* c/canvas-start-x zoom)
c/canvas-scroll-padding)]
(when (< (mod value big-ticks-mod) step-size)
(html
[:text {:x (+ pos 2)
:y 13
:key (str pos)
:fill "#9da2a6"
:style {:font-size "12px"}}
value]))))
[:text {:x (+ pos 2)
:y 13
:key (str pos)
:fill "#9da2a6"
:style {:font-size "12px"}}
value])))
;; --- Horizontal Text Label
(defn- vertical-text-label
(mx/defc vertical-text-label
[zoom value]
(let [big-ticks-mod (big-ticks-mod zoom)
pos (+ (* value zoom)
@ -92,14 +90,13 @@
;; c/canvas-start-x
c/canvas-scroll-padding)]
(when (< (mod value big-ticks-mod) step-size)
(html
[:text {:y (- pos 3)
:x 5
:key (str pos)
:fill "#9da2a6"
:transform (str/format "rotate(90 0 %s)" pos)
:style {:font-size "12px"}}
value]))))
[:text {:y (- pos 3)
:x 5
:key (str pos)
:fill "#9da2a6"
:transform (str/format "rotate(90 0 %s)" pos)
:style {:font-size "12px"}}
value])))
;; --- Horizontal Rule Ticks (Component)
@ -112,7 +109,9 @@
(filterv identity))]
[:g {}
[:path {:d (str/join " " path)}]
labels]))
(for [tick +ticks+]
(-> (horizontal-text-label zoom tick)
(mx/with-key (str tick))))]))
;; --- Vertical Rule Ticks (Component)
@ -125,7 +124,9 @@
(filterv identity))]
[:g {}
[:path {:d (str/join " " path)}]
labels]))
(for [tick +ticks+]
(-> (vertical-text-label zoom tick)
(mx/with-key (str tick))))]))
;; --- Horizontal Rule (Component)

View file

@ -6,8 +6,7 @@
;; Copyright (c) 2015-2016 Juan de la Cruz <delacruzgarciajuan@gmail.com>
(ns uxbox.main.ui.workspace.sidebar.drawtools
(:require [sablono.core :as html :refer-macros [html]]
[lentes.core :as l]
(:require [lentes.core :as l]
[potok.core :as ptk]
[uxbox.main.store :as st]
[uxbox.main.refs :as refs]

View file

@ -6,22 +6,20 @@
;; Copyright (c) 2015-2016 Juan de la Cruz <delacruzgarciajuan@gmail.com>
(ns uxbox.main.ui.workspace.sidebar.options.circle-measures
(:require [sablono.core :as html :refer-macros [html]]
[rum.core :as rum]
[lentes.core :as l]
[uxbox.util.i18n :refer (tr)]
[uxbox.util.router :as r]
(:require [lentes.core :as l]
[potok.core :as ptk]
[uxbox.main.store :as st]
[uxbox.main.data.workspace :as udw]
[uxbox.main.data.shapes :as uds]
[uxbox.builtins.icons :as i]
[rumext.core :as mx :include-macros true]
[uxbox.builtins.icons :as i]
[uxbox.main.data.shapes :as uds]
[uxbox.main.data.workspace :as udw]
[uxbox.main.geom :as geom]
[uxbox.main.store :as st]
[uxbox.util.data :refer (parse-int parse-float read-string)]
[uxbox.util.dom :as dom]
[uxbox.util.geom.point :as gpt]
[uxbox.util.data :refer (parse-int parse-float read-string)]
[uxbox.util.math :refer (precision-or-0)]))
[uxbox.util.i18n :refer (tr)]
[uxbox.util.math :refer (precision-or-0)]
[uxbox.util.router :as r]))
(mx/defc circle-measures-menu
{:mixins [mx/static]}

View file

@ -6,8 +6,7 @@
;; Copyright (c) 2016 Juan de la Cruz <delacruzgarciajuan@gmail.com>
(ns uxbox.view.ui.viewer.sitemap
(:require [sablono.core :refer-macros (html)]
[lentes.core :as l]
(:require [lentes.core :as l]
[potok.core :as ptk]
[uxbox.builtins.icons :as i]
[uxbox.util.i18n :refer [tr]]