diff --git a/src/assets/img/circles-transparent.png b/src/assets/img/circles-transparent.png new file mode 100644 index 0000000..894d754 Binary files /dev/null and b/src/assets/img/circles-transparent.png differ diff --git a/src/assets/img/gesotown-brand-bg.png b/src/assets/img/gesotown-brand-bg.png new file mode 100644 index 0000000..d32ed02 Binary files /dev/null and b/src/assets/img/gesotown-brand-bg.png differ diff --git a/src/assets/img/gesotown-coin.svg b/src/assets/img/gesotown-coin.svg new file mode 100644 index 0000000..97db3ac --- /dev/null +++ b/src/assets/img/gesotown-coin.svg @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/img/gesotown-daily-drop-bg.png b/src/assets/img/gesotown-daily-drop-bg.png new file mode 100644 index 0000000..eff12c0 Binary files /dev/null and b/src/assets/img/gesotown-daily-drop-bg.png differ diff --git a/src/assets/img/gesotown-horiz-card-bg.png b/src/assets/img/gesotown-horiz-card-bg.png new file mode 100644 index 0000000..ee4e845 Binary files /dev/null and b/src/assets/img/gesotown-horiz-card-bg.png differ diff --git a/src/assets/img/gesotown-price-bg.png b/src/assets/img/gesotown-price-bg.png new file mode 100644 index 0000000..bc630de Binary files /dev/null and b/src/assets/img/gesotown-price-bg.png differ diff --git a/src/assets/img/gesotown-tape-blob-bg.png b/src/assets/img/gesotown-tape-blob-bg.png new file mode 100644 index 0000000..3563ce9 Binary files /dev/null and b/src/assets/img/gesotown-tape-blob-bg.png differ diff --git a/src/assets/img/gesotown-tape.svg b/src/assets/img/gesotown-tape.svg new file mode 100644 index 0000000..44f9c38 --- /dev/null +++ b/src/assets/img/gesotown-tape.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/src/assets/img/paper-bg.jpg b/src/assets/img/paper-bg.jpg new file mode 100644 index 0000000..019db02 Binary files /dev/null and b/src/assets/img/paper-bg.jpg differ diff --git a/src/assets/img/paper-tear-mask.svg b/src/assets/img/paper-tear-mask.svg new file mode 100644 index 0000000..6e8bdd9 --- /dev/null +++ b/src/assets/img/paper-tear-mask.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/assets/img/paper-tear-overlay-w.png b/src/assets/img/paper-tear-overlay-w.png new file mode 100644 index 0000000..0d046d6 Binary files /dev/null and b/src/assets/img/paper-tear-overlay-w.png differ diff --git a/src/assets/img/paper-tear-overlay.png b/src/assets/img/paper-tear-overlay.png new file mode 100644 index 0000000..b82b8f5 Binary files /dev/null and b/src/assets/img/paper-tear-overlay.png differ diff --git a/src/assets/img/staple-left.png b/src/assets/img/staple-left.png new file mode 100644 index 0000000..bca542e Binary files /dev/null and b/src/assets/img/staple-left.png differ diff --git a/src/assets/img/staple-right.png b/src/assets/img/staple-right.png new file mode 100644 index 0000000..cc7b3cd Binary files /dev/null and b/src/assets/img/staple-right.png differ diff --git a/src/common/links.js b/src/common/links.js new file mode 100644 index 0000000..9112049 --- /dev/null +++ b/src/common/links.js @@ -0,0 +1,5 @@ +const baseUrl = 'com.nintendo.znca://znca/game/4834290508791808'; + +export function getGesotownGearUrl(id) { + return `${baseUrl}?p=/gesotown/${id}` +} diff --git a/src/common/time.js b/src/common/time.js index 86e6cc3..cff2085 100644 --- a/src/common/time.js +++ b/src/common/time.js @@ -1,5 +1,9 @@ import { useTimeStore } from '../stores/time'; +export function formatDateTime(value) { + return (new Date(value)).toLocaleString(undefined, { month: 'numeric', day: 'numeric', hour: 'numeric', minute: '2-digit' }); +} + export function formatTime(value) { return (new Date(value)).toLocaleTimeString(undefined, { hour: 'numeric', minute: '2-digit' }); } @@ -47,3 +51,21 @@ export function formatDurationFromNow(value, hideSeconds = false) { return formatDuration((Date.parse(value) - time.now) / 1000, hideSeconds); } + +export function formatShortDuration(value) { + let { negative, days, hours, minutes, seconds } = getDurationParts(value); + + if (days) + return `${negative}${days} ${days === 1 ? 'day' : 'days'}`; + if (hours) + return `${negative}${hours} ${hours === 1 ? 'hour' : 'hours'}`; + if (minutes) + return `${negative}${minutes} ${minutes === 1 ? 'minute' : 'minutes'}`; + return `${negative}${seconds} ${seconds === 1 ? 'second' : 'seconds'}`; +} + +export function formatShortDurationFromNow(value) { + let time = useTimeStore(); + + return formatShortDuration((Date.parse(value) - time.now) / 1000); +} diff --git a/src/components/SquidTape.vue b/src/components/SquidTape.vue index dd5b24f..09d2928 100644 --- a/src/components/SquidTape.vue +++ b/src/components/SquidTape.vue @@ -3,7 +3,7 @@
-
+
@@ -21,7 +21,7 @@ const props = defineProps({ default: 'bg-white', }, border: { - default: 'border border-white', + default: 'border-white', }, squidSize: { default: '10px', diff --git a/src/components/gear/DailyDropGear.vue b/src/components/gear/DailyDropGear.vue new file mode 100644 index 0000000..fd2d9d9 --- /dev/null +++ b/src/components/gear/DailyDropGear.vue @@ -0,0 +1,71 @@ + + + + + diff --git a/src/components/gear/GearCard.vue b/src/components/gear/GearCard.vue new file mode 100644 index 0000000..a81b848 --- /dev/null +++ b/src/components/gear/GearCard.vue @@ -0,0 +1,101 @@ + + + + + diff --git a/src/components/gear/GearCardHorizontal.vue b/src/components/gear/GearCardHorizontal.vue new file mode 100644 index 0000000..fb6bc0b --- /dev/null +++ b/src/components/gear/GearCardHorizontal.vue @@ -0,0 +1,92 @@ + + + + + diff --git a/src/components/gear/RegularGear.vue b/src/components/gear/RegularGear.vue new file mode 100644 index 0000000..b3f9ffb --- /dev/null +++ b/src/components/gear/RegularGear.vue @@ -0,0 +1,75 @@ + + + + + diff --git a/src/router/index.js b/src/router/index.js index 02fb3b4..424514a 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -1,5 +1,6 @@ import { createRouter, createWebHistory } from 'vue-router' import HomeView from '../views/HomeView.vue' +import GearView from '../views/GearView.vue' import AboutView from '../views/AboutView.vue' const router = createRouter({ @@ -10,6 +11,11 @@ const router = createRouter({ name: 'home', component: HomeView }, + { + path: '/gear', + name: 'gear', + component: GearView, + }, { path: '/about', name: 'about', diff --git a/src/stores/gear.mjs b/src/stores/gear.mjs index 1f81772..3f3365d 100644 --- a/src/stores/gear.mjs +++ b/src/stores/gear.mjs @@ -21,9 +21,9 @@ export const useGearStore = defineStore('gear', () => { const dailyDropBrand = computed(() => whenCurrent(gesotown.value?.pickupBrand)); const dailyDropGear = computed(() => currentNodes(gesotown.value?.pickupBrand.brandGears)); - const normalGear = computed(() => currentNodes(gesotown.value?.limitedGears)); + const regularGear = computed(() => currentNodes(gesotown.value?.limitedGears)); - return { dailyDropBrand, dailyDropGear, normalGear }; + return { dailyDropBrand, dailyDropGear, regularGear }; }); if (import.meta.hot) { diff --git a/src/views/GearView.vue b/src/views/GearView.vue new file mode 100644 index 0000000..33dfea8 --- /dev/null +++ b/src/views/GearView.vue @@ -0,0 +1,28 @@ + + +