From 78b9bef0a4485e4ff75995f943cb198402211f11 Mon Sep 17 00:00:00 2001
From: syuilo <syuilotan@yahoo.co.jp>
Date: Mon, 13 Nov 2017 04:19:36 +0900
Subject: [PATCH] Clean up

---
 .../common/scripts/server-stream-manager.ts    |  2 +-
 src/web/app/common/scripts/uuid.js             | 18 ------------------
 .../app/desktop/tags/home-widgets/server.tag   |  2 +-
 src/web/app/status/tags/index.tag              |  2 +-
 4 files changed, 3 insertions(+), 21 deletions(-)
 delete mode 100644 src/web/app/common/scripts/uuid.js

diff --git a/src/web/app/common/scripts/server-stream-manager.ts b/src/web/app/common/scripts/server-stream-manager.ts
index e3f03ae40b..54333c8cf5 100644
--- a/src/web/app/common/scripts/server-stream-manager.ts
+++ b/src/web/app/common/scripts/server-stream-manager.ts
@@ -1,5 +1,5 @@
 import Connection from './server-stream';
-import uuid from './uuid';
+import * as uuid from 'uuid';
 
 export default class ServerStreamManager {
 	private connection = null;
diff --git a/src/web/app/common/scripts/uuid.js b/src/web/app/common/scripts/uuid.js
deleted file mode 100644
index ff016e18ad..0000000000
--- a/src/web/app/common/scripts/uuid.js
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
- * Generate a UUID
- */
-export default () => {
-	let uuid = '';
-
-	for (let i = 0; i < 32; i++) {
-		const random = Math.random() * 16 | 0;
-
-		if (i == 8 || i == 12 || i == 16 || i == 20) {
-			uuid += '-';
-		}
-
-		uuid += (i == 12 ? 4 : (i == 16 ? (random & 3 | 8) : random)).toString(16);
-	}
-
-	return uuid;
-};
diff --git a/src/web/app/desktop/tags/home-widgets/server.tag b/src/web/app/desktop/tags/home-widgets/server.tag
index f499769b00..c5746a3ca9 100644
--- a/src/web/app/desktop/tags/home-widgets/server.tag
+++ b/src/web/app/desktop/tags/home-widgets/server.tag
@@ -183,7 +183,7 @@
 				clear both
 	</style>
 	<script>
-		import uuid from '../../../common/scripts/uuid';
+		import uuid from 'uuid';
 
 		this.viewBoxX = 50;
 		this.viewBoxY = 30;
diff --git a/src/web/app/status/tags/index.tag b/src/web/app/status/tags/index.tag
index 6fb6041c3c..8e875daf39 100644
--- a/src/web/app/status/tags/index.tag
+++ b/src/web/app/status/tags/index.tag
@@ -177,7 +177,7 @@
 				width 100%
 	</style>
 	<script>
-		import uuid from '../../common/scripts/uuid';
+		import uuid from 'uuid';
 
 		this.viewBoxX = 100;
 		this.viewBoxY = 30;