Skip to content

Commit beedefd

Browse files
committed
Merge branch 'dev' into main
2 parents 0aa8752 + bb1e7f0 commit beedefd

7 files changed

Lines changed: 38 additions & 19 deletions

File tree

apps/client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"electron-updater": "4.3.1",
5959
"express": "4.18.2",
6060
"highlight.js": "11.6.0",
61-
"html2canvas": "^1.4.1",
61+
"html2canvas": "npm:@deepnotes/html2canvas@^1.4.2",
6262
"ioredis": "npm:@deepnotes/ioredis@5.3.1",
6363
"js-base64": "3.7.3",
6464
"katex": "^0.16.4",

apps/client/src/code/pages/composables/use-page-navigation-interception.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@ export function usePageNavigationInterception() {
1111

1212
// Ignore if it's not a link
1313

14-
const anchor = target.closest('a[href]');
14+
const closestAnchor = target.closest('a');
1515

16-
if (anchor == null) {
16+
const href = closestAnchor?.getAttribute('href') ?? '';
17+
18+
if (!href) {
19+
event.preventDefault();
1720
return;
1821
}
1922

@@ -35,8 +38,6 @@ export function usePageNavigationInterception() {
3538

3639
// Allow default action if it's not a page link
3740

38-
const href = anchor.getAttribute('href') ?? '';
39-
4041
if (
4142
!(
4243
href.startsWith('/pages/') ||

apps/client/src/layouts/PagesLayout/MainContent/DisplayPage/DisplayScreens/DisplayWorld/DisplayNote/NoteContent.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
:style="{ cursor: note.react.cursor }"
77
tabindex="-1"
88
target="_blank"
9+
draggable="false"
910
>
1011
<div
1112
class="note-content"
@@ -53,7 +54,7 @@ function onLeftPointerDown(event: PointerEvent) {
5354
}
5455
5556
if (
56-
(note.react.collab.link || (event.target as Element).closest('a[href]')) &&
57+
note.react.collab.link &&
5758
!event.altKey &&
5859
!event.shiftKey &&
5960
!internals.mobileAltKey &&

apps/client/src/layouts/PagesLayout/MainContent/DisplayPage/DisplayScreens/DisplayWorld/DisplayNote/NoteSection/NoteContainerSection/NoteListContainer.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,5 +286,7 @@ useResizeObserver(
286286
display: flex;
287287
288288
margin: 3px;
289+
290+
cursor: default;
289291
}
290292
</style>

apps/client/src/layouts/PagesLayout/MainContent/DisplayPage/DisplayScreens/DisplayWorld/DisplayNote/NoteSection/NoteContainerSection/NoteSpatialContainer.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
>
99
<div
1010
class="note-spatial-background"
11-
@click.left="onLeftClick"
11+
@click.left.stop.prevent="onLeftClick"
1212
>
1313
<!-- Placeholder -->
1414

@@ -147,6 +147,8 @@ async function onLeftClick(event: MouseEvent) {
147147
border-radius: 5px;
148148
149149
background-color: rgba(0, 0, 0, 0.4);
150+
151+
cursor: default;
150152
}
151153
152154
.note-spatial-background {

apps/client/src/layouts/PagesLayout/MainToolbar/TakeScreenshotDialog.vue

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,17 @@
1818
v-model="margin"
1919
style="width: 160px"
2020
/>
21+
22+
<Gap style="height: 16px" />
23+
24+
<q-input
25+
label="Scale (%):"
26+
type="number"
27+
filled
28+
dense
29+
v-model="scale"
30+
style="width: 160px"
31+
/>
2132
</q-card-section>
2233
</template>
2334

@@ -43,6 +54,8 @@
4354

4455
<script lang="ts">
4556
const margin = ref(100);
57+
58+
const scale = ref(100);
4659
</script>
4760

4861
<script setup lang="ts">
@@ -87,7 +100,7 @@ async function takeScreenshot() {
87100
`.display-world[data-page-id="${page.value.id}"]`,
88101
) as HTMLElement,
89102
{
90-
scale: 1 / page.value.camera.react.zoom,
103+
scale: (1 / page.value.camera.react.zoom) * (scale.value / 100),
91104
92105
x: -finalMargin * page.value.camera.react.zoom + displayRect.topLeft.x,
93106
y: -finalMargin * page.value.camera.react.zoom + displayRect.topLeft.y,
@@ -110,7 +123,7 @@ async function takeScreenshot() {
110123
111124
const dataUrl = canvas.toDataURL('image/png');
112125
113-
download(dataUrl, 'screenshot.png', 'image/png');
126+
download(dataUrl, 'DeepNotes-screenshot.png', 'image/png');
114127
115128
dialogRef.value.onDialogOK();
116129
}

pnpm-lock.yaml

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)