diff --git a/apps/client/src/widgets/ribbon/NotePropertiesTab.tsx b/apps/client/src/widgets/ribbon/NotePropertiesTab.tsx
new file mode 100644
index 000000000..8cc0c2b85
--- /dev/null
+++ b/apps/client/src/widgets/ribbon/NotePropertiesTab.tsx
@@ -0,0 +1,20 @@
+import { t } from "../../services/i18n";
+import { useNoteLabel } from "../react/hooks";
+import { TabContext } from "./ribbon-interface";
+
+/**
+ * TODO: figure out better name or conceptualize better.
+ */
+export default function NotePropertiesTab({ note }: TabContext) {
+ const [ pageUrl ] = useNoteLabel(note, "pageUrl");
+
+ return (
+
+ { pageUrl && (
+
+ {t("note_properties.this_note_was_originally_taken_from")}
{pageUrl}
+
+ )}
+
+ )
+}
\ No newline at end of file
diff --git a/apps/client/src/widgets/ribbon/Ribbon.tsx b/apps/client/src/widgets/ribbon/Ribbon.tsx
index c043f84e3..5dbeb1c62 100644
--- a/apps/client/src/widgets/ribbon/Ribbon.tsx
+++ b/apps/client/src/widgets/ribbon/Ribbon.tsx
@@ -12,6 +12,7 @@ import { CommandNames } from "../../components/app_context";
import FNote from "../../entities/fnote";
import ScriptTab from "./ScriptTab";
import EditedNotesTab from "./EditedNotesTab";
+import NotePropertiesTab from "./NotePropertiesTab";
interface TitleContext {
note: FNote | null | undefined;
@@ -67,9 +68,11 @@ const TAB_CONFIGURATION = numberObjectsInPlace([
icon: "bx bx-book"
},
{
- // NotePropertiesWidget
title: t("note_properties.info"),
- icon: "bx bx-info-square"
+ icon: "bx bx-info-square",
+ content: NotePropertiesTab,
+ show: ({ note }) => !!note?.getLabelValue("pageUrl"),
+ activate: true
},
{
// FilePropertiesWidget
diff --git a/apps/client/src/widgets/ribbon_widgets/note_properties.ts b/apps/client/src/widgets/ribbon_widgets/note_properties.ts
deleted file mode 100644
index 7f875e4e4..000000000
--- a/apps/client/src/widgets/ribbon_widgets/note_properties.ts
+++ /dev/null
@@ -1,53 +0,0 @@
-import type FNote from "../../entities/fnote.js";
-import { t } from "../../services/i18n.js";
-import NoteContextAwareWidget from "../note_context_aware_widget.js";
-
-const TPL = /*html*/`
-`;
-
-/**
- * TODO: figure out better name or conceptualize better.
- */
-export default class NotePropertiesWidget extends NoteContextAwareWidget {
-
- private $pageUrl!: JQuery;
-
- isEnabled() {
- return this.note && !!this.note.getLabelValue("pageUrl");
- }
-
- getTitle() {
- return {
- show: this.isEnabled(),
- activate: true,
-
- };
- }
-
- doRender() {
- this.$widget = $(TPL);
- this.contentSized();
-
- this.$pageUrl = this.$widget.find(".page-url");
- }
-
- async refreshWithNote(note: FNote) {
- const pageUrl = note.getLabelValue("pageUrl");
-
- this.$pageUrl
- .attr("href", pageUrl)
- .attr("title", pageUrl)
- .text(pageUrl ?? "");
- }
-}