move webex specific things in their own directory

This commit is contained in:
Florian Dold 2017-05-28 23:15:41 +02:00
parent 38a74188d7
commit b6e774585d
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B
35 changed files with 86 additions and 71 deletions

View File

@ -36,7 +36,7 @@
"32": "img/icon.png" "32": "img/icon.png"
}, },
"default_title": "Taler", "default_title": "Taler",
"default_popup": "src/pages/popup.html" "default_popup": "src/webex/pages/popup.html"
}, },
"content_scripts": [ "content_scripts": [
@ -54,7 +54,7 @@
], ],
"background": { "background": {
"page": "src/background/background.html", "page": "src/webex/background.html",
"persistent": true "persistent": true
} }
} }

View File

@ -23,7 +23,7 @@
/** /**
* Imports. * Imports.
*/ */
import {wxMain} from "./../wxBackend"; import {wxMain} from "./wxBackend";
window.addEventListener("load", () => { window.addEventListener("load", () => {
wxMain(); wxMain();

View File

@ -16,7 +16,7 @@
import { import {
Badge, Badge,
} from "./wallet"; } from "../wallet";
/** /**

View File

@ -21,6 +21,7 @@
*/ */
import { getTalerStampDate } from "../../helpers";
import { import {
ExchangeRecord, ExchangeRecord,
DenominationRecord, DenominationRecord,
@ -30,13 +31,13 @@ import {
CoinRecord, CoinRecord,
PreCoinRecord, PreCoinRecord,
Denomination Denomination
} from "../types"; } from "../../types";
import { ImplicitStateComponent, StateHolder } from "../components"; import { ImplicitStateComponent, StateHolder } from "../components";
import { import {
getCurrencies, getCurrencies,
updateCurrency, updateCurrency,
} from "../wxApi"; } from "../wxApi";
import { getTalerStampDate } from "../helpers";
import * as React from "react"; import * as React from "react";
import * as ReactDOM from "react-dom"; import * as ReactDOM from "react-dom";

View File

@ -21,6 +21,7 @@
*/ */
import { getTalerStampDate } from "../../helpers";
import { import {
ExchangeRecord, ExchangeRecord,
ExchangeForCurrencyRecord, ExchangeForCurrencyRecord,
@ -31,13 +32,13 @@ import {
CoinRecord, CoinRecord,
PreCoinRecord, PreCoinRecord,
Denomination Denomination
} from "../types"; } from "../../types";
import { ImplicitStateComponent, StateHolder } from "../components"; import { ImplicitStateComponent, StateHolder } from "../components";
import { import {
getCurrencies, getCurrencies,
updateCurrency, updateCurrency,
} from "../wxApi"; } from "../wxApi";
import { getTalerStampDate } from "../helpers";
import * as React from "react"; import * as React from "react";
import * as ReactDOM from "react-dom"; import * as ReactDOM from "react-dom";

View File

@ -23,11 +23,13 @@
/** /**
* Imports. * Imports.
*/ */
import { Contract, AmountJson, ExchangeRecord } from "../types"; import * as i18n from "../../i18n";
import { OfferRecord } from "../wallet"; import { Contract, AmountJson, ExchangeRecord } from "../../types";
import { OfferRecord } from "../../wallet";
import { renderContract } from "../renderHtml"; import { renderContract } from "../renderHtml";
import { getExchanges } from "../wxApi"; import { getExchanges } from "../wxApi";
import * as i18n from "../i18n";
import * as React from "react"; import * as React from "react";
import * as ReactDOM from "react-dom"; import * as ReactDOM from "react-dom";
import URI = require("urijs"); import URI = require("urijs");

View File

@ -22,15 +22,17 @@
* @author Florian Dold * @author Florian Dold
*/ */
import {amountToPretty, canonicalizeBaseUrl} from "../helpers"; import {amountToPretty, canonicalizeBaseUrl} from "../../helpers";
import { import {
AmountJson, CreateReserveResponse, AmountJson, CreateReserveResponse,
ReserveCreationInfo, Amounts, ReserveCreationInfo, Amounts,
Denomination, DenominationRecord, CurrencyRecord Denomination, DenominationRecord, CurrencyRecord
} from "../types"; } from "../../types";
import * as i18n from "../../i18n";
import {getReserveCreationInfo, getCurrency, getExchangeInfo} from "../wxApi"; import {getReserveCreationInfo, getCurrency, getExchangeInfo} from "../wxApi";
import {ImplicitStateComponent, StateHolder} from "../components"; import {ImplicitStateComponent, StateHolder} from "../components";
import * as i18n from "../i18n";
import * as React from "react"; import * as React from "react";
import * as ReactDOM from "react-dom"; import * as ReactDOM from "react-dom";
import URI = require("urijs"); import URI = require("urijs");

View File

@ -20,9 +20,10 @@
* @author Florian Dold * @author Florian Dold
*/ */
import {LogEntry, getLogs} from "../../logging";
import * as React from "react"; import * as React from "react";
import * as ReactDOM from "react-dom"; import * as ReactDOM from "react-dom";
import {LogEntry, getLogs} from "../logging";
interface LogViewProps { interface LogViewProps {
log: LogEntry; log: LogEntry;

View File

@ -21,6 +21,7 @@
*/ */
import { amountToPretty, getTalerStampDate } from "../../helpers";
import { import {
ExchangeRecord, ExchangeRecord,
ExchangeForCurrencyRecord, ExchangeForCurrencyRecord,
@ -32,7 +33,8 @@ import {
PreCoinRecord, PreCoinRecord,
Denomination, Denomination,
WalletBalance, WalletBalance,
} from "../types"; } from "../../types";
import { ImplicitStateComponent, StateHolder } from "../components"; import { ImplicitStateComponent, StateHolder } from "../components";
import { import {
getCurrencies, getCurrencies,
@ -40,7 +42,7 @@ import {
getPaybackReserves, getPaybackReserves,
withdrawPaybackReserve, withdrawPaybackReserve,
} from "../wxApi"; } from "../wxApi";
import { amountToPretty, getTalerStampDate } from "../helpers";
import * as React from "react"; import * as React from "react";
import * as ReactDOM from "react-dom"; import * as ReactDOM from "react-dom";

View File

@ -25,15 +25,18 @@
"use strict"; "use strict";
import BrowserClickedEvent = chrome.browserAction.BrowserClickedEvent;
import { HistoryRecord, HistoryLevel } from "../wallet";
import { import {
AmountJson, WalletBalance, Amounts, AmountJson,
Amounts,
WalletBalance,
WalletBalanceEntry WalletBalanceEntry
} from "../types"; } from "../../types";
import { amountToPretty } from "../helpers"; import { HistoryRecord, HistoryLevel } from "../../wallet";
import { amountToPretty } from "../../helpers";
import * as i18n from "../../i18n";
import { abbrev } from "../renderHtml"; import { abbrev } from "../renderHtml";
import * as i18n from "../i18n";
import * as React from "react"; import * as React from "react";
import * as ReactDOM from "react-dom"; import * as ReactDOM from "react-dom";
import URI = require("urijs"); import URI = require("urijs");

View File

@ -21,21 +21,22 @@
*/ */
import { amountToPretty, getTalerStampDate } from "../../helpers";
import { import {
ExchangeRecord,
DenominationRecord,
CoinStatus,
ReserveRecord,
CoinRecord, CoinRecord,
PreCoinRecord, CoinStatus,
Denomination, Denomination,
} from "../types"; DenominationRecord,
ExchangeRecord,
PreCoinRecord,
ReserveRecord,
} from "../../types";
import { ImplicitStateComponent, StateHolder } from "../components"; import { ImplicitStateComponent, StateHolder } from "../components";
import { import {
getReserves, getExchanges, getCoins, getPreCoins, getReserves, getExchanges, getCoins, getPreCoins,
refresh, getDenoms, payback, refresh, getDenoms, payback,
} from "../wxApi"; } from "../wxApi";
import { amountToPretty, getTalerStampDate } from "../helpers";
import * as React from "react"; import * as React from "react";
import * as ReactDOM from "react-dom"; import * as ReactDOM from "react-dom";

View File

@ -28,9 +28,10 @@ import {
AmountJson, AmountJson,
Amounts, Amounts,
Contract, Contract,
} from "./types"; } from "../types";
import * as i18n from "./i18n"; import * as i18n from "../i18n";
import { amountToPretty } from "./helpers"; import { amountToPretty } from "../helpers";
import * as React from "react"; import * as React from "react";

View File

@ -31,7 +31,7 @@ import {
PreCoinRecord, PreCoinRecord,
ReserveCreationInfo, ReserveCreationInfo,
ReserveRecord, ReserveRecord,
} from "./types"; } from "../types";
/** /**

View File

@ -24,20 +24,18 @@
/** /**
* Imports. * Imports.
*/ */
import { Checkable } from "./checkable"; import { Checkable } from "../checkable";
import { ChromeBadge } from "./chromeBadge"; import { BrowserHttpLib } from "../http";
import { BrowserHttpLib } from "./http"; import * as logging from "../logging";
import * as logging from "./logging";
import { import {
Index, Index,
Store, Store,
} from "./query"; } from "../query";
import { import {
AmountJson, AmountJson,
Contract, Contract,
Notifier, Notifier,
} from "./types"; } from "../types";
import URI = require("urijs");
import { import {
Badge, Badge,
ConfirmReserveRequest, ConfirmReserveRequest,
@ -45,7 +43,10 @@ import {
OfferRecord, OfferRecord,
Stores, Stores,
Wallet, Wallet,
} from "./wallet"; } from "../wallet";
import { ChromeBadge } from "./chromeBadge";
import URI = require("urijs");
import Port = chrome.runtime.Port; import Port = chrome.runtime.Port;
import MessageSender = chrome.runtime.MessageSender; import MessageSender = chrome.runtime.MessageSender;

View File

@ -22,11 +22,7 @@
"decl/chrome/chrome.d.ts", "decl/chrome/chrome.d.ts",
"decl/jed.d.ts", "decl/jed.d.ts",
"decl/urijs.d.ts", "decl/urijs.d.ts",
"src/background/background.ts",
"src/checkable.ts", "src/checkable.ts",
"src/chromeBadge.ts",
"src/components.ts",
"src/content_scripts/notify.ts",
"src/crypto/cryptoApi-test.ts", "src/crypto/cryptoApi-test.ts",
"src/crypto/cryptoApi.ts", "src/crypto/cryptoApi.ts",
"src/crypto/cryptoWorker.ts", "src/crypto/cryptoWorker.ts",
@ -43,24 +39,28 @@
"src/i18n.tsx", "src/i18n.tsx",
"src/i18n/strings.ts", "src/i18n/strings.ts",
"src/logging.ts", "src/logging.ts",
"src/pages/add-auditor.tsx",
"src/pages/auditors.tsx",
"src/pages/confirm-contract.tsx",
"src/pages/confirm-create-reserve.tsx",
"src/pages/error.tsx",
"src/pages/logs.tsx",
"src/pages/payback.tsx",
"src/pages/popup.tsx",
"src/pages/show-db.ts",
"src/pages/tree.tsx",
"src/query.ts", "src/query.ts",
"src/renderHtml.tsx",
"src/timer.ts", "src/timer.ts",
"src/types-test.ts", "src/types-test.ts",
"src/types.ts", "src/types.ts",
"src/wallet-test.ts", "src/wallet-test.ts",
"src/wallet.ts", "src/wallet.ts",
"src/wxApi.ts", "src/webex/background.ts",
"src/wxBackend.ts" "src/webex/chromeBadge.ts",
"src/webex/components.ts",
"src/webex/notify.ts",
"src/webex/pages/add-auditor.tsx",
"src/webex/pages/auditors.tsx",
"src/webex/pages/confirm-contract.tsx",
"src/webex/pages/confirm-create-reserve.tsx",
"src/webex/pages/error.tsx",
"src/webex/pages/logs.tsx",
"src/webex/pages/payback.tsx",
"src/webex/pages/popup.tsx",
"src/webex/pages/show-db.ts",
"src/webex/pages/tree.tsx",
"src/webex/renderHtml.tsx",
"src/webex/wxApi.ts",
"src/webex/wxBackend.ts"
] ]
} }

View File

@ -39,25 +39,25 @@ module.exports = function (env) {
}; };
const configBackground = { const configBackground = {
entry: {"background": "./src/background/background.ts"}, entry: {"background": "./src/webex/background.ts"},
}; };
const configContentScript = { const configContentScript = {
entry: {"contentScript": "./src/content_scripts/notify.ts"}, entry: {"contentScript": "./src/webex/notify.ts"},
}; };
const configExtensionPages = { const configExtensionPages = {
entry: { entry: {
"add-auditor": "./src/pages/add-auditor.tsx", "add-auditor": "./src/webex/pages/add-auditor.tsx",
"auditors": "./src/pages/auditors.tsx", "auditors": "./src/webex/pages/auditors.tsx",
"confirm-contract": "./src/pages/confirm-contract.tsx", "confirm-contract": "./src/webex/pages/confirm-contract.tsx",
"confirm-create-reserve": "./src/pages/confirm-create-reserve.tsx", "confirm-create-reserve": "./src/webex/pages/confirm-create-reserve.tsx",
"error": "./src/pages/error.tsx", "error": "./src/webex/pages/error.tsx",
"logs": "./src/pages/logs.tsx", "logs": "./src/webex/pages/logs.tsx",
"popup": "./src/pages/popup.tsx", "popup": "./src/webex/pages/popup.tsx",
"show-db": "./src/pages/show-db.ts", "show-db": "./src/webex/pages/show-db.ts",
"tree": "./src/pages/tree.tsx", "tree": "./src/webex/pages/tree.tsx",
"payback": "./src/pages/payback.tsx", "payback": "./src/webex/pages/payback.tsx",
}, },
plugins: [ plugins: [
new webpack.optimize.CommonsChunkPlugin({ new webpack.optimize.CommonsChunkPlugin({