generated from PoCInnovation/open-source-project-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from PoCInnovation/multichain_dev
add multichain
- Loading branch information
Showing
17 changed files
with
286 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<template> | ||
<div id="chain-switcher"> | ||
<div class="dropdown"> | ||
<div tabindex="0" role="button" class="btn m-1">chain : {{ chain.name }}</div> | ||
<ul tabindex="0" class="dropdown-content menu rounded-box z-[1] w-52 p-2 shadow"> | ||
<li class="chain" v-for="(c, i) in chainLs" @click="switchChain(i)"><a>{{ c.name }}</a></li> | ||
</ul> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { SwitchChain } from '../multichain' | ||
import { chain, chainLs } from '../multichain' | ||
import { useStore } from 'vuex' | ||
const store = useStore() | ||
const switchChain = (index: number) => { | ||
SwitchChain(store, index) | ||
console.log(chain.value.name) | ||
} | ||
</script> | ||
|
||
<style scoped> | ||
.btn { | ||
background-color: #1E6BDE; | ||
border: #1E6BDE; | ||
color: white; | ||
font-size: 1.2rem; | ||
} | ||
.btn:hover { | ||
background-color: #144a9c; | ||
} | ||
.chain { | ||
cursor: pointer; | ||
color: white; | ||
font-size: 1rem; | ||
} | ||
.dropdown-content { | ||
background-color: #1E6BDE; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.