mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-20 11:00:52 +08:00
💄 status
This commit is contained in:
parent
e1f6953a42
commit
b20c1fec0c
@ -249,6 +249,7 @@ progressLoading: 400
|
||||
|
||||
&__counter {
|
||||
font-size: 12px;
|
||||
display: flex;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
|
@ -133,7 +133,11 @@ export const countSelectWord = (range: Range) => {
|
||||
const selectText = range.toString();
|
||||
if (selectText) {
|
||||
fetchPost("/api/block/getContentWordCount", {"content": range.toString()}, (response) => {
|
||||
document.querySelector("#status .status__counter").innerHTML = `<span class="ft__on-surface">${window.siyuan.languages.runeCount}</span> ${response.data.runeCount}<span class="fn__space"></span><span class="ft__on-surface">${window.siyuan.languages.wordCount}</span> ${response.data.wordCount}`;
|
||||
document.querySelector("#status .status__counter").innerHTML = `<span class="ft__on-surface">${window.siyuan.languages.runeCount}</span>
|
||||
${response.data.runeCount}
|
||||
<span class="fn__space"></span>
|
||||
<span class="ft__on-surface">${window.siyuan.languages.wordCount}</span>
|
||||
${response.data.wordCount}<span class="fn__space"></span>`;
|
||||
});
|
||||
} else {
|
||||
document.querySelector("#status .status__counter").innerHTML = "";
|
||||
@ -146,7 +150,11 @@ export const countBlockWord = (ids: string[]) => {
|
||||
}
|
||||
if (ids.length > 0) {
|
||||
fetchPost("/api/block/getBlocksWordCount", {ids}, (response) => {
|
||||
document.querySelector("#status .status__counter").innerHTML = `<span class="ft__on-surface">${window.siyuan.languages.runeCount}</span> ${response.data.runeCount}<span class="fn__space"></span><span class="ft__on-surface">${window.siyuan.languages.wordCount}</span> ${response.data.wordCount}`;
|
||||
document.querySelector("#status .status__counter").innerHTML = `<span class="ft__on-surface">${window.siyuan.languages.runeCount}</span>
|
||||
${response.data.runeCount}
|
||||
<span class="fn__space"></span>
|
||||
<span class="ft__on-surface">${window.siyuan.languages.wordCount}</span>
|
||||
${response.data.wordCount}<span class="fn__space"></span>`;
|
||||
});
|
||||
} else {
|
||||
document.querySelector("#status .status__counter").innerHTML = "";
|
||||
|
@ -823,6 +823,7 @@ export class WYSIWYG {
|
||||
mouseElement = newMouseElement;
|
||||
}
|
||||
hideElements(["select"], protyle);
|
||||
countBlockWord([]);
|
||||
let firstElement = document.elementFromPoint(newLeft - 1, newTop);
|
||||
if (!firstElement) {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user