chore: add x link to ribbon

This commit is contained in:
Lykin 2024-01-20 17:00:25 +08:00
parent bbcbc8b661
commit cee25a8015
3 changed files with 19 additions and 3 deletions

View File

@ -109,6 +109,10 @@ const onSelectPreferenceMenu = (key) => {
} }
} }
const openX = () => {
BrowserOpenURL('https://twitter.com/LykinHuang')
}
const openGithub = () => { const openGithub = () => {
BrowserOpenURL('https://github.com/tiny-craft/tiny-rdm') BrowserOpenURL('https://github.com/tiny-craft/tiny-rdm')
} }
@ -149,20 +153,30 @@ const exThemeVars = computed(() => {
:render-icon="({ icon }) => render.renderIcon(icon)" :render-icon="({ icon }) => render.renderIcon(icon)"
:render-label="({ label }) => render.renderLabel($t(label), { class: 'context-menu-item' })" :render-label="({ label }) => render.renderLabel($t(label), { class: 'context-menu-item' })"
trigger="click" trigger="click"
content-class="nav-menu-button"
@select="onSelectPreferenceMenu"> @select="onSelectPreferenceMenu">
<icon-button :icon="Config" :size="iconSize" :stroke-width="3" class="nav-menu-button" /> <icon-button :icon="Config" :size="iconSize" :stroke-width="3" />
</n-dropdown> </n-dropdown>
<icon-button <icon-button
v-if="prefStore.currentLanguage === 'zh'" v-if="prefStore.currentLanguage === 'zh'"
:icon="QRCode" :icon="QRCode"
:size="iconSize" :size="iconSize"
:tooltip="$t('ribbon.wechat_official')" t-tooltip="ribbon.wechat_official"
class="nav-menu-button" class="nav-menu-button"
@click="showWechat = true" /> @click="showWechat = true" />
<icon-button
v-else
:border="false"
:size="iconSize"
class="nav-menu-button"
t-tooltip="ribbon.follow_x"
@click="openX">
<span style="font-weight: bold; font-size: 24px">𝕏</span>
</icon-button>
<icon-button <icon-button
:icon="Github" :icon="Github"
:size="iconSize" :size="iconSize"
:tooltip="$t('ribbon.github')" t-tooltip="ribbon.github"
class="nav-menu-button" class="nav-menu-button"
@click="openGithub" /> @click="openGithub" />
</div> </div>

View File

@ -146,6 +146,7 @@
"browser": "Data Browser", "browser": "Data Browser",
"log": "Log", "log": "Log",
"wechat_official": "Wechat Official Account", "wechat_official": "Wechat Official Account",
"follow_x": "Follow My \uD835\uDD4F",
"github": "Github" "github": "Github"
}, },
"dialogue": { "dialogue": {

View File

@ -146,6 +146,7 @@
"browser": "数据浏览", "browser": "数据浏览",
"log": "日志", "log": "日志",
"wechat_official": "微信公众号", "wechat_official": "微信公众号",
"follow_x": "关注的我\uD835\uDD4F",
"github": "Github" "github": "Github"
}, },
"dialogue": { "dialogue": {