Skip to content

Commit 49d0d2b

Browse files
committed
Initial commit
0 parents  commit 49d0d2b

File tree

114 files changed

+19819
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+19819
-0
lines changed

.editorconfig

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true

.env.example

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
APP_NAME='Native Bitcoint Vault'
2+
WSS='wss://n1.hashed.systems'
3+
BDK_SERVICES_URL='https://bdk.hashed.systems'

.eslintignore

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/dist
2+
.env
3+
/src-bex/www
4+
/src-capacitor
5+
/src-cordova
6+
/.quasar
7+
/node_modules
8+
.eslintrc.js
9+
babel.config.js

.eslintrc.js

+105
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
module.exports = {
2+
// https://eslint.org/docs/user-guide/configuring#configuration-cascading-and-hierarchy
3+
// This option interrupts the configuration hierarchy at this file
4+
// Remove this if you have an higher level ESLint config file (it usually happens into a monorepos)
5+
root: true,
6+
parserOptions: {
7+
parser: "@babel/eslint-parser",
8+
ecmaVersion: 2018,
9+
// Allows for the parsing of modern ECMAScript features
10+
sourceType: "module", // Allows for the use of imports
11+
},
12+
env: {
13+
browser: true,
14+
'cypress/globals': true
15+
},
16+
// Rules order is important, please avoid shuffling them
17+
extends: [
18+
"plugin:vue/vue3-essential",
19+
"plugin:vue/vue3-strongly-recommended",
20+
"plugin:vue/vue3-recommended",
21+
"prettier",
22+
"plugin:storybook/recommended",
23+
"eslint:recommended",
24+
"plugin:cypress/recommended",
25+
'@vue/standard'
26+
],
27+
plugins: [
28+
// https://eslint.vuejs.org/user-guide/#why-doesn-t-it-work-on-vue-file
29+
// required to lint *.vue files
30+
"vue", // https://github.com/typescript-eslint/typescript-eslint/issues/389#issuecomment-509292674
31+
"cypress"
32+
// Prettier has not been included as plugin to avoid performance impact
33+
// add it as an extension for your IDE
34+
],
35+
globals: {
36+
ga: "readonly",
37+
// Google Analytics
38+
cordova: "readonly",
39+
__statics: "readonly",
40+
__QUASAR_SSR__: "readonly",
41+
__QUASAR_SSR_SERVER__: "readonly",
42+
__QUASAR_SSR_CLIENT__: "readonly",
43+
__QUASAR_SSR_PWA__: "readonly",
44+
process: true,
45+
Capacitor: "readonly",
46+
chrome: "readonly",
47+
},
48+
// add your custom rules here
49+
rules: {
50+
// allow async-await
51+
// 'generator-star-spacing': 'off',
52+
// allow paren-less arrow functions
53+
'arrow-parens': 'off',
54+
'one-var': 'off',
55+
// "vue/require-explicit-emits": 'off',
56+
"vue/custom-event-name-casing": 'off',
57+
"vue/component-tags-order": ["error", { "order": ["template", "script", "style"] }],
58+
"vue/no-multi-spaces": [
59+
"error",
60+
{
61+
ignoreProperties: false,
62+
},
63+
],
64+
"indent": ["error", 2],
65+
"semi": [2, "never"],
66+
"no-else-return": 1,
67+
"consistent-return": 2,
68+
"space-before-blocks": [2, "always"],
69+
"space-infix-ops": [2, { int32Hint: false }],
70+
"arrow-spacing": [2, { before: true, after: true }],
71+
"key-spacing": [2, { beforeColon: false, afterColon: true }],
72+
"eqeqeq": [2, "smart"],
73+
"comma-dangle": [2, "never"],
74+
"no-trailing-spaces": [2, { skipBlankLines: false }],
75+
"quotes": [2, "single", { avoidEscape: true }],
76+
"keyword-spacing": [2, { before: true, after: true }],
77+
"block-spacing": [2, "always"],
78+
"brace-style": [1, "1tbs", { allowSingleLine: true }],
79+
"space-before-function-paren": ["error", "always"],
80+
81+
// 'import/first': 'off',
82+
// 'import/named': 'error',
83+
// 'import/namespace': 'error',
84+
// 'import/default': 'error',
85+
// 'import/export': 'error',
86+
// 'import/extensions': 'off',
87+
// 'import/no-unresolved': 'off',
88+
// 'import/no-extraneous-dependencies': 'off',
89+
"prefer-promise-reject-errors": "off",
90+
// allow debugger during development only
91+
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off",
92+
},
93+
overrides: [
94+
{
95+
// or whatever matches stories specified in .storybook/main.js
96+
files: ["*.stories.@(ts|tsx|js|jsx|mjs|cjs)"],
97+
rules: {
98+
// example of overriding a rule
99+
"storybook/hierarchy-separator": "error",
100+
// example of disabling a rule
101+
"storybook/default-exports": "off",
102+
},
103+
},
104+
],
105+
};

