FEATURE: Web Share Target Support

This adds a **very basic** support for share to Discourse.

Currently, this is only supported in Android + Chrome 71+.

After installing a Discourse site to the Home Screen, you will be
able to share from anywhere in the OS to the Discourse site.

Discourse will use the title and text from the share event.
This commit is contained in:
Rafael dos Santos Silva 2018-12-07 13:48:09 -02:00
parent 160d29b18a
commit efec2db859

View File

@ -37,7 +37,14 @@ class MetadataController < ApplicationController
sizes: file_info[:size],
type: file_info[:type]
}
]
],
share_target: {
action: "/new-topic",
params: {
title: "title",
text: "body"
}
}
}
manifest[:short_name] = SiteSetting.short_title if SiteSetting.short_title.present?