Merge remote-tracking branch 'origin/main' into react/settings

; Conflicts:
;	apps/client/package.json
;	apps/client/src/translations/en/translation.json
;	apps/client/src/translations/tw/translation.json
;	pnpm-lock.yaml
This commit is contained in:
Elian Doran
2025-08-19 13:50:27 +03:00
53 changed files with 2330 additions and 972 deletions

View File

@@ -414,7 +414,7 @@ export default class GlobalMenuWidget extends BasicWidget {
}
async fetchLatestVersion() {
const RELEASES_API_URL = "https://api.github.com/repos/TriliumNext/Notes/releases/latest";
const RELEASES_API_URL = "https://api.github.com/repos/TriliumNext/Trilium/releases/latest";
const resp = await fetch(RELEASES_API_URL);
const data = await resp.json();

View File

@@ -3,6 +3,7 @@ import Button from "../react/Button";
import Modal from "../react/Modal";
import ReactBasicWidget from "../react/ReactBasicWidget";
import { CallToAction, dismissCallToAction, getCallToActions } from "./call_to_action_definitions";
import { t } from "../../services/i18n";
function CallToActionDialogComponent({ activeCallToActions }: { activeCallToActions: CallToAction[] }) {
if (!activeCallToActions.length) {
@@ -25,12 +26,12 @@ function CallToActionDialogComponent({ activeCallToActions }: { activeCallToActi
<Modal
className="call-to-action"
size="md"
title="New features"
title={activeItem.title}
show={shown}
onHidden={() => setShown(false)}
footerAlignment="between"
footer={<>
<Button text="Dismiss" onClick={async () => {
<Button text={t("call_to_action.dismiss")} onClick={async () => {
await dismissCallToAction(activeItem.id);
goToNext();
}} />
@@ -43,7 +44,6 @@ function CallToActionDialogComponent({ activeCallToActions }: { activeCallToActi
)}
</>}
>
<h4>{activeItem.title}</h4>
<p>{activeItem.message}</p>
</Modal>
)

View File

@@ -65,7 +65,7 @@ const CALL_TO_ACTIONS: CallToAction[] = [
id: "background_effects",
title: t("call_to_action.background_effects_title"),
message: t("call_to_action.background_effects_message"),
enabled: () => utils.isElectron() && window.glob.platform === "win32" && isNextTheme() && !options.is("backgroundEffects"),
enabled: () => false,
buttons: [
{
text: t("call_to_action.background_effects_button"),

View File

@@ -93,6 +93,8 @@ interface QuickSearchResponse {
highlightedNotePathTitle: string;
contentSnippet?: string;
highlightedContentSnippet?: string;
attributeSnippet?: string;
highlightedAttributeSnippet?: string;
icon: string;
}>;
error: string;
@@ -241,7 +243,12 @@ export default class QuickSearchWidget extends BasicWidget {
<span style="flex: 1;" class="search-result-title">${result.highlightedNotePathTitle}</span>
</div>`;
// Add content snippet below the title if available
// Add attribute snippet (tags/attributes) below the title if available
if (result.highlightedAttributeSnippet) {
itemHtml += `<div style="font-size: 0.75em; color: var(--muted-text-color); opacity: 0.5; margin-left: 20px; margin-top: 2px; line-height: 1.2;" class="search-result-attributes">${result.highlightedAttributeSnippet}</div>`;
}
// Add content snippet below the attributes if available
if (result.highlightedContentSnippet) {
itemHtml += `<div style="font-size: 0.85em; color: var(--main-text-color); opacity: 0.7; margin-left: 20px; margin-top: 4px; line-height: 1.3;" class="search-result-content">${result.highlightedContentSnippet}</div>`;
}