misc: delete both web github integration and encryption

This commit is contained in:
Tienson Qin
2022-04-22 09:10:32 +08:00
parent 1ff87706f6
commit b3f67c69b1
49 changed files with 470 additions and 2516 deletions

View File

@@ -390,14 +390,6 @@
;; (let [value (not enable-block-timestamps?)]
;; (config-handler/set-config! :feature/enable-block-timestamps? value)))))
(defn encryption-row [t enable-encryption?]
(toggle "enable_encryption"
(t :settings-page/enable-encryption)
enable-encryption?
#(let [value (not enable-encryption?)]
(config-handler/set-config! :feature/enable-encryption? value))
[:div.text-sm.opacity-50 "⚠️ This feature is experimental"]))
(rum/defc keyboard-shortcuts-row [t]
(row-with-button-action
{:left-label (t :settings-page/customize-shortcuts)
@@ -552,7 +544,6 @@
preferred-workflow (state/get-preferred-workflow)
enable-timetracking? (state/enable-timetracking?)
enable-journals? (state/enable-journals? current-repo)
enable-encryption? (state/enable-encryption? current-repo)
enable-all-pages-public? (state/all-pages-public?)
logical-outdenting? (state/logical-outdenting?)
enable-tooltip? (state/enable-tooltip?)
@@ -587,7 +578,6 @@
:on-key-press (fn [e]
(when (= "Enter" (util/ekey e))
(update-home-page e)))}]]]])
(encryption-row t enable-encryption?)
(enable-all-pages-public-row t enable-all-pages-public?)
(zotero-settings-row t)
(auto-push-row t current-repo enable-git-auto-push?)]))
@@ -616,9 +606,7 @@
[_state]
(let [instrument-disabled? (state/sub :instrument/disabled?)
developer-mode? (state/sub [:ui/developer-mode?])
cors-proxy (state/sub [:me :cors_proxy])
https-agent-opts (state/sub [:electron/user-cfgs :settings/agent])
logged? (state/deprecated-logged?)]
https-agent-opts (state/sub [:electron/user-cfgs :settings/agent])]
[:div.panel-wrap.is-advanced
(when (and util/mac? (util/electron?)) (app-auto-update-row t))
(usage-diagnostics-row t instrument-disabled?)
@@ -629,36 +617,7 @@
(ui/admonition
:warning
[:p "Clearing the cache will discard open graphs. You will lose unsaved changes."])
(when logged?
[:div
[:div.mt-6.sm:mt-5.sm:grid.sm:grid-cols-3.sm:gap-4.sm:items-center.sm:pt-5
[:label.block.text-sm.font-medium.leading-5.sm:mt-px..opacity-70
{:for "cors"}
(t :settings-page/custom-cors-proxy-server)]
[:div.mt-1.sm:mt-0.sm:col-span-2
[:div.max-w-lg.rounded-md.sm:max-w-xs
[:input#pat.form-input.is-small.transition.duration-150.ease-in-out
{:default-value cors-proxy
:on-blur (fn [event]
(when-let [server (util/evalue event)]
(user-handler/set-cors! server)
(notification/show! "Custom CORS proxy updated successfully!" :success)))
:on-key-press (fn [event]
(let [k (gobj/get event "key")]
(when (= "Enter" k)
(when-let [server (util/evalue event)]
(user-handler/set-cors! server)
(notification/show! "Custom CORS proxy updated successfully!" :success)))))}]]]]
(ui/admonition
:important
[:p (t :settings-page/dont-use-other-peoples-proxy-servers)
[:a {:href "https://github.com/isomorphic-git/cors-proxy"
:target "_blank"}
"https://github.com/isomorphic-git/cors-proxy"]])])
]))
[:p "Clearing the cache will discard open graphs. You will lose unsaved changes."])]))
(rum/defcs settings
< (rum/local [:general :general] ::active)