Skip to content

Commit

Permalink
Merge pull request #118 from brafdlog/SheetsExporter
Browse files Browse the repository at this point in the history
Add Google Sheets exporter with login
  • Loading branch information
baruchiro authored Nov 14, 2020
2 parents b274f58 + 5c6119b commit bdd73ce
Show file tree
Hide file tree
Showing 22 changed files with 845 additions and 972 deletions.
10 changes: 6 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
const globals = require('./globals');

const readonlyGlobals = Object.keys(globals).reduce((acc, key) => {
acc[key] = 'readonly';
return acc;
}, {});

const productionError = process.env.NODE_ENV === 'production' ? 'error' : 'warn';

module.exports = {
Expand All @@ -20,10 +25,7 @@ module.exports = {

globals: {
__static: 'writable',
...globals.reduce((prev, curr) => {
prev[curr] = 'readonly';
return prev;
}, {}),
...readonlyGlobals,
},

plugins: [
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v1
with:
node-version: 10
node-version: 12.x
- name: Install Snapcraft
uses: samuelmeuli/action-snapcraft@7510647f38ad93cd87e6d8f043bbcce816d7f3bf
# Only install Snapcraft on Ubuntu
Expand Down
11 changes: 6 additions & 5 deletions globals.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module.exports = [
'SENTRY_DSN',
'GOOGLE_CLIENT_ID',
'GOOGLE_CLIENT_SECRET',
];
module.exports = {
SENTRY_DSN: JSON.stringify(process.env.SENTRY_DSN),
// https://console.developers.google.com/apis/credentials
GOOGLE_CLIENT_ID: JSON.stringify(process.env.GOOGLE_CLIENT_ID),
GOOGLE_CLIENT_SECRET: JSON.stringify(process.env.GOOGLE_CLIENT_SECRET),
};
2 changes: 2 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { defaults } = require('jest-config');
const globals = require('./globals');

module.exports = {
preset: '@vue/cli-plugin-unit-jest/presets/typescript-and-babel',
Expand All @@ -19,4 +20,5 @@ module.exports = {
'^.+\\.js$': 'babel-jest',
'^.+\\.ts$': 'ts-jest',
},
globals
};
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
"license": "MIT",
"main": "background.js",
"private": true,
"repository": "github:brafdlog/budget-tracking",
"homepage": "https://github.com/brafdlog/budget-tracking",
"scripts": {
"serve": "vue-cli-service electron:serve",
"build": "vue-cli-service electron:build",
Expand Down Expand Up @@ -34,7 +36,7 @@
"download-chromium": "^2.2.0",
"electron-log": "^4.1.1",
"emittery": "^0.7.1",
"googleapis": "^49.0.0",
"googleapis": "^59.0.0",
"keytar": "^5.2.0",
"lodash": "^4.17.15",
"moment": "^2.24.0",
Expand Down
7 changes: 6 additions & 1 deletion src/components/app/ConfigEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<v-col class="py-0">
<v-text-field
v-model="globalConfig.numDaysBack"
class="input-element"
type="number"
label="Days back from today to take"
:rules="[rules.required, rules.positive]"
Expand All @@ -20,6 +21,7 @@
>
<v-checkbox
v-model="globalConfig.showBrowser"
class="input-element"
label="Show browser"
@change="changed = true"
/>
Expand Down Expand Up @@ -78,5 +80,8 @@ export default defineComponent({
});
</script>

<style>
<style scoped>
.input-element {
min-width: 200px;
}
</style>
6 changes: 3 additions & 3 deletions src/components/app/Exporters.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@
<ynab-exporter />
</expansion-panel>
<expansion-panel title="Google Sheets">
<google-sheets-exporter />
<spreadsheet-exporter />
</expansion-panel>
</div>
</template>

<script lang="ts">
import { defineComponent } from '@vue/composition-api';
import JsonExporter from './exporters/JsonExporter.vue';
import GoogleSheetsExporter from './exporters/GoogleSheetsExporter.vue';
import YnabExporter from './exporters/YnabExporter.vue';
import ExpansionPanel from './exporters/ExpansionPanel.vue';
import SpreadsheetExporter from './exporters/googleSheets/SpreadsheetExporter.vue';
export default defineComponent({
components: {
ExpansionPanel, JsonExporter, GoogleSheetsExporter, YnabExporter
ExpansionPanel, JsonExporter, YnabExporter, SpreadsheetExporter
},
});
</script>
Expand Down
61 changes: 0 additions & 61 deletions src/components/app/exporters/GoogleSheetsExporter.vue

This file was deleted.

189 changes: 0 additions & 189 deletions src/components/app/exporters/SpreadsheetExporter.vue

This file was deleted.

Loading

0 comments on commit bdd73ce

Please sign in to comment.