mirror of
https://github.com/mtan93/homebridge.git
synced 2026-03-08 05:31:55 +00:00
Merge pull request #917 from crzcrz/master
Use chalk instead of hardcoded ANSI codes
This commit is contained in:
@@ -16,6 +16,7 @@ var BridgeSetupManager = require("./bridgeSetupManager").BridgeSetupManager;
|
||||
var log = require("./logger")._system;
|
||||
var Logger = require('./logger').Logger;
|
||||
var mac = require("./util/mac");
|
||||
var chalk = require('chalk');
|
||||
|
||||
'use strict';
|
||||
|
||||
@@ -580,9 +581,9 @@ Server.prototype._handleNewConfig = function(type, name, replace, config) {
|
||||
// Returns the setup code in a scannable format.
|
||||
Server.prototype._printPin = function(pin) {
|
||||
console.log("Scan this code with your HomeKit App on your iOS device to pair with Homebridge:");
|
||||
console.log("\x1b[30;47m%s\x1b[0m", " ");
|
||||
console.log("\x1b[30;47m%s\x1b[0m", " ┌────────────┐ ");
|
||||
console.log("\x1b[30;47m%s\x1b[0m", " │ " + pin + " │ ");
|
||||
console.log("\x1b[30;47m%s\x1b[0m", " └────────────┘ ");
|
||||
console.log("\x1b[30;47m%s\x1b[0m", " ");
|
||||
console.log(chalk.black.bgWhite(" "));
|
||||
console.log(chalk.black.bgWhite(" ┌────────────┐ "));
|
||||
console.log(chalk.black.bgWhite(" │ " + pin + " │ "));
|
||||
console.log(chalk.black.bgWhite(" └────────────┘ "));
|
||||
console.log(chalk.black.bgWhite(" "));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user