Skip to content

Commit

Permalink
优化ListVM
Browse files Browse the repository at this point in the history
  • Loading branch information
junixapp committed May 24, 2023
1 parent 757ef17 commit 8683aff
Show file tree
Hide file tree
Showing 17 changed files with 628 additions and 156 deletions.
45 changes: 45 additions & 0 deletions app/src/main/assets/dist/bundle.js

Large diffs are not rendered by default.

43 changes: 43 additions & 0 deletions app/src/main/assets/dist/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
section {
margin: 20px 0 20px 0;
}

.info-text {
font-size: 1.1em;
}

.full-width {
width: 100%;
}

.card {
margin-bottom: 20px;
}

/* Logo & Header */

header {
display: flex;
justify-content: center;
align-items: center;
}

#logo-container {
display: inline-flex;
flex-direction: column;
}

#logo-text {
padding-top: 15px;
padding-bottom: 5px;
}

#mm-logo {
width: 100%;
}

/* Encrypt/Decrypt */

#encryptMessageInput {
margin-bottom: 1rem;
}
329 changes: 329 additions & 0 deletions app/src/main/assets/dist/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,329 @@
<html>
<head>
<meta charset="UTF-8" />
<title>E2E Test Dapp</title>
<link rel="icon" type="image/svg" href="file:///android_asset/dist/metamask-fox.svg" />
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap"
/>
<link
href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.4.1/css/bootstrap.min.css"
rel="stylesheet"
/>
<link
href="https://cdnjs.cloudflare.com/ajax/libs/mdbootstrap/4.14.1/css/mdb.min.css"
rel="stylesheet"
/>
<link rel="stylesheet" href="file:///android_asset/dist/index.css" type="text/css" />
</head>

<body>
<main class="container-fluid">
<header>
<div id="logo-container">
<h1 id="logo-text" class="text-center">
E2E Test Dapp
</h1>

<img id="mm-logo" src="metamask-fox.svg" />
</div>
</header>
<section>
<h3 class="card-title">
Status
</h3>

<div class="row">
<div class="col-xl-4 col-lg-6 col-md-12 col-sm-12 col-12">
<p class="info-text alert alert-primary">
Network: <span id="network"></span>
</p>
</div>

<div class="col-xl-4 col-lg-6 col-md-12 col-sm-12 col-12">
<p class="info-text alert alert-secondary">
ChainId: <span id="chainId"></span>
</p>
</div>

<div class="col-xl-4 col-lg-6 col-md-12 col-sm-12 col-12">
<p class="info-text alert alert-success">
Accounts: <span id="accounts"></span>
</p>
</div>
</div>
</section>

<section>
<div class="row d-flex justify-content-center">
<div class="col-xl-4 col-lg-6 col-md-12 col-sm-12 col-12">
<div class="card">
<div class="card-body">
<h4 class="card-title">
Basic Actions
</h4>

<button
class="btn btn-primary btn-lg btn-block mb-3"
id="connectButton"
disabled
>
Connect
</button>

<button
class="btn btn-primary btn-lg btn-block mb-3"
id="getAccounts"
>
eth_accounts
</button>

<p class="info-text alert alert-secondary">
eth_accounts result: <span id="getAccountsResult"></span>
</p>
</div>
</div>
</div>
</div>
</section>

<section>
<div class="row d-flex justify-content-center">
<div class="col-xl-4 col-lg-6 col-md-12 col-sm-12 col-12">
<div class="card">
<div class="card-body">
<h4 class="card-title">
Permissions Actions
</h4>

<button
class="btn btn-primary btn-lg btn-block mb-3"
id="requestPermissions"
>
Request Permissions
</button>

<button
class="btn btn-primary btn-lg btn-block mb-3"
id="getPermissions"
>
Get Permissions
</button>

<p class="info-text alert alert-secondary">
Permissions result: <span id="permissionsResult"></span>
</p>
</div>
</div>
</div>
</div>
</section>

<section>
<div class="row">
<div
class="col-xl-4 col-lg-6 col-md-12 col-sm-12 col-12 d-flex align-items-stretch"
>
<div class="card full-width">
<div class="card-body">
<h4 class="card-title">
Contract
</h4>

<button
class="btn btn-primary btn-lg btn-block mb-3"
id="deployButton"
disabled
>
Deploy Contract
</button>

<button
class="btn btn-primary btn-lg btn-block mb-3"
id="depositButton"
disabled
>
Deposit
</button>

