-
+
You received {willReceive} {$selectedOffer.provides}
{:else if !!swapError}
-
+
{swapError}
diff --git a/ui/src/lib/TokenIcon.svelte b/ui/frontend/src/lib/TokenIcon.svelte
similarity index 50%
rename from ui/src/lib/TokenIcon.svelte
rename to ui/frontend/src/lib/TokenIcon.svelte
index 57d8557a3..b19c97c95 100644
--- a/ui/src/lib/TokenIcon.svelte
+++ b/ui/frontend/src/lib/TokenIcon.svelte
@@ -7,17 +7,14 @@
$: url = unknown
async function load() {
- if (ticker) {
- try {
- const path = await import(`../assets/coins/${ticker.toLowerCase()}@2x.png`)
- url = path.default
- } catch (e) {}
- }
+ try {
+ const path = await import(`../assets/coins/${ticker.toLowerCase()}@2x.png`)
+ url = path.default
+ } catch (e) {}
}
-
-
+
diff --git a/ui/src/routes/+page.svelte b/ui/frontend/src/routes/+page.svelte
similarity index 87%
rename from ui/src/routes/+page.svelte
rename to ui/frontend/src/routes/+page.svelte
index 0035fae50..47ca8991e 100644
--- a/ui/src/routes/+page.svelte
+++ b/ui/frontend/src/routes/+page.svelte
@@ -12,7 +12,8 @@
);
-
+{#if filteredPairs.length > 0}
+
@@ -24,21 +25,21 @@
-
+
Pairs
{$pairs.length} Pairs
-
+
Reported Liquidity
{$liquidity} XMR
-
+
Offers
{$offers}
@@ -46,15 +47,14 @@
- {#if filteredPairs.length > 0}
-
+
Ticker
Reported Liquidity
Offers
-
+
{#each filteredPairs as pair (pair.token.symbol)}
@@ -81,16 +81,19 @@
{/each}
- {:else}
+
+{:else}
+
+{/if}
diff --git a/ui/src/routes/offers/[token]/+page.svelte b/ui/frontend/src/routes/offers/[token]/+page.svelte
similarity index 92%
rename from ui/src/routes/offers/[token]/+page.svelte
rename to ui/frontend/src/routes/offers/[token]/+page.svelte
index 413755203..c91426c50 100644
--- a/ui/src/routes/offers/[token]/+page.svelte
+++ b/ui/frontend/src/routes/offers/[token]/+page.svelte
@@ -7,6 +7,8 @@
import type { TokenInfo } from '../../../types/PersonalTokenInfoResult'
export let data: PageData
+ $: filteredOffers = $offers.filter(off => off.ethAsset === data.token)
+
const getToken = async (): Promise => {
if (data.token.toLowerCase() === 'eth') return EthTokenInfo
return getTokenInfo(data.token) || EthTokenInfo
@@ -15,7 +17,7 @@
$: filteredOffers = $offers.filter(off => off.ethAsset.toLowerCase() === data.token.toLowerCase())
-
+
{#if offers }
{#await tokenInfoPromise}
diff --git a/ui/src/routes/offers/[token]/+page.ts b/ui/frontend/src/routes/offers/[token]/+page.ts
similarity index 100%
rename from ui/src/routes/offers/[token]/+page.ts
rename to ui/frontend/src/routes/offers/[token]/+page.ts
diff --git a/ui/frontend/src/routes/peers/+page.svelte b/ui/frontend/src/routes/peers/+page.svelte
new file mode 100644
index 000000000..f13f8fbce
--- /dev/null
+++ b/ui/frontend/src/routes/peers/+page.svelte
@@ -0,0 +1,47 @@
+
+
+
+
{$peers.length} Peers
+
+
+
+ Id
+ Offers
+
+
+ {#each $peers as peerID}
+
+
+
+ {peerID}
+
+ ?
+
+ {/each}
+
+
+
+
+
\ No newline at end of file
diff --git a/ui/src/stores/metamask.ts b/ui/frontend/src/stores/metamask.ts
similarity index 100%
rename from ui/src/stores/metamask.ts
rename to ui/frontend/src/stores/metamask.ts
diff --git a/ui/src/stores/offerStore.ts b/ui/frontend/src/stores/offerStore.ts
similarity index 100%
rename from ui/src/stores/offerStore.ts
rename to ui/frontend/src/stores/offerStore.ts
diff --git a/ui/src/stores/pairStore.ts b/ui/frontend/src/stores/pairStore.ts
similarity index 94%
rename from ui/src/stores/pairStore.ts
rename to ui/frontend/src/stores/pairStore.ts
index 4292f9ea1..3f7887eef 100644
--- a/ui/src/stores/pairStore.ts
+++ b/ui/frontend/src/stores/pairStore.ts
@@ -16,10 +16,11 @@ export const getPairs = () => {
.then(({ result }) => {
pairs.set(result.Pairs)
liquidity.set(result.Pairs.reduce((acc, a) => acc += Number(a.reportedLiquidityXmr), 0))
+ console.log(result, liquidity)
offers.set(result.Pairs.reduce((acc, a) => acc += a.offers, 0))
})
.catch(console.error)
.finally(() => {
isLoadingPairs.set(false)
})
-}
+}
\ No newline at end of file
diff --git a/ui/frontend/src/stores/peerStore.ts b/ui/frontend/src/stores/peerStore.ts
new file mode 100644
index 000000000..c1612f119
--- /dev/null
+++ b/ui/frontend/src/stores/peerStore.ts
@@ -0,0 +1,20 @@
+import { rpcRequest } from '../utils';
+import { writable } from 'svelte/store';
+import type { NetDiscoverResult } from '../types/NetDiscoverResults';
+
+export const isLoadingPeers = writable(false)
+export const peers = writable
([], () => {
+ getPeers()
+});
+
+export const getPeers = async () => {
+ try {
+ isLoadingPeers.set(true)
+ const resp = await rpcRequest('net_discover', { searchTime: 3 })
+ peers.set([...new Set(resp.result.peerIDs)])
+ } catch (e) {
+ console.error(e)
+ } finally {
+ isLoadingPeers.set(false)
+ }
+}
\ No newline at end of file
diff --git a/ui/src/types/Cancel.ts b/ui/frontend/src/types/Cancel.ts
similarity index 100%
rename from ui/src/types/Cancel.ts
rename to ui/frontend/src/types/Cancel.ts
diff --git a/ui/src/types/NetAddressResult.ts b/ui/frontend/src/types/NetAddressResult.ts
similarity index 100%
rename from ui/src/types/NetAddressResult.ts
rename to ui/frontend/src/types/NetAddressResult.ts
diff --git a/ui/src/types/NetDiscoverResults.ts b/ui/frontend/src/types/NetDiscoverResults.ts
similarity index 100%
rename from ui/src/types/NetDiscoverResults.ts
rename to ui/frontend/src/types/NetDiscoverResults.ts
diff --git a/ui/src/types/NetPairResults.ts b/ui/frontend/src/types/NetPairResults.ts
similarity index 99%
rename from ui/src/types/NetPairResults.ts
rename to ui/frontend/src/types/NetPairResults.ts
index deb29a10c..27211393e 100644
--- a/ui/src/types/NetPairResults.ts
+++ b/ui/frontend/src/types/NetPairResults.ts
@@ -13,4 +13,4 @@ export interface Pair {
export interface NetPairResults {
Pairs: Pair[]
-}
+}
\ No newline at end of file
diff --git a/ui/src/types/NetQueryPeerResults.ts b/ui/frontend/src/types/NetQueryPeerResults.ts
similarity index 100%
rename from ui/src/types/NetQueryPeerResults.ts
rename to ui/frontend/src/types/NetQueryPeerResults.ts
diff --git a/ui/src/types/NetTakeOfferSync.ts b/ui/frontend/src/types/NetTakeOfferSync.ts
similarity index 100%
rename from ui/src/types/NetTakeOfferSync.ts
rename to ui/frontend/src/types/NetTakeOfferSync.ts
diff --git a/ui/src/types/PersonalTokenInfoResult.ts b/ui/frontend/src/types/PersonalTokenInfoResult.ts
similarity index 98%
rename from ui/src/types/PersonalTokenInfoResult.ts
rename to ui/frontend/src/types/PersonalTokenInfoResult.ts
index 08b501ada..351dfbff3 100644
--- a/ui/src/types/PersonalTokenInfoResult.ts
+++ b/ui/frontend/src/types/PersonalTokenInfoResult.ts
@@ -3,4 +3,4 @@ export interface TokenInfo {
decimals: Number
name: String
symbol: String
-}
+}
\ No newline at end of file
diff --git a/ui/src/types/index.ts b/ui/frontend/src/types/index.ts
similarity index 99%
rename from ui/src/types/index.ts
rename to ui/frontend/src/types/index.ts
index 36ae4f289..6c94fcd4d 100644
--- a/ui/src/types/index.ts
+++ b/ui/frontend/src/types/index.ts
@@ -15,4 +15,4 @@ export interface Offer {
version: String
ethAsset: Currency
nonce: Number
-}
+}
\ No newline at end of file
diff --git a/ui/src/utils/getCorrespondingToken.ts b/ui/frontend/src/utils/getCorrespondingToken.ts
similarity index 100%
rename from ui/src/utils/getCorrespondingToken.ts
rename to ui/frontend/src/utils/getCorrespondingToken.ts
diff --git a/ui/src/utils/getTokenInfo.ts b/ui/frontend/src/utils/getTokenInfo.ts
similarity index 99%
rename from ui/src/utils/getTokenInfo.ts
rename to ui/frontend/src/utils/getTokenInfo.ts
index 4e2a85ba8..b2fc808ba 100644
--- a/ui/src/utils/getTokenInfo.ts
+++ b/ui/frontend/src/utils/getTokenInfo.ts
@@ -7,4 +7,4 @@ export const getTokenInfo = async (address: String): Promise;
diff --git a/ui/frontend/wailsjs/go/main/App.js b/ui/frontend/wailsjs/go/main/App.js
new file mode 100755
index 000000000..c71ae77cb
--- /dev/null
+++ b/ui/frontend/wailsjs/go/main/App.js
@@ -0,0 +1,7 @@
+// @ts-check
+// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
+// This file is automatically generated. DO NOT EDIT
+
+export function Greet(arg1) {
+ return window['go']['main']['App']['Greet'](arg1);
+}
diff --git a/ui/frontend/wailsjs/runtime/package.json b/ui/frontend/wailsjs/runtime/package.json
new file mode 100644
index 000000000..1e7c8a5d7
--- /dev/null
+++ b/ui/frontend/wailsjs/runtime/package.json
@@ -0,0 +1,24 @@
+{
+ "name": "@wailsapp/runtime",
+ "version": "2.0.0",
+ "description": "Wails Javascript runtime library",
+ "main": "runtime.js",
+ "types": "runtime.d.ts",
+ "scripts": {
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/wailsapp/wails.git"
+ },
+ "keywords": [
+ "Wails",
+ "Javascript",
+ "Go"
+ ],
+ "author": "Lea Anthony ",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/wailsapp/wails/issues"
+ },
+ "homepage": "https://github.com/wailsapp/wails#readme"
+}
diff --git a/ui/frontend/wailsjs/runtime/runtime.d.ts b/ui/frontend/wailsjs/runtime/runtime.d.ts
new file mode 100644
index 000000000..a3723f94b
--- /dev/null
+++ b/ui/frontend/wailsjs/runtime/runtime.d.ts
@@ -0,0 +1,235 @@
+/*
+ _ __ _ __
+| | / /___ _(_) /____
+| | /| / / __ `/ / / ___/
+| |/ |/ / /_/ / / (__ )
+|__/|__/\__,_/_/_/____/
+The electron alternative for Go
+(c) Lea Anthony 2019-present
+*/
+
+export interface Position {
+ x: number;
+ y: number;
+}
+
+export interface Size {
+ w: number;
+ h: number;
+}
+
+export interface Screen {
+ isCurrent: boolean;
+ isPrimary: boolean;
+ width : number
+ height : number
+}
+
+// Environment information such as platform, buildtype, ...
+export interface EnvironmentInfo {
+ buildType: string;
+ platform: string;
+ arch: string;
+}
+
+// [EventsEmit](https://wails.io/docs/reference/runtime/events#eventsemit)
+// emits the given event. Optional data may be passed with the event.
+// This will trigger any event listeners.
+export function EventsEmit(eventName: string, ...data: any): void;
+
+// [EventsOn](https://wails.io/docs/reference/runtime/events#eventson) sets up a listener for the given event name.
+export function EventsOn(eventName: string, callback: (...data: any) => void): () => void;
+
+// [EventsOnMultiple](https://wails.io/docs/reference/runtime/events#eventsonmultiple)
+// sets up a listener for the given event name, but will only trigger a given number times.
+export function EventsOnMultiple(eventName: string, callback: (...data: any) => void, maxCallbacks: number): () => void;
+
+// [EventsOnce](https://wails.io/docs/reference/runtime/events#eventsonce)
+// sets up a listener for the given event name, but will only trigger once.
+export function EventsOnce(eventName: string, callback: (...data: any) => void): () => void;
+
+// [EventsOff](https://wails.io/docs/reference/runtime/events#eventsoff)
+// unregisters the listener for the given event name.
+export function EventsOff(eventName: string, ...additionalEventNames: string[]): void;
+
+// [EventsOffAll](https://wails.io/docs/reference/runtime/events#eventsoffall)
+// unregisters all listeners.
+export function EventsOffAll(): void;
+
+// [LogPrint](https://wails.io/docs/reference/runtime/log#logprint)
+// logs the given message as a raw message
+export function LogPrint(message: string): void;
+
+// [LogTrace](https://wails.io/docs/reference/runtime/log#logtrace)
+// logs the given message at the `trace` log level.
+export function LogTrace(message: string): void;
+
+// [LogDebug](https://wails.io/docs/reference/runtime/log#logdebug)
+// logs the given message at the `debug` log level.
+export function LogDebug(message: string): void;
+
+// [LogError](https://wails.io/docs/reference/runtime/log#logerror)
+// logs the given message at the `error` log level.
+export function LogError(message: string): void;
+
+// [LogFatal](https://wails.io/docs/reference/runtime/log#logfatal)
+// logs the given message at the `fatal` log level.
+// The application will quit after calling this method.
+export function LogFatal(message: string): void;
+
+// [LogInfo](https://wails.io/docs/reference/runtime/log#loginfo)
+// logs the given message at the `info` log level.
+export function LogInfo(message: string): void;
+
+// [LogWarning](https://wails.io/docs/reference/runtime/log#logwarning)
+// logs the given message at the `warning` log level.
+export function LogWarning(message: string): void;
+
+// [WindowReload](https://wails.io/docs/reference/runtime/window#windowreload)
+// Forces a reload by the main application as well as connected browsers.
+export function WindowReload(): void;
+
+// [WindowReloadApp](https://wails.io/docs/reference/runtime/window#windowreloadapp)
+// Reloads the application frontend.
+export function WindowReloadApp(): void;
+
+// [WindowSetAlwaysOnTop](https://wails.io/docs/reference/runtime/window#windowsetalwaysontop)
+// Sets the window AlwaysOnTop or not on top.
+export function WindowSetAlwaysOnTop(b: boolean): void;
+
+// [WindowSetSystemDefaultTheme](https://wails.io/docs/next/reference/runtime/window#windowsetsystemdefaulttheme)
+// *Windows only*
+// Sets window theme to system default (dark/light).
+export function WindowSetSystemDefaultTheme(): void;
+
+// [WindowSetLightTheme](https://wails.io/docs/next/reference/runtime/window#windowsetlighttheme)
+// *Windows only*
+// Sets window to light theme.
+export function WindowSetLightTheme(): void;
+
+// [WindowSetDarkTheme](https://wails.io/docs/next/reference/runtime/window#windowsetdarktheme)
+// *Windows only*
+// Sets window to dark theme.
+export function WindowSetDarkTheme(): void;
+
+// [WindowCenter](https://wails.io/docs/reference/runtime/window#windowcenter)
+// Centers the window on the monitor the window is currently on.
+export function WindowCenter(): void;
+
+// [WindowSetTitle](https://wails.io/docs/reference/runtime/window#windowsettitle)
+// Sets the text in the window title bar.
+export function WindowSetTitle(title: string): void;
+
+// [WindowFullscreen](https://wails.io/docs/reference/runtime/window#windowfullscreen)
+// Makes the window full screen.
+export function WindowFullscreen(): void;
+
+// [WindowUnfullscreen](https://wails.io/docs/reference/runtime/window#windowunfullscreen)
+// Restores the previous window dimensions and position prior to full screen.
+export function WindowUnfullscreen(): void;
+
+// [WindowIsFullscreen](https://wails.io/docs/reference/runtime/window#windowisfullscreen)
+// Returns the state of the window, i.e. whether the window is in full screen mode or not.
+export function WindowIsFullscreen(): Promise;
+
+// [WindowSetSize](https://wails.io/docs/reference/runtime/window#windowsetsize)
+// Sets the width and height of the window.
+export function WindowSetSize(width: number, height: number): Promise;
+
+// [WindowGetSize](https://wails.io/docs/reference/runtime/window#windowgetsize)
+// Gets the width and height of the window.
+export function WindowGetSize(): Promise;
+
+// [WindowSetMaxSize](https://wails.io/docs/reference/runtime/window#windowsetmaxsize)
+// Sets the maximum window size. Will resize the window if the window is currently larger than the given dimensions.
+// Setting a size of 0,0 will disable this constraint.
+export function WindowSetMaxSize(width: number, height: number): void;
+
+// [WindowSetMinSize](https://wails.io/docs/reference/runtime/window#windowsetminsize)
+// Sets the minimum window size. Will resize the window if the window is currently smaller than the given dimensions.
+// Setting a size of 0,0 will disable this constraint.
+export function WindowSetMinSize(width: number, height: number): void;
+
+// [WindowSetPosition](https://wails.io/docs/reference/runtime/window#windowsetposition)
+// Sets the window position relative to the monitor the window is currently on.
+export function WindowSetPosition(x: number, y: number): void;
+
+// [WindowGetPosition](https://wails.io/docs/reference/runtime/window#windowgetposition)
+// Gets the window position relative to the monitor the window is currently on.
+export function WindowGetPosition(): Promise;
+
+// [WindowHide](https://wails.io/docs/reference/runtime/window#windowhide)
+// Hides the window.
+export function WindowHide(): void;
+
+// [WindowShow](https://wails.io/docs/reference/runtime/window#windowshow)
+// Shows the window, if it is currently hidden.
+export function WindowShow(): void;
+
+// [WindowMaximise](https://wails.io/docs/reference/runtime/window#windowmaximise)
+// Maximises the window to fill the screen.
+export function WindowMaximise(): void;
+
+// [WindowToggleMaximise](https://wails.io/docs/reference/runtime/window#windowtogglemaximise)
+// Toggles between Maximised and UnMaximised.
+export function WindowToggleMaximise(): void;
+
+// [WindowUnmaximise](https://wails.io/docs/reference/runtime/window#windowunmaximise)
+// Restores the window to the dimensions and position prior to maximising.
+export function WindowUnmaximise(): void;
+
+// [WindowIsMaximised](https://wails.io/docs/reference/runtime/window#windowismaximised)
+// Returns the state of the window, i.e. whether the window is maximised or not.
+export function WindowIsMaximised(): Promise;
+
+// [WindowMinimise](https://wails.io/docs/reference/runtime/window#windowminimise)
+// Minimises the window.
+export function WindowMinimise(): void;
+
+// [WindowUnminimise](https://wails.io/docs/reference/runtime/window#windowunminimise)
+// Restores the window to the dimensions and position prior to minimising.
+export function WindowUnminimise(): void;
+
+// [WindowIsMinimised](https://wails.io/docs/reference/runtime/window#windowisminimised)
+// Returns the state of the window, i.e. whether the window is minimised or not.
+export function WindowIsMinimised(): Promise;
+
+// [WindowIsNormal](https://wails.io/docs/reference/runtime/window#windowisnormal)
+// Returns the state of the window, i.e. whether the window is normal or not.
+export function WindowIsNormal(): Promise;
+
+// [WindowSetBackgroundColour](https://wails.io/docs/reference/runtime/window#windowsetbackgroundcolour)
+// Sets the background colour of the window to the given RGBA colour definition. This colour will show through for all transparent pixels.
+export function WindowSetBackgroundColour(R: number, G: number, B: number, A: number): void;
+
+// [ScreenGetAll](https://wails.io/docs/reference/runtime/window#screengetall)
+// Gets the all screens. Call this anew each time you want to refresh data from the underlying windowing system.
+export function ScreenGetAll(): Promise;
+
+// [BrowserOpenURL](https://wails.io/docs/reference/runtime/browser#browseropenurl)
+// Opens the given URL in the system browser.
+export function BrowserOpenURL(url: string): void;
+
+// [Environment](https://wails.io/docs/reference/runtime/intro#environment)
+// Returns information about the environment
+export function Environment(): Promise;
+
+// [Quit](https://wails.io/docs/reference/runtime/intro#quit)
+// Quits the application.
+export function Quit(): void;
+
+// [Hide](https://wails.io/docs/reference/runtime/intro#hide)
+// Hides the application.
+export function Hide(): void;
+
+// [Show](https://wails.io/docs/reference/runtime/intro#show)
+// Shows the application.
+export function Show(): void;
+
+// [ClipboardGetText](https://wails.io/docs/reference/runtime/clipboard#clipboardgettext)
+// Returns the current text stored on clipboard
+export function ClipboardGetText(): Promise;
+
+// [ClipboardSetText](https://wails.io/docs/reference/runtime/clipboard#clipboardsettext)
+// Sets a text on the clipboard
+export function ClipboardSetText(text: string): Promise;
diff --git a/ui/frontend/wailsjs/runtime/runtime.js b/ui/frontend/wailsjs/runtime/runtime.js
new file mode 100644
index 000000000..bd4f371ae
--- /dev/null
+++ b/ui/frontend/wailsjs/runtime/runtime.js
@@ -0,0 +1,202 @@
+/*
+ _ __ _ __
+| | / /___ _(_) /____
+| | /| / / __ `/ / / ___/
+| |/ |/ / /_/ / / (__ )
+|__/|__/\__,_/_/_/____/
+The electron alternative for Go
+(c) Lea Anthony 2019-present
+*/
+
+export function LogPrint(message) {
+ window.runtime.LogPrint(message);
+}
+
+export function LogTrace(message) {
+ window.runtime.LogTrace(message);
+}
+
+export function LogDebug(message) {
+ window.runtime.LogDebug(message);
+}
+
+export function LogInfo(message) {
+ window.runtime.LogInfo(message);
+}
+
+export function LogWarning(message) {
+ window.runtime.LogWarning(message);
+}
+
+export function LogError(message) {
+ window.runtime.LogError(message);
+}
+
+export function LogFatal(message) {
+ window.runtime.LogFatal(message);
+}
+
+export function EventsOnMultiple(eventName, callback, maxCallbacks) {
+ return window.runtime.EventsOnMultiple(eventName, callback, maxCallbacks);
+}
+
+export function EventsOn(eventName, callback) {
+ return EventsOnMultiple(eventName, callback, -1);
+}
+
+export function EventsOff(eventName, ...additionalEventNames) {
+ return window.runtime.EventsOff(eventName, ...additionalEventNames);
+}
+
+export function EventsOnce(eventName, callback) {
+ return EventsOnMultiple(eventName, callback, 1);
+}
+
+export function EventsEmit(eventName) {
+ let args = [eventName].slice.call(arguments);
+ return window.runtime.EventsEmit.apply(null, args);
+}
+
+export function WindowReload() {
+ window.runtime.WindowReload();
+}
+
+export function WindowReloadApp() {
+ window.runtime.WindowReloadApp();
+}
+
+export function WindowSetAlwaysOnTop(b) {
+ window.runtime.WindowSetAlwaysOnTop(b);
+}
+
+export function WindowSetSystemDefaultTheme() {
+ window.runtime.WindowSetSystemDefaultTheme();
+}
+
+export function WindowSetLightTheme() {
+ window.runtime.WindowSetLightTheme();
+}
+
+export function WindowSetDarkTheme() {
+ window.runtime.WindowSetDarkTheme();
+}
+
+export function WindowCenter() {
+ window.runtime.WindowCenter();
+}
+
+export function WindowSetTitle(title) {
+ window.runtime.WindowSetTitle(title);
+}
+
+export function WindowFullscreen() {
+ window.runtime.WindowFullscreen();
+}
+
+export function WindowUnfullscreen() {
+ window.runtime.WindowUnfullscreen();
+}
+
+export function WindowIsFullscreen() {
+ return window.runtime.WindowIsFullscreen();
+}
+
+export function WindowGetSize() {
+ return window.runtime.WindowGetSize();
+}
+
+export function WindowSetSize(width, height) {
+ window.runtime.WindowSetSize(width, height);
+}
+
+export function WindowSetMaxSize(width, height) {
+ window.runtime.WindowSetMaxSize(width, height);
+}
+
+export function WindowSetMinSize(width, height) {
+ window.runtime.WindowSetMinSize(width, height);
+}
+
+export function WindowSetPosition(x, y) {
+ window.runtime.WindowSetPosition(x, y);
+}
+
+export function WindowGetPosition() {
+ return window.runtime.WindowGetPosition();
+}
+
+export function WindowHide() {
+ window.runtime.WindowHide();
+}
+
+export function WindowShow() {
+ window.runtime.WindowShow();
+}
+
+export function WindowMaximise() {
+ window.runtime.WindowMaximise();
+}
+
+export function WindowToggleMaximise() {
+ window.runtime.WindowToggleMaximise();
+}
+
+export function WindowUnmaximise() {
+ window.runtime.WindowUnmaximise();
+}
+
+export function WindowIsMaximised() {
+ return window.runtime.WindowIsMaximised();
+}
+
+export function WindowMinimise() {
+ window.runtime.WindowMinimise();
+}
+
+export function WindowUnminimise() {
+ window.runtime.WindowUnminimise();
+}
+
+export function WindowSetBackgroundColour(R, G, B, A) {
+ window.runtime.WindowSetBackgroundColour(R, G, B, A);
+}
+
+export function ScreenGetAll() {
+ return window.runtime.ScreenGetAll();
+}
+
+export function WindowIsMinimised() {
+ return window.runtime.WindowIsMinimised();
+}
+
+export function WindowIsNormal() {
+ return window.runtime.WindowIsNormal();
+}
+
+export function BrowserOpenURL(url) {
+ window.runtime.BrowserOpenURL(url);
+}
+
+export function Environment() {
+ return window.runtime.Environment();
+}
+
+export function Quit() {
+ window.runtime.Quit();
+}
+
+export function Hide() {
+ window.runtime.Hide();
+}
+
+export function Show() {
+ window.runtime.Show();
+}
+
+export function ClipboardGetText() {
+ return window.runtime.ClipboardGetText();
+}
+
+export function ClipboardSetText(text) {
+ return window.runtime.ClipboardSetText(text);
+}
\ No newline at end of file
diff --git a/ui/yarn.lock b/ui/frontend/yarn.lock
similarity index 99%
rename from ui/yarn.lock
rename to ui/frontend/yarn.lock
index 92f93e309..47245c05b 100644
--- a/ui/yarn.lock
+++ b/ui/frontend/yarn.lock
@@ -383,6 +383,11 @@
dependencies:
import-meta-resolve "^3.0.0"
+"@sveltejs/adapter-static@^1.0.0":
+ version "1.0.6"
+ resolved "https://registry.yarnpkg.com/@sveltejs/adapter-static/-/adapter-static-1.0.6.tgz#897c0a1e7b929be8dc1871d28cab7746afa7bf72"
+ integrity sha512-gTus2jW6bEQAZoT1MdmPHWZZmcb6dfLWc0r6dFHnbzSDZ68kifqQ1E+dZDOMF7aXeRV91sgnPuAn2MtpinVdlA==
+
"@sveltejs/kit@^1.20.4":
version "1.22.1"
resolved "https://registry.yarnpkg.com/@sveltejs/kit/-/kit-1.22.1.tgz#1429ae67f4cfe725adc25dad47e2271a39a0bab5"
@@ -816,6 +821,11 @@ dlv@^1.1.3:
resolved "https://registry.yarnpkg.com/dlv/-/dlv-1.1.3.tgz#5c198a8a11453596e751494d49874bc7732f2e79"
integrity sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==
+dotenv@^16.0.3:
+ version "16.3.1"
+ resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.3.1.tgz#369034de7d7e5b120972693352a3bf112172cc3e"
+ integrity sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==
+
electron-to-chromium@^1.4.284:
version "1.4.394"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.394.tgz#989abe104a40366755648876cde2cdeda9f31133"
diff --git a/ui/go.mod b/ui/go.mod
new file mode 100644
index 000000000..e9d8b6b0d
--- /dev/null
+++ b/ui/go.mod
@@ -0,0 +1,33 @@
+module changeme
+
+go 1.18
+
+require github.com/wailsapp/wails/v2 v2.5.1
+
+require (
+ github.com/bep/debounce v1.2.1 // indirect
+ github.com/go-ole/go-ole v1.2.6 // indirect
+ github.com/google/uuid v1.1.2 // indirect
+ github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e // indirect
+ github.com/labstack/echo/v4 v4.9.0 // indirect
+ github.com/labstack/gommon v0.3.1 // indirect
+ github.com/leaanthony/go-ansi-parser v1.0.1 // indirect
+ github.com/leaanthony/gosod v1.0.3 // indirect
+ github.com/leaanthony/slicer v1.5.0 // indirect
+ github.com/mattn/go-colorable v0.1.11 // indirect
+ github.com/mattn/go-isatty v0.0.14 // indirect
+ github.com/pkg/browser v0.0.0-20210706143420-7d21f8c997e2 // indirect
+ github.com/pkg/errors v0.9.1 // indirect
+ github.com/samber/lo v1.27.1 // indirect
+ github.com/tkrajina/go-reflector v0.5.5 // indirect
+ github.com/valyala/bytebufferpool v1.0.0 // indirect
+ github.com/valyala/fasttemplate v1.2.1 // indirect
+ github.com/wailsapp/mimetype v1.4.1 // indirect
+ golang.org/x/crypto v0.1.0 // indirect
+ golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17 // indirect
+ golang.org/x/net v0.7.0 // indirect
+ golang.org/x/sys v0.5.0 // indirect
+ golang.org/x/text v0.7.0 // indirect
+)
+
+// replace github.com/wailsapp/wails/v2 v2.2.0 => /home/plihelix/go/pkg/mod
diff --git a/ui/go.sum b/ui/go.sum
new file mode 100644
index 000000000..aac88038b
--- /dev/null
+++ b/ui/go.sum
@@ -0,0 +1,77 @@
+github.com/bep/debounce v1.2.1 h1:v67fRdBA9UQu2NhLFXrSg0Brw7CexQekrBwDMM8bzeY=
+github.com/bep/debounce v1.2.1/go.mod h1:H8yggRPQKLUhUoqrJC1bO2xNya7vanpDl7xR3ISbCJ0=
+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
+github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=
+github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
+github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y=
+github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e h1:Q3+PugElBCf4PFpxhErSzU3/PY5sFL5Z6rfv4AbGAck=
+github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e/go.mod h1:alcuEEnZsY1WQsagKhZDsoPCRoOijYqhZvPwLG0kzVs=
+github.com/labstack/echo/v4 v4.9.0 h1:wPOF1CE6gvt/kmbMR4dGzWvHMPT+sAEUJOwOTtvITVY=
+github.com/labstack/echo/v4 v4.9.0/go.mod h1:xkCDAdFCIf8jsFQ5NnbK7oqaF/yU1A1X20Ltm0OvSks=
+github.com/labstack/gommon v0.3.1 h1:OomWaJXm7xR6L1HmEtGyQf26TEn7V6X88mktX9kee9o=
+github.com/labstack/gommon v0.3.1/go.mod h1:uW6kP17uPlLJsD3ijUYn3/M5bAxtlZhMI6m3MFxTMTM=
+github.com/leaanthony/debme v1.2.1 h1:9Tgwf+kjcrbMQ4WnPcEIUcQuIZYqdWftzZkBr+i/oOc=
+github.com/leaanthony/debme v1.2.1/go.mod h1:3V+sCm5tYAgQymvSOfYQ5Xx2JCr+OXiD9Jkw3otUjiA=
+github.com/leaanthony/go-ansi-parser v1.0.1 h1:97v6c5kYppVsbScf4r/VZdXyQ21KQIfeQOk2DgKxGG4=
+github.com/leaanthony/go-ansi-parser v1.0.1/go.mod h1:7arTzgVI47srICYhvgUV4CGd063sGEeoSlych5yeSPM=
+github.com/leaanthony/gosod v1.0.3 h1:Fnt+/B6NjQOVuCWOKYRREZnjGyvg+mEhd1nkkA04aTQ=
+github.com/leaanthony/gosod v1.0.3/go.mod h1:BJ2J+oHsQIyIQpnLPjnqFGTMnOZXDbvWtRCSG7jGxs4=
+github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY=
+github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY=
+github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE=
+github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU=
+github.com/mattn/go-colorable v0.1.11 h1:nQ+aFkoE2TMGc0b68U2OKSexC+eq46+XwZzWXHRmPYs=
+github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
+github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=
+github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
+github.com/pkg/browser v0.0.0-20210706143420-7d21f8c997e2 h1:acNfDZXmm28D2Yg/c3ALnZStzNaZMSagpbr96vY6Zjc=
+github.com/pkg/browser v0.0.0-20210706143420-7d21f8c997e2/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI=
+github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
+github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/samber/lo v1.27.1 h1:sTXwkRiIFIQG+G0HeAvOEnGjqWeWtI9cg5/n51KrxPg=
+github.com/samber/lo v1.27.1/go.mod h1:it33p9UtPMS7z72fP4gw/EIfQB2eI8ke7GR2wc6+Rhg=
+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
+github.com/thoas/go-funk v0.9.1 h1:O549iLZqPpTUQ10ykd26sZhzD+rmR5pWhuElrhbC20M=
+github.com/tkrajina/go-reflector v0.5.5 h1:gwoQFNye30Kk7NrExj8zm3zFtrGPqOkzFMLuQZg1DtQ=
+github.com/tkrajina/go-reflector v0.5.5/go.mod h1:ECbqLgccecY5kPmPmXg1MrHW585yMcDkVl6IvJe64T4=
+github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
+github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
+github.com/valyala/fasttemplate v1.2.1 h1:TVEnxayobAdVkhQfrfes2IzOB6o+z4roRkPF52WA1u4=
+github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ=
+github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs=
+github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o=
+github.com/wailsapp/wails/v2 v2.5.1 h1:mfG+2kWqQXYOwdgI43HEILjOZDXbk5woPYI3jP2b+js=
+github.com/wailsapp/wails/v2 v2.5.1/go.mod h1:jbOZbcr/zm79PxXxAjP8UoVlDd9wLW3uDs+isIthDfs=
+golang.org/x/crypto v0.1.0 h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU=
+golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw=
+golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17 h1:3MTrJm4PyNL9NBqvYDSj3DHl46qQakyfqfWo4jgfaEM=
+golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17/go.mod h1:lgLbSvA5ygNOMpwM/9anMpWVlVJ7Z+cHWq/eFuinpGE=
+golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
+golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
+golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
+golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200810151505-1b9f1253b3ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU=
+golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
+golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo=
+golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
+golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
diff --git a/ui/main.go b/ui/main.go
new file mode 100644
index 000000000..f94f94a2c
--- /dev/null
+++ b/ui/main.go
@@ -0,0 +1,74 @@
+// main
+package main
+
+import (
+ "embed"
+ "fmt"
+ "net/http"
+ "os"
+ "path/filepath"
+ "strings"
+
+ "github.com/wailsapp/wails/v2"
+ "github.com/wailsapp/wails/v2/pkg/options"
+ "github.com/wailsapp/wails/v2/pkg/options/assetserver"
+)
+
+// 'wails dev' should properly launch vite to serve the site
+// for live development without needing to separately launch
+// 'npm run dev' or your flavor such as pnpm in the frontend
+// directory separatelye
+
+// The comment below chooses what gets packaged with
+// the application.
+
+//go:embed all:frontend/build
+var assets embed.FS
+
+// FileLoader ...
+type FileLoader struct {
+ http.Handler
+}
+
+// NewFileLoader ...
+func NewFileLoader() *FileLoader {
+ return &FileLoader{}
+}
+
+func (h *FileLoader) ServeHTTP(res http.ResponseWriter, req *http.Request) {
+ var err error
+ requestedFilename := strings.TrimPrefix(req.URL.Path, "/")
+ println("Requesting file:", requestedFilename)
+ fileData, err := os.ReadFile(filepath.Clean(requestedFilename))
+ if err != nil {
+ res.WriteHeader(http.StatusBadRequest)
+ _, _ = res.Write([]byte(fmt.Sprintf("Could not load file %s", requestedFilename)))
+ }
+
+ _, _ = res.Write(fileData)
+}
+
+func main() {
+ // Create an instance of the app structure
+ app := NewApp()
+
+ // Create application with options
+ err := wails.Run(&options.App{
+ Title: "AtomicSwap",
+ Width: 1024,
+ Height: 768,
+ AssetServer: &assetserver.Options{
+ Assets: assets,
+ Handler: NewFileLoader(),
+ },
+ BackgroundColour: &options.RGBA{R: 27, G: 38, B: 54, A: 1},
+ OnStartup: app.startup,
+ Bind: []interface{}{
+ app,
+ },
+ })
+
+ if err != nil {
+ println("Error:", err.Error())
+ }
+}
diff --git a/ui/src/routes/+layout.svelte b/ui/src/routes/+layout.svelte
deleted file mode 100644
index a015cff7a..000000000
--- a/ui/src/routes/+layout.svelte
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/ui/src/stores/peerStore.ts b/ui/src/stores/peerStore.ts
deleted file mode 100644
index e3cfef516..000000000
--- a/ui/src/stores/peerStore.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-import { rpcRequest } from '../utils';
-import { writable } from 'svelte/store';
-import type { NetDiscoverResult } from '../types/NetDiscoverResults';
-
-export const isLoadingPeers = writable(false)
-export const peers = writable([], () => {
- getPeers()
-});
-
-export const getPeers = () => {
- isLoadingPeers.set(true)
- return rpcRequest('net_discover', { searchTime: 3 })
- .then(({ result }) => { peers.set([...new Set(result.peerIDs)]) })
- .catch(console.error)
- .finally(() => {
- isLoadingPeers.set(false)
- })
-}
\ No newline at end of file
diff --git a/ui/src/theme/_smui-theme.scss b/ui/src/theme/_smui-theme.scss
deleted file mode 100644
index 7373188de..000000000
--- a/ui/src/theme/_smui-theme.scss
+++ /dev/null
@@ -1,38 +0,0 @@
-@use 'sass:color';
-
-@use '@material/theme/color-palette';
-
-// Svelte Colors!
-@use '@material/theme/index' as theme with (
- $primary: #ff3e00,
- $on-primary: #222,
- $secondary: #676778,
- $surface: #fcfcfc,
- $on-surface: #222,
- $background: #fff,
- $error: color-palette.$red-900,
-);
-
-html,
-body {
- background-color: theme.$surface;
- color: theme.$on-surface;
- padding: 0;
-}
-
-a {
- color: #40b3ff;
-}
-a:visited {
- color: color.scale(#40b3ff, $lightness: -35%);
-}
-
-
-.topappbar {
- background: #fff;
-}
-.mdc-top-app-bar {
- background: transparent
-}
-
-// Import the mixins.
diff --git a/ui/src/theme/dark/_smui-theme.scss b/ui/src/theme/dark/_smui-theme.scss
deleted file mode 100644
index f52ecbf90..000000000
--- a/ui/src/theme/dark/_smui-theme.scss
+++ /dev/null
@@ -1,25 +0,0 @@
-@use 'sass:color';
-
-@use '@material/theme/color-palette';
-
-// Svelte Colors! (Dark Theme)
-@use '@material/theme/index' as theme with (
- $primary: #ff3e00,
- $secondary: color.scale(#676778, $whiteness: -10%),
- $surface: color.adjust(color-palette.$grey-900, $blue: +4),
- $background: #000,
- $error: color-palette.$red-700
-);
-
-html,
-body {
- background-color: #000;
- color: theme.$on-surface;
-}
-
-a {
- color: #40b3ff;
-}
-a:visited {
- color: color.scale(#40b3ff, $lightness: -35%);
-}
diff --git a/ui/svelte.config.js b/ui/svelte.config.js
deleted file mode 100644
index db566e90c..000000000
--- a/ui/svelte.config.js
+++ /dev/null
@@ -1,18 +0,0 @@
-import adapter from '@sveltejs/adapter-auto';
-import { vitePreprocess } from '@sveltejs/kit/vite';
-
-/** @type {import('@sveltejs/kit').Config} */
-const config = {
- // Consult https://kit.svelte.dev/docs/integrations#preprocessors
- // for more information about preprocessors
- preprocess: vitePreprocess(),
-
- kit: {
- // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
- // If your environment is not supported or you settled on a specific environment, switch out the adapter.
- // See https://kit.svelte.dev/docs/adapters for more information about adapters.
- adapter: adapter()
- }
-};
-
-export default config;
\ No newline at end of file
diff --git a/ui/wails.json b/ui/wails.json
new file mode 100644
index 000000000..4aa609648
--- /dev/null
+++ b/ui/wails.json
@@ -0,0 +1,13 @@
+{
+ "name": "AtomicSwap",
+ "outputfilename": "swap",
+ "frontend:install": "npm install",
+ "frontend:build": "npm run build --base=./",
+ "frontend:dev:watcher": "npm run dev",
+ "frontend:dev:serverUrl": "auto",
+ "wailsjsdir": "./frontend/src/lib",
+ "author": {
+ "name": "Matt",
+ "email": "stubbrn@protonmail.com"
+ }
+}