.gitignore

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
.DS_Store
2+
.thumbs.db
3+
.env
4+
node_modules
5+
6+
# Quasar core related directories
7+
.quasar
8+
/dist
9+
10+
# Cordova related directories and files
11+
/src-cordova/node_modules
12+
/src-cordova/platforms
13+
/src-cordova/plugins
14+
/src-cordova/www
15+
16+
# Capacitor related directories and files
17+
/src-capacitor/www
18+
/src-capacitor/node_modules
19+
20+
# BEX related directories and files
21+
/src-bex/www
22+
/src-bex/js/core
23+
24+
# Log files
25+
npm-debug.log*
26+
yarn-debug.log*
27+
yarn-error.log*
28+
29+
# Editor directories and files
30+
.idea
31+
*.suo
32+
*.ntvs*
33+
*.njsproj
34+
*.sln

.husky/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.husky/pre-commit

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
echo "Husky > pre-commit"
4+
yarn lint-staged

.postcssrc.js

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// https://github.com/michael-ciniawsky/postcss-load-config
2+
3+
module.exports = {
4+
plugins: [
5+
// to edit target browsers: use "browserslist" field in package.json
6+
require('autoprefixer')
7+
]
8+
}

.quasar.env.json

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"development": {
3+
"ENV_TYPE": "Running Development",
4+
"ENV_DEV": "Development"
5+
},
6+
"production": {
7+
"ENV_TYPE": "Running Production",
8+
"ENV_PROD": "Production"
9+
},
10+
"test": {
11+
"ENV_TYPE": "Running Test",
12+
"ENV_Test": "Test"
13+
}
14+
}

