Move UI components to ui/ directory

This commit is contained in:
hensm
2019-04-09 01:11:24 +01:00
parent a6ebb4fd22
commit 56ec766d86
22 changed files with 19 additions and 15 deletions

View File

@@ -2,7 +2,7 @@
import getBridgeInfo from "./lib/getBridgeInfo";
import messageRouter from "./lib/messageRouter";
import defaultOptions, { Options } from "./options/defaultOptions";
import defaultOptions, { Options } from "./defaultOptions";
import { getChromeUserAgent } from "./lib/userAgents";
import { getWindowCenteredProps } from "./lib/utils";
@@ -365,7 +365,7 @@ async function openPopup (shimId: string) {
const centeredProps = getWindowCenteredProps(win, 350, 200);
const popup = await browser.windows.create({
url: "popup/index.html"
url: "ui/popup/index.html"
, type: "popup"
, ...centeredProps
});

View File

@@ -32,7 +32,7 @@
, "manifest_version": 2
, "options_ui": {
"page": "options/index.html"
"page": "ui/options/index.html"
}
, "permissions": [
"downloads"

View File

@@ -5,9 +5,9 @@ import React, { Component } from "react";
import semver from "semver";
import { getNextEllipsis
, getWindowCenteredProps } from "../lib/utils";
, getWindowCenteredProps } from "../../lib/utils";
import { BridgeInfo } from "../lib/getBridgeInfo";
import { BridgeInfo } from "../../lib/getBridgeInfo";
const _ = browser.i18n.getMessage;

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -4,13 +4,13 @@
import React, { Component } from "react";
import ReactDOM from "react-dom";
import defaultOptions, { Options } from "./defaultOptions";
import defaultOptions, { Options } from "../../defaultOptions";
import Bridge from "./Bridge";
import EditableList from "./EditableList";
import getBridgeInfo, { BridgeInfo } from "../lib/getBridgeInfo";
import { REMOTE_MATCH_PATTERN_REGEX } from "../lib/utils";
import getBridgeInfo, { BridgeInfo } from "../../lib/getBridgeInfo";
import { REMOTE_MATCH_PATTERN_REGEX } from "../../lib/utils";
const _ = browser.i18n.getMessage;

View File

@@ -4,8 +4,8 @@
import React, { Component } from "react";
import ReactDOM from "react-dom";
import { getNextEllipsis } from "../lib/utils";
import * as types from "../types";
import { getNextEllipsis } from "../../lib/utils";
import * as types from "../../types";
const _ = browser.i18n.getMessage;

View File

@@ -3,8 +3,8 @@
import React, { Component } from "react";
import ReactDOM from "react-dom";
import { getNextEllipsis } from "../lib/utils";
import { DownloadDelta, Message } from "../types";
import { getNextEllipsis } from "../../lib/utils";
import { DownloadDelta, Message } from "../../types";
const _ = browser.i18n.getMessage;

View File

@@ -7,9 +7,13 @@ const CopyWebpackPlugin = require("copy-webpack-plugin");
module.exports = (env) => ({
entry: {
"main": `${env.includePath}/main.ts`
, "popup/bundle": `${env.includePath}/popup/index.tsx`
, "options/bundle": `${env.includePath}/options/index.tsx`
, "updater/bundle": `${env.includePath}/updater/index.tsx`
// UI
, "ui/popup/bundle": `${env.includePath}/ui/popup/index.tsx`
, "ui/options/bundle": `${env.includePath}/ui/options/index.tsx`
, "ui/updater/bundle": `${env.includePath}/ui/updater/index.tsx`
// Sender apps
, "mediaCast": `${env.includePath}/mediaCast.js`
, "mirroringCast": `${env.includePath}/mirroringCast.js`