mirror of
https://github.com/penpot/penpot.git
synced 2025-03-14 08:41:48 -05:00
🔥 Remove unused code.
This commit is contained in:
parent
f4a15e6db7
commit
eeb2f39ada
8 changed files with 14 additions and 48 deletions
|
@ -73,6 +73,7 @@
|
|||
(rx/of (fetch-files (:project-id local))
|
||||
(fetch-projects (:team-id local)))))))
|
||||
|
||||
|
||||
(defn initialize-team
|
||||
[team-id]
|
||||
(us/verify ::us/uuid team-id)
|
||||
|
@ -86,8 +87,8 @@
|
|||
ptk/WatchEvent
|
||||
(watch [_ state stream]
|
||||
(let [local (:dashboard-local state)]
|
||||
;; TODO
|
||||
))))
|
||||
(rx/of (fetch-projects (:team-id local)))))))
|
||||
|
||||
|
||||
(defn initialize-project
|
||||
[team-id project-id]
|
||||
|
|
|
@ -22,18 +22,14 @@
|
|||
[uxbox.main.data.projects :as dp]
|
||||
[uxbox.main.refs :as refs]
|
||||
[uxbox.main.store :as st]
|
||||
[uxbox.main.ui.login :refer [login-page]]
|
||||
[uxbox.main.ui.profile.register :refer [profile-register-page]]
|
||||
[uxbox.main.ui.profile.recovery-request :refer [profile-recovery-request-page]]
|
||||
[uxbox.main.ui.profile.recovery :refer [profile-recovery-page]]
|
||||
[uxbox.main.ui.dashboard :refer [dashboard]]
|
||||
[uxbox.main.ui.login :refer [login-page]]
|
||||
[uxbox.main.ui.profile.recovery :refer [profile-recovery-page]]
|
||||
[uxbox.main.ui.profile.recovery-request :refer [profile-recovery-request-page]]
|
||||
[uxbox.main.ui.profile.register :refer [profile-register-page]]
|
||||
[uxbox.main.ui.settings :as settings]
|
||||
[uxbox.main.ui.shapes]
|
||||
[uxbox.main.ui.workspace :as workspace]
|
||||
[uxbox.util.data :refer [parse-int uuid-str?]]
|
||||
[uxbox.util.components :refer [wrap-catch]]
|
||||
[uxbox.util.dom :as dom]
|
||||
[uxbox.util.html.history :as html-history]
|
||||
[uxbox.util.i18n :refer [tr]]
|
||||
[uxbox.util.messages :as uum]
|
||||
[uxbox.util.router :as rt]
|
||||
|
@ -86,15 +82,8 @@
|
|||
:else (ex/raise :type :validation
|
||||
:code :invalid-project-id))))
|
||||
|
||||
(mf/defc app-error
|
||||
[{:keys [error] :as props}]
|
||||
(let [data (ex-data error)]
|
||||
(case (:type data)
|
||||
:not-found [:span "404"]
|
||||
[:span "Internal application errror"])))
|
||||
|
||||
(mf/defc app
|
||||
{:wrap [#(wrap-catch % app-error)]}
|
||||
[props]
|
||||
(let [route (mf/deref route-iref)]
|
||||
(case (get-in route [:data :name])
|
||||
|
@ -118,11 +107,6 @@
|
|||
:dashboard-project)
|
||||
(mf/element dashboard #js {:route route})
|
||||
|
||||
(:dashboard-icons
|
||||
:dashboard-images
|
||||
:dashboard-colors)
|
||||
(mf/element dashboard/dashboard-assets #js {:route route})
|
||||
|
||||
:workspace
|
||||
(let [file-id (uuid (get-in route [:params :path :file-id]))
|
||||
page-id (uuid (get-in route [:params :query :page-id]))]
|
||||
|
|
|
@ -13,14 +13,19 @@
|
|||
[cuerdas.core :as str]
|
||||
[rumext.alpha :as mf]
|
||||
[uxbox.common.exceptions :as ex]
|
||||
[uxbox.common.spec :as us]
|
||||
[uxbox.main.refs :as refs]
|
||||
[uxbox.util.data :refer [uuid-str?]]
|
||||
[uxbox.main.ui.dashboard.header :refer [header]]
|
||||
[uxbox.main.ui.dashboard.sidebar :refer [sidebar]]
|
||||
[uxbox.main.ui.dashboard.project :refer [project-page]]
|
||||
[uxbox.main.ui.dashboard.team :refer [team-page]]
|
||||
[uxbox.main.ui.messages :refer [messages-widget]]))
|
||||
|
||||
(defn- ^boolean uuid-str?
|
||||
[s]
|
||||
(and (string? s)
|
||||
(boolean (re-seq us/uuid-rx s))))
|
||||
|
||||
(defn- parse-params
|
||||
[route profile]
|
||||
(let [team-id (get-in route [:params :path :team-id])
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
[uxbox.main.ui.modal :as modal]
|
||||
[uxbox.main.ui.shapes.icon :as icon]
|
||||
[uxbox.util.components :refer [chunked-list]]
|
||||
[uxbox.util.data :refer [read-string jscoll->vec seek]]
|
||||
[uxbox.util.data :refer [read-string seek]]
|
||||
[uxbox.util.dom :as dom]
|
||||
[uxbox.util.i18n :as i18n :refer [tr t]]
|
||||
[uxbox.util.router :as rt]
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
[uxbox.main.ui.dashboard.header :refer [header]]
|
||||
[uxbox.main.ui.dashboard.sidebar :refer [sidebar]]
|
||||
[uxbox.main.ui.messages :refer [messages-widget]]
|
||||
[uxbox.util.data :refer [uuid-str?]]
|
||||
[uxbox.util.dom :as dom]
|
||||
[uxbox.util.i18n :as i18n :refer [t tr]]
|
||||
[uxbox.util.router :as rt]
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
[uxbox.main.ui.dashboard.common :as common]
|
||||
[uxbox.main.ui.dashboard.header :refer [header]]
|
||||
[uxbox.main.ui.messages :refer [messages-widget]]
|
||||
[uxbox.util.data :refer [read-string parse-int uuid-str?]]
|
||||
[uxbox.util.dom :as dom]
|
||||
[uxbox.util.i18n :as i18n :refer [t tr]]
|
||||
[uxbox.util.router :as rt]
|
||||
|
|
|
@ -9,9 +9,7 @@
|
|||
;; Copyright (c) 2015-2020 Juan de la Cruz <delacruzgarciajuan@gmail.com>
|
||||
|
||||
(ns uxbox.main.ui.dashboard.team
|
||||
(:refer-clojure :exclude [sort-by])
|
||||
(:require
|
||||
[cuerdas.core :as str]
|
||||
[lentes.core :as l]
|
||||
[rumext.alpha :as mf]
|
||||
[uxbox.builtins.icons :as i]
|
||||
|
|
|
@ -111,26 +111,6 @@
|
|||
not-found))
|
||||
not-found coll)))
|
||||
|
||||
;; --- String utils
|
||||
|
||||
(def +uuid-re+
|
||||
#"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$")
|
||||
|
||||
(defn uuid-str?
|
||||
[v]
|
||||
(and (string? v)
|
||||
(re-seq +uuid-re+ v)))
|
||||
|
||||
;; --- Interop
|
||||
|
||||
(defn jscoll->vec
|
||||
"Convert array like js object into vector."
|
||||
[v]
|
||||
(-> (clj->js [])
|
||||
(.-slice)
|
||||
(.call v)
|
||||
(js->clj)))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Numbers Parsing
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
|
Loading…
Add table
Reference in a new issue