Skip to content

Commit

Permalink
Ran formatter (#589)
Browse files Browse the repository at this point in the history
  • Loading branch information
DeSoDog authored Aug 4, 2022
1 parent eb85567 commit 338eb13
Show file tree
Hide file tree
Showing 428 changed files with 29,512 additions and 10,576 deletions.
1 change: 0 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,3 @@
}
]
}

4 changes: 2 additions & 2 deletions .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ vscode:
- angular.ng-template
- ecmel.vscode-html-css
- eamodio.gitlens

# Ports to expose on workspace startup
ports:
- port: 4200
Expand All @@ -21,4 +21,4 @@ ports:
# Github integration
github:
prebuilds:
master: true
master: true
9 changes: 4 additions & 5 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"printWidth": 120,
"tabWidth": 2,
"useTabs": false,
"quoteProps": "as-needed",
"htmlWhitespaceSensitivity": "ignore",
"tabWidth": 2,
"useTabs": false,
"printWidth": 80,
"singleQuote": true
}
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
![DeSo Logo](src/assets/deso/camelcase_logo.svg)

# About DeSo

DeSo is a blockchain built from the ground up to support a fully-featured
social network. Its architecture is similar to Bitcoin, only it supports complex
social network data like profiles, posts, follows, creator coin transactions, and
Expand All @@ -9,13 +10,16 @@ more.
[Read about the vision](https://docs.deso.org/#the-ultimate-vision)

# About This Repo

Documentation for this repo lives on docs.deso.org. Specifically, the following
docs should give you everything you need to get started:
* [DeSo Code Walkthrough](https://docs.deso.org/code/walkthrough)
* [Setting Up Your Dev Environment](https://docs.deso.org/code/dev-setup)
* [Making Your First Changes](https://docs.deso.org/code/making-your-first-changes)

- [DeSo Code Walkthrough](https://docs.deso.org/code/walkthrough)
- [Setting Up Your Dev Environment](https://docs.deso.org/code/dev-setup)
- [Making Your First Changes](https://docs.deso.org/code/making-your-first-changes)

# Start Coding

The quickest way to contribute changes to the BitClout Frontend is the following these steps:

1. Open frontend repo in Gitpod
Expand All @@ -26,9 +30,8 @@ You can use any repo / branch URL and just prepend `https://gitpod.io/#` to it.

2. If needed, login to your github account

3. Set the correct `lastLocalNodeV2` to `"https://api.tijn.club"` in your browser Local Storage for the gitpod preview URL
3. Set the correct `lastLocalNodeV2` to `"https://api.tijn.club"` in your browser Local Storage for the gitpod preview URL

4. Create a new branch to start working

To commit / submit a pull reqest from gitpod, you will need to give gitpod additional permissions to your github account: `public_repo, read:org, read:user, repo, user:email, workflow` which you can do on the [GitPod Integrations page](https://gitpod.io/integrations).

19 changes: 4 additions & 15 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"assets": [
"src/assets",
"src/vendor"
],
"assets": ["src/assets", "src/vendor"],
"styles": [
"./node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
"./node_modules/ngx-toastr/toastr.css",
Expand Down Expand Up @@ -100,18 +97,13 @@
"src/styles.sass"
],
"scripts": [],
"assets": [
"src/assets"
]
"assets": ["src/assets"]
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"src/**/*.ts",
"src/**/*.html"
]
"lintFilePatterns": ["src/**/*.ts", "src/**/*.html"]
}
}
}
Expand All @@ -136,10 +128,7 @@
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"e2e//**/*.ts",
"e2e//**/*.html"
]
"lintFilePatterns": ["e2e//**/*.ts", "e2e//**/*.html"]
}
}
}
Expand Down
12 changes: 3 additions & 9 deletions e2e/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
{
"extends": "../.eslintrc.json",
"ignorePatterns": [
"!**/*"
],
"ignorePatterns": ["!**/*"],
"overrides": [
{
"files": [
"*.ts"
],
"files": ["*.ts"],
"parserOptions": {
"project": [
"e2e//tsconfig.app.json",
Expand Down Expand Up @@ -36,9 +32,7 @@
}
},
{
"files": [
"*.html"
],
"files": ["*.html"],
"rules": {}
}
]
Expand Down
18 changes: 9 additions & 9 deletions e2e/protractor.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@ const { SpecReporter } = require('jasmine-spec-reporter');

exports.config = {
allScriptsTimeout: 11000,
specs: [
'./src/**/*.e2e-spec.ts'
],
specs: ['./src/**/*.e2e-spec.ts'],
capabilities: {
'browserName': 'chrome'
browserName: 'chrome',
},
directConnect: true,
baseUrl: 'http://localhost:4200/',
framework: 'jasmine',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
print: function() {}
print: function () {},
},
onPrepare() {
require('ts-node').register({
project: require('path').join(__dirname, './tsconfig.e2e.json')
project: require('path').join(__dirname, './tsconfig.e2e.json'),
});
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
}
};
jasmine
.getEnv()
.addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
},
};
10 changes: 5 additions & 5 deletions e2e/src/app.e2e-spec.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { AppPage } from "./app.po";
import { browser, logging } from "protractor";
import { AppPage } from './app.po';
import { browser, logging } from 'protractor';

