增加源码地址的链接

This commit is contained in:
bob
2025-02-26 12:37:27 +08:00
parent 2ccd389802
commit deb633acdb
3 changed files with 89 additions and 1 deletions

15
src/assets/svg/gitee.svg Normal file
View File

@@ -0,0 +1,15 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg
t="1740540663977"
class="svg-icon"
viewBox="0 0 1024 1024"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
p-id="3318"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="200"
height="200"
>
<path d="M512 1024C229.222 1024 0 794.778 0 512S229.222 0 512 0s512 229.222 512 512-229.222 512-512 512z m259.149-568.883h-290.74a25.293 25.293 0 0 0-25.292 25.293l-0.026 63.206c0 13.952 11.315 25.293 25.267 25.293h177.024c13.978 0 25.293 11.315 25.293 25.267v12.646a75.853 75.853 0 0 1-75.853 75.853h-240.23a25.293 25.293 0 0 1-25.267-25.293V417.203a75.853 75.853 0 0 1 75.827-75.853h353.946a25.293 25.293 0 0 0 25.267-25.292l0.077-63.207a25.293 25.293 0 0 0-25.268-25.293H417.152a189.62 189.62 0 0 0-189.62 189.645V771.15c0 13.977 11.316 25.293 25.294 25.293h372.94a170.65 170.65 0 0 0 170.65-170.65V480.384a25.293 25.293 0 0 0-25.293-25.267z" fill="#C71D23" p-id="3319">
</path>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -27,6 +27,7 @@ import GroupCard from '@/components/card/GroupCard.vue'
import { MsgType } from '@/proto/msg'
import contactusIcon from '@/assets/svg/contactus.svg'
import githubIcon from '@/assets/svg/github.svg'
import SourceCode from '@/views/layout/components/SourceCode.vue'
const myAvatar = ref()
const userData = userStore()
@@ -35,6 +36,7 @@ const searchData = searchStore()
const groupData = groupStore()
const isShowMyCard = ref(false)
const contactUsRef = ref(null)
const sourceCodeRef = ref(null)
const userStatusDesc = computed(() => {
switch (userData.user.status) {
@@ -230,7 +232,9 @@ const onExit = async () => {
<el-icon class="footer-item" title="联系我们" @click="contactUsRef.show($event)">
<contactusIcon />
</el-icon>
<el-icon class="footer-item" title="源码"><githubIcon /></el-icon>
<el-icon class="footer-item" title="源码" @click="sourceCodeRef.show()">
<githubIcon />
</el-icon>
<el-icon class="footer-item" title="退出" :size="20" @click="onExit()">
<SwitchButton />
</el-icon>
@@ -243,6 +247,7 @@ const onExit = async () => {
<UserCard></UserCard>
<GroupCard></GroupCard>
<ContactUs ref="contactUsRef"></ContactUs>
<SourceCode ref="sourceCodeRef"></SourceCode>
</el-container>
</template>

View File

@@ -0,0 +1,68 @@
<script setup>
import { ref } from 'vue'
import githubIcon from '@/assets/svg/github.svg'
import giteeIcon from '@/assets/svg/gitee.svg'
const isVisible = ref(false)
const tableData = [
{
project: '服务端',
githubUrl: 'https://github.com/GatlinHa/open-anylink',
giteeUrl: 'https://gitee.com/lijingbo-2021/open-anylink'
},
{
project: 'Web端',
githubUrl: 'https://github.com/GatlinHa/open-anylink-web',
giteeUrl: 'https://gitee.com/lijingbo-2021/open-anylink-web'
}
]
const show = () => {
isVisible.value = true
}
defineExpose({ show })
</script>
<template>
<el-dialog title="源码地址" v-model="isVisible" width="400" top="40vh">
<el-table :data="tableData" stripe size="small" style="font-size: 14px">
<el-table-column prop="project" label="项目" width="100"></el-table-column>
<el-table-column prop="githubUrl">
<template #header>
<div class="column-header">
<githubIcon></githubIcon>
<span>github</span>
</div>
</template>
<template #default="scope">
<a :href="scope.row.githubUrl" target="_blank">链接</a>
</template>
</el-table-column>
<el-table-column prop="giteeUrl">
<template #header>
<div class="column-header">
<giteeIcon></giteeIcon>
<span>gitee</span>
</div>
</template>
<template #default="scope">
<a :href="scope.row.giteeUrl" target="_blank">链接</a>
</template>
</el-table-column>
</el-table>
</el-dialog>
</template>
<style lang="scss" scoped>
.svg-icon {
width: 20px;
height: 20px;
}
.column-header {
display: flex;
align-items: center;
}
</style>