mirror of https://github.com/logseq/logseq
enhance: allow built-in pages to be renamed
`db/ident` shouldn't be updated, at least for those built-in pages.pull/11491/head
parent
d20f4d9b8e
commit
37d91f2e5d
|
@ -319,17 +319,13 @@ i.ti {
|
|||
/** endregion **/
|
||||
|
||||
/* region FIXME: override elements (?) */
|
||||
h1.title, h1.title input, .ls-page-title-container, .ls-page-icon {
|
||||
h1.title, h1.title input, .ls-page-title-container {
|
||||
@apply font-medium;
|
||||
|
||||
color: var(--lx-gray-12, var(--ls-title-text-color, hsl(var(--foreground))));
|
||||
font-size: var(--ls-page-title-size, 32px);
|
||||
}
|
||||
|
||||
.title .page-icon {
|
||||
margin-right: 12px;
|
||||
}
|
||||
|
||||
.block-highlight,
|
||||
.content .selected {
|
||||
transition: background-color 0.2s cubic-bezier(0, 1, 0, 1);
|
||||
|
|
|
@ -3106,7 +3106,7 @@
|
|||
(when (ldb/property? block)
|
||||
{:type :tabler-icon
|
||||
:id "letter-p"}))))]
|
||||
[:div {:class (when (:page-title? config) "ls-page-icon")}
|
||||
[:div.flex.items-center.page-icon
|
||||
(icon-component/icon-picker icon
|
||||
{:on-chosen (fn [_e icon]
|
||||
(db-property-handler/set-block-property!
|
||||
|
|
|
@ -149,8 +149,6 @@
|
|||
(outliner-op/rename-page! page-uuid new-name))
|
||||
result' (ldb/read-transit-str result)]
|
||||
(case (if (string? result') (keyword result') result')
|
||||
:built-in-page
|
||||
(notification/show! "Built-in page's name cannot be modified" :warning)
|
||||
:invalid-empty-name
|
||||
(notification/show! "Please use a valid name, empty name is not allowed!" :warning)
|
||||
:rename-page-exists
|
||||
|
|
|
@ -81,9 +81,6 @@
|
|||
new-page-exists?
|
||||
:rename-page-exists
|
||||
|
||||
(ldb/built-in? page-e)
|
||||
:built-in-page
|
||||
|
||||
(and old-name new-name name-changed?)
|
||||
(if (= old-page-name new-page-name) ; case changed
|
||||
(ldb/transact! conn
|
||||
|
|
Loading…
Reference in New Issue