mirror of
https://github.com/quorafind/Obsidian-Daily-Notes-Editor.git
synced 2026-07-22 07:00:27 +00:00
fix: cannot load in mobile
This commit is contained in:
parent
66e302562e
commit
f6023b74b7
4 changed files with 14 additions and 1 deletions
|
|
@ -31,6 +31,8 @@
|
|||
}
|
||||
});
|
||||
|
||||
console.log(shouldRender, rendered)
|
||||
|
||||
$: if (editorEl && shouldRender && !rendered) {
|
||||
showEditor();
|
||||
} else if (editorEl && !shouldRender && rendered) {
|
||||
|
|
@ -153,7 +155,7 @@
|
|||
|
||||
function handleFileIconClick() {
|
||||
if (!(file instanceof TFile)) return;
|
||||
if (leaf) {
|
||||
if (leaf && !(leaf as any)?.pinned) {
|
||||
leaf.openFile(file);
|
||||
} else plugin.app.workspace.getLeaf(false).openFile(file);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -187,6 +187,8 @@
|
|||
export function tick() {
|
||||
// First check if we need to update for a new day
|
||||
check();
|
||||
|
||||
console.log("hello")
|
||||
|
||||
// Force a refresh of the view
|
||||
renderedFiles = renderedFiles;
|
||||
|
|
@ -253,6 +255,7 @@
|
|||
|
||||
// Handle note visibility change
|
||||
function handleNoteVisibilityChange(file: TFile, isVisible: boolean) {
|
||||
console.log("inview", isVisible)
|
||||
if (isVisible) {
|
||||
visibleNotes.add(file.path);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -213,3 +213,7 @@ body.daily-notes-hide-backlinks .daily-note-view .embedded-backlinks {
|
|||
gap: var(--size-4-2);
|
||||
margin-top: var(--size-4-4);
|
||||
}
|
||||
|
||||
.is-phone .mod-root .workspace-tabs:not(.mod-visible):has(.daily-note-view) {
|
||||
display: flex !important;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -213,4 +213,8 @@ body.daily-notes-hide-backlinks .daily-note-view .embedded-backlinks {
|
|||
gap: var(--size-4-2);
|
||||
margin-top: var(--size-4-4);
|
||||
}
|
||||
|
||||
.is-phone .mod-root .workspace-tabs:not(.mod-visible):has(.daily-note-view) {
|
||||
display: flex !important;
|
||||
}
|
||||
.daily-note.svelte-1d2sruf.svelte-1d2sruf{margin-bottom:var(--size-4-5);padding-bottom:var(--size-4-8)}.daily-note.svelte-1d2sruf.svelte-1d2sruf:has(.daily-note-editor[data-collapsed="true"]){margin-bottom:0;padding-bottom:0}.daily-note-editor.svelte-1d2sruf.svelte-1d2sruf{min-height:100px}.daily-note-editor[data-collapsed="true"].svelte-1d2sruf.svelte-1d2sruf{display:none}.daily-note.svelte-1d2sruf .collapse-button.svelte-1d2sruf{display:none}.daily-note.svelte-1d2sruf:hover .collapse-button.svelte-1d2sruf{display:block}.daily-note.svelte-1d2sruf .collapse-button.svelte-1d2sruf{color:var(--text-muted)}.daily-note.svelte-1d2sruf .collapse-button.svelte-1d2sruf:hover{color:var(--text-normal)}.daily-note.svelte-1d2sruf:has(.is-readable-line-width) .daily-note-title.svelte-1d2sruf{max-width:calc(var(--file-line-width) + var(--size-4-4));width:calc(var(--file-line-width) + var(--size-4-4));margin-left:auto;margin-right:auto;margin-bottom:var(--size-4-8);display:flex;align-items:center;justify-content:start;gap:var(--size-4-2)}.collapse-button.svelte-1d2sruf.svelte-1d2sruf{margin-left:calc(var(--size-4-8) * -1)}.collapse-button[data-collapsed="true"].svelte-1d2sruf.svelte-1d2sruf{transform:rotate(-90deg);transition:transform 0.2s ease}.daily-note.svelte-1d2sruf:not(:has(.is-readable-line-width)) .daily-note-title.svelte-1d2sruf{display:flex;justify-content:start;align-items:center;width:100%;padding-left:calc(calc(100% - var(--file-line-width)) / 2 - var(--size-4-2));padding-right:calc(calc(100% - var(--file-line-width)) / 2 - var(--size-4-2));margin-top:var(--size-4-8);gap:var(--size-4-2)}.clickable-link.svelte-1d2sruf.svelte-1d2sruf{cursor:pointer;text-decoration:none}.clickable-link.svelte-1d2sruf.svelte-1d2sruf:hover{color:var(--color-accent);text-decoration:underline}.editor-placeholder.svelte-1d2sruf.svelte-1d2sruf{display:flex;justify-content:center;align-items:center;height:100px;color:var(--text-muted);font-style:italic}.collapse-button.svelte-1d2sruf.svelte-1d2sruf{cursor:pointer;display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:4px;color:var(--text-muted);transition:background-color 0.2s ease}.collapse-button.svelte-1d2sruf.svelte-1d2sruf:hover{color:var(--text-normal)}.dn-stock.svelte-4q3cv7{height:1000px;width:100%;display:flex;justify-content:center;align-items:center}.dn-stock-text.svelte-4q3cv7{text-align:center}.no-more-text.svelte-4q3cv7{margin-left:auto;margin-right:auto;text-align:center}.dn-blank-day.svelte-4q3cv7{display:flex;margin-left:auto;margin-right:auto;max-width:var(--file-line-width);color:var(--color-base-40);padding-top:20px;padding-bottom:20px;transition:all 300ms}.dn-blank-day.svelte-4q3cv7:hover{padding-top:40px;padding-bottom:40px;transition:padding 300ms}.dn-blank-day-text.svelte-4q3cv7{margin-left:auto;margin-right:auto;text-align:center}.daily-note-wrapper.svelte-4q3cv7{width:100%}
|
||||
Loading…
Reference in a new issue