diff --git a/.env.sample b/.env.sample index 042800e2..f4a09a57 100644 --- a/.env.sample +++ b/.env.sample @@ -22,6 +22,7 @@ ROLLBAR_CLIENT_TOKEN= # This should match rumors-api's RUMORS_LINE_BOT_SECRET APP_SECRET=CHANGE_ME +APP_ID=RUMORS_LINE_BOT # Cofacst API URL API_URL=https://cofacts-api.hacktabl.org/graphql diff --git a/src/liff/.eslintrc.js b/src/liff/.eslintrc.js index 0a84fabb..591c6347 100644 --- a/src/liff/.eslintrc.js +++ b/src/liff/.eslintrc.js @@ -30,7 +30,9 @@ module.exports = { liff: 'readonly', // Define plugin + APP_ID: 'readonly', LIFF_ID: 'readonly', DEBUG_LIFF: 'readonly', + COFACTS_API_URL: 'readonly', }, }; diff --git a/src/liff/App.svelte b/src/liff/App.svelte index 863a989a..cb1fbb8e 100644 --- a/src/liff/App.svelte +++ b/src/liff/App.svelte @@ -1,11 +1,13 @@ + +{#if articleData === null} +

Loading...

+{:else} + +{/if} \ No newline at end of file diff --git a/webpack.config.js b/webpack.config.js index 4d9a38f0..d44b5909 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -128,7 +128,9 @@ module.exports = { LIFF_ID: JSON.stringify( (process.env.LIFF_URL || '').replace('https://liff.line.me/', '') ), + APP_ID: JSON.stringify(process.env.APP_ID), DEBUG_LIFF: process.env.DEBUG_LIFF, + COFACTS_API_URL: JSON.stringify(process.env.API_URL), }), ], devtool: prod ? false : 'source-map',