Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
catlaser
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chris Prince
catlaser
Commits
5b649572
Commit
5b649572
authored
Apr 24, 2021
by
Chris Prince
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some minor changes to include bootstrap and a funny laser cat image;
parent
3cffa5bd
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
15 deletions
+29
-15
angular.json
website/lasercat-ui/angular.json
+1
-0
package-lock.json
website/lasercat-ui/package-lock.json
+0
-0
package.json
website/lasercat-ui/package.json
+3
-1
app.component.css
website/lasercat-ui/src/app/app.component.css
+7
-1
app.component.html
website/lasercat-ui/src/app/app.component.html
+16
-12
app.component.ts
website/lasercat-ui/src/app/app.component.ts
+2
-1
No files found.
website/lasercat-ui/angular.json
View file @
5b649572
...
...
@@ -23,6 +23,7 @@
"src/assets"
],
"styles"
:
[
"node_modules/bootstrap/dist/css/bootstrap.min.css"
,
"src/styles.css"
],
"scripts"
:
[],
...
...
website/lasercat-ui/package-lock.json
View file @
5b649572
This source diff could not be displayed because it is too large. You can
view the blob
instead.
website/lasercat-ui/package.json
View file @
5b649572
...
...
@@ -19,6 +19,8 @@
"@angular/platform-browser"
:
"~7.2.0"
,
"@angular/platform-browser-dynamic"
:
"~7.2.0"
,
"@angular/router"
:
"~7.2.0"
,
"@ng-bootstrap/ng-bootstrap"
:
"^4.2.2"
,
"bootstrap"
:
"^4.6.0"
,
"core-js"
:
"^2.5.4"
,
"rxjs"
:
"~6.3.3"
,
"tslib"
:
"^1.9.0"
,
...
...
@@ -29,9 +31,9 @@
"@angular/cli"
:
"~7.3.9"
,
"@angular/compiler-cli"
:
"~7.2.0"
,
"@angular/language-service"
:
"~7.2.0"
,
"@types/node"
:
"~8.9.4"
,
"@types/jasmine"
:
"~2.8.8"
,
"@types/jasminewd2"
:
"~2.0.3"
,
"@types/node"
:
"~8.9.4"
,
"codelyzer"
:
"~4.5.0"
,
"jasmine-core"
:
"~2.99.1"
,
"jasmine-spec-reporter"
:
"~4.2.1"
,
...
...
website/lasercat-ui/src/app/app.component.css
View file @
5b649572
...
...
@@ -3,8 +3,13 @@
}
.pos
{
display
:
inline
;
margin
:
5px
;
}
.mini
{
max-width
:
75px
;
margin-left
:
5px
;
}
.centered
{
margin
:
auto
;
width
:
50%
;
}
\ No newline at end of file
website/lasercat-ui/src/app/app.component.html
View file @
5b649572
...
...
@@ -3,21 +3,25 @@
<h1>
Welcome to {{ title }}!
</h1>
<img
width=
"
300"
alt=
"Angular Logo"
src=
"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg==
"
>
<img
width=
"
500"
alt=
"laser cat xkcd"
src=
"https://imgs.xkcd.com/comics/laser_pointer.png
"
>
</div>
<div
class=
"centered"
>
<button
(
click
)="
alterState
()"
>
Turn {{ laserState }} Laser
</button>
<button>
Start Random Patterns
</button>
<div
class=
"inline"
>
<div
class=
"pos"
>
<label
for=
"xPos"
>
X:
</label>
<input
class=
"mini"
maxlength=
"3"
d=
"XPos"
type=
"number"
/>
</div>
<div
class=
"pos"
>
<label
for=
"yPos"
>
Y:
</label>
<input
class=
"mini"
maxlength=
"3"
id=
"yPos"
type=
"number"
/>
<div
class=
"btn-group"
>
<button
(
click
)="
triggerLaser
()"
class=
"btn"
[
ngClass
]="{
'
btn-outline-danger
'
:
laserState =
==
'
on
',
'
btn-outline-info
'
:
laserState =
==
'
off
'}"
>
Turn {{ laserState }} Laser
</button>
<button
class=
"btn btn-warning"
>
Start Random Patterns
</button>
</div>
<div
class=
"btn-group"
>
<div
class=
"inline"
>
<div
class=
"pos"
>
<label
for=
"xPos"
>
X:
</label>
<input
class=
"mini"
maxlength=
"3"
id=
"xPos"
type=
"number"
min=
"0"
max=
"180"
/>
</div>
<div
class=
"pos"
>
<label
for=
"yPos"
>
Y:
</label>
<input
class=
"mini"
maxlength=
"3"
id=
"yPos"
type=
"number"
min=
"0"
max=
"180"
/>
</div>
<button
class=
"btn btn-sm btn-link"
(
click
)="
moveLaser
()"
>
Move
</button>
</div>
<button
(
click
)="
moveLaser
()"
>
Move
</button>
</div>
</div>
<router-outlet></router-outlet>
website/lasercat-ui/src/app/app.component.ts
View file @
5b649572
...
...
@@ -12,7 +12,8 @@ export class AppComponent {
laserState
=
'on'
;
constructor
(
private
esp
:
Esp12Service
)
{}
public
alterState
()
{
public
triggerLaser
()
{
if
(
this
.
laserState
===
'on'
)
{
this
.
esp
.
start
().
subscribe
();
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment