aboutsummaryrefslogtreecommitdiff
path: root/priv/discord_activity.html.eex
diff options
context:
space:
mode:
authorArjun Satarkar <me@arjunsatarkar.net>2024-07-26 14:20:14 +0000
committerArjun Satarkar <me@arjunsatarkar.net>2024-07-26 14:23:53 +0000
commitcd794243a5bba358d995e26ba024268e7d5d3f85 (patch)
tree2df6974cc40f736441f7b985ca95a7f897f4510e /priv/discord_activity.html.eex
parent37ab5213a368926506206cb21a438cb7fea3d530 (diff)
downloadmediasync-cd794243a5bba358d995e26ba024268e7d5d3f85.tar
mediasync-cd794243a5bba358d995e26ba024268e7d5d3f85.tar.gz
mediasync-cd794243a5bba358d995e26ba024268e7d5d3f85.zip
Add Discord Activity functionality (mostly) + general improvements
Diffstat (limited to 'priv/discord_activity.html.eex')
-rw-r--r--priv/discord_activity.html.eex30
1 files changed, 30 insertions, 0 deletions
diff --git a/priv/discord_activity.html.eex b/priv/discord_activity.html.eex
new file mode 100644
index 0000000..83bda0d
--- /dev/null
+++ b/priv/discord_activity.html.eex
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="robots" content="noindex, nofollow">
+ <title>discord activity | mediasync</title>
+ <style>
+ body {
+ overflow: hidden;
+ }
+ iframe {
+ border: none;
+ }
+ html, body, iframe {
+ margin: 0;
+ width: 100%;
+ height: 100%;
+ }
+ </style>
+</head>
+<body>
+ <iframe src="/.proxy/?<%= Mediasync.Constants.query_param_discord_activity_inner() %>"></iframe>
+ <script>
+ const DISCORD_CLIENT_ID = "<%= Application.fetch_env!(:mediasync, :discord_client_id) %>";
+ </script>
+ <script src="/static/discord-embedded-app-sdk/Discord.js" type="module"></script>
+ <script src="/static/discord_activity.js" type="module"></script>
+</body>
+</html>