diff --git a/index.js b/index.js
index 6e8f614..9d8b25b 100644
--- a/index.js
+++ b/index.js
@@ -101,8 +101,12 @@ const template = [
role: 'help',
submenu: [
{
- label: 'Learn More',
- click() { electron.shell.openExternal('https://electronjs.org') }
+ label: 'Documentation',
+ click() { electron.shell.openExternal('https://github.com/smaeda-ks/twitter-ads-api-analytics-debugger') }
+ },
+ {
+ label: 'Report issue',
+ click() { electron.shell.openExternal('https://github.com/smaeda-ks/twitter-ads-api-analytics-debugger/issues/new/choose') }
}
]
}
diff --git a/renderer/index.html b/renderer/index.html
index 32dc184..004e272 100644
--- a/renderer/index.html
+++ b/renderer/index.html
@@ -83,12 +83,12 @@
-
-
+
+
-
+
Status |
@@ -228,7 +228,7 @@
-
+
@@ -268,7 +268,7 @@
},
components: {
'result-data-modal-template': {
- template: Enum.MODAL_TEMPLATE.MODAL_ANALYTICS_DATA(),
+ template: Enum.MODAL_TEMPLATE.MODAL_ANALYTICS_DATA,
props: [
'data'
],
@@ -292,7 +292,7 @@
},
components: {
'error-modal-template': {
- template: Enum.MODAL_TEMPLATE.MODAL_NOTIFICATION(),
+ template: Enum.MODAL_TEMPLATE.MODAL_NOTIFICATION,
props: [
'data'
]
@@ -338,7 +338,7 @@
`PROCESSING` +
`` +
`{{ item.job_id }} | ` +
- `` +
+ ` | ` +
``,
props: ['item'],
methods: {
@@ -372,7 +372,7 @@
el: '#main-form',
data: {
// Ads account id
- accountID: '',
+ accountId: '',
// entity_type
selectedEntityType: '',
listsEntityType: Enum.ENTITY_TYPE,
@@ -407,7 +407,7 @@
components: {
'input-datepicker': {
props: ['value'],
- template: ``
+ template: ``
},
},
mounted: function () {
@@ -472,7 +472,7 @@
// because we want to trigger form validations but don't need page transitions (or reload)
event.preventDefault()
- const accountId = mainForm.accountID
+ const accountId = mainForm.accountId
const metricGroups = mainForm.selectedMultiMetricGroups
// form validations
@@ -537,7 +537,7 @@
el: '#fetch-jobs-button',
methods: {
onClickFetchJobs: async () => {
- const accountId = mainForm.accountID
+ const accountId = mainForm.accountId
const jobIdsRowsIndex = {}
const parsedJobIds = tabelJobIds.items.filter((item, index) => {
if (item.status !== 'success') {
@@ -587,7 +587,7 @@
},
components: {
'config-modal-template': {
- template: Enum.MODAL_TEMPLATE.CONFIG_WINDOW(),
+ template: Enum.MODAL_TEMPLATE.CONFIG_WINDOW,
props: [
'data'
],
@@ -620,22 +620,19 @@
this.$parent.secret[key] = value
},
trapTabKey: function (event) {
- // TAB key press
- if (event.keyCode === 9) {
- firstTabStop = document.getElementById('consumer_key')
- lastTabStop = document.getElementById('save-tokens-button')
- // SHIFT + TAB
- if (event.shiftKey) {
- if (document.activeElement === firstTabStop) {
- event.preventDefault()
- lastTabStop.focus()
- }
- // TAB
- } else {
- if (document.activeElement === lastTabStop) {
- event.preventDefault()
- firstTabStop.focus()
- }
+ firstTabStop = document.getElementById('consumer_key')
+ lastTabStop = document.getElementById('save-tokens-button')
+ // SHIFT + TAB
+ if (event.shiftKey) {
+ if (document.activeElement === firstTabStop) {
+ event.preventDefault()
+ lastTabStop.focus()
+ }
+ // TAB
+ } else {
+ if (document.activeElement === lastTabStop) {
+ event.preventDefault()
+ firstTabStop.focus()
}
}
}
@@ -648,6 +645,7 @@
el: '#config-modal-open-button',
methods: {
openConfigWindow: async function () {
+ console.log('open')
// get saved tokens from keychain
const tokens = await ipcRenderer.invoke('getTokens')
configModal.secret.consumer_key = tokens.consumer_key || ""
diff --git a/utils/enum.js b/utils/enum.js
index e34d294..042a6fd 100644
--- a/utils/enum.js
+++ b/utils/enum.js
@@ -25,10 +25,10 @@ Enum.ENTITY_TYPE = [
'PROMOTED_TWEET',
'MEDIA_CREATIVE',
'PROMOTED_ACCOUNT'
-]
+];
-const MODAL_ANALYTICS_DATA_MESSAGE = () =>
- `
+const MODAL_ANALYTICS_DATA_MESSAGE =
+`
`;
-const MODAL_NOTIFICATION_MESSAGE = () =>
- `
+const MODAL_NOTIFICATION_MESSAGE =
+`
`;
-const CONFIG_WINDOW_TEMPLATE = () =>
- `
+const CONFIG_WINDOW_TEMPLATE =
+`
@@ -117,7 +117,7 @@ Enum.TIME_24H = [
"21:00",
"22:00",
"23:00"
-]
+];
Enum.SEGMENTATION_TYPE = [
"AGE",
@@ -139,7 +139,7 @@ Enum.SEGMENTATION_TYPE = [
"REGIONS",
"SIMILAR_TO_FOLLOWERS_OF_USER",
"TV_SHOWS"
-]
+];
Object.freeze(Enum);
|