<button
class="btn btn-primary btn-lg btn-block mb-3"
id="withdrawButton"
disabled
>
Withdraw
</button>

<p class="info-text alert alert-secondary">
Contract Status: <span id="contractStatus">Not clicked</span>
</p>
</div>
</div>
</div>

<div
class="col-xl-4 col-lg-6 col-md-12 col-sm-12 col-12 d-flex align-items-stretch"
>
<div class="card full-width">
<div class="card-body">
<h4 class="card-title">
Send Eth
</h4>

<button
class="btn btn-primary btn-lg btn-block mb-3"
id="sendButton"
disabled
>
Send
</button>

<hr />

<h4>
Sign Typed Data
</h4>

<button
class="btn btn-primary btn-lg btn-block mb-3"
id="signTypedData"
disabled
>
Sign
</button>

<p class="info-text alert alert-warning">
Sign Typed Data Result: <span id="signTypedDataResult"></span>
</p>
</div>
</div>
</div>

<div
class="col-xl-4 col-lg-6 col-md-12 col-sm-12 col-12 d-flex align-items-stretch"
>
<div class="card full-width">
<div class="card-body">
<h4 class="card-title">
Send Tokens
</h4>

<p class="info-text alert alert-success">
Token: <span id="tokenAddress"></span>
</p>

<button
class="btn btn-primary btn-lg btn-block mb-3"
id="createToken"
disabled
>
Create Token
</button>

<button
class="btn btn-primary btn-lg btn-block mb-3"
id="transferTokens"
disabled
>
Transfer Tokens
</button>

<button
class="btn btn-primary btn-lg btn-block mb-3"
id="approveTokens"
disabled
>
Approve Tokens
</button>

<button
class="btn btn-primary btn-lg btn-block mb-3"
id="transferTokensWithoutGas"
disabled
>
Transfer Tokens Without Gas
</button>

<button
class="btn btn-primary btn-lg btn-block mb-3"
id="approveTokensWithoutGas"
disabled
>
Approve Tokens Without Gas
</button>
</div>
</div>
</div>
</div>
</section>

<section>
<div class="row">
<div
class="col-xl-4 col-lg-6 col-md-12 col-sm-12 col-12 d-flex align-items-stretch"
>
<div class="card full-width">
<div class="card-body">
<h4 class="card-title">
Encrypt / Decrypt
</h4>

<button
class="btn btn-primary btn-lg btn-block mb-3"
id="getEncryptionKeyButton"
disabled
>
Get Encryption Key
</button>

<hr />

<div id="encrypt-message-form">
<input
class="form-control"
type="text"
placeholder="Message to encrypt"
id="encryptMessageInput"
/>

<button
class="btn btn-primary btn-lg btn-block mb-3"
id="encryptButton"
disabled
>
Encrypt
</button>
</div>

<hr />

<button
class="btn btn-primary btn-lg btn-block mb-3"
id="decryptButton"
disabled
>
Decrypt
</button>

<p class="info-text alert alert-secondary">
Encryption key: <span id="encryptionKeyDisplay"></span>
</p>

<p class="info-text text-truncate alert alert-secondary">
Ciphertext: <span id="ciphertextDisplay"></span>
</p>

<p class="info-text alert alert-secondary">
Cleartext: <span id="cleartextDisplay"></span>
</p>
</div>
</div>
</div>
</div>
</section>
</main>

<script src="file:///android_asset/dist/bundle.js" defer></script>
</body>
</html>
1 change: 1 addition & 0 deletions app/src/main/assets/dist/metamask-fox.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/src/main/java/com/lxj/androidktxdemo/MainActivity.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.lxj.androidktxdemo

import android.content.Intent
import androidx.viewpager2.adapter.FragmentStateAdapter
import com.blankj.utilcode.util.LogUtils
import com.lxj.androidktx.base.BaseActivity
import com.lxj.androidktx.core.*
Expand Down Expand Up @@ -35,7 +36,6 @@ class MainActivity : BaseActivity() {
PageInfo("LiveDataBus", LiveDataBusDemo()),
PageInfo("RecyclerView相关", RecyclerViewExtDemo()),
PageInfo("ViewPager2", ViewPager2Demo()),
PageInfo("九宫格View", NineGridViewDemo()),
PageInfo("播放器", PlayerFragment()),
PageInfo("Uploader", UploaderFragment()),
)
Expand Down
Loading

0 comments on commit 8683aff

Please sign in to comment.