@slidev/client 0.49.14 → 0.49.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -41,14 +41,20 @@ function onMousedown() {
|
|
|
41
41
|
:title="`Clicks in this slide: ${length}`"
|
|
42
42
|
:class="length && props.clicksContext.isMounted ? '' : 'op50'"
|
|
43
43
|
>
|
|
44
|
-
<div class="flex gap-0.
|
|
44
|
+
<div class="flex gap-0.2 items-center min-w-16 font-mono mr1">
|
|
45
45
|
<carbon:cursor-1 text-sm op50 />
|
|
46
|
-
<div flex-auto />
|
|
47
46
|
<template v-if="current >= 0 && current !== CLICKS_MAX && active">
|
|
47
|
+
<div flex-auto />
|
|
48
48
|
<span text-primary>{{ current }}</span>
|
|
49
|
-
<span op25>/</span>
|
|
49
|
+
<span op25 text-sm>/</span>
|
|
50
|
+
<span op50 text-sm>{{ total }}</span>
|
|
50
51
|
</template>
|
|
51
|
-
<
|
|
52
|
+
<div
|
|
53
|
+
v-else
|
|
54
|
+
op50 flex-auto pl1
|
|
55
|
+
>
|
|
56
|
+
{{ total }}
|
|
57
|
+
</div>
|
|
52
58
|
</div>
|
|
53
59
|
<div
|
|
54
60
|
relative flex-auto h5 font-mono flex="~"
|
|
@@ -62,10 +68,13 @@ function onMousedown() {
|
|
|
62
68
|
]"
|
|
63
69
|
:style="{ width: length > 0 ? `${1 / length * 100}%` : '100%' }"
|
|
64
70
|
>
|
|
65
|
-
<div
|
|
71
|
+
<div
|
|
72
|
+
absolute inset-0
|
|
73
|
+
:class="(i <= current && active) ? 'bg-primary op15' : ''"
|
|
74
|
+
/>
|
|
66
75
|
<div
|
|
67
76
|
:class="[
|
|
68
|
-
+i === +current ? 'text-primary font-bold op100 border-primary' : 'op30 border-main',
|
|
77
|
+
(+i === +current && active) ? 'text-primary font-bold op100 border-primary' : 'op30 border-main',
|
|
69
78
|
i === 0 ? 'rounded-l' : '',
|
|
70
79
|
i === total ? 'rounded-r' : 'border-r-2',
|
|
71
80
|
]"
|
|
@@ -94,6 +94,14 @@ function calculateEditorHeight() {
|
|
|
94
94
|
inputEl.value.style.height = `${inputEl.value.scrollHeight}px`
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
+
function onKeyDown(e: KeyboardEvent) {
|
|
98
|
+
// Override save shortcut on editing mode
|
|
99
|
+
if (editing.value && e.metaKey && e.key === 's') {
|
|
100
|
+
e.preventDefault()
|
|
101
|
+
update({ note: note.value }, props.no)
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
97
105
|
watch(
|
|
98
106
|
[note, editing],
|
|
99
107
|
() => {
|
|
@@ -129,5 +137,6 @@ watch(
|
|
|
129
137
|
:class="props.class"
|
|
130
138
|
:placeholder="placeholder"
|
|
131
139
|
@keydown.esc="editing = false"
|
|
140
|
+
@keydown="onKeyDown"
|
|
132
141
|
/>
|
|
133
142
|
</template>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slidev/client",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.49.
|
|
4
|
+
"version": "0.49.16",
|
|
5
5
|
"description": "Presentation slides for developers",
|
|
6
6
|
"author": "antfu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
"vue": "^3.4.31",
|
|
59
59
|
"vue-router": "^4.4.0",
|
|
60
60
|
"yaml": "^2.4.5",
|
|
61
|
-
"@slidev/parser": "0.49.
|
|
62
|
-
"@slidev/types": "0.49.
|
|
61
|
+
"@slidev/parser": "0.49.16",
|
|
62
|
+
"@slidev/types": "0.49.16"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"vite": "^5.3.2"
|
package/pages/overview.vue
CHANGED
|
@@ -139,6 +139,14 @@ onMounted(() => {
|
|
|
139
139
|
<carbon-moon v-if="isDark" />
|
|
140
140
|
<carbon-sun v-else />
|
|
141
141
|
</IconButton>
|
|
142
|
+
<IconButton
|
|
143
|
+
v-else
|
|
144
|
+
:title="isDark ? 'Dark mode' : 'Light mode'"
|
|
145
|
+
pointer-events-none op50
|
|
146
|
+
>
|
|
147
|
+
<carbon-moon v-if="isDark" />
|
|
148
|
+
<carbon-sun v-else />
|
|
149
|
+
</IconButton>
|
|
142
150
|
</div>
|
|
143
151
|
</nav>
|
|
144
152
|
<main
|
|
@@ -173,7 +181,7 @@ onMounted(() => {
|
|
|
173
181
|
<carbon:cics-program />
|
|
174
182
|
</IconButton>
|
|
175
183
|
</div>
|
|
176
|
-
<div class="flex flex-col gap-2 my5">
|
|
184
|
+
<div class="flex flex-col gap-2 my5" :style="{ width: `${cardWidth}px` }">
|
|
177
185
|
<div
|
|
178
186
|
class="border rounded border-main overflow-hidden bg-main select-none h-max"
|
|
179
187
|
@dblclick="openSlideInNewTab(getSlidePath(route, false))"
|