diff --git a/manifest.json b/manifest.json index 2ae5bfe..19dbe5b 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "obsidian-habitica-integration", "name": "Habitica Sync", - "version": "1.0.2", + "version": "1.0.0", "minAppVersion": "0.9.12", "description": "This plugin helps integrate Habitica user tasks and stats into Obsidian", "author": "Leoh and Ran", diff --git a/package.json b/package.json index 37371e6..80f9f65 100644 --- a/package.json +++ b/package.json @@ -4,48 +4,47 @@ "description": "This plugin allows for Habitica integration into Obsidian", "main": "main.js", "scripts": { - "dev": "rollup --config rollup.config.mjs -w", - "build": "rollup --config rollup.config.mjs --environment BUILD:production", + "dev": "rollup --config rollup.config.js -w", + "build": "rollup --config rollup.config.js --environment BUILD:production", "dev2": "obsidian-plugin dev src/main.ts" }, "keywords": [], "author": "Leonard and Ran", "license": "MIT", "devDependencies": { - "@rollup/plugin-commonjs": "^25.0.7", - "@rollup/plugin-json": "^6.1.0", - "@rollup/plugin-node-resolve": "^15.2.3", - "@rollup/plugin-typescript": "^11.1.6", - "@types/markdown-it": "^13.0.7", - "@types/markdown-it-emoji": "^2.0.4", - "@types/node": "^20.11.0", - "@types/node-emoji": "^1.8.2", - "@types/react": "^18.2.47", - "@types/react-dom": "^18.2.18", - "@types/react-tabs": "^5.0.4", - "@types/twemoji": "^13.1.1", - "css-loader": "^6.9.0", - "mini-css-extract-plugin": "^2.7.7", - "obsidian": "^1.4.11", - "obsidian-plugin-cli": "^0.0.5", - "rollup": "^4.9.4", - "style-loader": "^3.3.4", - "tslib": "^2.6.2", - "typescript": "^5.3.3", - "webpack": "^5.89.0" + "@rollup/plugin-commonjs": "^18.0.0", + "@rollup/plugin-json": "^4.1.0", + "@rollup/plugin-node-resolve": "^11.2.1", + "@rollup/plugin-typescript": "^8.2.1", + "@types/markdown-it": "^12.2.3", + "@types/markdown-it-emoji": "^2.0.2", + "@types/node": "^14.14.37", + "@types/node-emoji": "^1.8.1", + "@types/react": "^17.0.27", + "@types/react-dom": "^17.0.9", + "@types/react-tabs": "^2.3.3", + "@types/twemoji": "^12.1.2", + "css-loader": "^6.4.0", + "extract-text-webpack-plugin": "^2.1.2", + "obsidian": "^0.12.0", + "obsidian-plugin-cli": "^0.4.3", + "rollup": "^2.32.1", + "style-loader": "^3.3.0", + "tslib": "^2.2.0", + "typescript": "^4.2.4" }, "dependencies": { - "markdown-it": "^14.0.0", - "markdown-it-emoji": "^2.0.2", - "moment": "^2.30.1", - "node": "^21.2.0", - "node-emoji": "^2.1.3", - "node-fetch": "^3.3.2", - "react": "^18.2.0", - "react-dom": "^18.2.0", - "react-emoji-render": "^2.0.1", - "react-markdown": "^9.0.1", - "react-tabs": "^6.0.2", - "twemoji": "^14.0.2" + "markdown-it": "^12.3.2", + "markdown-it-emoji": "^2.0.0", + "moment": "^2.29.1", + "node": "^16.10.0", + "node-emoji": "^1.11.0", + "node-fetch": "^3.0.0", + "react": "^17.0.2", + "react-dom": "^17.0.2", + "react-emoji-render": "^1.2.4", + "react-markdown": "^7.1.0", + "react-tabs": "^3.2.2", + "twemoji": "^13.1.0" } } diff --git a/rollup.config.mjs b/rollup.config.js similarity index 95% rename from rollup.config.mjs rename to rollup.config.js index 1551460..6da9767 100644 --- a/rollup.config.mjs +++ b/rollup.config.js @@ -1,32 +1,32 @@ -import typescript from '@rollup/plugin-typescript'; -import {nodeResolve} from '@rollup/plugin-node-resolve'; -import commonjs from '@rollup/plugin-commonjs'; -import json from '@rollup/plugin-json'; - -const isProd = (process.env.BUILD === 'production'); - -const banner = -`/* -THIS IS A GENERATED/BUNDLED FILE BY ROLLUP -if you want to view the source visit the plugins github repository -*/ -`; - -export default { - input: 'src/main.ts', - output: { - dir: '.', - sourcemap: 'inline', - sourcemapExcludeSources: isProd, - format: 'cjs', - exports: 'default', - banner, - }, - external: ['obsidian'], - plugins: [ - typescript(), - nodeResolve({browser: true}), - commonjs(), - json(), - ] +import typescript from '@rollup/plugin-typescript'; +import {nodeResolve} from '@rollup/plugin-node-resolve'; +import commonjs from '@rollup/plugin-commonjs'; +import json from '@rollup/plugin-json'; + +const isProd = (process.env.BUILD === 'production'); + +const banner = +`/* +THIS IS A GENERATED/BUNDLED FILE BY ROLLUP +if you want to view the source visit the plugins github repository +*/ +`; + +export default { + input: 'src/main.ts', + output: { + dir: '.', + sourcemap: 'inline', + sourcemapExcludeSources: isProd, + format: 'cjs', + exports: 'default', + banner, + }, + external: ['obsidian'], + plugins: [ + typescript(), + nodeResolve({browser: true}), + commonjs(), + json(), + ] }; \ No newline at end of file diff --git a/src/main.ts b/src/main.ts index b8eaff4..13cae87 100644 --- a/src/main.ts +++ b/src/main.ts @@ -39,7 +39,7 @@ export default class HabiticaSync extends Plugin { this.activateView(); } }); - + } async loadSettings() { this.settings = Object.assign(DEFAULT_SETTINGS, await this.loadData()) @@ -50,22 +50,22 @@ export default class HabiticaSync extends Plugin { async onunload() { await this.view.onClose(); - + this.app.workspace .getLeavesOfType(VIEW_TYPE) .forEach((leaf) => leaf.detach()); } async activateView() { this.app.workspace.detachLeavesOfType(VIEW_TYPE); - + await this.app.workspace.getRightLeaf(false).setViewState({ type: VIEW_TYPE, active: true, }); - + this.app.workspace.revealLeaf( this.app.workspace.getLeavesOfType(VIEW_TYPE)[0] ); } - + } diff --git a/src/view/Components/Taskview/Dailiesview/index.tsx b/src/view/Components/Taskview/Dailiesview/index.tsx index db5944b..9785888 100644 --- a/src/view/Components/Taskview/Dailiesview/index.tsx +++ b/src/view/Components/Taskview/Dailiesview/index.tsx @@ -62,30 +62,12 @@ export default function Index(props: any){ } }) - const allDailies = props.dailys.map((daily: any) => { - // if(daily.completed) - // return - let daily_notes = ''; - let daily_subtasks = ''; - if (props.settings.showTaskDescription) { - daily_notes = daily.notes; - } - - if (props.settings.showSubTasks) { - daily_subtasks = daily.checklist; - } - return - }) - const display =
Active Completed Not Due - All
    {incompleteDailies}
@@ -96,9 +78,6 @@ export default function Index(props: any){
    {notDueDailies}
- -
    {allDailies}
-
return(display); diff --git a/src/view/Components/Taskview/Todoview/index.tsx b/src/view/Components/Taskview/Todoview/index.tsx index 035b52e..a050528 100644 --- a/src/view/Components/Taskview/Todoview/index.tsx +++ b/src/view/Components/Taskview/Todoview/index.tsx @@ -36,10 +36,10 @@ export default function Index(props: any){ Completed -
    {incompleteTodos}
+
    {incompleteTodos}
-
    {completedTodos}
+
    {completedTodos}
diff --git a/styles.css b/styles.css index 90c9ec1..64be137 100644 --- a/styles.css +++ b/styles.css @@ -1,6 +1,10 @@ @import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@1,300&display=swap'); @import url('https://fonts.googleapis.com/css2?family=Open Sans:ital,wght@0,400;1,100&family=Roboto&display=swap'); +* { + padding: 0; +} + .add-task-input { display: flex; } @@ -41,7 +45,6 @@ font-family: Roboto, sans-serif; font-weight: bold; font-size: 16px; - padding-left: 0; } .description { @@ -320,4 +323,4 @@ button { .description>ul { list-style-type: disc; margin-left: 10% !important; -} +} \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index c6bbfcb..95b95d2 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,7 +10,6 @@ "moduleResolution": "node", "importHelpers": true, "allowSyntheticDefaultImports": true, - "esModuleInterop": true, "lib": [ "dom", "es5",