Skip to content

Commit

Permalink
0.9.1003
Browse files Browse the repository at this point in the history
  • Loading branch information
jp-cen committed Aug 12, 2024
1 parent a2b13ea commit 76e2bbe
Show file tree
Hide file tree
Showing 16 changed files with 95 additions and 91 deletions.
132 changes: 66 additions & 66 deletions main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "make-md",
"name": "MAKE.md",
"version": "0.9.1002",
"version": "0.9.1003",
"minAppVersion": "0.16.0",
"description": "Make.md brings powerful and modern note-taking features to Obsidian. Capture, organize and connect information with more flexibility without any code.",
"author": "MAKE.md",
Expand Down
5 changes: 1 addition & 4 deletions src/adapters/obsidian/SpaceViewContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,7 @@ export class SpaceViewContainer extends ItemView {
>
<div
className={classNames(
"mk-space-scroller markdown-source-view mod-cm6",
this.superstate.settings.readableLineWidth
? "is-readable-line-width"
: ""
"mk-space-scroller markdown-source-view mod-cm6"
)}
>
<SpaceInner
Expand Down
3 changes: 1 addition & 2 deletions src/adapters/obsidian/filetypes/markdownAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,8 @@ public app: App;
if (afile && afile instanceof TFile) {
if (this.app.fileManager.processFrontMatter) {
await this.app.fileManager.processFrontMatter(afile, (frontmatter: any) => {

const newFrontmatter = content(frontmatter);

const newKeys = Object.keys(newFrontmatter);
newKeys.forEach((f) => {
frontmatter[f] = newFrontmatter?.[f];
Expand Down
2 changes: 1 addition & 1 deletion src/adapters/obsidian/replaceMobileMainMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export const ObsidianMobileMainMenu = (props: {
</button>
{props.superstate.ui.getScreenType() == ScreenType.Tablet && (
<div
aria-label={i18n.buttons.newNote}
aria-label={i18n.buttons.togglePin}
className="mk-main-menu-button"
onClick={(e) => props.plugin.app.workspace.leftSplit.togglePinned()}
>
Expand Down
1 change: 1 addition & 0 deletions src/core/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ class T {
},
buttons: {
add: "Add",
togglePin: "Toggle Pin",
refresh: "Refresh",
showHidden: "Show Hidden",
alias: "Alias",
Expand Down
1 change: 0 additions & 1 deletion src/core/react/context/ContextEditorContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,6 @@ export const ContextEditorProvider: React.FC<
}),
[predicate, data, cols, searchString]
);

const updateValue = (
column: string,
value: string,
Expand Down
1 change: 0 additions & 1 deletion src/core/spaceManager/spaceManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,6 @@ export class SpaceManager {
return f});
}
public saveTable (path: string, table: SpaceTable, force?: boolean) {

return this.adapterForPath(path).saveTable(path, table, force)
}
public deleteTable (path: string, name: string) {
Expand Down
11 changes: 4 additions & 7 deletions src/core/superstate/superstate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -556,11 +556,7 @@ public api: API;

}
const allContextsWithFile = pathState.spaces.map(f => this.spacesIndex.get(f)?.space).filter(f => f);
this.addToContextStateQueue(() => updateContextWithProperties(this, path, allContextsWithFile).then(() => {
allContextsWithFile.forEach(f => {
this.dispatchEvent("contextStateUpdated", {path: f.path})
})
}));
this.addToContextStateQueue(() => updateContextWithProperties(this, path, allContextsWithFile));
this.dispatchEvent("pathStateUpdated", {path: path})
}
);
Expand Down Expand Up @@ -771,7 +767,9 @@ public api: API;

}
if (cache.dbExists && changed)
await this.spaceManager.saveTable(path, cache.contextTable);
{
await this.spaceManager.saveTable(path, cache.contextTable);
}
this.persister.store(path, JSON.stringify(cache), 'context');
this.dispatchEvent("contextStateUpdated", {path: path});

Expand Down Expand Up @@ -965,7 +963,6 @@ public async updateSpaceMetadata (spacePath: string, metadata: SpaceDefinition)
this.addToContextStateQueue(() => updateContextWithProperties(this, path, allContextsWithFile).then(g => {

allContextsWithFile.forEach(f => {
this.reloadContext(f);
this.dispatchEvent("spaceStateUpdated", {path: f.path})
})
}));
Expand Down
2 changes: 1 addition & 1 deletion src/core/utils/contexts/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ export const updateContextWithProperties = async (
};
if (!_.isEqual(mdb, newDB))
{
await saveContext(superstate.spaceManager, space, newDB);
await saveContext(superstate.spaceManager, space, newDB, true);
}
return newDB;
})
Expand Down
5 changes: 5 additions & 0 deletions src/css/Menus/MainMenu.css
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,17 @@
font-size: 16px;
font-weight: var(--font-medium);
gap: 4px;
padding: 8px 12px !important;
}

.mk-main-menu-button > div {
display: flex;
}

.workspace-drawer.mod-left.is-pinned {
min-width: 350px;
}

.mk-main-menu-button.mk-main-menu-button-primary {
flex-grow: 1;
line-height: 1;
Expand Down
6 changes: 2 additions & 4 deletions src/css/Menus/Menu.css
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,9 @@
padding-top: var(--safe-area-inset-top);
background: var(--editor-bg-color);
}
.workspace-drawer {
position: absolute;
}

body {

body.is-mobile {
padding-top: 0 !important;
}
.mk-drawer-content.mk-drawer-modal {
Expand Down
6 changes: 6 additions & 0 deletions src/css/Panels/Navigator/FileTree.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@
.workspace-drawer-header {
padding-left: 0 !important;
}
.mk-spaces-enabled.is-tablet
.workspace-drawer.mod-left
.workspace-drawer-inner
.workspace-drawer-header {
padding-right: 0 !important;
}

.mk-spaces-enabled.is-phone
.workspace-drawer.mod-left
Expand Down
4 changes: 2 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ import { convertPathToSpace } from "core/superstate/utils/path";
import { FilesystemMiddleware, FilesystemSpaceAdapter, SpaceManager, Superstate, UIManager } from "makemd-core";

import { mkLogo } from "adapters/obsidian/ui/icons";
import { patchWorkspace, patchWorkspaceLeaf } from "adapters/obsidian/utils/patches";
import { patchFilesPlugin, patchWorkspace, patchWorkspaceLeaf } from "adapters/obsidian/utils/patches";
import { safelyParseJSON } from "utils/parsers";
import { modifyFlowDom } from "./adapters/obsidian/utils/flow/flow";

Expand Down Expand Up @@ -310,7 +310,7 @@ loadViews () {
this.superstate.settings.spacesEnabled
);

// if (!this.superstate.settings.spacesDisablePatch && this.superstate.settings.navigatorEnabled) patchFilesPlugin(this);
if (!this.superstate.settings.spacesDisablePatch && this.superstate.settings.navigatorEnabled) patchFilesPlugin(this);


}
Expand Down
3 changes: 3 additions & 0 deletions src/utils/parsers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export const parseMultiString = (str: string): string[] => str?.startsWith("[")
break;
case "option-multi":
case "link-multi":
case "context-multi":
if (typeof value === "string") {
return parseLinkString(value);
}
Expand All @@ -76,6 +77,7 @@ export const parseMultiString = (str: string): string[] => str?.startsWith("[")
);
break;
case "link":
case "context":
{
if (Array.isArray(value) &&
value.length == 1 &&
Expand All @@ -91,6 +93,7 @@ export const parseMultiString = (str: string): string[] => str?.startsWith("[")
break;
case "text":
case "tag":
case "option":
case "image":
return value;
break;
Expand Down
2 changes: 1 addition & 1 deletion styles.css

Large diffs are not rendered by default.

0 comments on commit 76e2bbe

Please sign in to comment.