Skip to content

Commit e70f0f7

Browse files
Merge pull request #324 from lightningrodlabs/run-prettier
run prettier on whole web project
2 parents 01d74b9 + d6ea96c commit e70f0f7

File tree

194 files changed

+1367
-1087
lines changed

Some content is hidden

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

194 files changed

+1367
-1087
lines changed

web/.babelrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
"@babel/preset-react"
1414
],
1515
"plugins": []
16-
}
16+
}

web/.prettierrc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"trailingComma": "es5",
3-
"tabWidth": 2,
4-
"semi": false,
5-
"singleQuote": true
2+
"trailingComma": "es5",
3+
"tabWidth": 2,
4+
"semi": false,
5+
"singleQuote": true
66
}

web/.storybook/main.js

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
module.exports = {
2-
"stories": ["../src/**/*.stories.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
3-
"addons": ["@storybook/addon-links", "@storybook/addon-essentials", "@storybook/addon-interactions", "@storybook/preset-scss", "@storybook/addon-mdx-gfm"],
4-
"framework": {
5-
name: "@storybook/react-webpack5",
6-
options: {}
2+
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
3+
addons: [
4+
'@storybook/addon-links',
5+
'@storybook/addon-essentials',
6+
'@storybook/addon-interactions',
7+
'@storybook/preset-scss',
8+
'@storybook/addon-mdx-gfm',
9+
],
10+
framework: {
11+
name: '@storybook/react-webpack5',
12+
options: {},
713
},
814
docs: {
9-
autodocs: true
10-
}
11-
};
15+
autodocs: true,
16+
},
17+
}

web/.storybook/preview.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
export const parameters = {
2-
actions: { argTypesRegex: "^on[A-Z].*" },
2+
actions: { argTypesRegex: '^on[A-Z].*' },
33
controls: {
44
matchers: {
55
color: /(background|color)$/i,
66
date: /Date$/,
77
},
88
},
9-
}
9+
}

web/dist/index.html

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,10 @@
1-
<!doctype html><html><head><title>Acorn</title><script defer="defer" src="./app.js"></script></head><body><div id="react"/></body></html>
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Acorn</title>
5+
<script defer="defer" src="./app.js"></script>
6+
</head>
7+
<body>
8+
<div id="react" />
9+
</body>
10+
</html>

web/dist/splashscreen.html

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,42 @@
1-
<!doctype html><html><head><title>Acorn</title><script defer="defer" src="./splash.js"></script></head><body><div class="splash-wrapper"><div class="splash-image-wrapper"><div class="splash-image-caption">Photograph by Valeriia Miller</div></div><div class="splash-content-wrapper"><div><div class="splash-logo">acorn</div><div class="splash-version">version 7.0.1-alpha</div></div><div class="splash-loading-message" id="activity">Setting up Holochain...</div><div class="splash-description">Acorn is an open-source, peer-to-peer project management application designed and built for distributed software development teams. Acorn functions through defining Intended Outcomes for a project in a Dependency Tree structure.<br/><br/>Acorn is built as a Holochain application, meaning it runs on decentralized peer-to-peer computing and can be used without server infrastructure or a hosting service. The users of a particular Acorn instance are its hosting power.</div><div class="splash-license">© 2020-2022 Harris-Braun Enterprises, LLC.<br/>Licensed under the Cryptographic Autonomy License v1.0.</div></div></div><script>const el = document.getElementById('activity')
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Acorn</title>
5+
<script defer="defer" src="./splash.js"></script>
6+
</head>
7+
<body>
8+
<div class="splash-wrapper">
9+
<div class="splash-image-wrapper">
10+
<div class="splash-image-caption">Photograph by Valeriia Miller</div>
11+
</div>
12+
<div class="splash-content-wrapper">
13+
<div>
14+
<div class="splash-logo">acorn</div>
15+
<div class="splash-version">version 7.0.1-alpha</div>
16+
</div>
17+
<div class="splash-loading-message" id="activity">
18+
Setting up Holochain...
19+
</div>
20+
<div class="splash-description">
21+
Acorn is an open-source, peer-to-peer project management application
22+
designed and built for distributed software development teams. Acorn
23+
functions through defining Intended Outcomes for a project in a
24+
Dependency Tree structure.<br /><br />Acorn is built as a Holochain
25+
application, meaning it runs on decentralized peer-to-peer computing
26+
and can be used without server infrastructure or a hosting service.
27+
The users of a particular Acorn instance are its hosting power.
28+
</div>
29+
<div class="splash-license">
30+
© 2020-2022 Harris-Braun Enterprises, LLC.<br />Licensed under the
31+
Cryptographic Autonomy License v1.0.
32+
</div>
33+
</div>
34+
</div>
35+
<script>
36+
const el = document.getElementById('activity')
237
require('electron').ipcRenderer.on('status', (event, message) => {
338
el.innerHTML = message
4-
})</script></body></html>
39+
})
40+
</script>
41+
</body>
42+
</html>

