Commit Graph

83 Commits

Author SHA1 Message Date
Brad Fitzpatrick 2d30988009 Remove CamliNetIP, camnetdns, gpgchallenge
These were all part of an earlier effort to let it be easy for people
to easily deploy their own Perkeep servers and get them on the
internet. The idea was that we'd run a small DNS server which would
map from GPG public keys to their rented cloud IPs which users would
prove to us with the gpgchallenge stuff.

The recently added Tailscale support (see 43f34e5cc5, #1668) makes
most of this redundant.

Also I'd stopped running this infrastructure ages ago and removed the
launcher code recently in b5823a65b9 (and disabled it in
c9f78d02ad). So this was all basically dead code.

Signed-off-by: Brad Fitzpatrick <brad@danga.com>
2024-01-02 13:30:20 -08:00
Brad Fitzpatrick 43f34e5cc5 auth, webserver, serverinit: add Tailscale tsnet support
Updates #1668

Co-authored-by: Will Norris <will@willnorris.com>
Signed-off-by: Brad Fitzpatrick <brad@danga.com>
2024-01-02 12:58:44 -08:00
Brad Fitzpatrick 98dff16008 clients/web/embed/closure: use modern go:embed instead of old bespoke make.go hack
Signed-off-by: Brad Fitzpatrick <brad@danga.com>
2023-12-31 12:15:42 -08:00
Brad Fitzpatrick bec657b7e2 Remove legacy +build comments; use go:build only
Signed-off-by: Brad Fitzpatrick <brad@danga.com>
2023-12-31 09:18:39 -08:00
Brad Fitzpatrick a549aab217 Remove legacy Google AppEngine alternate implementations
AppEngine lets you do just about anything these days. No need to cater
to the ancient limited version.

Signed-off-by: Brad Fitzpatrick <brad@danga.com>
2023-12-31 08:50:03 -08:00
Grant 199456cf97 Update map.js to use correct tile.osm.org URL
See: https://github.com/openstreetmap/operations/issues/737
2023-09-02 12:14:08 -07:00
Oleksandr Redko 001c417e73
all: replace deprecated io/ioutil with io and os (#1647) 2023-01-23 10:25:14 -08:00
Brad Fitzpatrick 921894783b all: gofmt for Go 1.19
Signed-off-by: Brad Fitzpatrick <brad@danga.com>
2022-12-31 22:45:40 -08:00
Michael Hoffmann b67ce5ab74
perkeepd: delete perkeepd test 2022-12-17 22:02:54 +01:00
Will Norris 5af672029e geocode: add support for openstreetmap geocoding api 2022-06-17 07:36:42 -07:00
kalidor eed05eef5b B2 configuration line build s3 config 2022-06-17 07:34:44 -07:00
luz paz d605f86c82 Fix various typos
Found via `codespell -q 3 -S ./clients/web/embed,./clients/chrome -L ba,everytime,impres,keypair,msdos,pres,ro,te,ue`
2022-05-02 14:31:09 -07:00
Tamás Gulácsi c986ee3c62
Use modernc.org/sqlite (#1581)
* Use modernc.org/sqlite

This way it can be enabled by default, as it is a cgo-free, Go-only package.
No need for build tags, conditional compilation (whether libsqlite3-dev is installed).

* make.go: Remove unused -sqlite flag

* Remove use of -sqlite flag
2021-12-27 12:18:08 -08:00
Alexandre Viau ccad6635e4
move to go:embed (#1396) 2021-07-29 15:24:05 -04:00
aviau c5a95677e7 buildsystem: deprecate perkeepd goui
- GopherJS is no longer required to build the perkeepd ui.

- Rename the `-buildWebUI` flag to `-buildPublisherUI`. Only the
  publisher needs gopherjs.

- Adapt `make.go` so that it no longer tries to generate the perkeepd
  web interface with GopherJS.

- Adapt `make.go` so that it no longer tries to download goui.js from
  perkeep.org as it isn't needed anymore.
2021-01-23 19:45:14 -05:00
aviau a039b4fee5 mapquery: Go -> JS 2021-01-21 17:40:44 -05:00
aviau 6975588c02 IsBlobRef: go -> JS 2021-01-21 17:13:34 -05:00
aviau 627149a7ed ShareItem: goui -> JS 2021-01-19 18:40:30 -05:00
aviau 42a972bed2 DirChildren: goui -> JS 2021-01-19 01:13:23 -05:00
aviau 62e67790bc ImportShare: goui -> JS 2021-01-19 00:55:36 -05:00
aviau 9534e2b534 handleAbout: move to index.js
All other buttons from the top menu are implemented like this, and
the go ones were an exception. This isn't in go anymore so we should
just use `getMenuItem_` like all others and implement the event
handler in index.js.
2021-01-19 00:42:00 -05:00
aviau 40f12e532c SelectAllBtn: goui -> JS 2021-01-17 18:54:26 -05:00
aviau 7bda39dee3 aboutdialog: migrate from goui to JS 2021-01-16 23:13:53 -05:00
aviau 30af144717 downloadbutton: missing return + leftover file
Remove leftover generated file from
1700b5be5f.

Also add missing return, causing two downloads to start
when selecting a single file.
2021-01-14 16:35:55 -05:00
aviau 1700b5be5f downloadbutton: migrate from goui to JS 2021-01-14 09:51:42 -05:00
aviau 5d8a9e87f7
gopherjs -> goplusjs
github.com/gopherjs/gopherjs no longer supports new Go versions and
doing a full perkeep build currently requires go 1.12.

This moves to github.com/goplusjs/gopherjs which supports new Go
version. Building perkeep no longer requires go 1.12.

- Support building webui with just go 1.15
- Before this PR, reactGen was built from the vendor directory.
  Now, it is built with gomodules. We can't run it with `go run`
  because it breaks myitcv.io/gogenerate which they use to determine
  what file to compile.
- go.mod: require go 1.15
- goplusjs/gopherjs is built and ran with gomodules. We run it
  with go run github.com/goplusjs/gopherjs
- Add test-tidy workflow to ensure that go.mod can't drift.
- We use go run -mod=readonly so packages are not sneakily updated.
  Any update in go.mod should be voluntary.
2021-01-13 21:55:21 -05:00
Ian Denhardt d9e34b748c Web UI: viewer for plain text files
This just generalizes PdfDetail to also recognize text/plain. It has
been renamed BrowserViewDetail to reflect its more general nature.

Adding more formats will now be trivial: just add entries to the
`supportedMimeTypes` array.
2019-12-03 16:22:03 +01:00
mpl 1625019561
Merge pull request #1260 from omarchehab98/uiaudio
server/perkeepd/ui: Implement blob audio
2019-06-16 01:13:32 +02:00
Omar Chehab 5c043c6311 server/perkeepd/ui: Fix blob item video play button styling
Closes #776

Change-Id: I85c17f5478b476c06de611f759f618e608120976
2019-06-12 09:53:06 -07:00
Omar Chehab 99f2e2dcb4 server/perkeepd/ui: Implement blob detail audio
Summary:

Implement audio player using web ui.

Add new blob aspect for audio files.

Test Plan:

1. Upload browser compatible audio to perkeep
2. Navigate to web UI
3. Open the audio blob's detail page
4. Play audio

Before:

Audio cannot be played using web ui

After:

Compatible audio can be played and paused from the detail page

Audio title and artist are shown if available

Issue: #202
Change-Id: Icd450aaa16e9e622a677c23f4f1f699784453dbc
2019-06-11 19:21:12 -07:00
Omar Chehab a838f6e15a server/perkeepd/ui: Implement blob item audio
Summary:

Implement audio preview using web ui.

Add new blob handler for audio files.

Test Plan:

1. Upload browser compatible audio to perkeep
2. Navigate to web UI
3. Play audio without leaving perkeep ui
4. Pause audio

Before:

Audio cannot be played using web ui

After:

Compatible audio can be visually identified by the volume icon instead of the default file icon.

Hovering over the audio blob shows a play button.

Click the play button to start playing the audio.

Click the pause button to stop playing the audio.

Issue: #202

Change-Id: Iab8ee4a339f44178992e11e02232d480cd534b3e
2019-06-11 19:21:04 -07:00
mpl 9417938aa3 vendor: update a bunch of dependencies, and clean some things up
This change:

1) makes perkeep.org/server/perkeepd/ui/goui a module on its own, so that it
gets ignored by go mod with respect to perkeep.org. Because there's no reason it
should appear in perkeep.org/go.mod, as it is only used by gopherjs to rebuild
the web UI code.
2) updates a few of our dependencies to keep up with upstream changes (go get
-u, go mod tidy, go mod vendor).
3) readds manually (since go mod vendor removes them)
vendor/github.com/gopherjs/gopherjs (and its deps) as well as vendor/myitcv.io
because they are needed when one wants to rebuild the web UI.

As a result I think we can now drop dep, so it is done in this change as
well.

Change-Id: I155819163e15e214a6ba44bab2c19ae171d83d1b
2019-05-30 02:03:30 +02:00
Ian Denhardt 9601cf75f8 Web UI: Render PDFs in detail view.
Per the comment, this is pretty straightforward: just embed it in an
iframe

Tested in Firefox and Chromium.

Fixes #795

Change-Id: Ic9620ae974a4c6c562c769db4f2c0f76f22a4041
2019-05-04 01:27:21 -04:00
Mathieu Lonjaret aa7ab23772 Merge "pkg/importer: add "instapaper" importer for Instapaper service" 2018-12-03 15:07:30 +00:00
Angel 3dbb01138f pkg/importer: add "instapaper" importer for Instapaper service
A working importer for the Instapaper service. The importer imports
bookmarks, full text articles, and highlights. A blob item handler for
Instapaper highlight permanodes is included to show summarized highlight
content from the server UI.

Also, this CL updates github.com/garyburd.com/go-auth to rev
bca2e7f09a178fd36b034107a00e2323bca6a82e in order to get support for
XAuth requests.

Fixes #1208

Change-Id: I72e0c40b245c7eec4a44bb475fcaa96a0ee9a1c5
2018-11-26 07:57:08 -05:00
mpl dc4c57880c server/perkeepd/ui: use TokenOrNone in selectall
Omission from 8130bd61ef

Change-Id: Iecf31de608283f12d48ef150d42c7cf55c055d16
2018-10-07 19:16:33 +02:00
mpl 8130bd61ef server/perkeepd/ui/goui: suppress basic auth on OmitAuthToken
The javascript code was taking into account the OmitAuthToken signal
that there should be no auth, but it hadn't been done in the gopherjs
code yet as well.

Fixes #1221

Change-Id: I3eda0cc12c99664739d6073cc1aeba1aeed8a88a
2018-09-26 20:00:36 +02:00
mpl 2453859515 server/perkeepd/ui: actually use defaults for dialog size
Change-Id: I69a3406db8fd71618b1b8feba207707aef726db9
2018-09-25 20:02:38 +02:00
mpl 44db6d9b98 server/perkeepd/ui: treat ref: as special case only with full blobRef
The ref: predicate was treated as a special case, to make it correspond
to navigating to a "blobRef URL", e.g.
http://localhost:3179/ui/sha224-b6a88695e3a9178d45fdfb1fa888939d5adc090f866aaa1d7b5ec3a5

However, we should not do that when the query is only for the prefix of
a blobRef, e.g. "ref:sha224-b6a88695".
This CL therefore adds a check to make sure we're in the presence of a
full blobRef before navigating to the special case.

Fixes #1119

Change-Id: Ib92b43adbb2316c1607d617eb03de132c38de85f
2018-09-19 03:01:02 +02:00
Mathieu Lonjaret 9a49f0959d Merge "importer/twitter: add likes import" 2018-08-21 23:53:37 +00:00
mpl 0888d28260 all: fix misc bugs found with go test ./...
Change-Id: If5bda860c9cc6bdc14c2977646516c58d17d62de
2018-08-17 02:17:54 +02:00
Niklas Merz 05f86e7846
importer/twitter: add likes import
Import liked tweets via favorites API

Change-Id: I8000bcd20cd895e540ec4d3b36035531172c7cb6
2018-08-14 17:49:37 +02:00
mpl f6280b16cd server/perkeepd: fix typo in log message
Change-Id: I56d4534ba92fd7e4b78613d697f8af6671b6ecfe
2018-08-08 18:33:34 +02:00
Mathieu Lonjaret 82925c5010 Merge "perkeepd: remove map zoom guided by loc: or locrect:" 2018-08-02 18:11:12 +00:00
Mathieu Lonjaret e66f5ce20a Merge "server/perkeepd/ui: display search query errors" 2018-08-02 17:56:49 +00:00
mpl 5e271c0e08 perkeepd: remove map zoom guided by loc: or locrect:
As well as the rectangle which was drawn to show the area corresponding
to the requested location.

The initial zoom is now only based on the location of the search
results.

As (the intended) side-effect, geocoding requests are not needed
anymore, since the map aspect does not need to know the coordinates of a
loc: request anymore. Which allowed to trim down the
server/perkeepd/ui/goui/geo pkg.

Updates #1115

Change-Id: I22983661fd482b652d8bf34a63fa88d7b7695d5e
2018-08-02 03:41:07 +02:00
mpl 8b537a6630 server/perkeepd: readd log about using Lets Encrypt
Change-Id: Ia3df8ba3e10d568e8033b7b69ed8ef13e554898c
2018-07-25 19:51:48 +02:00
mpl 3f1b2f475d vendor: update golang.org/x/crypto
to c126467f60eb25f8f27e5a981f32a87e3965053f

For acme tls-alpn-01 support.
And enable it in perkeepd.
Remove http-01 challenge support.

Fixes #1078 (by making it obsolote)

Change-Id: I45220b6269024a2ff7a181f69cf708869705dca7
2018-07-24 04:03:16 +02:00
Mathieu Lonjaret 38e3e3d07a Merge "vendor: update myitcv.io" 2018-07-23 19:15:06 +00:00
Euan Kemp 4c3d497fc1 vendor: update myitcv.io
to bf2c84553c7827a1cb6cecf19424fdb93b887d5b.

This is required per the change mentioned in
https://github.com/myitcv/react/issues/116#issuecomment-405631245.

Without this change, 'dep ensure' can't be run, unless the upstream
myitcv.io html is reverted/updated or dep fixes a few issues allowing
project-root calculations to be overridden.

Change-Id: I63ab98b8701dcea753d4e67828f47227801638be
2018-07-23 09:56:03 -07:00