Skip to content

Commit

Permalink
Merge pull request #439 from hamster-shared/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
mohaijiang authored Dec 15, 2023
2 parents 746b7b1 + a9fbcf9 commit 9666464
Show file tree
Hide file tree
Showing 8 changed files with 68 additions and 32 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"version": "0.0.0",
"scripts": {
"dev": "vite",
"build": "vite build",
"build": "NODE_OPTIONS=--max-old-space-size=8192 vite build",
"preview": "vite preview --mode staging",
"build:staging": "vite build --mode staging",
"build:production": "vite build --mode production",
"build-only": "vite build",
"build:staging": "NODE_OPTIONS=--max-old-space-size=8192 vite build --mode staging",
"build:production": "NODE_OPTIONS=--max-old-space-size=8192 vite build --mode production",
"build-only": "NODE_OPTIONS=--max-old-space-size=8192 vite build",
"type-check": "vue-tsc --noEmit",
"lint": "eslint frontend --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore"
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/DefaultHeader/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ const handleOrder = () => {
padding: 0 32px;
width: 100%;
height: 64px;
z-index: 1;
z-index: 9;
}
.div-img {
Expand Down
16 changes: 8 additions & 8 deletions src/components/Wallets.vue
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,14 @@ async function autoConnectSavedWallet(): Promise<WalletState[] | null> {
onBeforeMount(async () => {
console.log('是否加载了钱包组件~~~~')
// 进入页面即要求连接钱包
const walletStatesOrNull = await autoConnectSavedWallet()
if (walletStatesOrNull !== null) {
walletStates = walletStatesOrNull
}
if (walletStates !== undefined && walletStates[0]) {
setWalletAccount(walletStates[0]);
}
// // 进入页面即要求连接钱包
// const walletStatesOrNull = await autoConnectSavedWallet()
// if (walletStatesOrNull !== null) {
// walletStates = walletStatesOrNull
// }
// if (walletStates !== undefined && walletStates[0]) {
// setWalletAccount(walletStates[0]);
// }
});
const onClickConnect = async () => {
Expand Down
25 changes: 21 additions & 4 deletions src/views/chainLink/miwaspace/components/rpcMiwaspace.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
</div>
</div>

<div class="grid grid-cols-3 gap-[10px]">
<div class="grid gap-[10px] " :style="styleVal">
<div class="ethereum-container" v-for="(item,index) in rpcPageInfo" :key="index">
<div class="flex justify-between items-center mb-[100px]">
<div class="flex justify-between items-center mb-[50px]">
<div>
<img :src="item.ecosystemIcon" class="h-[42px] "/>
<span class="ml-[10px] text-[18px] font-bold align-middle">{{item.ecosystemName}}</span>
Expand All @@ -27,7 +27,7 @@
</template>

<script lang="ts" setup>
import { toRefs, onMounted,ref } from 'vue';
import { toRefs, onMounted,ref,watch } from 'vue';
import { useRouter } from 'vue-router';
import { message } from 'ant-design-vue';
import { apiGetZanUserAuthed, apiGetZanAuthUrl } from "@/apis/middlewareRPC"
Expand All @@ -38,6 +38,8 @@
})
const { rpcPageInfo } = toRefs(props)
const screenWidth = ref<any>(window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth);
const styleVal = ref<any>('');
const openAppModal = async () => {
const authedData = await apiGetZanUserAuthed()
if(authedData.data){
Expand Down Expand Up @@ -65,7 +67,22 @@ const handleOpenRpcService = async(buyFlag:boolean)=>{
openAppModal()
}
}
const setStyleVal = () => {
if (parseInt(screenWidth.value) < 1400) {
styleVal.value = "grid-template-columns: repeat(2, minmax(0, 1fr));";
} else {
styleVal.value = "grid-template-columns: repeat(3, minmax(0, 1fr));";
}
}
onMounted(() => {
setStyleVal();
window.onresize = () => {
return (() => {
screenWidth.value = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
setStyleVal();
})()
}
});
</script>

<style scoped>
Expand Down
4 changes: 2 additions & 2 deletions src/views/chainLink/rpc/components/NoData.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<template>
<div class="h-full w-full flex justify-center items-center bg-[#F3F3F3] dark:bg-[#12110F]">
<div class="text-center">
<img src="@/assets/images/rpc-nodata.png" class="h-[80px]"/>
<div class="text-[14px] font-medium text-[#656D7A] mt-[10px]">No Data</div>
<img src="@/assets/images/rpc-nodata.png" class="h-[48px]"/>
<div class="text-[10px] font-medium text-[#656D7A] mt-[10px]">No Data</div>
</div>
</div>
</template>
Expand Down
2 changes: 1 addition & 1 deletion src/views/login/welcome.vue
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ const getUser = async () => {
const { data } = await getUserInfo();
localStorage.setItem('firstState', data.firstState.toString());
localStorage.setItem('userInfo', JSON.stringify(data));
// localStorage.setItem('userInfo', JSON.stringify(data));
} catch (error: any) {
console.log("erro:", error)
}
Expand Down
41 changes: 30 additions & 11 deletions src/views/projects/projectsWorkflows/components/CheckReport.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
</div> -->
<div v-for="item in checkReportData" :key="item.id"
class="dark:bg-[#1D1C1A] bg-[#ffffff] dark:text-white text-[#121211] mt-[24px] p-[32px] rounded-[12px]">
<img v-if="frameType!=2" class="align-middle mr-[8px]" :src="getImageUrl(item.checkTool)" />
<!-- <img v-if="frameType != 2" class="align-middle mr-[8px]" :src="getImageUrl(item.checkTool)" /> -->
<span class="text-[24px] font-bold align-middle">{{ item.name }}</span>
<div v-if="item.errorNumber === 0 || item.reportFile=='null'" class="text-center p-[16px]">

<div v-if="item.errorNumber === 0 || item.reportFile == 'null'" class="text-center p-[16px]">
<img src="@/assets/images/report-b.png" class="w-[128px] hidden dark:inline-block" />
<img src="@/assets/images/report-w.png" class="w-[128px] dark:hidden" />
<div class="dark:text-white text-[#151210] text-[24px] font-bold">Congratulations!</div>
Expand All @@ -23,16 +23,16 @@
<a-collapse v-else v-model:activeKey="activeKey" v-for="val in item.reportFileData" :key="val.name">
<a-collapse-panel v-if="val.issue > 0" :key="val.name + item.id" :header="val.name" :showArrow="false">
<a-table :class="theme.themeValue === 'dark' ? 'dark-table-css' : ''" class="noHeader-table-css"
v-if="(projectType === '2' || projectType==='1') && (item.checkTool === 'ESLint') && val.message" :dataSource="val.message"
:columns="ESLintColumns" :pagination="false" :showHeader="false">
v-if="(projectType === '2' || projectType === '1') && (item.checkTool === 'ESLint') && val.message"
:dataSource="val.message" :columns="ESLintColumns" :pagination="false" :showHeader="false">
<template #bodyCell="{ column, record, index }">
<template v-if="column.dataIndex === 'columnLine'">
line {{ record.line }},col {{ record.column }},
</template>
</template>
</a-table>
<a-table :class="theme.themeValue === 'dark' ? 'dark-table-css' : ''" class="noHeader-table-css"
v-if="projectType === '1' && item.checkTool === 'Solhint' && val.message" :dataSource="val.message"
v-if="projectType === '1' && item.checkTool === 'Solhint' && val.message" :dataSource="val.message"
:columns="ESLintColumns" :pagination="false" :showHeader="false">
<template #bodyCell="{ column, record, index }">
<template v-if="column.dataIndex === 'columnLine'">
Expand All @@ -41,16 +41,29 @@
</template>
</a-table>

<div v-if="projectType === '1' && item.checkTool === 'Move Lint' && val.message"
class="border border-solid border-[#434343] rounded-[12px]">
<div v-for="it in val.message" :key="it"
class="flex justify-between text-[#E0DBD2] py-[16px] px-[32px] border-css">
<div class="flex">
<div class=" min-w-[80px] mr-[10px]">{{ 'Line ' + it?.line }}</div>
<div>{{ it?.note }}</div>
</div>

<div class="w-[120px] text-right ml-[20px]">{{ item.checkTool }}</div>
</div>
</div>

<a-table :class="theme.themeValue === 'dark' ? 'dark-table-css' : ''" class="noHeader-table-css"
v-if="(projectType === '2' || projectType==='1') && (item.checkTool === 'mythril' || item.checkTool === 'Move Prove') && val.message"
v-if="(projectType === '2' || projectType === '1') && (item.checkTool === 'mythril' || item.checkTool === 'Move Prove') && val.message"
:dataSource="val.message" :columns="SolhintColumns" :pagination="false" :showHeader="false">
</a-table>

<!--<a-table :class="theme.themeValue === 'dark' ? 'dark-table-css' : ''" class="noHeader-table-css"
v-if="item.checkTool === 'Solhint' && val.message" :dataSource="val.message" :columns="SolhintColumns"
:pagination="false" :showHeader="false">
</a-table>-->

<a-table :class="theme.themeValue === 'dark' ? 'dark-table-css' : ''" class="table-css"
v-if="item.checkTool === 'sol-profiler' && val.message" :dataSource="val.message" :columns="columns"
:pagination="false">
Expand All @@ -66,7 +79,7 @@

<template #extra>
<div>
<span class="mr-[8px]" v-show="item.checkTool !== 'sol-profiler'">
<span class="mr-[8px] min-w-[80px]" v-show="item.checkTool !== 'sol-profiler'">
{{ val.issue + ' issues' }}
</span>
<img class="up-tran w-[12px] hidden dark:inline-block" src="@/assets/icons/up-b.svg" />
Expand All @@ -91,7 +104,7 @@ import { onBeforeUnmount, onMounted, ref } from "vue";
import { toRefs } from 'vue';
import { useThemeStore } from "@/stores/useTheme";
const theme = useThemeStore();
const frameType:any = localStorage.getItem('frameType') || undefined
const frameType: any = localStorage.getItem('frameType') || undefined
const activeKey = ref(['1']);
interface ReportFileData {
Expand All @@ -106,7 +119,7 @@ interface CheckReportData {
checkTool: string,
errorNumber: number,
reportFileData: ReportFileData[],
reportFile:string
reportFile: string
}
const props = defineProps<{
projectType: String,
Expand All @@ -131,6 +144,7 @@ const customRender = ({ text }) => {
}
}
const SolhintColumns = [
{
title: 'column',
Expand Down Expand Up @@ -322,4 +336,9 @@ const { checkReportData, projectType, checkStatus } = toRefs(props)
:deep(.ant-table-row:last-child .ant-table-cell:last-child) {
border-radius: 0 0 12px 0;
}
.border-css:not(:last-child) {
// margin-bottom: 10px;
border-bottom: 1px solid #45423D;
}
</style>
2 changes: 1 addition & 1 deletion src/views/projects/projectsWorkflows/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ import Deployment from './components/Deployment.vue';
import GasUsageReport from './components/GasUsageReport.vue';
import AiAnalysis from './components/AiAnalysis.vue';
import CheckResult from './components/CheckResult.vue'
import Canisters from '../projectsListDetails/components/Canisters.vue'
import Canisters from '../projectsListDetails/components/Canisters.vue';
const { t } = useI18n()
const { params, query } = useRoute();
Expand Down

0 comments on commit 9666464

Please sign in to comment.