feat: copy feeds from user menu

This commit is contained in:
ThatOneCalculator 2023-07-17 17:10:25 -07:00
parent d4aeacfae6
commit 5dff9df704
No known key found for this signature in database
GPG Key ID: 8703CACD01000000
2 changed files with 32 additions and 0 deletions

View File

@ -2104,3 +2104,7 @@ _skinTones:
medium: "Medium"
mediumDark: "Medium Dark"
dark: "Dark"
_feeds:
rss: "RSS"
atom: "Atom"
jsonFeed: "JSON Feed"

View File

@ -245,6 +245,34 @@ export function getUserMenu(user, router: Router = mainRouter) {
router.push(`/user-info/${user.id}`);
},
},
{
icon: "ph-newspaper ph-bold ph-lg",
text: i18n.ts.copyFeed,
type: "parent",
children: [
{
icon: "ph-rss ph-bold ph-lg",
text: i18n.ts._feeds.rss,
action: () => {
copyToClipboard(`https://${host}/@${user.username}.rss`);
},
},
{
icon: "ph-atom ph-bold ph-lg",
text: i18n.ts._feeds.atom,
action: () => {
copyToClipboard(`https://${host}/@${user.username}.atom`);
},
},
{
icon: "ph-brackets-curly ph-bold ph-lg",
text: i18n.ts._feeds.jsonFeed,
action: () => {
copyToClipboard(`https://${host}/@${user.username}.json`);
},
},
],
},
{
icon: "ph-envelope-simple-open ph-bold ph-lg",
text: i18n.ts.sendMessage,