Skip to content

Commit 4062f07

Browse files
authored
Remove legacy config files (#15)
1 parent 3472004 commit 4062f07

File tree

7 files changed

+15
-12
lines changed

7 files changed

+15
-12
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ We believe in a transparent and fair world, so we open-source the app and
4848
you get a trial version for your personal use, but if you find the app helpful,
4949
please make a purchase.
5050

51-
Purchase page: https://gum.co/plainmerge (Accept Debit/Credit cards and PayPal)
51+
Purchase page: https://gum.co/plainmerge (accept Debit/Credit cards and PayPal)
5252

5353
---
5454

55-
© 2021 PlainLab
55+
© 2022 PlainLab

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
"email": "[email protected]",
101101
"url": "https://plainlab.github.io"
102102
},
103-
"license": "GPL-3.0-only",
103+
"license": "AGPL-3.0-only",
104104
"bugs": {
105105
"url": "https://github.com/plainlab/plainmerge/issues"
106106
},

src/components/merge/MailMerge.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ const MailMerge = ({ configPath }: MailMergeProps) => {
124124
}`}
125125
>
126126
<FontAwesomeIcon icon="folder" className="mr-2" />
127-
Merge to Files
127+
Merge into Files
128128
</button>
129129
</li>
130130
<li className="mr-2">
@@ -228,8 +228,8 @@ const MailMerge = ({ configPath }: MailMergeProps) => {
228228
{!smtpValid && (
229229
<section className="w-full space-y-2">
230230
<p className="text-red-500">
231-
Invalid SMTP configuration. Please configure and validate SMTP
232-
server first in the Settings menu.
231+
Invalid SMTP configuration. Please configure and validate your
232+
SMTP server in the Settings menu.
233233
</p>
234234
</section>
235235
)}

src/components/merge/MergeList.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const MergeList = () => {
5656
<section className="flex items-center justify-center">
5757
<FontAwesomeIcon
5858
icon={['far', 'trash-alt']}
59-
onClick={() => handleRemove(state.pdfFile)}
59+
onClick={() => handleRemove(state.configPath)}
6060
className="w-3 h-3 text-gray-400 cursor-pointer hover:opacity-80"
6161
/>
6262
</section>

src/components/pdf/PdfEditor.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export interface CanvasObjects {
3333
clientWidth: number;
3434
}
3535
export interface RenderPdfState {
36+
configPath: string;
3637
pdfFile: string;
3738
excelFile: string;
3839
combinePdf: boolean;

src/main.dev.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,9 @@ const saveConfig = async (params: RenderPdfState) => {
181181

182182
const loadConfig = async (fp: string) => {
183183
const data = await readFile(fp, { encoding: 'utf8' });
184-
return JSON.parse(data);
184+
const conf = JSON.parse(data);
185+
conf.configPath = fp;
186+
return conf;
185187
};
186188

187189
const loadConfigs = async () => {
@@ -204,8 +206,8 @@ const loadConfigs = async () => {
204206
return configList.filter((c: any) => c && c.pdfFile);
205207
};
206208

207-
const removeConfig = async (pdfFile: string) => {
208-
return promisify(fs.unlink)(getPathHash(pdfFile));
209+
const removeConfig = async (confPath: string) => {
210+
return promisify(fs.unlink)(confPath);
209211
};
210212

211213
const savePdf = async (params: RenderPdfState) => {

src/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "plainmerge",
33
"productName": "PlainMerge",
4-
"version": "0.2.0",
4+
"version": "0.2.1",
55
"description": "Offline PDF mail merger",
66
"main": "./main.prod.js",
77
"author": {
@@ -13,7 +13,7 @@
1313
"electron-rebuild": "node -r ../.erb/scripts/BabelRegister.js ../.erb/scripts/ElectronRebuild.js",
1414
"postinstall": "yarn electron-rebuild"
1515
},
16-
"license": "GPL-3.0-only",
16+
"license": "AGPL-3.0-only",
1717
"dependencies": {
1818
"fabric": "^4.6.0"
1919
},

0 commit comments

Comments
 (0)