.storybook/main.js

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
const webpackConfig = require('../webpack-config.js')
2+
const path = require('path');
3+
module.exports = {
4+
"stories": ["../src/**/*.stories.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
5+
"addons": ["@storybook/addon-links", "@storybook/addon-essentials", "@storybook/addon-interactions"],
6+
"framework": "@storybook/vue3",
7+
features: {
8+
interactionsDebugger: true
9+
},
10+
core: {
11+
builder: "webpack5"
12+
},
13+
"webpackFinal": async(cfg, {configType}) => {
14+
cfg.module.rules.push({
15+
test: /\.(styl|stylus)$/,
16+
use: ['style-loader', 'css-loader', 'stylus-loader'],
17+
});
18+
cfg = webpackConfig(cfg)
19+
// cfg.plugins.push(
20+
// new ESLintPlugin(options)
21+
// )
22+
// cfg.plugins.push(new ESLintPlugin({
23+
// extensions: [ 'js', 'vue' ],
24+
// fix: true,
25+
// formatter: 'stylish',
26+
// threads: false
27+
// }))
28+
return cfg;
29+
}
30+
};

.storybook/preview.js

+85
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
import '@quasar/extras/roboto-font/roboto-font.css'
2+
import '@quasar/extras/material-icons/material-icons.css'
3+
import '@quasar/extras/animate/fadeInUp.css'
4+
import '@quasar/extras/animate/fadeOutDown.css'
5+
import '@quasar/extras/animate/fadeInRight.css'
6+
import '@quasar/extras/animate/fadeOutRight.css'
7+
8+
import 'quasar/dist/quasar.css'
9+
import '../src/css/app.styl'
10+
import { app } from '@storybook/vue3'
11+
import { Quasar } from 'quasar'
12+
import Vuex from 'vuex'
13+
import { createI18n } from 'vue-i18n'
14+
import messages from '../src/i18n'
15+
// import myStore from '../src/store'
16+
// import messages from '../src/i18n'
17+
import { createStore } from 'vuex'
18+
import polkadotWallet from '../src/store/polkadotWallet'
19+
import notifications from '~/mixins/notifications'
20+
import { Notify, Loading } from 'quasar'
21+
22+
const store = createStore({
23+
modules: {
24+
polkadotWallet
25+
},
26+
})
27+
28+
app.use(Quasar, {
29+
plugins: {
30+
Notify,
31+
Loading
32+
},
33+
config: {
34+
notify: {},
35+
loading: {}
36+
}
37+
})
38+
app.use(Vuex)
39+
40+
const i18n = createI18n({
41+
locale: 'en-US',
42+
messages
43+
})
44+
app.use(i18n)
45+
46+
app.use(store)
47+
console.log('store on storybook', store)
48+
49+
// API INSTANCES
50+
import PolkadotApi from '~/services/polkadotApi.js'
51+
import { NbvStorageApi } from '~/services/polkadot-pallets'
52+
const api = new PolkadotApi('wss://n1.hashed.systems')
53+
api.connect().then(() => {
54+
const nbvStorageApi = new NbvStorageApi(api)
55+
store['$polkadotApi'] = api
56+
store['$nbvStorageApi'] = nbvStorageApi
57+
})
58+
59+
60+
app.mixin(notifications)
61+
62+
// const i18n = new VueI18n({
63+
// locale: 'en-us',
64+
// fallbackLocale: 'en-us',
65+
// messages
66+
// })
67+
// export const decorators = [
68+
// (story) => ({
69+
// components: { story },
70+
// template: `<div class="bg-green q-pa-md"><story /></div>`,
71+
// // i18n,
72+
// // store
73+
// })
74+
// ];
75+
76+
export const parameters = {
77+
actions: { argTypesRegex: "^on[A-Z].*" },
78+
controls: {
79+
matchers: {
80+
color: /(background|color)$/i,
81+
date: /Date$/,
82+
},
83+
expanded: true
84+
},
85+
}

.stylintrc

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"blocks": "never",
3+
"brackets": "never",
4+
"colons": "never",
5+
"colors": "always",
6+
"commaSpace": "always",
7+
"commentSpace": "always",
8+
"cssLiteral": "never",
9+
"depthLimit": false,
10+
"duplicates": true,
11+
"efficient": "always",
12+
"extendPref": false,
13+
"globalDupe": true,
14+
"indentPref": 2,
15+
"leadingZero": "never",
16+
"maxErrors": false,
17+
"maxWarnings": false,
18+
"mixed": false,
19+
"namingConvention": false,
20+
"namingConventionStrict": false,
21+
"none": "never",
22+
"noImportant": false,
23+
"parenSpace": "never",
24+
"placeholder": false,
25+
"prefixVarsWithDollar": "always",
26+
"quotePref": "single",
27+
"semicolons": "never",
28+
"sortOrder": false,
29+
"stackedProperties": "never",
30+
"trailingWhitespace": "never",
31+
"universal": "never",
32+
"valid": true,
33+
"zeroUnits": "never",
34+
"zIndexNormalize": false
35+
}

.vscode/extensions.json

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"recommendations": [
3+
"dbaeumer.vscode-eslint",
4+
"esbenp.prettier-vscode",
5+
"octref.vetur"
6+
],
7+
"unwantedRecommendations": [
8+
"hookyqr.beautify",
9+
"dbaeumer.jshint",
10+
"ms-vscode.vscode-typescript-tslint-plugin"
11+
]
12+
}

.vscode/settings.json

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"vetur.validation.template": false,
3+
"vetur.validation.interpolation": false,
4+
"vetur.format.enable": false,
5+
"eslint.validate": ["javascript", "javascriptreact", "typescript", "vue"],
6+
"vetur.experimental.templateInterpolationService": true,
7+
"cSpell.words": [
8+
"Polkadot",
9+
"Satoshi",
10+
"Unsub",
11+
"xpub",
12+
"xpubs"
13+
]
14+
}

0 commit comments

Comments
 (0)