From 439c2373365da4ecb412ff42961b5c3e7d66f8c4 Mon Sep 17 00:00:00 2001 From: pablodip Date: Wed, 7 Feb 2018 21:22:38 +0100 Subject: [PATCH] disable filters and sorting in windows for now --- src/cljs/commiteth/bounties.cljs | 14 ++++++++------ src/cljs/commiteth/util.cljs | 5 +++++ 2 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 src/cljs/commiteth/util.cljs diff --git a/src/cljs/commiteth/bounties.cljs b/src/cljs/commiteth/bounties.cljs index 7dfa55b..bbdceec 100644 --- a/src/cljs/commiteth/bounties.cljs +++ b/src/cljs/commiteth/bounties.cljs @@ -8,7 +8,8 @@ [commiteth.handlers :as handlers] [commiteth.db :as db] [commiteth.ui-model :as ui-model] - [commiteth.subscriptions :as subs])) + [commiteth.subscriptions :as subs] + [commiteth.util :as util])) (defn bounty-item [bounty] @@ -210,7 +211,8 @@ [:div.item-counts-label-and-sorting-container [:div.item-counts-label [:span (str "Showing " left "-" right " of " total-count)]] - [bounties-sort-view]]) + (when-not (util/os-windows?) + [bounties-sort-view])]) (display-data-page bounty-page-data bounty-item container-element)])) (defn bounties-page [] @@ -225,7 +227,7 @@ [:div.ui.container.open-bounties-container {:ref #(reset! container-element %1)} [:div.open-bounties-header "Bounties"] - [:div.open-bounties-filter-and-sort - [bounty-filters-view]] - [bounties-list @bounty-page-data container-element]])) - )) + (when-not (util/os-windows?) + [:div.open-bounties-filter-and-sort + [bounty-filters-view]]) + [bounties-list @bounty-page-data container-element]])))) diff --git a/src/cljs/commiteth/util.cljs b/src/cljs/commiteth/util.cljs new file mode 100644 index 0000000..8b6f852 --- /dev/null +++ b/src/cljs/commiteth/util.cljs @@ -0,0 +1,5 @@ +(ns commiteth.util + (:require [clojure.string :as string])) + +(defn os-windows? [] + (string/includes? (-> js/navigator .-platform) "Win"))