This commit is contained in:
Jaco
2023-01-15 21:27:52 +02:00
committed by GitHub
parent 9b4845a6d4
commit 7fa98ef5a1
16 changed files with 853 additions and 719 deletions
+8
View File
@@ -1,5 +1,13 @@
# CHANGELOG # CHANGELOG
## 2.10.1 Jan 15, 2023
Changes:
- Add setting to allow/disallow in-browser account storage
- Bump to `@polkadot/util` 10.2.3
## 2.9.15 Jan 8, 2023 ## 2.9.15 Jan 8, 2023
Changes: Changes:
+4 -4
View File
@@ -11,7 +11,7 @@
}, },
"sideEffects": false, "sideEffects": false,
"type": "module", "type": "module",
"version": "2.9.15", "version": "2.10.0",
"versions": { "versions": {
"git": "2.9.15", "git": "2.9.15",
"npm": "2.9.15" "npm": "2.9.15"
@@ -34,8 +34,8 @@
"devDependencies": { "devDependencies": {
"@babel/core": "^7.20.12", "@babel/core": "^7.20.12",
"@babel/runtime": "^7.20.7", "@babel/runtime": "^7.20.7",
"@polkadot/dev": "^0.67.177", "@polkadot/dev": "^0.67.181",
"@polkadot/x-bundle": "^10.2.3", "@polkadot/x-bundle": "^10.2.6",
"@types/jest": "^29.2.5", "@types/jest": "^29.2.5",
"babel-loader": "^8.3.0", "babel-loader": "^8.3.0",
"babel-plugin-transform-vue-template": "^0.4.2", "babel-plugin-transform-vue-template": "^0.4.2",
@@ -44,7 +44,7 @@
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"react-is": "^18.2.0", "react-is": "^18.2.0",
"react-native": "^0.70.6", "react-native": "^0.71.0",
"stream-browserify": "^3.0.0", "stream-browserify": "^3.0.0",
"vue-template-compiler": "^2.7.14" "vue-template-compiler": "^2.7.14"
}, },
+1 -1
View File
@@ -14,7 +14,7 @@
"url": "https://github.com/polkadot-js/ui.git" "url": "https://github.com/polkadot-js/ui.git"
}, },
"sideEffects": false, "sideEffects": false,
"version": "2.9.15", "version": "2.10.0",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.20.7" "@babel/runtime": "^7.20.7"
+1 -1
View File
@@ -14,7 +14,7 @@
"url": "https://github.com/polkadot-js/ui.git" "url": "https://github.com/polkadot-js/ui.git"
}, },
"sideEffects": false, "sideEffects": false,
"version": "2.9.15", "version": "2.10.0",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.20.7" "@babel/runtime": "^7.20.7"
+7 -7
View File
@@ -17,18 +17,18 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "2.9.15", "version": "2.10.0",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.20.7", "@babel/runtime": "^7.20.7",
"@polkadot/keyring": "^10.2.3", "@polkadot/keyring": "^10.2.6",
"@polkadot/ui-settings": "2.9.15", "@polkadot/ui-settings": "2.10.0",
"@polkadot/ui-shared": "2.9.15", "@polkadot/ui-shared": "2.10.0",
"@polkadot/util": "^10.2.3", "@polkadot/util": "^10.2.6",
"@polkadot/util-crypto": "^10.2.3", "@polkadot/util-crypto": "^10.2.6",
"color": "^3.2.1", "color": "^3.2.1",
"ethereum-blockies-base64": "^1.0.2", "ethereum-blockies-base64": "^1.0.2",
"jdenticon": "3.1.1", "jdenticon": "3.2.0",
"react-copy-to-clipboard": "^5.1.0", "react-copy-to-clipboard": "^5.1.0",
"styled-components": "^5.3.6" "styled-components": "^5.3.6"
}, },
+4 -4
View File
@@ -17,13 +17,13 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "2.9.15", "version": "2.10.0",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.20.7", "@babel/runtime": "^7.20.7",
"@polkadot/ui-settings": "2.9.15", "@polkadot/ui-settings": "2.10.0",
"@polkadot/util": "^10.2.3", "@polkadot/util": "^10.2.6",
"@polkadot/util-crypto": "^10.2.3", "@polkadot/util-crypto": "^10.2.6",
"qrcode-generator": "^1.4.4", "qrcode-generator": "^1.4.4",
"react-qr-reader": "^2.2.1", "react-qr-reader": "^2.2.1",
"styled-components": "^5.3.6" "styled-components": "^5.3.6"
+6 -6
View File
@@ -17,17 +17,17 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "2.9.15", "version": "2.10.0",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.20.7", "@babel/runtime": "^7.20.7",
"@polkadot/ui-shared": "2.9.15", "@polkadot/ui-shared": "2.10.0",
"@polkadot/util": "^10.2.3", "@polkadot/util": "^10.2.6",
"@polkadot/util-crypto": "^10.2.3", "@polkadot/util-crypto": "^10.2.6",
"react-native-svg": "^12.4.4" "react-native-svg": "^12.5.0"
}, },
"devDependencies": { "devDependencies": {
"@types/react-native": "^0.70.8" "@types/react-native": "^0.71.0"
}, },
"peerDependencies": { "peerDependencies": {
"@polkadot/util": "*", "@polkadot/util": "*",
+2 -2
View File
@@ -13,10 +13,10 @@
"url": "https://github.com/polkadot-js/ui.git" "url": "https://github.com/polkadot-js/ui.git"
}, },
"sideEffects": false, "sideEffects": false,
"version": "2.9.15", "version": "2.10.0",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.20.7", "@babel/runtime": "^7.20.7",
"@polkadot/util": "^10.2.3" "@polkadot/util": "^10.2.6"
} }
} }
+5 -5
View File
@@ -16,14 +16,14 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "2.9.15", "version": "2.10.0",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.20.7", "@babel/runtime": "^7.20.7",
"@polkadot/keyring": "^10.2.3", "@polkadot/keyring": "^10.2.6",
"@polkadot/ui-settings": "2.9.15", "@polkadot/ui-settings": "2.10.0",
"@polkadot/util": "^10.2.3", "@polkadot/util": "^10.2.6",
"@polkadot/util-crypto": "^10.2.3", "@polkadot/util-crypto": "^10.2.6",
"mkdirp": "^1.0.4", "mkdirp": "^1.0.4",
"rxjs": "^7.8.0", "rxjs": "^7.8.0",
"store": "^2.0.12" "store": "^2.0.12"
+3 -3
View File
@@ -17,12 +17,12 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "2.9.15", "version": "2.10.0",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.20.7", "@babel/runtime": "^7.20.7",
"@polkadot/networks": "^10.2.3", "@polkadot/networks": "^10.2.6",
"@polkadot/util": "^10.2.3", "@polkadot/util": "^10.2.6",
"eventemitter3": "^4.0.7", "eventemitter3": "^4.0.7",
"store": "^2.0.12" "store": "^2.0.12"
}, },
+15 -2
View File
@@ -8,7 +8,7 @@ import store from 'store';
import { hasProcess, isUndefined } from '@polkadot/util'; import { hasProcess, isUndefined } from '@polkadot/util';
import { CAMERA, CAMERA_DEFAULT, CRYPTOS, CRYPTOS_ETH, CRYPTOS_LEDGER, ENDPOINT_DEFAULT, ENDPOINTS, ICON_DEFAULT, ICONS, LANGUAGE_DEFAULT, LEDGER_CONN, LEDGER_CONN_DEFAULT, LOCKING, LOCKING_DEFAULT, NOTIFICATION_DEFAULT, PREFIX_DEFAULT, PREFIXES, UIMODE_DEFAULT, UIMODES, UITHEME_DEFAULT, UITHEMES } from './defaults'; import { CAMERA, CAMERA_DEFAULT, CRYPTOS, CRYPTOS_ETH, CRYPTOS_LEDGER, ENDPOINT_DEFAULT, ENDPOINTS, ICON_DEFAULT, ICONS, LANGUAGE_DEFAULT, LEDGER_CONN, LEDGER_CONN_DEFAULT, LOCKING, LOCKING_DEFAULT, NOTIFICATION_DEFAULT, PREFIX_DEFAULT, PREFIXES, STORAGE, STORAGE_DEFAULT, UIMODE_DEFAULT, UIMODES, UITHEME_DEFAULT, UITHEMES } from './defaults';
type ChangeCallback = (settings: SettingsStruct) => void; type ChangeCallback = (settings: SettingsStruct) => void;
type OnTypes = 'change'; type OnTypes = 'change';
@@ -41,6 +41,8 @@ export class Settings implements SettingsStruct {
#prefix: number; #prefix: number;
#storage: string;
#uiMode: string; #uiMode: string;
#uiTheme: string; #uiTheme: string;
@@ -60,10 +62,11 @@ export class Settings implements SettingsStruct {
this.#i18nLang = settings.i18nLang || LANGUAGE_DEFAULT; this.#i18nLang = settings.i18nLang || LANGUAGE_DEFAULT;
this.#icon = settings.icon || ICON_DEFAULT; this.#icon = settings.icon || ICON_DEFAULT;
this.#locking = settings.locking || LOCKING_DEFAULT; this.#locking = settings.locking || LOCKING_DEFAULT;
this.#notification = settings.notification || NOTIFICATION_DEFAULT;
this.#prefix = isUndefined(settings.prefix) ? PREFIX_DEFAULT : settings.prefix; this.#prefix = isUndefined(settings.prefix) ? PREFIX_DEFAULT : settings.prefix;
this.#storage = withDefault(STORAGE, settings.storage, STORAGE_DEFAULT);
this.#uiMode = settings.uiMode || UIMODE_DEFAULT; this.#uiMode = settings.uiMode || UIMODE_DEFAULT;
this.#uiTheme = settings.uiTheme || UITHEME_DEFAULT; this.#uiTheme = settings.uiTheme || UITHEME_DEFAULT;
this.#notification = settings.notification || NOTIFICATION_DEFAULT;
} }
public get camera (): string { public get camera (): string {
@@ -102,6 +105,10 @@ export class Settings implements SettingsStruct {
return this.#prefix; return this.#prefix;
} }
public get storage (): string {
return this.#storage;
}
public get uiMode (): string { public get uiMode (): string {
return this.#uiMode; return this.#uiMode;
} }
@@ -146,6 +153,10 @@ export class Settings implements SettingsStruct {
return PREFIXES; return PREFIXES;
} }
public get availableStorage (): Option[] {
return STORAGE;
}
public get availableUIModes (): Option[] { public get availableUIModes (): Option[] {
return UIMODES; return UIMODES;
} }
@@ -165,6 +176,7 @@ export class Settings implements SettingsStruct {
locking: this.#locking, locking: this.#locking,
notification: this.#notification, notification: this.#notification,
prefix: this.#prefix, prefix: this.#prefix,
storage: this.#storage,
uiMode: this.#uiMode, uiMode: this.#uiMode,
uiTheme: this.#uiTheme uiTheme: this.#uiTheme
}; };
@@ -180,6 +192,7 @@ export class Settings implements SettingsStruct {
this.#locking = settings.locking || this.#locking; this.#locking = settings.locking || this.#locking;
this.#notification = settings.notification || this.#notification; this.#notification = settings.notification || this.#notification;
this.#prefix = isUndefined(settings.prefix) ? this.#prefix : settings.prefix; this.#prefix = isUndefined(settings.prefix) ? this.#prefix : settings.prefix;
this.#storage = settings.storage || this.#storage;
this.#uiMode = settings.uiMode || this.#uiMode; this.#uiMode = settings.uiMode || this.#uiMode;
this.#uiTheme = settings.uiTheme || this.#uiTheme; this.#uiTheme = settings.uiTheme || this.#uiTheme;
@@ -41,6 +41,21 @@ const LOCKING: Option[] = [
} }
]; ];
const STORAGE_DEFAULT = 'off';
const STORAGE: Option[] = [
{
info: 'on',
text: 'Allow local in-browser account storage',
value: 'on'
},
{
info: 'off',
text: 'Do not allow local in-browser account storage',
value: 'off'
}
];
export { export {
CAMERA_DEFAULT, CAMERA_DEFAULT,
CAMERA, CAMERA,
@@ -60,6 +75,8 @@ export {
NOTIFICATION_DEFAULT, NOTIFICATION_DEFAULT,
PREFIX_DEFAULT, PREFIX_DEFAULT,
PREFIXES, PREFIXES,
STORAGE,
STORAGE_DEFAULT,
UIMODE_DEFAULT, UIMODE_DEFAULT,
UIMODES, UIMODES,
UITHEME_DEFAULT, UITHEME_DEFAULT,
+1
View File
@@ -18,6 +18,7 @@ export interface SettingsStruct {
locking: string; locking: string;
notification: string; notification: string;
prefix: number; prefix: number;
storage: string;
uiMode: string; uiMode: string;
uiTheme: string; uiTheme: string;
} }
+3 -3
View File
@@ -17,15 +17,15 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "2.9.15", "version": "2.10.0",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.20.7", "@babel/runtime": "^7.20.7",
"color": "^3.2.1" "color": "^3.2.1"
}, },
"devDependencies": { "devDependencies": {
"@polkadot/util": "^10.2.3", "@polkadot/util": "^10.2.6",
"@polkadot/util-crypto": "^10.2.3", "@polkadot/util-crypto": "^10.2.6",
"@types/color": "^3.0.3", "@types/color": "^3.0.3",
"@types/xmlserializer": "^0.6.3", "@types/xmlserializer": "^0.6.3",
"xmlserializer": "^0.6.1" "xmlserializer": "^0.6.1"
+5 -5
View File
@@ -17,14 +17,14 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "2.9.15", "version": "2.10.0",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.20.7", "@babel/runtime": "^7.20.7",
"@polkadot/ui-shared": "2.9.15", "@polkadot/ui-shared": "2.10.0",
"@polkadot/util": "^10.2.3", "@polkadot/util": "^10.2.6",
"@polkadot/util-crypto": "^10.2.3", "@polkadot/util-crypto": "^10.2.6",
"jdenticon": "3.1.1" "jdenticon": "3.2.0"
}, },
"devDependencies": { "devDependencies": {
"vue": "^2.7.14" "vue": "^2.7.14"
+771 -676
View File
File diff suppressed because it is too large Load Diff