Compare commits

...

3 Commits

Author SHA1 Message Date
6c99fa0401 draft character page 2024-05-18 18:55:37 +02:00
c38f44c182 <Misc acquisitions 2024-05-18 18:36:27 +02:00
167788ac15 titles 2024-05-18 18:23:54 +02:00
6 changed files with 20 additions and 5 deletions

View File

@@ -3,7 +3,7 @@ import log from "loglevel";
import { defineStore } from "pinia";
import { computed, ref } from "vue";
export type AcquiredTypeSource = 'bo' | 'so' | 'prod';
export type AcquiredTypeSource = 'bo' | 'so' | 'prod' | 'misc';
export type MarbasAcquiredType = MarbasObject & {
type: number;
@@ -28,7 +28,7 @@ export const useAcquiredTypesStore = defineStore('market-acquisition', () => {
remaining: quantity,
price: price,
date: new Date(),
source: source ?? 'bo',
source: source ?? 'misc',
})).data
acquiredTypes.value = [...acquiredTypes.value, newItem];

View File

@@ -141,8 +141,8 @@ const getLineColor = (result: Result) => {
<td v-if="showColumn('profit')" class="text-right">{{ percentFormater.format(r.profit) }}</td>
<td v-if="showColumn('score')" class="text-right">{{ scoreFormater.format(r.score) }}</td>
<td v-if="showColumn('buttons')" class="text-right">
<button class="btn-icon me-1" @click="$emit('buy', r.type, r.buy, r.sell)"><ShoppingCartIcon /></button>
<button class="btn-icon me-1" @click="$emit('remove', r.type)"><BookmarkSlashIcon /></button>
<button class="btn-icon me-1" title="Add to acquisitions" @click="$emit('buy', r.type, r.buy, r.sell)"><ShoppingCartIcon /></button>
<button class="btn-icon me-1" title="Untrack" @click="$emit('remove', r.type)"><BookmarkSlashIcon /></button>
</td>
</tr>
</tbody>

11
src/pages/Characters.vue Normal file
View File

@@ -0,0 +1,11 @@
<script setup lang="ts">
const addCharacter = () => {
// TODO
}
</script>
<template>
<div class="grid mb-2 mt-4">
<button class="justify-self-end" @click="addCharacter">Add chacarcter</button>
</div>
</template>

View File

@@ -91,7 +91,7 @@ watch(useRoute(), async route => {
<span class="text-lg font-semibold">{{ item.name }}</span>
<div class="ms-auto">
<ClipboardButton class="ms-1" :value="item.name" />
<button v-if="price" class="btn-icon ms-1" @click="buyModal?.open(item, { 'Buy': price.buy, 'Sell': price.sell })"><ShoppingCartIcon /></button>
<button v-if="price" class="btn-icon ms-1" title="Add to acquisitions" @click="buyModal?.open(item, { 'Buy': price.buy, 'Sell': price.sell })"><ShoppingCartIcon /></button>
<button class="btn-icon ms-1" :title="isTracked ? 'Untrack' : 'Track'" @click="toogleTracking">
<BookmarkSlashIcon v-if="isTracked" />
<BookmarkIcon v-else />

View File

@@ -11,5 +11,6 @@ export const routes: RouteRecordRaw[] = [
{ path: 'acquisitions', component: () => import('@/pages/market/Acquisitions.vue') },
] },
{ path: '/tools', component: () => import('@/pages/Tools.vue') },
{ path: '/characters', component: () => import('@/pages/Characters.vue') },
{ path: '/about', name: 'about', component: () => import('@/pages/About.vue') },
];

View File

@@ -25,6 +25,9 @@ const logout = async () => {
<span>{{ authStore.username }}</span>
</template>
<ul>
<li>
<RouterLink class="sidebar-button py-0.5 px-2" to="/characters">Characters</RouterLink>
</li>
<li>
<RouterLink class="sidebar-button py-0.5 px-2" :to="{name: 'about'}">About EVE Online</RouterLink>
</li>