mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 18:10:06 -05:00
The web app manifest declares a share_target, so on a phone where WeKan is installed as an app it appears in Android's Share menu. Sharing a web page, a note or a message opens /share-target, "Add to WeKan": pick a board and a list, and what was shared becomes a card there - the page's title or the text's first line as the title, the text and the address in its description, the address once - and the card opens. Only boards the member may add cards to are offered, and the server checks the right to write in that list, on that board, as for any card added. models/lib/shareTarget.js turns a share into a card and holds the manifest's declaration; tests/shareTarget.test.cjs covers what browsers, notes and chat apps share, an empty share, javascript: addresses, the manifest, the route and the server's checks. Documented in docs/Platforms/FOSS/OS/Android.md. The four new strings are English placeholders until the next translation pass. Thanks to memeplex and xet7 ! Fixes #1293.
30 lines
1.0 KiB
Plaintext
30 lines
1.0 KiB
Plaintext
//- #1293: WeKan as an Android share target (models/lib/shareTarget.js). What
|
|
was shared becomes a card on the board and list picked here.
|
|
template(name="shareTarget")
|
|
.wrapper.share-target
|
|
h2
|
|
i.fa.fa-share-alt
|
|
| {{_ 'share-target-title'}}
|
|
if preview.title
|
|
.share-target-preview
|
|
strong= preview.title
|
|
if preview.description
|
|
p.quiet= preview.description
|
|
form.js-share-target-form
|
|
label
|
|
| {{_ 'boards'}}
|
|
select.js-share-target-board
|
|
option(value="") {{_ 'share-target-pick-board'}}
|
|
each writableBoards
|
|
option(value=_id selected=isSelectedBoard) {{title}}
|
|
label
|
|
| {{_ 'list'}}
|
|
select.js-share-target-list(disabled=noBoard)
|
|
each boardLists
|
|
option(value=_id) {{title}}
|
|
button.primary.js-share-target-create(type="submit" disabled=noBoard) {{_ 'share-target-create'}}
|
|
if message
|
|
p.quiet= message
|
|
else
|
|
p.quiet {{_ 'share-target-empty'}}
|