commit
8e180c08f2
10
index.html
10
index.html
@ -31,7 +31,16 @@
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
<!--
|
||||
<link
|
||||
rel="stylesheet"
|
||||
id="app-style"
|
||||
href="/src/style.output.css"
|
||||
rel="stylesheet"
|
||||
/> -->
|
||||
|
||||
<!-- Google tag (gtag.js) -->
|
||||
<script
|
||||
async
|
||||
@ -51,5 +60,6 @@
|
||||
});
|
||||
gtag('config', 'G-5VWD0SDXJE');
|
||||
</script>
|
||||
<style id="app-style-default"></style>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"serve": "vite",
|
||||
"prebuild": "tailwindcss -i ./src/style.css -o ./src/style.output.css",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview",
|
||||
"type-check": "vue-tsc --noEmit"
|
||||
@ -24,7 +25,7 @@
|
||||
"@intlify/unplugin-vue-i18n": "^0.8.2",
|
||||
"@leapwallet/cosmos-snap-provider": "^0.1.20",
|
||||
"@leapwallet/name-matcha": "^1.1.0",
|
||||
"@oraichain/oraiscan-widget": "^0.2.11",
|
||||
"@oraichain/oraiscan-widget": "0.2.12-1",
|
||||
"@osmonauts/lcd": "^0.8.0",
|
||||
"@ping-pub/chain-registry-client": "^0.0.25",
|
||||
"@tharsis/proto": "^0.1.20",
|
||||
@ -50,7 +51,7 @@
|
||||
"qrcode": "^1.5.3",
|
||||
"secretjs": "^1.12.4",
|
||||
"shiki": "^1.2.1",
|
||||
"tailwindcss": "^3.3.1",
|
||||
"tailwindcss": "^3.3.2",
|
||||
"theme-change": "^2.5.0",
|
||||
"vite-plugin-vue-layouts": "^0.7.0",
|
||||
"vue": "^3.2.45",
|
||||
@ -77,6 +78,8 @@
|
||||
"unplugin-vue-components": "^0.23.0",
|
||||
"unplugin-vue-define-options": "1.1.4",
|
||||
"vite": "^5.0.12",
|
||||
"vite-plugin-css-injected-by-js": "^3.5.1",
|
||||
"vite-plugin-html": "^3.2.2",
|
||||
"vite-plugin-pages": "^0.32.0",
|
||||
"vue-json-viewer": "3",
|
||||
"vue-tsc": "^1.8.27"
|
||||
|
||||
15
src/App.vue
15
src/App.vue
@ -1,10 +1,23 @@
|
||||
<script setup lang="ts">
|
||||
import { themeChange } from 'theme-change';
|
||||
import { onMounted } from 'vue';
|
||||
import { defineAsyncComponent, onMounted } from 'vue';
|
||||
import TxDialog from './components/TxDialog.vue';
|
||||
|
||||
onMounted(() => {
|
||||
themeChange(false);
|
||||
// import '@oraichain/oraiscan-widget';
|
||||
// defineAsyncComponent(() => import('@/style.css'));
|
||||
|
||||
// Find the <style> element with id "app-style"
|
||||
const appStyle = document.getElementById('app-styles');
|
||||
|
||||
if (appStyle) {
|
||||
// Remove the <style> element from its current position
|
||||
appStyle.parentNode?.removeChild(appStyle);
|
||||
|
||||
// Append the <style> element to the end of <head>
|
||||
document.head.appendChild(appStyle);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@ -57,14 +57,10 @@ function metaItem(metadata: string | undefined): {
|
||||
<tr
|
||||
v-for="(item, index) in proposals?.proposals"
|
||||
:key="index"
|
||||
class="hover:bg-[#47474B] cursor-pointer border-b border-b-[#242627] px-4"
|
||||
class="hover:bg-[#47474B] cursor-pointer border-b border-b-[#242627] px-4 rounded"
|
||||
>
|
||||
<td class="px-4 w-20">
|
||||
<label
|
||||
for="proposal-detail-modal"
|
||||
class="text-main text-base hover:text-indigo-400 cursor-pointer"
|
||||
@click="proposalInfo = item"
|
||||
>
|
||||
<label for="proposal-detail-modal" class="text-main text-base">
|
||||
#{{ item?.proposalId }}</label
|
||||
>
|
||||
</td>
|
||||
@ -171,11 +167,9 @@ function metaItem(metadata: string | undefined): {
|
||||
class="flex-1 w-0 truncate mr-4"
|
||||
>{{ item?.title }}</RouterLink
|
||||
>
|
||||
<label
|
||||
for="proposal-detail-modal"
|
||||
class="text-main text-base hover:text-indigo-400 cursor-pointer"
|
||||
@click="proposalInfo = item"
|
||||
>
|
||||
<label for="proposal-detail-modal" class="text-main text-base">
|
||||
<!-- @click="proposalInfo = item" -->
|
||||
<!-- hover:text-indigo-400 cursor-pointer -->
|
||||
#{{ item?.proposalId }}</label
|
||||
>
|
||||
</div>
|
||||
@ -257,8 +251,8 @@ function metaItem(metadata: string | undefined): {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="checkbox" id="proposal-detail-modal" class="modal-toggle" />
|
||||
<label for="proposal-detail-modal" class="modal">
|
||||
<!-- <input type="checkbox" id="proposal-detail-modal" class="modal-toggle" /> -->
|
||||
<!-- <label for="proposal-detail-modal" class="modal">
|
||||
<label class="modal-box !w-11/12 !max-w-5xl" for="">
|
||||
<label
|
||||
for="proposal-detail-modal"
|
||||
@ -290,6 +284,6 @@ function metaItem(metadata: string | undefined): {
|
||||
</Component>
|
||||
</p>
|
||||
</label>
|
||||
</label>
|
||||
</label> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -189,13 +189,13 @@ function mapAmount(events: readonly Event[]) {
|
||||
<div class="flex justify-end mb-4 pr-5">
|
||||
<label
|
||||
for="send"
|
||||
class="btn btn-secondary-sm btn-sm mr-2"
|
||||
class="btn btn-third-sm btn-sm mr-2"
|
||||
@click="dialog.open('send', {}, updateEvent)"
|
||||
>{{ $t('account.btn_send') }}</label
|
||||
>
|
||||
<label
|
||||
for="transfer"
|
||||
class="btn btn-secondary-sm btn-sm"
|
||||
class="btn btn-third-sm btn-sm"
|
||||
@click="
|
||||
dialog.open(
|
||||
'transfer',
|
||||
@ -397,13 +397,13 @@ function mapAmount(events: readonly Event[]) {
|
||||
<div class="flex justify-end mb-4">
|
||||
<label
|
||||
for="delegate"
|
||||
class="btn btn-secondary-sm btn-sm mr-2"
|
||||
class="btn btn-third-sm btn-sm mr-2"
|
||||
@click="dialog.open('delegate', {}, updateEvent)"
|
||||
>{{ $t('account.btn_delegate') }}</label
|
||||
>
|
||||
<label
|
||||
for="withdraw"
|
||||
class="btn btn-secondary-sm btn-sm"
|
||||
class="btn btn-third-sm btn-sm"
|
||||
@click="dialog.open('withdraw', {}, updateEvent)"
|
||||
>{{ $t('account.btn_withdraw') }}</label
|
||||
>
|
||||
|
||||
@ -36,7 +36,7 @@ onMounted(() => {
|
||||
<div v-show="tab === 'registry'" class="flex flex-wrap gap-4 p-4">
|
||||
<span
|
||||
v-for="s in ibcStore.commonIBCs"
|
||||
class="btn btn-secondary-sm"
|
||||
class="btn btn-third-sm"
|
||||
@click="ibcStore.fetchConnection(s.path)"
|
||||
>{{ s.from }} ⇌ {{ s.to }}</span
|
||||
>
|
||||
|
||||
@ -248,7 +248,7 @@ const amount = computed({
|
||||
|
||||
<div class="flex">
|
||||
<a
|
||||
class="my-5 !text-white btn grow bg-primary border-0 filter hover:brightness-150 hover:bg-primary"
|
||||
class="my-5 !text-white btn grow bg-primary border-0 hover:brightness-150 hover:bg-primary"
|
||||
:class="{
|
||||
// 'bg-primary border-0 filter hover:brightness-150 ':
|
||||
// store.trustColor === 'green',
|
||||
@ -426,7 +426,10 @@ const amount = computed({
|
||||
>
|
||||
{{ walletStore.currentAddress || 'Not Connected' }}
|
||||
</p>
|
||||
<CopyAddress :fillSvg="'#B999F3'" />
|
||||
<CopyAddress
|
||||
v-if="walletStore.currentAddress"
|
||||
:fillSvg="'#B999F3'"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<RouterLink
|
||||
@ -451,13 +454,13 @@ const amount = computed({
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="PingTokenConvert" class="btn btn-secondary mr-4">
|
||||
<label for="PingTokenConvert" class="btn btn-third mr-4">
|
||||
<Icon icon="mdi:swap-vertical" width="20" height="20" />
|
||||
{{ $t('index.btn_swap') }}
|
||||
</label>
|
||||
<label
|
||||
for="send"
|
||||
class="btn btn-secondary"
|
||||
class="btn btn-third"
|
||||
@click="dialog.open('send', {}, updateState)"
|
||||
>
|
||||
<img :src="sendImg" alt="sendIcon" width="20" height="20" />
|
||||
@ -478,7 +481,7 @@ const amount = computed({
|
||||
|
||||
<label
|
||||
for="delegate"
|
||||
class="btn btn-secondary"
|
||||
class="btn btn-third"
|
||||
@click="dialog.open('delegate', {}, updateState)"
|
||||
>
|
||||
<img :src="delegateImg" alt="delegate" width="20" height="20" />
|
||||
@ -528,7 +531,7 @@ const amount = computed({
|
||||
<tr v-for="(item, index) in walletStore.delegations" :key="index">
|
||||
<td>
|
||||
<RouterLink
|
||||
class="link link-primary no-underline text-link"
|
||||
class="link link-primary no-underline text-link hover:brightness-150 hover:text-link"
|
||||
:to="`/${chain}/staking/${item?.delegation?.validatorAddress}`"
|
||||
>
|
||||
{{
|
||||
|
||||
@ -519,7 +519,7 @@ loadAvatars();
|
||||
<label
|
||||
v-else
|
||||
for="delegate"
|
||||
class="btn-secondary !py-1 !px-3 capitalize !h-[unset]"
|
||||
class="btn-third !py-1 !px-3 capitalize !h-[unset]"
|
||||
@click="
|
||||
dialog.open('delegate', {
|
||||
validator_address: v.operatorAddress,
|
||||
|
||||
@ -202,11 +202,11 @@ table td {
|
||||
background-size: 112% 112%;
|
||||
}
|
||||
|
||||
.btn-secondary {
|
||||
.btn-third {
|
||||
@apply cursor-pointer bg-base rounded-lg border border-[#383B40] px-6 py-[14px] h-[48px] text-[14px] font-medium text-white hover:brightness-150 hover:bg-base hover:border-[#383B40];
|
||||
}
|
||||
|
||||
.btn-secondary-sm {
|
||||
.btn-third-sm {
|
||||
@apply cursor-pointer bg-base rounded-lg border border-[#383B40] px-3 py-1 text-[14px] font-medium text-white hover:brightness-150 hover:bg-base hover:border-[#383B40];
|
||||
}
|
||||
|
||||
|
||||
7174
src/style.output.css
Normal file
7174
src/style.output.css
Normal file
File diff suppressed because it is too large
Load Diff
@ -2,6 +2,8 @@
|
||||
const colors = require('tailwindcss/colors');
|
||||
|
||||
module.exports = {
|
||||
// prefix: 'tw-scan-',
|
||||
// important: true,
|
||||
darkMode: ['class'],
|
||||
content: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'],
|
||||
theme: {
|
||||
|
||||
@ -7,9 +7,14 @@ import Layouts from 'vite-plugin-vue-layouts';
|
||||
import DefineOptions from 'unplugin-vue-define-options/vite';
|
||||
import AutoImport from 'unplugin-auto-import/vite';
|
||||
import Pages from 'vite-plugin-pages';
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
|
||||
import cssInjectedByJsPlugin from 'vite-plugin-css-injected-by-js';
|
||||
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite';
|
||||
|
||||
import { createHtmlPlugin } from 'vite-plugin-html';
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
define: {
|
||||
@ -58,6 +63,26 @@ export default defineConfig({
|
||||
],
|
||||
}),
|
||||
DefineOptions(),
|
||||
|
||||
// createHtmlPlugin({
|
||||
// inject: {
|
||||
// // Inject data into ejs template
|
||||
// ejsOptions: {
|
||||
// customCss: () => {
|
||||
// const filepath = path.resolve(__dirname, './src/style.output.css');
|
||||
// if (fs.existsSync(filepath)) {
|
||||
// const css = fs.readFileSync(filepath, 'utf-8');
|
||||
// console.log('css', css);
|
||||
// return `<style>${css}</style>`;
|
||||
// }
|
||||
// return '';
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// }),
|
||||
cssInjectedByJsPlugin({
|
||||
styleId: 'app-styles',
|
||||
}),
|
||||
],
|
||||
resolve: {
|
||||
alias: {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user