Skip to content

Commit

Permalink
Merge branch 'master' into fix_mac_autoupdate
Browse files Browse the repository at this point in the history
  • Loading branch information
tangjeff0 authored Mar 9, 2021
2 parents 0f279c4 + 07dc655 commit 883c593
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 19 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [1.0.0-beta.52](https://github.com/athensresearch/athens/compare/v1.0.0-beta.51...v1.0.0-beta.52) (2021-03-09)


### Bug Fixes

* **clj-kondo:** upgrade CI, with-let, specter, remove #_:clj-kondo/ignore ([#769](https://github.com/athensresearch/athens/issues/769)) ([40dabd7](https://github.com/athensresearch/athens/commit/40dabd71998514b7368a8d73959b4e6e27f5cfd1))
* **web:** theme and graph conf issue [#773](https://github.com/athensresearch/athens/issues/773) ([#779](https://github.com/athensresearch/athens/issues/779)) ([8c42437](https://github.com/athensresearch/athens/commit/8c424372d9c5f8f15f54f3b9703b1d4196909e4c))
* unlinked reference overflowing content ([#770](https://github.com/athensresearch/athens/issues/770)) ([defc78d](https://github.com/athensresearch/athens/commit/defc78d3ddfa7faafc585f7e9203d5cdd5c70bb2))


### Documentation

* add download links for M1 ([6d33825](https://github.com/athensresearch/athens/commit/6d33825605ce0e09d4a5b37887c318bf6be1d96a))
* update screenshot url ([b76f45f](https://github.com/athensresearch/athens/commit/b76f45fe76fe89ba6a37764d369b23289cbaa582))
* **README:** update screenshots, add PH badge ([#774](https://github.com/athensresearch/athens/issues/774)) ([713b4a3](https://github.com/athensresearch/athens/commit/713b4a337b5716306a525d89e353311fa8cbcb7b))

## [1.0.0-beta.51](https://github.com/athensresearch/athens/compare/v1.0.0-beta.50...v1.0.0-beta.51) (2021-03-07)


Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Athens is an open-source and local-first alternative to [Roam Research](https://

**Demo Athens in your browser (no changes are saved): https://athensresearch.github.io/athens**

![graph-viz-gif](https://athens-assets-1.s3.us-east-2.amazonaws.com/hero-2.png)
![writing-demo](https://github.com/tangjeff0/athens-public/blob/main/bret-victor-demo.gif)

### Open-Source

Expand All @@ -42,7 +42,7 @@ The problem with notetaking apps like Evernote or Apple Notes is that once you w

Athens lets you take notes with minimal systems, structure, and organization, freeing you to stay creative and in flow state. Athens does this with [[bidirectional links]], ((block references)), and a graph database.

![tools-demo](https://athens-assets-1.s3.us-east-2.amazonaws.com/tools-2.png)
![graph-demo](https://github.com/tangjeff0/athens-public/blob/main/open-source-graph-demo.gif)

# [Building Locally or Contributing](CONTRIBUTING.md)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Athens",
"author": "athensresearch",
"version": "1.0.0-beta.51",
"version": "1.0.0-beta.52",
"description": "An open-source alternative to Roam Research",
"repository": {
"type": "git",
Expand Down
16 changes: 15 additions & 1 deletion src/cljs/athens/db.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,19 @@
(def ego-url "https://raw.githubusercontent.com/athensresearch/athens/master/data/ego.datoms")


;; -- seed data -----------------------------------------------------------


(def default-graph-conf
{:hlt-link-levels 1
:link-distance 50
:charge-strength -15
:local-depth 1
:root-links-only? false
:orphans? true
:daily-notes? true})


;; -- re-frame -----------------------------------------------------------

(defonce rfdb {:user "Socrates"
Expand All @@ -36,7 +49,8 @@
:mouse-down false
:daily-notes/items []
:selected/items []
:theme/dark false})
:theme/dark false
:graph-conf default-graph-conf})


;; -- JSON Parsing ----------------------------------------------------
Expand Down
11 changes: 8 additions & 3 deletions src/cljs/athens/events.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
:boot/web
(fn [_ _]
{:db db/rfdb
:dispatch-n [[:loading/unset]]}))
:dispatch-n [[:loading/unset]
[:local-storage/set-theme]]}))


(reg-event-db
Expand Down Expand Up @@ -408,8 +409,12 @@
(reg-event-fx
:get-db/init
(fn [{rfdb :db} _]
{:db (-> db/rfdb
(assoc :loading? true))
{:db (cond-> db/rfdb
true (assoc :loading? true)

(= (js/localStorage.getItem "theme/dark") "true")
(assoc :theme/dark true))

:async-flow {:first-dispatch (if false
[:local-storage/get-db]
[:http/get-db])
Expand Down
14 changes: 2 additions & 12 deletions src/cljs/athens/views/graph_page.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -92,21 +92,11 @@
(assoc db :graph-conf n-gc))))


(def default-graph-conf
{:hlt-link-levels 1
:link-distance 50
:charge-strength -15
:local-depth 1
:root-links-only? false
:orphans? true
:daily-notes? true})


(rf/reg-event-db
:graph/load-graph-conf
(fn [db _]
(let [conf (or (some->> "graph-conf" js/localStorage.getItem read-string)
default-graph-conf)]
db/default-graph-conf)]
(js/localStorage.setItem "graph-conf" conf)
(assoc db :graph-conf conf))))

Expand Down Expand Up @@ -245,7 +235,7 @@
[comp
(merge
props
{:value (or (key graph-conf) (key default-graph-conf))
{:value (or (key graph-conf) (key db/default-graph-conf))
:color "primary"
:onChange (fn [_ n-val]
(and onChange (onChange n-val))
Expand Down

0 comments on commit 883c593

Please sign in to comment.