mirror of
https://github.com/zadam/trilium.git
synced 2025-12-16 13:19:54 +01:00
Tweak note info (#8056)
This commit is contained in:
@@ -168,12 +168,6 @@ ul.editability-dropdown li.dropdown-item > div {
|
|||||||
* Note info
|
* Note info
|
||||||
*/
|
*/
|
||||||
|
|
||||||
:root .note-info-widget-table button.calculate-button {
|
|
||||||
min-width: 0;
|
|
||||||
padding: 4px 10px !important;
|
|
||||||
font-size: 0.8em;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Narrow width layout */
|
/* Narrow width layout */
|
||||||
.note-info-widget {
|
.note-info-widget {
|
||||||
container: info-section / inline-size;
|
container: info-section / inline-size;
|
||||||
|
|||||||
@@ -60,9 +60,13 @@
|
|||||||
padding: 1em !important;
|
padding: 1em !important;
|
||||||
|
|
||||||
ul {
|
ul {
|
||||||
|
--row-block-margin: .2em;
|
||||||
|
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
margin-top: calc(0px - var(--row-block-margin));
|
||||||
|
margin-bottom: 12px;
|
||||||
display: table;
|
display: table;
|
||||||
|
|
||||||
li {
|
li {
|
||||||
@@ -70,7 +74,8 @@
|
|||||||
|
|
||||||
> strong {
|
> strong {
|
||||||
display: table-cell;
|
display: table-cell;
|
||||||
padding: 0.2em 0;
|
padding: var(--row-block-margin) 0;
|
||||||
|
opacity: .5;
|
||||||
}
|
}
|
||||||
|
|
||||||
> span {
|
> span {
|
||||||
|
|||||||
@@ -11,6 +11,12 @@ export default function LinkButton({ onClick, text, triggerCommand }: LinkButton
|
|||||||
return (
|
return (
|
||||||
<a class="tn-link" href="#"
|
<a class="tn-link" href="#"
|
||||||
data-trigger-command={triggerCommand}
|
data-trigger-command={triggerCommand}
|
||||||
|
role="button"
|
||||||
|
onKeyDown={(e)=> {
|
||||||
|
if (e.code === "Space") {
|
||||||
|
onClick?.();
|
||||||
|
}
|
||||||
|
}}
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
onClick?.();
|
onClick?.();
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import LoadingSpinner from "../react/LoadingSpinner";
|
|||||||
import { useTriliumEvent } from "../react/hooks";
|
import { useTriliumEvent } from "../react/hooks";
|
||||||
import { isExperimentalFeatureEnabled } from "../../services/experimental_features";
|
import { isExperimentalFeatureEnabled } from "../../services/experimental_features";
|
||||||
import FNote from "../../entities/fnote";
|
import FNote from "../../entities/fnote";
|
||||||
|
import LinkButton from "../react/LinkButton";
|
||||||
|
|
||||||
const isNewLayout = isExperimentalFeatureEnabled("new-layout");
|
const isNewLayout = isExperimentalFeatureEnabled("new-layout");
|
||||||
|
|
||||||
@@ -53,9 +54,7 @@ export default function NoteInfoTab({ note }: { note: FNote | null | undefined }
|
|||||||
export function NoteSizeWidget({ isLoading, noteSizeResponse, subtreeSizeResponse, requestSizeInfo }: Omit<ReturnType<typeof useNoteMetadata>, "metadata">) {
|
export function NoteSizeWidget({ isLoading, noteSizeResponse, subtreeSizeResponse, requestSizeInfo }: Omit<ReturnType<typeof useNoteMetadata>, "metadata">) {
|
||||||
return <>
|
return <>
|
||||||
{!isLoading && !noteSizeResponse && !subtreeSizeResponse && (
|
{!isLoading && !noteSizeResponse && !subtreeSizeResponse && (
|
||||||
<Button
|
<LinkButton
|
||||||
className="calculate-button"
|
|
||||||
icon="bx bx-calculator"
|
|
||||||
text={t("note_info_widget.calculate")}
|
text={t("note_info_widget.calculate")}
|
||||||
onClick={requestSizeInfo}
|
onClick={requestSizeInfo}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -207,9 +207,6 @@ body.experimental-feature-new-layout .classic-toolbar-widget {
|
|||||||
vertical-align: middle !important;
|
vertical-align: middle !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.note-info-widget .calculate-button {
|
|
||||||
padding: 0 10px;
|
|
||||||
}
|
|
||||||
/* #endregion */
|
/* #endregion */
|
||||||
|
|
||||||
/* #region Similar Notes */
|
/* #region Similar Notes */
|
||||||
|
|||||||
Reference in New Issue
Block a user