diff --git a/app/components/header.hbs b/app/components/header.hbs
index 368ffda..9241e1a 100644
--- a/app/components/header.hbs
+++ b/app/components/header.hbs
@@ -7,10 +7,11 @@
View on Medium
{{else}}
- {{#if this.icon}}
-
+ {{#if this.iconUrl}}
+
{{else}}
{{@pageTitle}}
{{/if}}
+ View Medium
{{/if}}
diff --git a/app/components/header.js b/app/components/header.js
index 98d7ac4..896d798 100644
--- a/app/components/header.js
+++ b/app/components/header.js
@@ -3,7 +3,8 @@ import { tracked } from '@glimmer/tracking';
import ENV from 'rss-medium-blog-viewer/config/environment';
export default class HeaderComponent extends Component {
- @tracked icon = ENV.icon_url;
+ @tracked iconUrl = ENV.icon_url;
+ @tracked mediumUrl = ENV.medium_url;
get link() {
return this.args.items[this.args.selected].link;
diff --git a/app/controllers/application.js b/app/controllers/application.js
index 7560c29..61d7457 100644
--- a/app/controllers/application.js
+++ b/app/controllers/application.js
@@ -15,11 +15,11 @@ export default class ApplicationController extends Controller {
@action
async load() {
- const medium_url = ENV.medium_url;
- const rss_2_json_api_key = ENV.rss_2_json_api_key;
+ const mediumFeedUrl = ENV.medium_feed_url;
+ const rss2JsonApiKey = ENV.rss_2_json_api_key;
try {
const response = await fetch(
- `https://api.rss2json.com/v1/api.json?rss_url=${medium_url}&api_key=${rss_2_json_api_key}`,
+ `https://api.rss2json.com/v1/api.json?rss_url=${mediumFeedUrl}&api_key=${rss2JsonApiKey}`,
);
const data = await response.json();
this.items = data.items;
diff --git a/config/environment.js b/config/environment.js
index 3d63cf8..5984f92 100644
--- a/config/environment.js
+++ b/config/environment.js
@@ -21,6 +21,7 @@ module.exports = function (environment) {
page_title: process.env.PAGE_TITLE,
icon_url: process.env.ICON_URL,
medium_url: process.env.MEDIUM_URL,
+ medium_feed_url: process.env.MEDIUM_FEED_URL,
rss_2_json_api_key: process.env.RSS_2_JSON_API_KEY,
};
diff --git a/ember-cli-build.js b/ember-cli-build.js
index 8177002..e0055fc 100644
--- a/ember-cli-build.js
+++ b/ember-cli-build.js
@@ -18,6 +18,7 @@ module.exports = function (defaults) {
'PAGE_TITLE',
'ICON_URL',
'MEDIUM_URL',
+ 'MEDIUM_FEED_URL',
'RSS_2_JSON_API_KEY',
],
},