fixing animations.

This commit is contained in:
Bryce Covert
2018-04-13 16:09:32 -07:00
parent 121a38f20d
commit c8e959bd40
11 changed files with 82 additions and 97 deletions

View File

@@ -101,7 +101,9 @@
[:a {:class "button is-danger is-block is-bold" :href (bidi/path-for routes/routes :index)} [:a {:class "button is-danger is-block is-bold" :href (bidi/path-for routes/routes :index)}
[:span {:class "compose"} "Back"]]]]] [:span {:class "compose"} "Back"]]]]]
[:div {:class "column messages hero is-fullheight", :id "message-feed"} [:div {:class "column messages hero is-fullheight", :id "message-feed"}
^{:key (str "active-page-" (:name @company))} [pages/active-page ap]]] ^{:key (str "active-page-" (:name @company))}
[:div.inbox-messages
[pages/active-page ap]]]]
[:footer {:class "footer"} [:footer {:class "footer"}
[:div {:class "container"} [:div {:class "container"}
[:div {:class "content has-text-centered"} [:div {:class "content has-text-centered"}
@@ -181,7 +183,9 @@
[:a {:class "button is-danger is-block is-bold" :href (bidi/path-for routes/routes :new-invoice)} [:a {:class "button is-danger is-block is-bold" :href (bidi/path-for routes/routes :new-invoice)}
[:span {:class "compose"} "New Invoice"]]]]] [:span {:class "compose"} "New Invoice"]]]]]
[:div {:class "column messages hero is-fullheight", :id "message-feed"} [:div {:class "column messages hero is-fullheight", :id "message-feed"}
^{:key (str "active-page-" (:name @company))} [pages/active-page ap]]] ^{:key (str "active-page-" (:name @company))}
[:div.inbox-messages
[pages/active-page ap]]]]
[:footer {:class "footer"} [:footer {:class "footer"}
[:div {:class "container"} [:div {:class "container"}
[:div {:class "content has-text-centered"} [:div {:class "content has-text-centered"}

View File

@@ -52,7 +52,7 @@
(defmethod active-page :invoices [] (defmethod active-page :invoices []
[(with-meta [(with-meta
(fn [] (fn []
[:div {:class "inbox-messages"} [:div
[:h1.title "All invoices"]]) [:h1.title "All invoices"]])
{:component-did-mount (fn [] {:component-did-mount (fn []
(go (go

View File

@@ -10,8 +10,5 @@
[bidi.bidi :as bidi])) [bidi.bidi :as bidi]))
(defn admin-page [] (defn admin-page []
[:div {:class "inbox-messages"} [:div
[:div.hero [:h1.title "Admin"]])
[:div.hero-body
[:div.container
[:h1.title "Admin"]]]]])

View File

@@ -25,10 +25,7 @@
[:td email]])]])) [:td email]])]]))
(defn admin-companies-page [] (defn admin-companies-page []
[:div {:class "inbox-messages"} [:div
[:div.hero
[:div.hero-body
[:div.container
(let [companies (re-frame/subscribe [::subs/companies]) (let [companies (re-frame/subscribe [::subs/companies])
editing-company (:company @(re-frame/subscribe [::subs/admin]))] editing-company (:company @(re-frame/subscribe [::subs/admin]))]
@@ -77,4 +74,4 @@
[:span "Save"] [:span "Save"]
(when (:saving? editing-company) (when (:saving? editing-company)
[:span.icon [:span.icon
[:i.fa.fa-spin.fa-spinner]])]]]])])]]]]) [:i.fa.fa-spin.fa-spinner]])]]]])])])

View File

@@ -31,12 +31,8 @@
(defn admin-reminders-page [] (defn admin-reminders-page []
[(with-meta [(with-meta
(fn [] (fn []
[:div {:class "inbox-messages"}
[:div.hero
[:div.hero-body
[:div.container
[:div [:div
[:h1.title "Reminders"] [:h1.title "Reminders"]
[reminders-table]]]]]]) [reminders-table]])
{:component-did-mount (fn [] {:component-did-mount (fn []
(re-frame/dispatch [::events/mounted]))})]) (re-frame/dispatch [::events/mounted]))})])

View File

@@ -237,10 +237,7 @@
(defn admin-vendors-page [] (defn admin-vendors-page []
[(with-meta [(with-meta
(fn [] (fn []
[:div {:class "inbox-messages"} [:div.inbox-messages
[:div.hero
[:div.hero-body
[:div.container
(let [vendors (re-frame/subscribe [::subs/vendors]) (let [vendors (re-frame/subscribe [::subs/vendors])
editing-vendor (:vendor @(re-frame/subscribe [::subs/admin]))] editing-vendor (:vendor @(re-frame/subscribe [::subs/admin]))]
@@ -252,6 +249,6 @@
(when editing-vendor (when editing-vendor
[edit-dialog] [edit-dialog]
)])]]]]) )])])
{:component-did-mount (fn [] {:component-did-mount (fn []
(re-frame/dispatch [::events/mounted]))})]) (re-frame/dispatch [::events/mounted]))})])

View File

@@ -93,7 +93,7 @@
(fn [] (fn []
(let [invoice-page (re-frame/subscribe [::invoice-page]) (let [invoice-page (re-frame/subscribe [::invoice-page])
status (re-frame/subscribe [::subs/status])] status (re-frame/subscribe [::subs/status])]
[:div {:class "inbox-messages"} [:div
[:h1.title "Upload invoices"] [:h1.title "Upload invoices"]
[dropzone] [dropzone]

View File

@@ -3,10 +3,7 @@
[auto-ap.routes :as routes])) [auto-ap.routes :as routes]))
(defn index-page [] (defn index-page []
[:div {:class "inbox-messages"} [:div
[:div.hero
[:div.hero-body
[:div.container
[:h1.title "Dashboard"] [:h1.title "Dashboard"]
[:h2.subtitle "To get started, " [:h2.subtitle "To get started, "
[:a {:href (bidi/path-for routes/routes :import-invoices)} "Import some invoices"]]]]]]) [:a {:href (bidi/path-for routes/routes :import-invoices)} "Import some invoices"]]])

View File

@@ -10,10 +10,7 @@
[bidi.bidi :as bidi])) [bidi.bidi :as bidi]))
(defn login-page [] (defn login-page []
[:div {:class "inbox-messages"} [:div
[:div.hero
[:div.hero-body
[:div.container
[:h1.title "Login"] [:h1.title "Login"]
[:h2.subtitle "To get started, " [:h2.subtitle "To get started, "
[:a {:href login-url} "Login with Google"]]]]]]) [:a {:href login-url} "Login with Google"]]])

View File

@@ -5,7 +5,7 @@
(defn new-invoice-page [] (defn new-invoice-page []
(let [form-data (re-frame/subscribe [::subs/new-invoice-form])] (let [form-data (re-frame/subscribe [::subs/new-invoice-form])]
[:div {:class "inbox-messages"} [:div
[:form [:form
[:h1.title "New Invoice"] [:h1.title "New Invoice"]
[:div.field [:div.field

View File

@@ -9,10 +9,10 @@
(fn [] (fn []
(let [invoices (re-frame/subscribe [::subs/unpaid-invoices]) (let [invoices (re-frame/subscribe [::subs/unpaid-invoices])
status (re-frame/subscribe [::subs/status])] status (re-frame/subscribe [::subs/status])]
[:div {:class "inbox-messages"} [:div
[:h1.title "Paid invoices"] [:h1.title "Paid invoices"]
(if (:loading @status) (if (:loading @status)
[:div {:class "inbox-messages"} [:div
[:h1.title [:h1.title
[:i.fa.fa-spin.fa-spinner]]] [:i.fa.fa-spin.fa-spinner]]]
[:table {:class "table", :style {:width "100%"}} [:table {:class "table", :style {:width "100%"}}