Browse Source

fix: update icons

Peng Xiao 3 years ago
parent
commit
280ace28f3

+ 29 - 9
resources/css/tabler-extension.css

@@ -1,6 +1,14 @@
+/**
+ * This file is managed manually by Webfont app.
+ * Steps:
+ *  - download the zip from Webfont app
+ *  - get the tabler-icons-extension.woff2 and replace the one in fonts/tabler-icons-extension.woff2
+ *  - update the tie-xxx css rules
+ */
+
 @font-face {
   font-family: 'tabler-icons-extension';
-  src: url('../fonts/tabler-icons-extension.woff2?8ezspz') format('woff2');
+  src: url('../fonts/tabler-icons-extension.woff2?0wlio9') format('woff2');
   font-style: normal;
   font-weight: 400;
 }
@@ -20,33 +28,45 @@
 }
 
 .tie-block::before {
-  content: "\ea01";
+  content: '\ea01';
 }
 
 .tie-block-search::before {
-  content: "\ea02";
+  content: '\ea02';
+}
+
+.tie-connector::before {
+  content: '\ea03';
 }
 
 .tie-page::before {
-  content: "\ea03";
+  content: '\ea04';
 }
 
 .tie-page-search::before {
-  content: "\ea04";
+  content: '\ea05';
 }
 
 .tie-references-hide::before {
-  content: "\ea05";
+  content: '\ea06';
 }
 
 .tie-references-show::before {
-  content: "\ea06";
+  content: '\ea07';
+}
+
+.tie-select-cursor::before {
+  content: '\ea08';
+}
+
+.tie-text::before {
+  content: '\ea09';
 }
 
 .tie-whiteboard::before {
-  content: "\ea07";
+  content: '\ea0a';
 }
 
 .tie-whiteboard-element::before {
-  content: "\ea08";
+  content: '\ea0b';
 }

BIN
resources/fonts/tabler-icons-extension.woff2


+ 3 - 3
tldraw/apps/tldraw-logseq/src/components/PrimaryTools/PrimaryTools.tsx

@@ -35,7 +35,7 @@ export const PrimaryTools = observer(function PrimaryTools() {
           data-selected={selectedToolId === 'select'}
           onClick={handleToolClick}
         >
-          <TablerIcon name="click" />
+          <TablerIcon name="select-cursor" />
         </Button>
         <Button
           title="Draw tool"
@@ -68,7 +68,7 @@ export const PrimaryTools = observer(function PrimaryTools() {
           onClick={handleToolClick}
           onDoubleClick={handleToolDoubleClick}
         >
-          <TablerIcon name="line" />
+          <TablerIcon name="connector" />
         </Button>
         <Button
           title="Text tool"
@@ -77,7 +77,7 @@ export const PrimaryTools = observer(function PrimaryTools() {
           onClick={handleToolClick}
           onDoubleClick={handleToolDoubleClick}
         >
-          <TablerIcon name="text-resize" />
+          <TablerIcon name="text" />
         </Button>
         <Button
           title="Logseq Portal tool"

+ 4 - 1
tldraw/apps/tldraw-logseq/src/components/icons/TablerIcon.tsx

@@ -9,6 +9,9 @@ const extendedIcons = [
   'references-show',
   'whiteboard',
   'whiteboard-element',
+  'select-cursor',
+  'text',
+  'connector'
 ]
 
 const cx = (...args: (string | undefined)[]) => args.join(' ')
@@ -18,6 +21,6 @@ export const TablerIcon = ({
   className,
   ...props
 }: { name: string } & React.HTMLAttributes<HTMLElement>) => {
-  const classNamePrefix = extendedIcons.includes(name) ? `ti tie-` : `ti ti-`
+  const classNamePrefix = extendedIcons.includes(name) ? `tie tie-` : `ti ti-`
   return <i className={cx(classNamePrefix + name, className)} {...props} />
 }