Skip to content

Commit

Permalink
fix code-style issues
Browse files Browse the repository at this point in the history
  • Loading branch information
stv0g committed Apr 4, 2022
1 parent 8a33ab4 commit af47af0
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 35 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ GoSƐ is open-source software licensed under the Apache 2.0 license.

Check our my [blog article](https://noteblok.net/2022/04/03/gos%c9%9b-a-terascale-file-uploader/) for more background info.


## Features

- De-duplication of uploaded files based on their content-hash
Expand Down
20 changes: 10 additions & 10 deletions frontend/css/chart.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ $color-chart-fill: #f6bad1;
$color-chart-stroke: #eb71a0;

#chart {
width: 100%;
height: 100%;
width: 100%;
height: 100%;

svg {
path {
fill: $color-chart-fill;
stroke: $color-chart-stroke;
stroke-width: 0.4;
fill-opacity: 0.15;
stroke-opacity: 0.8;
}
svg {
path {
fill: $color-chart-fill;
stroke: $color-chart-stroke;
stroke-width: 0.4;
fill-opacity: 0.15;
stroke-opacity: 0.8;
}
}
}
36 changes: 18 additions & 18 deletions frontend/css/custom-file-button.scss
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
.custom-file-button {
input[type="file"] {
margin-left: -2px !important;
input[type="file"] {
margin-left: -2px !important;

&::-webkit-file-upload-button {
display: none;
}
&::file-selector-button {
display: none;
}
&::-webkit-file-upload-button {
display: none;
}
&::file-selector-button {
display: none;
}

height: 52px;
line-height: 38px;
}
height: 52px;
line-height: 38px;
}

&:hover {
label {
background-color: #dde0e3;
cursor: pointer;
}
}
&:hover {
label {
background-color: #dde0e3;
cursor: pointer;
}
}
}
8 changes: 4 additions & 4 deletions frontend/src/chart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ export class Chart {
return (value - inMin) * (outMax - outMin) / (inMax - inMin) + outMin;
};

const x = map(e[0], bounds.xMin, bounds.xMax, -1, 101)
const y = map(e[1], bounds.yMin, bounds.yMax, 27, 3)
const x = map(e[0], bounds.xMin, bounds.xMax, -1, 101);
const y = map(e[1], bounds.yMin, bounds.yMax, 27, 3);

return [x, y];
})
Expand All @@ -41,7 +41,7 @@ export class Chart {
return {
length: Math.sqrt(Math.pow(lengthX, 2) + Math.pow(lengthY, 2)),
angle: Math.atan2(lengthY, lengthX)
}
};
}

protected controlPoint(current: Point, previous: Point, next: Point, reverse: boolean = false): Point {
Expand Down Expand Up @@ -99,7 +99,7 @@ export class Chart {

public render(points: Point[]) {
if (points.length <= 1) {
return
return;
}

const bounds = this.findBounds(points);
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class Part {
return {
...this,
etag: buf2hex(this.etag)
}
};
}

static fromJSON(json: any): Part {
Expand Down
2 changes: 1 addition & 1 deletion pkg/handlers/part.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type partResponse struct {
URL string `json:"url"`
}

// HandleInitiate initiates a new upload
// HandlePart initiates a new upload
func HandlePart(c *gin.Context) {
svrs := c.MustGet("servers").(server.List)

Expand Down

0 comments on commit af47af0

Please sign in to comment.