feat: |UI| random fake name support MAX_ADDRESS_LEN (#482)

This commit is contained in:
Dream Hunter
2024-11-14 23:58:42 +08:00
committed by GitHub
parent 5ff2ceb5e8
commit 3c81e05a2f
3 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
## main(v0.8.0) ## main(v0.8.0)
TODO - feat: |UI| 随机生成地址时不超过最大长度
## v0.7.6 ## v0.7.6
+4
View File
@@ -124,6 +124,10 @@ const generateName = async () => {
.replace(/\.{2,}/g, '.') .replace(/\.{2,}/g, '.')
.replace(addressRegex.value, '') .replace(addressRegex.value, '')
.toLowerCase(); .toLowerCase();
// support maxAddressLen
if (emailName.value.length > openSettings.value.maxAddressLen) {
emailName.value = emailName.value.slice(0, openSettings.value.maxAddressLen);
}
} catch (error) { } catch (error) {
message.error(error.message || "error"); message.error(error.message || "error");
} finally { } finally {
+1 -1
View File
@@ -1,5 +1,5 @@
export const CONSTANTS = { export const CONSTANTS = {
VERSION: 'v0.7.6', VERSION: 'v0.8.0',
// DB settings // DB settings
ADDRESS_BLOCK_LIST_KEY: 'address_block_list', ADDRESS_BLOCK_LIST_KEY: 'address_block_list',