web/src/_fonts.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,4 @@
6767
url('fonts/gilroy/gilroy-light-webfont.woff') format('woff');
6868
font-weight: normal;
6969
font-style: normal;
70-
}
70+
}

web/src/api/clientSideIdHash.ts

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
21
const hashCodeId = function (str?: string): string {
3-
var hash = 0, i, chr;
4-
if (!str || str.length === 0) return hash.toString()
5-
for (i = 0; i < str.length; i++) {
6-
chr = str.charCodeAt(i)
7-
hash = ((hash << 5) - hash) + chr
8-
hash |= 0 // Convert to 32bit integer
9-
}
10-
return Math.abs(hash).toString().slice(0, 6)
2+
var hash = 0,
3+
i,
4+
chr
5+
if (!str || str.length === 0) return hash.toString()
6+
for (i = 0; i < str.length; i++) {
7+
chr = str.charCodeAt(i)
8+
hash = (hash << 5) - hash + chr
9+
hash |= 0 // Convert to 32bit integer
10+
}
11+
return Math.abs(hash).toString().slice(0, 6)
1112
}
1213

13-
export default hashCodeId
14+
export default hashCodeId

web/src/api/hdkCrud.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
import { EntryHashB64, FetchInput, ActionHashB64, UpdateInput } from '../types/shared'
1+
import {
2+
EntryHashB64,
3+
FetchInput,
4+
ActionHashB64,
5+
UpdateInput,
6+
} from '../types/shared'
27
import { AppWebsocket, CellId } from '@holochain/client'
38
import callZome from './callZome'
49

web/src/api/profilesApi.ts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ const ZOME_FN_NAMES = {
1616

1717
const ProfilesApi = (appWebsocket: AppWebsocket) => {
1818
return {
19-
createWhoami: async (cellId: CellId, payload: Profile): Promise<WireRecord<Profile>> => {
19+
createWhoami: async (
20+
cellId: CellId,
21+
payload: Profile
22+
): Promise<WireRecord<Profile>> => {
2023
return callZome(
2124
appWebsocket,
2225
cellId,
@@ -25,7 +28,10 @@ const ProfilesApi = (appWebsocket: AppWebsocket) => {
2528
payload
2629
)
2730
},
28-
createImportedProfile: async (cellId: CellId, payload: Profile): Promise<WireRecord<Profile>> => {
31+
createImportedProfile: async (
32+
cellId: CellId,
33+
payload: Profile
34+
): Promise<WireRecord<Profile>> => {
2935
return callZome(
3036
appWebsocket,
3137
cellId,
@@ -34,7 +40,10 @@ const ProfilesApi = (appWebsocket: AppWebsocket) => {
3440
payload
3541
)
3642
},
37-
updateWhoami: async (cellId: CellId, payload: UpdateInput<Profile>): Promise<WireRecord<Profile>> => {
43+
updateWhoami: async (
44+
cellId: CellId,
45+
payload: UpdateInput<Profile>
46+
): Promise<WireRecord<Profile>> => {
3847
return callZome(
3948
appWebsocket,
4049
cellId,

0 commit comments

Comments
 (0)