From 506e6b0cab2efdb75d8314a2120fadefe48ae1cb Mon Sep 17 00:00:00 2001 From: Elias Schneider Date: Thu, 5 May 2022 11:22:47 +0200 Subject: [PATCH] Add Open Graph tags --- .setup/data/collections.ts | 4 ++-- .setup/services/setup.service.ts | 4 +--- public/img/opengraph-default.png | Bin 0 -> 11799 bytes src/components/Meta.tsx | 18 +++++++++++++++++- src/pages/_document.tsx | 7 ++++++- 5 files changed, 26 insertions(+), 7 deletions(-) create mode 100644 public/img/opengraph-default.png diff --git a/.setup/data/collections.ts b/.setup/data/collections.ts index fe5cc332..57cc220d 100644 --- a/.setup/data/collections.ts +++ b/.setup/data/collections.ts @@ -5,7 +5,7 @@ export default [ $write: [], name: "Shares", enabled: true, - permission: "document", + permission: "collection", attributes: [ { key: "securityID", @@ -70,7 +70,7 @@ export default [ $write: [], name: "ShareSecurity", enabled: true, - permission: "document", + permission: "collection", attributes: [ { key: "password", diff --git a/.setup/services/setup.service.ts b/.setup/services/setup.service.ts index de98949f..1e456bfd 100644 --- a/.setup/services/setup.service.ts +++ b/.setup/services/setup.service.ts @@ -99,6 +99,7 @@ const generateFunctionsApiKey = async () => { "buckets.read", "buckets.write", "files.read", + "users.read", ], }); return res.data.secret; @@ -142,6 +143,3 @@ export default { generateFunctionsApiKey, addPlatform, }; -function token(token: any) { - throw new Error("Function not implemented."); -} diff --git a/public/img/opengraph-default.png b/public/img/opengraph-default.png new file mode 100644 index 0000000000000000000000000000000000000000..ba000d2c9253164c892f8316035af62ddabe6d16 GIT binary patch literal 11799 zcmc(FWmJ?=_wUf5Lr6&vpma${!+;DRA)S&+h|(<~ARt{L0s=CmAf+OmqQHQ3N+VK& z5>nFlJmY)sf35rVuJzt86X!Y4IeY(hp1n`B&K*@aDFZ1C27}*LQ`UpQ@ZZ5;xIVgDKj&-m^p8cD8Y_)3dX&eeB+CCkulK)ZbQCH1M1H zHS6kRxSGx7b}l_T^VQ&%^v#zwg$WwRxRq75#yg!?qSvX79AoiaNrfn z`Euk74X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ZqwXkI IC|N)KU(nTTH~;_u literal 0 HcmV?d00001 diff --git a/src/components/Meta.tsx b/src/components/Meta.tsx index 4de68b39..97ad8f6d 100644 --- a/src/components/Meta.tsx +++ b/src/components/Meta.tsx @@ -1,9 +1,25 @@ import Head from "next/head"; -const Meta = ({ title }: { title: string }) => { +const Meta = ({ + title, + description, +}: { + title: string; + description?: string; +}) => { return ( + {/* TODO: Doesn't work because script get only executed on client side */} {title} - Pingvin Share + + + + ); }; diff --git a/src/pages/_document.tsx b/src/pages/_document.tsx index 34ff9587..9d24661e 100644 --- a/src/pages/_document.tsx +++ b/src/pages/_document.tsx @@ -11,8 +11,13 @@ export default class _Document extends Document { - + + + + + +