Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jwarwick committed Feb 1, 2021
1 parent 9db5002 commit ca9739c
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/cljs/nr/chat.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -309,4 +309,4 @@
[:h1 (tr [:chat.title "Play Android: Netrunner in your browser"])]
[news]
[chat s old scroll-top]
[:div#version [:span (str "Version " (get-data "version"))]]]))))
[:div#version [:span (str "Version " (:app-version @app-state "Unknown"))]]]))))
16 changes: 8 additions & 8 deletions src/cljs/nr/stats.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
(defn game-details [state]
(let [game (:view-game @state)]
[:div.games.panel
[:p.return-button [:button {:on-click #(swap! state dissoc :view-game)} "Return to stats screen"]]
[:p.return-button [:button {:on-click #(swap! state dissoc :view-game)} (tr [:stats.view-games "Return to stats screen"])]]
[:h4 (:title game) (when (:replay-shared game) "")]
[:div
[:div.game-details-table
Expand All @@ -69,9 +69,9 @@
[:button {:on-click #(share-replay state (:gameid game))} (tr [:stats.share "Share replay"])])
(if (:replay game)
[:span
[:button {:on-click #(launch-replay game)} "Launch Replay"]
[:a.button {:href (str "/profile/history/full/" (:gameid game)) :download (str (:title game) ".json")} (tr [:stats.download "Download replay"])]
(tr [:stats.unavailable "Replay unavailable"])])]
[:button {:on-click #(launch-replay game)} (tr [:stats.launch "Launch Replay"])]
[:a.button {:href (str "/profile/history/full/" (:gameid game)) :download (str (:title game) ".json")} (tr [:stats.download "Download replay"])]]
(tr [:stats.unavailable "Replay unavailable"]))]
(when (:replay-shared game)
[:p [:input.share-link {:type "text" :read-only true :value (replay-link game)}]])]]))

Expand Down Expand Up @@ -198,15 +198,15 @@
(fn [state list-scroll-top log-scroll-top]
(let [rev-games (reverse (:games @state))
games (if (:filter-replays @state) (filter #(:replay-shared %) rev-games) rev-games)
cnt (count games)
log-str (if (= cnt 1) "Log" "Logs")]
cnt (count games)]
[:div.game-list
[:div.controls
[:button {:on-click #(swap! state update :filter-replays not)}
(if (:filter-replays @state)
(tr [:stats.all-games "Show all games"])
(tr [:stats.shared-games "Only show shared"]))]]
[:span.log-count (str cnt " " log-str (when (:filter-replays @state) " (filtered)"))]
(tr [:stats.shared-games "Only show shared"]))]
[:span.log-count (str (tr [:stats.log-count] cnt) (when (:filter-replays @state)
(str " " (tr [:stats.filtered "(filtered)"]))))]]
(if (empty? games)
[:h4 (tr [:stats.no-games "No games"])]
(doall
Expand Down
10 changes: 8 additions & 2 deletions src/cljs/nr/translations.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -281,10 +281,13 @@
:lobby "Lobby"
:format "Format"
:win-method "Win method"
:view-games "View games"
:view-games "Return to stats screen"
:share "Share replay"
:launch "Launch Replay"
:download "Download replay"
:unavailable "Replay unavailable"
:filtered "(filtered)"
:log-count (fn [[cnt]] (str cnt " Log" (when (not= cnt 1) "s")))
:clicks-gained "Clicks Gained"
:credits-gained "Credits Gained"
:credits-spent "Credits Spent"
Expand Down Expand Up @@ -667,10 +670,13 @@
:lobby "Obbylay"
:format "Ormatfay"
:win-method "Inway ethodmay"
:view-games "Iewvay amesgay"
:view-games "Eturnray otay atsstay eenscray"
:share "Areshay eplayray"
:launch "Aunchlay Eplayray"
:download "Ownloadday eplayray"
:unavailable "Eplayray unavailableyay"
:filtered "(ilteredfay)"
:log-count (fn [[cnt]] (str cnt " Oglay" (when (not= cnt 1) "s")))
:clicks-gained "Icksclay Ainedgay"
:credits-gained "Editscray Ainedgay"
:credits-spent "Editscray Entspay"
Expand Down
4 changes: 0 additions & 4 deletions src/css/base.styl
Original file line number Diff line number Diff line change
Expand Up @@ -925,9 +925,6 @@ nav ul
.heading, .type
font-weight: bold

.card-body
padding-top: 20px

.pack
font-style: italic
margin-top: 8px
Expand Down Expand Up @@ -1040,7 +1037,6 @@ nav ul

.text
position: absolute
bottom: 10px
left: 10px
right: 10px
height: 245px
Expand Down

0 comments on commit ca9739c

Please sign in to comment.