Skip to content

Commit

Permalink
Merge pull request #3 from jalibu/feat/typescript
Browse files Browse the repository at this point in the history
Feat/typescript
  • Loading branch information
jalibu authored Jan 23, 2021
2 parents 12f33ea + fb5dae7 commit 7363eb1
Show file tree
Hide file tree
Showing 29 changed files with 7,059 additions and 899 deletions.
17 changes: 17 additions & 0 deletions @types/Module/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
declare module Module {
export function register(
moduleName: string,
moduleProperties: {
defaults: any;
getStyles: Function;
getTranslations: Function;
getTemplate: Function;
getTemplateData: Function;
getHeader: Function;
start: Function;
scheduleUpdate: Function;
loadData: Function;
socketNotificationReceived: Function;
}
): void;
}
10 changes: 10 additions & 0 deletions @types/node_helper/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* @author https://github.com/dolanmiu
*/
declare module "node_helper" {
export function create(object: {
start(): void;
socketNotificationReceived<T>(notification: any, config: any): void;
[key: string]: any;
}): void;
}
64 changes: 64 additions & 0 deletions @types/selfsigned/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/**
* Minimal type definition for selfsigned
* @author Christopher Holomek
* @since 26.09.2019
*/
declare module "selfsigned" {
const selfsigned: SelfSigned;
export default selfsigned;

interface SelfSigned {
/**
* Generate certificate
* @param attrs
* attributes to use
* @param options
* options for generation
* @param done
* callback after generation of certificate is done
*/
generate(
attrs: any[] | null,
options: Options,
done: (error: Error | null, certificate: CertificateDefinition) => void
): void;

/**
* Generate certificate
* @param attrs
* attributes to use
* @param options
* options for generation
*/
generate(attrs: any[] | null, options: Options): CertificateDefinition;

/**
* Generate certificate
* @param done
* callback after generation of certificate is done
*/
generate(
done: (error: Error | null, certificate: CertificateDefinition) => void
): void;
}

export interface CertificateDefinition {
private: string;
public: string;
cert: string;
fingerprint: string;
clientprivate: string;
clientpublic: string;
clientcert: string;
}

export interface Options {
keySize?: number;
days?: number;
algorithm?: "sha1" | "sha256";
extensions?: any[];
pkcs7?: boolean;
clientCertificate?: boolean;
clientCertificateCN?: string;
}
}
118 changes: 0 additions & 118 deletions Charts.css

This file was deleted.

125 changes: 123 additions & 2 deletions MMM-BoschSmartHome.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
.bsh-wrapper {
/* background-color: #ccc;
padding: 0.5rem; */
text-align: left;
font-size: 1rem;
line-height: 1.2rem;
Expand Down Expand Up @@ -93,6 +91,7 @@
.bsh-tile.airquality {
padding-left: 3px;
padding-right: 3px;
color: #000;
}

.bsh-tile.airquality.GOOD {
Expand All @@ -105,3 +104,125 @@
color: #fff;
background-color: #dc4c4c;
}

/*
Chart styles
*/
.gauge-mask {
position: relative;
overflow: hidden;
display: block;
width: 6rem;
background-color: unset;
padding-top: 2px;
font-size: 0.8rem;
}

.gauge-semi-circle::before {
content: "";
position: absolute;
bottom: 0;
left: 50%;
z-index: 2;
display: block;
width: 4rem;
height: 2rem;
margin-left: -2rem;
background: rgba(255, 255, 255, 1);
border-radius: 50% 50% 50% 50% / 100% 100% 0% 0%;
}

.gauge-semi-circle-bar--mask {
display: none;
}
.gauge-mask.bar .gauge-semi-circle-bar--mask {
display: inline-block;
border-left: 3px solid white;
height: 100%;
position: absolute;
right: 0;
}

.bar > .gauge-semi-circle::before {
content: none;
}
.gauge-mask.bar .gauge-semi-circle {
border-radius: unset;
height: 100%;
min-height: 1rem;
max-height: 1.4rem;
}
.bar > .gauge-semi-circle--mask {
display: none;
}
.bar > .gauge-data {
background: rgba(255, 255, 255, 1);
position: unset;
line-height: 30px;
}

.gauge-semi-circle--mask {
position: absolute;
top: 3px;
left: 4px;
width: 6rem;
height: 6rem;
background: transparent;
transform-origin: center center;
backface-visibility: hidden;
transition: all 0.3s ease-in-out;
}

.gauge-semi-circle--mask::before {
content: "";
position: absolute;
top: 0;
left: 0;
z-index: 2;
display: block;
width: 6rem;
height: 3rem;
margin: -1px 0 0 -1px;
background: rgba(242, 242, 242, 1);
border-radius: 50% 50% 50% 50% / 100% 100% 0% 0%;
}

.gauge-data {
z-index: 10;
position: absolute;
width: 100%;
top: 50%;
margin-left: auto;
margin-right: auto;
transition: all 1s ease-out;
text-align: center !important;
line-height: 25px;
}

.gauge-semi-circle {
position: relative;
display: block;
width: 6rem;
height: 3rem;
background: linear-gradient(to right, #c0392b 0%, #f1c40f 50%, #1abc9c 100%);
border-radius: 50% 50% 50% 50% / 100% 100% 0 0;
}

.gauge-semi-circle.humidity {
background: linear-gradient(
to right,
#c0392b 0%,
#f1c40f 15%,
#1abc9c 50%,
#f1c40f 85%,
#c0392b 100%
);
}

.gauge-semi-circle.temperature {
background: linear-gradient(to right, #4682b4 0%, #c0392b 100%);
}

.gauge-semi-circle.purity {
background: linear-gradient(to right, #1abc9c 0%, #f1c40f 75%, #c0392b 100%);
}
Loading

0 comments on commit 7363eb1

Please sign in to comment.