Browse Source

fix: modal width tweaks

Tienson Qin 4 years ago
parent
commit
5261460a7d

+ 14 - 14
src/main/frontend/components/commit.cljs

@@ -38,22 +38,22 @@
   [state close-fn]
   (let [electron? (util/electron?)]
     (when-let [repo (state/sub :git/current-repo)]
-      [:div.w-full.sm:max-w-lg.sm:w-96
-      [:div.sm:flex.sm:items-start
-       [:div.mt-3.text-center.sm:mt-0.sm:text-left.mb-2
-        [:h3#modal-headline.text-lg.leading-6.font-medium
-         "Your commit message:"]]]
+      [:div
+       [:div.sm:flex.sm:items-start
+        [:div.mt-3.text-center.sm:mt-0.sm:text-left.mb-2
+         [:h3#modal-headline.text-lg.leading-6.font-medium
+          "Your commit message:"]]]
 
-      [:input#commit-message.form-input.block.w-full.sm:text-sm.sm:leading-5.my-2
-       {:auto-focus true
-        :default-value ""}]
+       [:input#commit-message.form-input.block.w-full.sm:text-sm.sm:leading-5.my-2
+        {:auto-focus true
+         :default-value ""}]
 
-      [:div.mt-5.sm:mt-4.sm:flex.sm:flex-row-reverse
-       [:span.flex.w-full.rounded-md.shadow-sm.sm:ml-3.sm:w-auto
-        [:button.inline-flex.justify-center.w-full.rounded-md.border.border-transparent.px-4.py-2.bg-indigo-600.text-base.leading-6.font-medium.text-white.shadow-sm.hover:bg-indigo-500.focus:outline-none.focus:border-indigo-700.focus:shadow-outline-indigo.transition.ease-in-out.duration-150.sm:text-sm.sm:leading-5
-         {:type "button"
-          :on-click commit-and-push!}
-         (if electron? "Commit" "Commit and push!")]]]])))
+       [:div.mt-5.sm:mt-4.sm:flex.sm:flex-row-reverse
+        [:span.flex.w-full.rounded-md.shadow-sm.sm:ml-3.sm:w-auto
+         [:button.inline-flex.justify-center.w-full.rounded-md.border.border-transparent.px-4.py-2.bg-indigo-600.text-base.leading-6.font-medium.text-white.shadow-sm.hover:bg-indigo-500.focus:outline-none.focus:border-indigo-700.focus:shadow-outline-indigo.transition.ease-in-out.duration-150.sm:text-sm.sm:leading-5
+          {:type "button"
+           :on-click commit-and-push!}
+          (if electron? "Commit" "Commit and push!")]]]])))
 
 (defn show-commit-modal! [e]
   (when (and

+ 2 - 2
src/main/frontend/components/encryption.cljs

@@ -58,7 +58,7 @@
   (rum/with-context [[t] i18n/*tongue-context*]
     (let [password (get state ::password)
           password-confirm (get state ::password-confirm)]
-      [:div.sm:w-96
+      [:div
        [:div.sm:flex.sm:items-start
         [:div.mt-3.text-center.sm:mt-0.sm:text-left
          [:h3#modal-headline.text-lg.leading-6.font-medium.font-bold
@@ -108,7 +108,7 @@
 (rum/defcs encryption-setup-dialog-inner
   [state repo-url close-fn]
   (rum/with-context [[t] i18n/*tongue-context*]
-    [:div.sm:w-96
+    [:div
      [:div.sm:flex.sm:items-start
       [:div.mt-3.text-center.sm:mt-0.sm:text-left
        [:h3#modal-headline.text-lg.leading-6.font-medium

+ 3 - 3
src/main/frontend/components/export.cljs

@@ -10,7 +10,7 @@
   []
   (when-let [current-repo (state/get-current-repo)]
     (rum/with-context [[t] i18n/*tongue-context*]
-      [:div.export.w-96
+      [:div.export
        [:h1.title "Export"]
 
        [:ul.mr-1
@@ -48,7 +48,7 @@
   (when-let [current-repo (state/get-current-repo)]
     (when-let [page (state/get-current-page)]
       (rum/with-context [[t] i18n/*tongue-context*]
-        [:div.export.w-96
+        [:div.export
          [:h1.title "Export"]
          [:ul.mr-1
           [:li.mb-4
@@ -85,7 +85,7 @@
           :opml (export/export-blocks-as-opml current-repo root-block-ids)
           :html (export/export-blocks-as-html current-repo root-block-ids)
           (export/export-blocks-as-markdown current-repo root-block-ids text-indent-style (into [] text-remove-options)))]
-    [:div.export.w-96.resize
+    [:div.export.resize
      [:div
       {:class "mb-2"}
       (ui/button "Text"

+ 1 - 1
src/main/frontend/components/page.cljs

@@ -230,7 +230,7 @@
   [state title page-name close-fn]
   (let [input (get state ::input)]
     (rum/with-context [[t] i18n/*tongue-context*]
-      [:div.w-full.sm:max-w-lg.sm:w-96
+      [:div
        [:div.sm:flex.sm:items-start
         [:div.mt-3.text-center.sm:mt-0.sm:text-left
          [:h3#modal-headline.text-lg.leading-6.font-medium

+ 1 - 1
src/main/frontend/components/shell.cljs

@@ -22,7 +22,7 @@
                                   (run-command command)))))
   [state]
   [:div.flex.flex-col
-   [:div.w-full.mx-auto.sm:max-w-lg.sm:w-96
+   [:div
     [:div
      [:div
       [:h1.title

+ 1 - 1
src/main/frontend/components/shortcut.cljs

@@ -13,7 +13,7 @@
   [state _ action-name current-binding]
   (let [keypress (:rum/local state)
         keyboard-shortcut (if (= "" @keypress) current-binding @keypress)]
-    [:div.w-full.sm:max-w-lg.sm:w-96
+    [:div
      [:div
       [:p.mb-4 "Press any sequence of keys to set the shortcut for the " [:b action-name] " action."]
       [:p.mb-4.mt-4

+ 1 - 1
src/main/frontend/extensions/zotero.cljs

@@ -297,7 +297,7 @@
   (rum/local "" ::input)
   [state profile* close-fn]
   (let [input (get state ::input)]
-    [:div.w-full.sm:max-w-lg.sm:w-96
+    [:div
      [:div.sm:flex.sm:items-start
       [:div.mt-3.text-center.sm:mt-0.sm:text-left
        [:h3#modal-headline.text-lg.leading-6.font-medium