diff --git a/media/How It Works.xcf b/media/How It Works.xcf deleted file mode 100644 index 9acf670..0000000 Binary files a/media/How It Works.xcf and /dev/null differ diff --git a/media/dexorder_icons/ico_black_clip.PNG b/media/dexorder_icons/ico_black_clip.PNG new file mode 100644 index 0000000..e79a82d Binary files /dev/null and b/media/dexorder_icons/ico_black_clip.PNG differ diff --git a/media/dexorder_icons/ico_black_fill.PNG b/media/dexorder_icons/ico_black_fill.PNG new file mode 100644 index 0000000..280e1eb Binary files /dev/null and b/media/dexorder_icons/ico_black_fill.PNG differ diff --git a/media/dexorder_icons/ico_green_clip.PNG b/media/dexorder_icons/ico_green_clip.PNG new file mode 100644 index 0000000..620cf08 Binary files /dev/null and b/media/dexorder_icons/ico_green_clip.PNG differ diff --git a/media/dexorder_icons/ico_green_fill.PNG b/media/dexorder_icons/ico_green_fill.PNG new file mode 100644 index 0000000..48f2332 Binary files /dev/null and b/media/dexorder_icons/ico_green_fill.PNG differ diff --git a/media/dexorder_icons/ico_white_clip.PNG b/media/dexorder_icons/ico_white_clip.PNG new file mode 100644 index 0000000..1bde17a Binary files /dev/null and b/media/dexorder_icons/ico_white_clip.PNG differ diff --git a/media/dexorder_icons/ico_white_fill.PNG b/media/dexorder_icons/ico_white_fill.PNG new file mode 100644 index 0000000..8d45b0c Binary files /dev/null and b/media/dexorder_icons/ico_white_fill.PNG differ diff --git a/media/dexorder_vectors/dexorder_arrow.svg b/media/dexorder_vectors/dexorder_arrow.svg new file mode 100644 index 0000000..c73a997 --- /dev/null +++ b/media/dexorder_vectors/dexorder_arrow.svg @@ -0,0 +1 @@ +Asset 14 \ No newline at end of file diff --git a/media/dexorder_vectors/dexorder_full_darkmode-noborder.png b/media/dexorder_vectors/dexorder_full_darkmode-noborder.png new file mode 100644 index 0000000..aa56485 Binary files /dev/null and b/media/dexorder_vectors/dexorder_full_darkmode-noborder.png differ diff --git a/media/dexorder_vectors/dexorder_full_darkmode.svg b/media/dexorder_vectors/dexorder_full_darkmode.svg new file mode 100644 index 0000000..cf738e0 --- /dev/null +++ b/media/dexorder_vectors/dexorder_full_darkmode.svg @@ -0,0 +1 @@ +Asset 13 \ No newline at end of file diff --git a/media/dexorder_vectors/dexorder_full_lightmode.svg b/media/dexorder_vectors/dexorder_full_lightmode.svg new file mode 100644 index 0000000..9ee5f16 --- /dev/null +++ b/media/dexorder_vectors/dexorder_full_lightmode.svg @@ -0,0 +1 @@ +Asset 12 \ No newline at end of file diff --git a/media/dexorder_vectors/howitworks.svg b/media/dexorder_vectors/howitworks.svg new file mode 100644 index 0000000..5730cfe --- /dev/null +++ b/media/dexorder_vectors/howitworks.svg @@ -0,0 +1 @@ +howitworks \ No newline at end of file diff --git a/media/logo-lg.png b/media/logo-lg.png deleted file mode 100644 index c4d126d..0000000 Binary files a/media/logo-lg.png and /dev/null differ diff --git a/public/dexorder_full_lightmode.svg b/public/dexorder_full_lightmode.svg new file mode 100644 index 0000000..9ee5f16 --- /dev/null +++ b/public/dexorder_full_lightmode.svg @@ -0,0 +1 @@ +Asset 12 \ No newline at end of file diff --git a/public/favicon.ico b/public/favicon.ico index 7b39019..201670d 100644 Binary files a/public/favicon.ico and b/public/favicon.ico differ diff --git a/public/favicon32.ico b/public/favicon32.ico deleted file mode 100644 index fb19177..0000000 Binary files a/public/favicon32.ico and /dev/null differ diff --git a/public/how-it-works.png b/public/how-it-works.png deleted file mode 100644 index 9eebcec..0000000 Binary files a/public/how-it-works.png and /dev/null differ diff --git a/public/howitworks.png b/public/howitworks.png new file mode 100644 index 0000000..4173be5 Binary files /dev/null and b/public/howitworks.png differ diff --git a/src/App.vue b/src/App.vue index 9ae4cb1..5f9479a 100644 --- a/src/App.vue +++ b/src/App.vue @@ -5,4 +5,6 @@ diff --git a/src/blockchain/orderlib.js b/src/blockchain/orderlib.js index 5d8c929..11887a4 100644 --- a/src/blockchain/orderlib.js +++ b/src/blockchain/orderlib.js @@ -137,6 +137,7 @@ export function parseElaboratedOrderStatus(chainId, status) { export function parseOrderStatus(chainId, status) { + console.log('parseOrderStatus', status) let [ order, fillFeeHalfBps, diff --git a/src/blockchain/transaction.js b/src/blockchain/transaction.js index c2d2b63..4fed97a 100644 --- a/src/blockchain/transaction.js +++ b/src/blockchain/transaction.js @@ -1,8 +1,9 @@ -import {nav, timestamp, uuid} from "@/misc.js"; +import {nav, uuid} from "@/misc.js"; import {newContract, vaultContract} from "@/blockchain/contract.js"; import {ensureVault, provider, switchChain, useWalletStore} from "@/blockchain/wallet.js"; import {toRaw} from "vue"; import {useChartOrderStore} from "@/orderbuild.js"; +import {timestamp} from "@/common.js"; export const TransactionState = { Created: 0, // user requested a transaction diff --git a/src/charts/datafeed.js b/src/charts/datafeed.js index bdae6e3..1fe15b1 100644 --- a/src/charts/datafeed.js +++ b/src/charts/datafeed.js @@ -5,7 +5,8 @@ import {useChartOrderStore} from "@/orderbuild.js"; import {useStore} from "@/store/store.js"; import {subOHLC, unsubOHLC} from "@/blockchain/ohlcs.js"; import {ohlcStart} from "@/charts/chart-misc.js"; -import {timestamp} from "@/misc.js"; + +import {timestamp} from "@/common.js"; const DEBUG_LOGGING = false const log = DEBUG_LOGGING ? console.log : ()=>{} diff --git a/src/charts/ordershapes.js b/src/charts/ordershapes.js index 917d00c..b45856a 100644 --- a/src/charts/ordershapes.js +++ b/src/charts/ordershapes.js @@ -1,8 +1,9 @@ import {DISTANT_FUTURE, DISTANT_PAST, MAX_FRACTION} from "@/blockchain/orderlib.js"; import {allocationText, DLine, HLine} from "@/charts/shape.js"; import {createShape, deleteShapeId} from "@/charts/chart.js"; -import {sideColor, timestamp} from "@/misc.js"; +import {sideColor} from "@/misc.js"; import {useChartOrderStore} from "@/orderbuild.js"; +import {timestamp} from "@/common.js"; export class OrderShapes { constructor(symbol, orderStatus) { diff --git a/src/common.js b/src/common.js index b58acc0..188e6c0 100644 --- a/src/common.js +++ b/src/common.js @@ -141,3 +141,13 @@ export function parseFill(obj) { fee = BigInt(fee) return {tx, time, filledIn, filledOut, fee} } + +export function timestamp(date = null) { + if (date === null) + date = new Date() + return Math.round(date.getTime() / 1000) +} + +export function dateString(datetime) { + return datetime.toLocaleString({dateStyle: 'medium', timeStyle: 'short'}) +} \ No newline at end of file diff --git a/src/components/ApproveRegion.vue b/src/components/ApproveRegion.vue index 252e63b..ccfa6fb 100644 --- a/src/components/ApproveRegion.vue +++ b/src/components/ApproveRegion.vue @@ -18,12 +18,16 @@ let timer = null const bypass = useRoute().query.approval function tryApproval() { - console.log('approval query', bypass) + console.log('trying region approval') if (timer!==null) { clearTimeout(timer) timer = null } - if (s.regionApproved===null) { + if (s.regionApproved===true) { + console.log('region approved') + } + else if (s.regionApproved===null) { + console.log('asking for region approval', bypass) socket.emit('approveRegion', bypass) timer = setTimeout(tryApproval, 1000) } diff --git a/src/components/ChartPairSelector.vue b/src/components/ChartPairSelector.vue deleted file mode 100644 index e61a43d..0000000 --- a/src/components/ChartPairSelector.vue +++ /dev/null @@ -1,10 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/components/DiagonalOrder.vue b/src/components/DiagonalOrder.vue index 583b36d..f888e59 100644 --- a/src/components/DiagonalOrder.vue +++ b/src/components/DiagonalOrder.vue @@ -32,7 +32,8 @@ import {applyLinePoints, linePointsValue, useChartOrderStore} from "@/orderbuild import {newTranche} from "@/blockchain/orderlib.js"; import TimeEntry from "@/components/TimeEntry.vue"; import RoutePrice from "@/components/RoutePrice.vue"; -import {timestamp} from "@/misc.js"; + +import {timestamp} from "@/common.js"; const s = useStore() const os = useOrderStore() diff --git a/src/components/Logo.vue b/src/components/Logo.vue index 309ab34..4bc66c3 100644 --- a/src/components/Logo.vue +++ b/src/components/Logo.vue @@ -1,15 +1,16 @@ + \ No newline at end of file diff --git a/src/components/TermsOfService.vue b/src/components/TermsOfService.vue index 4a2e124..ab5331d 100644 --- a/src/components/TermsOfService.vue +++ b/src/components/TermsOfService.vue @@ -658,7 +658,8 @@ at legal@dexorder.trade or -
+
delete orderFuncs[lastId]) const theme = useTheme().current const color = computed(()=>new Color(props.order.buy?theme.value.colors.success:theme.value.colors.error).darken(0.2).string()) -const lightColor = computed(() => lightenColor(color.value)) -const faintColor = computed(() => lightenColor2(color.value)) -const colorStyle = computed(() => { return {'color': color.value} }) -const bgColorStyle = computed(() => { return {'background-color': color.value} }) -const lightColorStyle = computed(() => { return {'background-color': lightColor.value} }) -const faintColorStyle = computed(() => { return {'background-color': faintColor.value} }) +// const lightColor = computed(() => lightenColor(color.value)) +// const faintColor = computed(() => lightenColor2(color.value)) +// const colorStyle = computed(() => { return {'color': color.value} }) +// const bgColorStyle = computed(() => { return {'background-color': color.value} }) +// const lightColorStyle = computed(() => { return {'background-color': lightColor.value} }) +// const faintColorStyle = computed(() => { return {'background-color': faintColor.value} }) const inToken = computed( ()=>props.order.buy ? co.quoteToken : co.baseToken ) const maxAmount = computed(()=>{ diff --git a/src/components/chart/ChartPlaceOrder.vue b/src/components/chart/ChartPlaceOrder.vue index 5cc4f23..a9622a9 100644 --- a/src/components/chart/ChartPlaceOrder.vue +++ b/src/components/chart/ChartPlaceOrder.vue @@ -9,20 +9,22 @@ Reset - - - - - - - Keep Existing - - - - - +
+ + + + + + + Keep Existing + + + + + +
@@ -63,7 +65,7 @@ const theme = useTheme().current const orderColor = computed(()=>co.orders.length===0?null : co.orders[0].buy ? theme.value.colors.success:theme.value.colors.error) const valid = computed(()=>{ - if (!s.allowed) + if (!s.approved) return false if (co.drawing) return false @@ -127,7 +129,7 @@ async function placeOrder() { -