Compare commits

..

No commits in common. "4bc594b5df58ffc8b1143a56a51422473b953b4b" and "630ef25c156ff7615843d8cf1ee65ecb33f02ebb" have entirely different histories.

14 changed files with 148 additions and 172 deletions

View file

@ -1,4 +1,4 @@
version=0.27.0
version=0.28.1
assignment-operator=end-line
break-cases=fit
break-fun-decl=wrap

View file

@ -1,30 +1,17 @@
(lang dune 3.0)
(name geochan)
(using menhir 2.1)
(implicit_transitive_deps false)
(generate_opam_files true)
(implicit_transitive_deps false)
(name geochan)
(authors "swrup <swrup@protonmail.com>" "pena <pena@kumikode.org>")
(maintainers "swrup <swrup@protonmail.com>" "pena <pena@kumikode.org>")
(license AGPL-3.0-or-later)
(authors
"swrup <swrup@protonmail.com>"
"Léo Andrès <contact@ndrs.fr>")
(maintainers
"swrup <swrup@protonmail.com>"
"Léo Andrès <contact@ndrs.fr>")
(source
(uri git+https://git.zapashcanon.fr/zapashcanon/geochan.git))
(homepage https://git.zapashcanon.fr/zapashcanon/geochan)
(bug_reports https://git.zapashcanon.fr/zapashcanon/geochan/issues)
(documentation https://doc.zapashcanon.fr/geochan)
(uri git+https://forge.kumikode.org/swrup/geochan.git))
(homepage https://forge.kumikode.org/swrup/geochan)
(bug_reports https://forge.kumikode.org/swrup/geochan/issues)
(package
(name geochan)

View file

@ -3,8 +3,8 @@ opam-version: "2.0"
synopsis: "A geo-imageboard written in OCaml"
description:
"Geochan is an open source imageboard with threads pinned to a geolocation."
maintainer: ["swrup <swrup@protonmail.com>" "Léo Andrès <contact@ndrs.fr>"]
authors: ["swrup <swrup@protonmail.com>" "Léo Andrès <contact@ndrs.fr>"]
maintainer: ["swrup <swrup@protonmail.com>" "pena <pena@kumikode.org>"]
authors: ["swrup <swrup@protonmail.com>" "pena <pena@kumikode.org>"]
license: "AGPL-3.0-or-later"
tags: [
"imageboard"
@ -14,9 +14,8 @@ tags: [
"single-page-application"
"functional-reactive-programming"
]
homepage: "https://git.zapashcanon.fr/zapashcanon/geochan"
doc: "https://doc.zapashcanon.fr/geochan"
bug-reports: "https://git.zapashcanon.fr/zapashcanon/geochan/issues"
homepage: "https://forge.kumikode.org/swrup/geochan"
bug-reports: "https://forge.kumikode.org/swrup/geochan/issues"
depends: [
"dune" {>= "3.0"}
"bos"
@ -64,4 +63,4 @@ build: [
"@doc" {with-doc}
]
]
dev-repo: "git+https://git.zapashcanon.fr/zapashcanon/geochan.git"
dev-repo: "git+https://forge.kumikode.org/swrup/geochan.git"

View file

@ -123,7 +123,6 @@ let add_user_404 id =
| _ -> session
in
update_session session;
begin
match find_user id with Some _ -> update_user None | None -> ()
begin match find_user id with Some _ -> update_user None | None -> ()
end;
()

View file

@ -148,9 +148,7 @@ let mk_comment_div t_s =
t_s
|> S.changes
|> E.filter_map (fun rf ->
match rf.Post_form_data.is_open with
| false -> None
| true -> Some true )
match rf.Post_form_data.is_open with false -> None | true -> Some true )
in
Elr.set_has_focus ~on:focus_e textarea;
El.div ~at:[ class' "comment-input-div" ] [ label; textarea ]
@ -258,9 +256,7 @@ let profile user =
user.avatar_info
|> Option.map (fun _ ->
let input_el =
El.input
~at:[ type' "hidden"; name "delete-avatar"; value "" ]
()
El.input ~at:[ type' "hidden"; name "delete-avatar"; value "" ] ()
in
let btn = mk_btn "delete current avatar" in
mk ~btn [ input_el ] )

View file

@ -258,8 +258,7 @@ let do_action : Client_types.action -> t -> t =
let quickview =
opt |> Option.map (fun (rect, v) -> (rect, Loading v)) |> load_quickview
in
begin
match quickview with
begin match quickview with
| Some (_, Loading post_id) -> Network.GET.post post_id
| _ -> ()
end;
@ -270,8 +269,7 @@ let do_action : Client_types.action -> t -> t =
let do_data_update : Client_types.data_update -> t -> t =
fun action t ->
Fmt.pr {|do data update: "%a"@.|} pp_data_update action;
begin
match action with
begin match action with
| Post_update v -> Db.add_post v
| Thread_update thread_w_reply ->
Db.update_thread_w_reply (Some thread_w_reply)

View file

@ -72,8 +72,7 @@ let on_link_click () =
let navigation_handler ev =
(* TODO rm magick if possible *)
let el : El.t = Obj.magic (Ev.target ev) in
begin
if Jstr.equal (El.tag_name el) (Jstr.v "a") then
begin if Jstr.equal (El.tag_name el) (Jstr.v "a") then
match El.at (Jstr.v "href") el with
| None -> Fmt.failwith "<a> element with no href"
| Some href -> begin

View file

@ -81,8 +81,7 @@ module GET = struct
fun req v ->
let open Client_types in
let open Events in
begin
match req with
begin match req with
| Catalog -> send_data_update (Catalog_update v)
| Thread _id -> send_data_update (Thread_update v)
| Post _id -> send_data_update (Post_update v)
@ -155,8 +154,7 @@ module POST = struct
fun o v ->
let open Client_types in
let open Events in
begin
match o with
begin match o with
| Home ->
send_data_update (Thread_update v);
send_action (Post_form_change Form_reset);

View file

@ -1,7 +1,7 @@
default_logger true
custom_logger true
admin admin
source_code_url "https://git.zapashcanon.fr/swrup/geochan"
source_code_url "https://forge.kumikode.org/swrup/geochan"
hostname "localhost"
port 3696
csrf_lifetime 3600