describe("workspace-project App", () => {
describe('workspace-project App', () => {
let page: AppPage;

beforeEach(() => {
page = new AppPage();
});

it("should display welcome message", () => {
it('should display welcome message', () => {
page.navigateTo();
expect(page.getTitleText()).toEqual("Welcome to electron-angular-app!");
expect(page.getTitleText()).toEqual('Welcome to electron-angular-app!');
});

afterEach(async () => {
Expand Down
4 changes: 2 additions & 2 deletions e2e/src/app.po.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { browser, by, element } from "protractor";
import { browser, by, element } from 'protractor';

export class AppPage {
navigateTo() {
return browser.get(browser.baseUrl) as Promise<any>;
}

getTitleText() {
return element(by.css("app-root h1")).getText() as Promise<string>;
return element(by.css('app-root h1')).getText() as Promise<string>;
}
}
8 changes: 2 additions & 6 deletions e2e/tsconfig.e2e.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
"outDir": "../out-tsc/app",
"module": "commonjs",
"target": "es5",
"types": [
"jasmine",
"jasminewd2",
"node"
]
"types": ["jasmine", "jasminewd2", "node"]
}
}
}
14 changes: 11 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@
"lint": "ng lint --fix",
"e2e": "ng e2e",
"build_prod": "ng build --prod --base-href / --deploy-url /",
"ngcc": "ngcc --properties es2015"
"ngcc": "ngcc --properties es2015",
"format": "npx prettier --write ."
},
"husky": {
"hooks": {
"pre-commit": "pretty-quick --staged"
}
},
"browserslist": [
"> 5%"
Expand Down Expand Up @@ -103,11 +109,13 @@
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"ng-packagr": "^11.1.2",
"prettier": "^2.2.1",
"protractor": "~7.0.0",
"ts-node": "~7.0.0",
"typescript": "^4.0.7",
"webpack-cli": "^3.3.10"
"webpack-cli": "^3.3.10",
"husky": "^8.0.1",
"prettier": "^2.7.1",
"pretty-quick": "^3.1.3"
},
"main": "main.js"
}
32 changes: 18 additions & 14 deletions src/app/add-unlockable-modal/add-unlockable-modal.component.html
Original file line number Diff line number Diff line change
@@ -1,31 +1,35 @@
<div app-theme class="nft-modal-container p-15px">
<nft-modal-header [header]="'Add unlockable content'" [bsModalRef]="bsModalRef"></nft-modal-header>
<nft-modal-header
[header]="'Add unlockable content'"
[bsModalRef]="bsModalRef"
></nft-modal-header>

<div class="fs-15px pt-15px pb-30px text-grey5">
This NFT includes unlockable content. Enter it below.
</div>

<textarea
class="fs-15px lh-18px br-8px form-control mb-30px"
style="width: 100%; padding: 10px"
cdkTextareaAutosize
cdkAutosizeMinRows="5"
[(ngModel)]="unlockableText"
#autosize="cdkTextareaAutosize"
placeholder="Enter URL, code to redeem, link, etc... "
></textarea>
<textarea
class="fs-15px lh-18px br-8px form-control mb-30px"
style="width: 100%; padding: 10px"
cdkTextareaAutosize
cdkAutosizeMinRows="5"
[(ngModel)]="unlockableText"
#autosize="cdkTextareaAutosize"
placeholder="Enter URL, code to redeem, link, etc... "
></textarea>

<div class="d-flex align-items-center mb-15px">
<button
class="btn btn-primary font-weight-bold fs-15px br-8px"
style="height: 36px; width: 100px; line-height: 15px"
[ngStyle]="{ 'width': sellingNFT ? '140px' : '100px' }"
[ngStyle]="{ width: sellingNFT ? '140px' : '100px' }"
(click)="sellNFT()"
[disabled]="addDisabled"
>
{{ sellingNFT ? "Selling NFTs" : "Add" }}
{{ sellingNFT ? 'Selling NFTs' : 'Add' }}
</button>
<div *ngIf="sellingNFT" class="pl-15px">{{ sellNFTCounter }} of {{ sellNFTTotal }} sold</div>

<div *ngIf="sellingNFT" class="pl-15px">
{{ sellNFTCounter }} of {{ sellNFTTotal }} sold
</div>
</div>
</div>
33 changes: 19 additions & 14 deletions src/app/add-unlockable-modal/add-unlockable-modal.component.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,30 @@
import { Component, OnInit, Input, ViewChild } from "@angular/core";
import { BsModalRef, BsModalService } from "ngx-bootstrap/modal";
import { CdkTextareaAutosize } from "@angular/cdk/text-field";
import { BackendApiService, NFTBidEntryResponse, NFTEntryResponse, PostEntryResponse } from "../backend-api.service";
import { of } from "rxjs";
import { concatMap, filter, last, map, take } from "rxjs/operators";
import { NftSoldModalComponent } from "../nft-sold-modal/nft-sold-modal.component";
import { GlobalVarsService } from "../global-vars.service";
import { Component, OnInit, Input, ViewChild } from '@angular/core';
import { BsModalRef, BsModalService } from 'ngx-bootstrap/modal';
import { CdkTextareaAutosize } from '@angular/cdk/text-field';
import {
BackendApiService,
NFTBidEntryResponse,
NFTEntryResponse,
PostEntryResponse,
} from '../backend-api.service';
import { of } from 'rxjs';
import { concatMap, filter, last, map, take } from 'rxjs/operators';
import { NftSoldModalComponent } from '../nft-sold-modal/nft-sold-modal.component';
import { GlobalVarsService } from '../global-vars.service';

@Component({
selector: "add-unlockable-modal",
templateUrl: "./add-unlockable-modal.component.html",
selector: 'add-unlockable-modal',
templateUrl: './add-unlockable-modal.component.html',
})
export class AddUnlockableModalComponent implements OnInit {
@ViewChild("autosize") autosize: CdkTextareaAutosize;
@ViewChild('autosize') autosize: CdkTextareaAutosize;
@Input() post: PostEntryResponse;
@Input() nftEntries: NFTEntryResponse[];
@Input() selectedBidEntries: NFTBidEntryResponse[];

addDisabled = false;
sellingNFT = false;
unlockableText: string = "";
unlockableText: string = '';

constructor(
private modalService: BsModalService,
Expand Down Expand Up @@ -64,9 +69,9 @@ export class AddUnlockableModalComponent implements OnInit {
// Hide this modal and open the next one.
this.bsModalRef.hide();
this.modalService.show(NftSoldModalComponent, {
class: "modal-dialog-centered modal-sm",
class: 'modal-dialog-centered modal-sm',
});
this.modalService.setDismissReason("nft sold");
this.modalService.setDismissReason('nft sold');
},
(err) => {
console.error(err);
Expand Down
8 changes: 4 additions & 4 deletions src/app/admin-page/admin-page.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { async, ComponentFixture, TestBed } from "@angular/core/testing";
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { AdminPageComponent } from "./admin-page.component";
import { AdminPageComponent } from './admin-page.component';

describe("AdminPageComponent", () => {
describe('AdminPageComponent', () => {
let component: AdminPageComponent;
let fixture: ComponentFixture<AdminPageComponent>;

Expand All @@ -18,7 +18,7 @@ describe("AdminPageComponent", () => {
fixture.detectChanges();
});

it("should create", () => {
it('should create', () => {
expect(component).toBeTruthy();
});
});
Loading

0 comments on commit 338eb13

Please sign in to comment.