diff --git a/spx-gui/.eslintrc.cjs b/spx-gui/.eslintrc.cjs index 1ae5debb2..708c09728 100644 --- a/spx-gui/.eslintrc.cjs +++ b/spx-gui/.eslintrc.cjs @@ -28,7 +28,8 @@ module.exports = { // These rules will match components in both kebab-case and CamelCase 'router-view', 'router-link', - 'v-.*' // for Vue Konva components + 'v-.*', // for Vue Konva components + 'I18nT' ] } ], diff --git a/spx-gui/src/components/project/ProjectPublishedModal.vue b/spx-gui/src/components/project/ProjectPublishedModal.vue index 31131c839..0fd62d16a 100644 --- a/spx-gui/src/components/project/ProjectPublishedModal.vue +++ b/spx-gui/src/components/project/ProjectPublishedModal.vue @@ -18,20 +18,6 @@ const emit = defineEmits<{ const projectPageRoute = computed(() => getProjectPageRoute(props.project.owner!, props.project.name!)) const projectPageLink = computed(() => `${location.origin}${projectPageRoute.value}`) -// TODO: support vnode as i18n message to simplify such case -const preLinkText = { - en: 'Visit ', - zh: '访问' -} -const linkText = { - en: 'project page', - zh: '项目主页' -} -const postLinkText = { - en: ', or copy the link below to share the project with others.', - zh: ',或者复制下方链接将项目分享给其他人。' -} - const handleCopy = useMessageHandle( () => navigator.clipboard.writeText(projectPageLink.value), { en: 'Failed to copy link to clipboard', zh: '分享链接复制到剪贴板失败' }, @@ -47,8 +33,15 @@ const handleCopy = useMessageHandle( @update:visible="emit('cancelled')" >
- {{ $t(preLinkText) }}{{ $t(linkText) }}{{ $t(postLinkText) }} + + + +