Skip to content

Commit

Permalink
Update variables
Browse files Browse the repository at this point in the history
  • Loading branch information
junian committed Apr 24, 2024
1 parent c8fd833 commit 6a9cb20
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Word and LaTeX are too overkill for a curriculum vitae / resume.

So why not write it in Markdown?

Have fun: [ohmycv.app](https://ohmycv.app/)
Have fun: [www.juniansoft.com/resume.md](https://www.juniansoft.com/resume.md/)

**WIP**

Expand Down
2 changes: 1 addition & 1 deletion site/src/public/robots.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
User-agent: *
Allow: /

Sitemap: https://ohmycv.app/sitemap.xml
Sitemap: https://www.juniansoft.com/resume.md/sitemap.xml
16 changes: 8 additions & 8 deletions site/src/utils/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { downloadFile, uploadFile, copy, isClient } from "@renovamen/utils";
import { DEFAULT_STYLES, DEFAULT_NAME, DEFAULT_MD_CONTENT, DEFAULT_CSS_CONTENT } from ".";
import type { ResumeStorage, ResumeStorageItem, ResumeStyles } from "~/types";

const OHMYCV_KEY = "ohmycv_data";
const RESUMEMD_KEY = "resumemd_data";

export const getStorage = async () =>
isClient ? localForage.getItem<ResumeStorage>(OHMYCV_KEY) : null;
isClient ? localForage.getItem<ResumeStorage>(RESUMEMD_KEY) : null;

export const getResumeList = async () => {
const storage = (await getStorage()) || {};
Expand Down Expand Up @@ -65,7 +65,7 @@ export const saveResume = async (id: string, resume: ResumeStorageItem) => {
const storage = (await getStorage()) || {};
storage[id] = resume;

await localForage.setItem(OHMYCV_KEY, storage);
await localForage.setItem(RESUMEMD_KEY, storage);

const toast = useToast();
toast.save();
Expand Down Expand Up @@ -97,7 +97,7 @@ export const newResume = async () => {
*/
export const saveResumesToLocal = async () => {
const storage = (await getStorage()) || {};
downloadFile("ohmycv_data.json", JSON.stringify(storage));
downloadFile("resumemd_data.json", JSON.stringify(storage));
};

/**
Expand Down Expand Up @@ -150,7 +150,7 @@ export const importResumesFromLocal = async (callback?: () => void) => {
...data
};

await localForage.setItem(OHMYCV_KEY, newStorage);
await localForage.setItem(RESUMEMD_KEY, newStorage);
toast.import(true);

callback && callback();
Expand All @@ -167,7 +167,7 @@ export const deleteResume = async (id: string) => {
const name = storage[id].name;
delete storage[id];

await localForage.setItem(OHMYCV_KEY, storage);
await localForage.setItem(RESUMEMD_KEY, storage);

toast.delete(name);
}
Expand Down Expand Up @@ -200,7 +200,7 @@ export const duplicateResume = async (id: string) => {
resume.update = newId;
storage[newId] = resume;

await localForage.setItem(OHMYCV_KEY, storage);
await localForage.setItem(RESUMEMD_KEY, storage);
toast.duplicate(oldName);
}
};
Expand All @@ -209,7 +209,7 @@ export const renameResume = async (id: string, name: string) => {
const storage = (await getStorage()) || {};
storage[id].name = name;

await localForage.setItem(OHMYCV_KEY, storage);
await localForage.setItem(RESUMEMD_KEY, storage);

const toast = useToast();
toast.save();
Expand Down

0 comments on commit 6a9cb20

Please sign in to comment.