diff --git a/public/iconfont.css b/public/iconfont.css index a4f4972..dbf27c4 100644 --- a/public/iconfont.css +++ b/public/iconfont.css @@ -1,8 +1,8 @@ @font-face { font-family: "iconfont"; /* Project id 4440655 */ - src: url('iconfont.woff2?t=1708609094813') format('woff2'), - url('iconfont.woff?t=1708609094813') format('woff'), - url('iconfont.ttf?t=1708609094813') format('truetype'); + src: url('iconfont.woff2?t=1709106897565') format('woff2'), + url('iconfont.woff?t=1709106897565') format('woff'), + url('iconfont.ttf?t=1709106897565') format('truetype'); } .iconfont { @@ -13,6 +13,10 @@ -moz-osx-font-smoothing: grayscale; } +.icon-register:before { + content: "\e611"; +} + .icon-about:before { content: "\e601"; } diff --git a/public/iconfont.woff2 b/public/iconfont.woff2 index 32d903a..fc91393 100644 Binary files a/public/iconfont.woff2 and b/public/iconfont.woff2 differ diff --git a/src/components/setting/index.vue b/src/components/setting/index.vue index c2d75a9..71f094d 100644 --- a/src/components/setting/index.vue +++ b/src/components/setting/index.vue @@ -51,6 +51,16 @@ {{ t('display-wave-height') }} + +
+ +
+ {{ t('display-signal-info-scope') }} + + width + parent + +
diff --git a/src/components/sidebar.vue b/src/components/sidebar.vue index 0b85e8c..1ff4bcc 100644 --- a/src/components/sidebar.vue +++ b/src/components/sidebar.vue @@ -4,7 +4,7 @@
- +
{{ signal.name }} @@ -24,7 +24,7 @@ /* eslint-disable */ import { reactive } from 'vue'; import { useI18n } from 'vue-i18n'; -import { emitter, globalLookup } from '@/hook/global'; +import { emitter, globalLookup, globalSetting } from '@/hook/global'; export default { name: 'sidebar', @@ -35,9 +35,27 @@ export default { emitter.emit('right-nav', 0); } + function makeSignalIconClass(signal) { + if (signal.type === 'wire') { + return 'iconfont icon-wave-square'; + } else if (signal.type === 'reg') { + return 'iconfont icon-register'; + } else { + return 'iconfont icon-wave-square'; + } + } + + function makeSignalInfo(signal) { + let htmlString = ''; + + } + + + return { t, globalLookup, + makeSignalIconClass, addSignal } } diff --git a/src/hook/global.js b/src/hook/global.js index b6fa2a6..b649113 100644 --- a/src/hook/global.js +++ b/src/hook/global.js @@ -30,7 +30,8 @@ const globalSetting = reactive({ displayParentOnly: false, displaySignalHeight: 50, searchMode: 'so', // so, mo, sm - searchScope: ['wire', 'reg'] + searchScope: ['wire', 'reg'], + displaySignalInfoScope: ['width', 'parent'], }) export { diff --git a/src/i18n/en.json b/src/i18n/en.json index 9425db8..bfc432c 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -18,6 +18,7 @@ "appearance-setting": "Appearance", "display-wave-height": "Height of Wave Track", + "display-signal-info-scope": "Info displayed in sidebar", "current-version": "current version", "copyright": "The copyright of this software belongs to Digital-IDE project team. Welcome to Star." diff --git a/src/i18n/zh.json b/src/i18n/zh.json index 8a94fdb..12aa635 100644 --- a/src/i18n/zh.json +++ b/src/i18n/zh.json @@ -18,6 +18,7 @@ "appearance-setting": "外观", "display-wave-height": "波形轨道的高度", + "display-signal-info-scope": "侧边栏展示信息", "current-version": "当前版本", "copyright": "本软件版权归 Digital-IDE 项目组所有,欢迎 Star。"