diff options
-rw-r--r-- | manifest.json | 4 | ||||
-rw-r--r-- | src/webex/background.html (renamed from src/background/background.html) | 0 | ||||
-rw-r--r-- | src/webex/background.ts (renamed from src/background/background.ts) | 2 | ||||
-rw-r--r-- | src/webex/chromeBadge.ts (renamed from src/chromeBadge.ts) | 2 | ||||
-rw-r--r-- | src/webex/components.ts (renamed from src/components.ts) | 0 | ||||
-rw-r--r-- | src/webex/notify.ts (renamed from src/content_scripts/notify.ts) | 0 | ||||
-rw-r--r-- | src/webex/pages/add-auditor.html (renamed from src/pages/add-auditor.html) | 0 | ||||
-rw-r--r-- | src/webex/pages/add-auditor.tsx (renamed from src/pages/add-auditor.tsx) | 5 | ||||
-rw-r--r-- | src/webex/pages/auditors.html (renamed from src/pages/auditors.html) | 0 | ||||
-rw-r--r-- | src/webex/pages/auditors.tsx (renamed from src/pages/auditors.tsx) | 5 | ||||
-rw-r--r-- | src/webex/pages/confirm-contract.html (renamed from src/pages/confirm-contract.html) | 0 | ||||
-rw-r--r-- | src/webex/pages/confirm-contract.tsx (renamed from src/pages/confirm-contract.tsx) | 8 | ||||
-rw-r--r-- | src/webex/pages/confirm-create-reserve.html (renamed from src/pages/confirm-create-reserve.html) | 0 | ||||
-rw-r--r-- | src/webex/pages/confirm-create-reserve.tsx (renamed from src/pages/confirm-create-reserve.tsx) | 8 | ||||
-rw-r--r-- | src/webex/pages/error.html (renamed from src/pages/error.html) | 0 | ||||
-rw-r--r-- | src/webex/pages/error.tsx (renamed from src/pages/error.tsx) | 0 | ||||
-rw-r--r-- | src/webex/pages/help/empty-wallet.html (renamed from src/pages/help/empty-wallet.html) | 0 | ||||
-rw-r--r-- | src/webex/pages/logs.html (renamed from src/pages/logs.html) | 0 | ||||
-rw-r--r-- | src/webex/pages/logs.tsx (renamed from src/pages/logs.tsx) | 3 | ||||
-rw-r--r-- | src/webex/pages/payback.html (renamed from src/pages/payback.html) | 0 | ||||
-rw-r--r-- | src/webex/pages/payback.tsx (renamed from src/pages/payback.tsx) | 6 | ||||
-rw-r--r-- | src/webex/pages/popup.css (renamed from src/pages/popup.css) | 0 | ||||
-rw-r--r-- | src/webex/pages/popup.html (renamed from src/pages/popup.html) | 0 | ||||
-rw-r--r-- | src/webex/pages/popup.tsx (renamed from src/pages/popup.tsx) | 15 | ||||
-rw-r--r-- | src/webex/pages/show-db.html (renamed from src/pages/show-db.html) | 0 | ||||
-rw-r--r-- | src/webex/pages/show-db.ts (renamed from src/pages/show-db.ts) | 0 | ||||
-rw-r--r-- | src/webex/pages/tree.html (renamed from src/pages/tree.html) | 0 | ||||
-rw-r--r-- | src/webex/pages/tree.tsx (renamed from src/pages/tree.tsx) | 15 | ||||
-rw-r--r-- | src/webex/renderHtml.tsx (renamed from src/renderHtml.tsx) | 7 | ||||
-rw-r--r-- | src/webex/style/pure.css (renamed from src/style/pure.css) | 0 | ||||
-rw-r--r-- | src/webex/style/wallet.css (renamed from src/style/wallet.css) | 0 | ||||
-rw-r--r-- | src/webex/wxApi.ts (renamed from src/wxApi.ts) | 2 | ||||
-rw-r--r-- | src/webex/wxBackend.ts (renamed from src/wxBackend.ts) | 17 | ||||
-rw-r--r-- | tsconfig.json | 34 | ||||
-rw-r--r-- | webpack.config.js | 24 |
35 files changed, 86 insertions, 71 deletions
diff --git a/manifest.json b/manifest.json index c93d49fed..1fa5282fd 100644 --- a/manifest.json +++ b/manifest.json @@ -36,7 +36,7 @@ "32": "img/icon.png" }, "default_title": "Taler", - "default_popup": "src/pages/popup.html" + "default_popup": "src/webex/pages/popup.html" }, "content_scripts": [ @@ -54,7 +54,7 @@ ], "background": { - "page": "src/background/background.html", + "page": "src/webex/background.html", "persistent": true } } diff --git a/src/background/background.html b/src/webex/background.html index 0535dd5f3..0535dd5f3 100644 --- a/src/background/background.html +++ b/src/webex/background.html diff --git a/src/background/background.ts b/src/webex/background.ts index aca27ef47..3c63f323e 100644 --- a/src/background/background.ts +++ b/src/webex/background.ts @@ -23,7 +23,7 @@ /** * Imports. */ -import {wxMain} from "./../wxBackend"; +import {wxMain} from "./wxBackend"; window.addEventListener("load", () => { wxMain(); diff --git a/src/chromeBadge.ts b/src/webex/chromeBadge.ts index 702cefea8..13add9b3f 100644 --- a/src/chromeBadge.ts +++ b/src/webex/chromeBadge.ts @@ -16,7 +16,7 @@ import { Badge, -} from "./wallet"; +} from "../wallet"; /** diff --git a/src/components.ts b/src/webex/components.ts index 1f5d18731..1f5d18731 100644 --- a/src/components.ts +++ b/src/webex/components.ts diff --git a/src/content_scripts/notify.ts b/src/webex/notify.ts index 733367a59..733367a59 100644 --- a/src/content_scripts/notify.ts +++ b/src/webex/notify.ts diff --git a/src/pages/add-auditor.html b/src/webex/pages/add-auditor.html index b7a9d041d..b7a9d041d 100644 --- a/src/pages/add-auditor.html +++ b/src/webex/pages/add-auditor.html diff --git a/src/pages/add-auditor.tsx b/src/webex/pages/add-auditor.tsx index 8bef557d9..c1a9f997f 100644 --- a/src/pages/add-auditor.tsx +++ b/src/webex/pages/add-auditor.tsx @@ -21,6 +21,7 @@ */ +import { getTalerStampDate } from "../../helpers"; import { ExchangeRecord, DenominationRecord, @@ -30,13 +31,13 @@ import { CoinRecord, PreCoinRecord, Denomination -} from "../types"; +} from "../../types"; + import { ImplicitStateComponent, StateHolder } from "../components"; import { getCurrencies, updateCurrency, } from "../wxApi"; -import { getTalerStampDate } from "../helpers"; import * as React from "react"; import * as ReactDOM from "react-dom"; diff --git a/src/pages/auditors.html b/src/webex/pages/auditors.html index cbfc3b4b5..cbfc3b4b5 100644 --- a/src/pages/auditors.html +++ b/src/webex/pages/auditors.html diff --git a/src/pages/auditors.tsx b/src/webex/pages/auditors.tsx index f263d2ec9..dac3c2be9 100644 --- a/src/pages/auditors.tsx +++ b/src/webex/pages/auditors.tsx @@ -21,6 +21,7 @@ */ +import { getTalerStampDate } from "../../helpers"; import { ExchangeRecord, ExchangeForCurrencyRecord, @@ -31,13 +32,13 @@ import { CoinRecord, PreCoinRecord, Denomination -} from "../types"; +} from "../../types"; + import { ImplicitStateComponent, StateHolder } from "../components"; import { getCurrencies, updateCurrency, } from "../wxApi"; -import { getTalerStampDate } from "../helpers"; import * as React from "react"; import * as ReactDOM from "react-dom"; diff --git a/src/pages/confirm-contract.html b/src/webex/pages/confirm-contract.html index 6713b2e2c..6713b2e2c 100644 --- a/src/pages/confirm-contract.html +++ b/src/webex/pages/confirm-contract.html diff --git a/src/pages/confirm-contract.tsx b/src/webex/pages/confirm-contract.tsx index 47db94ee8..011df27a1 100644 --- a/src/pages/confirm-contract.tsx +++ b/src/webex/pages/confirm-contract.tsx @@ -23,11 +23,13 @@ /** * Imports. */ -import { Contract, AmountJson, ExchangeRecord } from "../types"; -import { OfferRecord } from "../wallet"; +import * as i18n from "../../i18n"; +import { Contract, AmountJson, ExchangeRecord } from "../../types"; +import { OfferRecord } from "../../wallet"; + import { renderContract } from "../renderHtml"; import { getExchanges } from "../wxApi"; -import * as i18n from "../i18n"; + import * as React from "react"; import * as ReactDOM from "react-dom"; import URI = require("urijs"); diff --git a/src/pages/confirm-create-reserve.html b/src/webex/pages/confirm-create-reserve.html index 16ab12a30..16ab12a30 100644 --- a/src/pages/confirm-create-reserve.html +++ b/src/webex/pages/confirm-create-reserve.html diff --git a/src/pages/confirm-create-reserve.tsx b/src/webex/pages/confirm-create-reserve.tsx index 2f341bb4e..6ece92e21 100644 --- a/src/pages/confirm-create-reserve.tsx +++ b/src/webex/pages/confirm-create-reserve.tsx @@ -22,15 +22,17 @@ * @author Florian Dold */ -import {amountToPretty, canonicalizeBaseUrl} from "../helpers"; +import {amountToPretty, canonicalizeBaseUrl} from "../../helpers"; import { AmountJson, CreateReserveResponse, ReserveCreationInfo, Amounts, Denomination, DenominationRecord, CurrencyRecord -} from "../types"; +} from "../../types"; +import * as i18n from "../../i18n"; + import {getReserveCreationInfo, getCurrency, getExchangeInfo} from "../wxApi"; import {ImplicitStateComponent, StateHolder} from "../components"; -import * as i18n from "../i18n"; + import * as React from "react"; import * as ReactDOM from "react-dom"; import URI = require("urijs"); diff --git a/src/pages/error.html b/src/webex/pages/error.html index 51a8fd73a..51a8fd73a 100644 --- a/src/pages/error.html +++ b/src/webex/pages/error.html diff --git a/src/pages/error.tsx b/src/webex/pages/error.tsx index f278bd224..f278bd224 100644 --- a/src/pages/error.tsx +++ b/src/webex/pages/error.tsx diff --git a/src/pages/help/empty-wallet.html b/src/webex/pages/help/empty-wallet.html index dd29d9689..dd29d9689 100644 --- a/src/pages/help/empty-wallet.html +++ b/src/webex/pages/help/empty-wallet.html diff --git a/src/pages/logs.html b/src/webex/pages/logs.html index 9545269e3..9545269e3 100644 --- a/src/pages/logs.html +++ b/src/webex/pages/logs.html diff --git a/src/pages/logs.tsx b/src/webex/pages/logs.tsx index a1e5161ec..0c533bfa8 100644 --- a/src/pages/logs.tsx +++ b/src/webex/pages/logs.tsx @@ -20,9 +20,10 @@ * @author Florian Dold */ +import {LogEntry, getLogs} from "../../logging"; + import * as React from "react"; import * as ReactDOM from "react-dom"; -import {LogEntry, getLogs} from "../logging"; interface LogViewProps { log: LogEntry; diff --git a/src/pages/payback.html b/src/webex/pages/payback.html index d6fe334c8..d6fe334c8 100644 --- a/src/pages/payback.html +++ b/src/webex/pages/payback.html diff --git a/src/pages/payback.tsx b/src/webex/pages/payback.tsx index 01f5a64e4..7bcc581d8 100644 --- a/src/pages/payback.tsx +++ b/src/webex/pages/payback.tsx @@ -21,6 +21,7 @@ */ +import { amountToPretty, getTalerStampDate } from "../../helpers"; import { ExchangeRecord, ExchangeForCurrencyRecord, @@ -32,7 +33,8 @@ import { PreCoinRecord, Denomination, WalletBalance, -} from "../types"; +} from "../../types"; + import { ImplicitStateComponent, StateHolder } from "../components"; import { getCurrencies, @@ -40,7 +42,7 @@ import { getPaybackReserves, withdrawPaybackReserve, } from "../wxApi"; -import { amountToPretty, getTalerStampDate } from "../helpers"; + import * as React from "react"; import * as ReactDOM from "react-dom"; diff --git a/src/pages/popup.css b/src/webex/pages/popup.css index 675412c11..675412c11 100644 --- a/src/pages/popup.css +++ b/src/webex/pages/popup.css diff --git a/src/pages/popup.html b/src/webex/pages/popup.html index 98f24bccc..98f24bccc 100644 --- a/src/pages/popup.html +++ b/src/webex/pages/popup.html diff --git a/src/pages/popup.tsx b/src/webex/pages/popup.tsx index aef5a3df8..a806cfef9 100644 --- a/src/pages/popup.tsx +++ b/src/webex/pages/popup.tsx @@ -25,15 +25,18 @@ "use strict"; -import BrowserClickedEvent = chrome.browserAction.BrowserClickedEvent; -import { HistoryRecord, HistoryLevel } from "../wallet"; import { - AmountJson, WalletBalance, Amounts, + AmountJson, + Amounts, + WalletBalance, WalletBalanceEntry -} from "../types"; -import { amountToPretty } from "../helpers"; +} from "../../types"; +import { HistoryRecord, HistoryLevel } from "../../wallet"; +import { amountToPretty } from "../../helpers"; +import * as i18n from "../../i18n"; + import { abbrev } from "../renderHtml"; -import * as i18n from "../i18n"; + import * as React from "react"; import * as ReactDOM from "react-dom"; import URI = require("urijs"); diff --git a/src/pages/show-db.html b/src/webex/pages/show-db.html index 215c726d9..215c726d9 100644 --- a/src/pages/show-db.html +++ b/src/webex/pages/show-db.html diff --git a/src/pages/show-db.ts b/src/webex/pages/show-db.ts index d95951385..d95951385 100644 --- a/src/pages/show-db.ts +++ b/src/webex/pages/show-db.ts diff --git a/src/pages/tree.html b/src/webex/pages/tree.html index 0c0a368b3..0c0a368b3 100644 --- a/src/pages/tree.html +++ b/src/webex/pages/tree.html diff --git a/src/pages/tree.tsx b/src/webex/pages/tree.tsx index 8d1258c51..ddf8f2dbc 100644 --- a/src/pages/tree.tsx +++ b/src/webex/pages/tree.tsx @@ -21,21 +21,22 @@ */ +import { amountToPretty, getTalerStampDate } from "../../helpers"; import { - ExchangeRecord, - DenominationRecord, - CoinStatus, - ReserveRecord, CoinRecord, - PreCoinRecord, + CoinStatus, Denomination, -} from "../types"; + DenominationRecord, + ExchangeRecord, + PreCoinRecord, + ReserveRecord, +} from "../../types"; + import { ImplicitStateComponent, StateHolder } from "../components"; import { getReserves, getExchanges, getCoins, getPreCoins, refresh, getDenoms, payback, } from "../wxApi"; -import { amountToPretty, getTalerStampDate } from "../helpers"; import * as React from "react"; import * as ReactDOM from "react-dom"; diff --git a/src/renderHtml.tsx b/src/webex/renderHtml.tsx index 9d14d6cb7..440cd5789 100644 --- a/src/renderHtml.tsx +++ b/src/webex/renderHtml.tsx @@ -28,9 +28,10 @@ import { AmountJson, Amounts, Contract, -} from "./types"; -import * as i18n from "./i18n"; -import { amountToPretty } from "./helpers"; +} from "../types"; +import * as i18n from "../i18n"; +import { amountToPretty } from "../helpers"; + import * as React from "react"; diff --git a/src/style/pure.css b/src/webex/style/pure.css index 739113970..739113970 100644 --- a/src/style/pure.css +++ b/src/webex/style/pure.css diff --git a/src/style/wallet.css b/src/webex/style/wallet.css index 752fc6d75..752fc6d75 100644 --- a/src/style/wallet.css +++ b/src/webex/style/wallet.css diff --git a/src/wxApi.ts b/src/webex/wxApi.ts index 8a95e75f5..e5a502406 100644 --- a/src/wxApi.ts +++ b/src/webex/wxApi.ts @@ -31,7 +31,7 @@ import { PreCoinRecord, ReserveCreationInfo, ReserveRecord, -} from "./types"; +} from "../types"; /** diff --git a/src/wxBackend.ts b/src/webex/wxBackend.ts index a9a208dcd..35e1ff938 100644 --- a/src/wxBackend.ts +++ b/src/webex/wxBackend.ts @@ -24,20 +24,18 @@ /** * Imports. */ -import { Checkable } from "./checkable"; -import { ChromeBadge } from "./chromeBadge"; -import { BrowserHttpLib } from "./http"; -import * as logging from "./logging"; +import { Checkable } from "../checkable"; +import { BrowserHttpLib } from "../http"; +import * as logging from "../logging"; import { Index, Store, -} from "./query"; +} from "../query"; import { AmountJson, Contract, Notifier, -} from "./types"; -import URI = require("urijs"); +} from "../types"; import { Badge, ConfirmReserveRequest, @@ -45,7 +43,10 @@ import { OfferRecord, Stores, Wallet, -} from "./wallet"; +} from "../wallet"; + +import { ChromeBadge } from "./chromeBadge"; +import URI = require("urijs"); import Port = chrome.runtime.Port; import MessageSender = chrome.runtime.MessageSender; diff --git a/tsconfig.json b/tsconfig.json index 412616d69..3862c233b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -22,11 +22,7 @@ "decl/chrome/chrome.d.ts", "decl/jed.d.ts", "decl/urijs.d.ts", - "src/background/background.ts", "src/checkable.ts", - "src/chromeBadge.ts", - "src/components.ts", - "src/content_scripts/notify.ts", "src/crypto/cryptoApi-test.ts", "src/crypto/cryptoApi.ts", "src/crypto/cryptoWorker.ts", @@ -43,24 +39,28 @@ "src/i18n.tsx", "src/i18n/strings.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/renderHtml.tsx", "src/timer.ts", "src/types-test.ts", "src/types.ts", "src/wallet-test.ts", "src/wallet.ts", - "src/wxApi.ts", - "src/wxBackend.ts" + "src/webex/background.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" ] }
\ No newline at end of file diff --git a/webpack.config.js b/webpack.config.js index deca2ae76..f4771793f 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -39,25 +39,25 @@ module.exports = function (env) { }; const configBackground = { - entry: {"background": "./src/background/background.ts"}, + entry: {"background": "./src/webex/background.ts"}, }; const configContentScript = { - entry: {"contentScript": "./src/content_scripts/notify.ts"}, + entry: {"contentScript": "./src/webex/notify.ts"}, }; const configExtensionPages = { entry: { - "add-auditor": "./src/pages/add-auditor.tsx", - "auditors": "./src/pages/auditors.tsx", - "confirm-contract": "./src/pages/confirm-contract.tsx", - "confirm-create-reserve": "./src/pages/confirm-create-reserve.tsx", - "error": "./src/pages/error.tsx", - "logs": "./src/pages/logs.tsx", - "popup": "./src/pages/popup.tsx", - "show-db": "./src/pages/show-db.ts", - "tree": "./src/pages/tree.tsx", - "payback": "./src/pages/payback.tsx", + "add-auditor": "./src/webex/pages/add-auditor.tsx", + "auditors": "./src/webex/pages/auditors.tsx", + "confirm-contract": "./src/webex/pages/confirm-contract.tsx", + "confirm-create-reserve": "./src/webex/pages/confirm-create-reserve.tsx", + "error": "./src/webex/pages/error.tsx", + "logs": "./src/webex/pages/logs.tsx", + "popup": "./src/webex/pages/popup.tsx", + "show-db": "./src/webex/pages/show-db.ts", + "tree": "./src/webex/pages/tree.tsx", + "payback": "./src/webex/pages/payback.tsx", }, plugins: [ new webpack.optimize.CommonsChunkPlugin({ |