This commit is contained in:
a 2022-07-13 17:59:38 -05:00
parent 8ac589d44e
commit 516c91ab3f
7 changed files with 71 additions and 8 deletions

19
Dockerfile Normal file
View File

@ -0,0 +1,19 @@
FROM golang:1.18.2-alpine as GOBUILDER
WORKDIR /wd
COPY go.mod go.sum ./
COPY app ./app
RUN go mod tidy
RUN go build -o app.exe ./app
FROM node:18.1-alpine as NODEBUILDER
WORKDIR /wd
COPY . .
RUN npm install
RUN npx vite build
FROM alpine:3.16
WORKDIR /wd
COPY --from=GOBUILDER /wd/app.exe app.exe
COPY --from=NODEBUILDER /wd/dist dist
ENTRYPOINT [ "/wd/app.exe" ]

View File

@ -7,7 +7,7 @@
<script lang="ts" setup>
import CharacterCard from './CharacterCard.vue';
const { chars, invs, activeTable } = useStoreRef()
const {accs, chars, invs, activeTable } = useStoreRef()
const characters = ref([] as string[])
watch(chars, () => {
@ -20,6 +20,7 @@ const api:LTOApi = getLTOState(LTOApiv0, session, useStoreRef())
api.GetAccounts().then(xs => {
xs.forEach(x => {
characters.value.push(...x.characters.map(x=>x.path))
accs.value.set(x.name, x)
})
characters.value = [...new Set([...characters.value])]
saveStore();

View File

@ -71,7 +71,7 @@ class Count implements ColumnInfo {
}
}
const spacer = "-------------------------------"
const spacer = "-----------"
class Move implements ColumnInfo {
name:ColumnName = "Move"
displayName = "Target"

View File

@ -14,7 +14,7 @@
//}
import { ColumnSet } from "./table"
import { TricksterCharacter, TricksterInventory } from "./trickster"
import { TricksterAccount, TricksterCharacter, TricksterInventory } from "./trickster"
export const ARRAY_SEPERATOR = ","
@ -51,6 +51,13 @@ export const StoreChars = {
},
Revive: (s:string):Map<string,TricksterCharacter>=>new Map(JSON.parse(s)),
}
export const StoreAccounts = {
Murder: (s:Map<string,TricksterAccount>):string=>{
let o = JSON.stringify(Array.from(s.entries()))
return o
},
Revive: (s:string):Map<string,TricksterAccount>=>new Map(JSON.parse(s)),
}
export const StoreJsonable = {
Murder: <T>(s:T):string=>JSON.stringify(Object.entries(s)),

View File

@ -186,7 +186,7 @@ export const DefaultSettings = ():HotTableProps=>{
},
// renderAllRows: true,
viewportColumnRenderingOffset: 3,
viewportRowRenderingOffset: 100,
viewportRowRenderingOffset: 10,
// dropdownMenu: DefaultDropdownItems(),
afterGetColHeader: (col, th) => {
if(!th.innerHTML.toLowerCase().includes("name")) {

View File

@ -46,9 +46,42 @@ export interface TricksterInventory extends Identifier{
const jobMap:{[key:number]:string} = {
31: "diva",
//---- job 1, fm
1: "schoolgirl",
2: "fighter",
3: "librarian",
4: "shaman",
5: "archeologist",
6: "engineer",
7: "model",
8: "teacher",
//---- job 2 fm
9: "boxer",
10: "warrior",
11: "bard",
12: "magician",
13: "explorer",
14: "inventor",
15: "entertainer",
16: "card master",
//----
17: "champion",
18: "duelist",
19: "mercinary",
20: "gladiator",
21: "soul master",
22: "witch",
23: "wizard",
24: "dark lord",
25: "priest",
26: "thief master",
27: "hunter lord",
28: "cyber hunter",
29: "scientist",
11: "sheep",
30: "primadonna",
31: "diva",
32: "duke",
33: "gambler",
}
export const JobNumberToString = (n:number):string=> {

View File

@ -3,9 +3,9 @@ import { getCookie, setCookie } from 'typescript-cookie'
import { useCookies } from 'vue3-cookies'
import { BasicColumns, ColumnInfo, ColumnName, Columns, DetailsColumns, MoveColumns } from '../lib/columns'
import { OrderTracker } from '../lib/lifeto/order_manager'
import { Reviver, StoreChars, StoreColSet, StoreInvs, StoreSerializable, StoreStr, StoreStrSet } from '../lib/storage'
import { Reviver, StoreAccounts, StoreChars, StoreColSet, StoreInvs, StoreSerializable, StoreStr, StoreStrSet } from '../lib/storage'
import { ColumnSet } from '../lib/table'
import { TricksterCharacter, TricksterInventory } from '../lib/trickster'
import { TricksterAccount, TricksterCharacter, TricksterInventory } from '../lib/trickster'
import { nameCookie} from '../session_storage'
const _defaultColumn:(ColumnInfo| ColumnName)[] = [
@ -17,6 +17,7 @@ const _defaultColumn:(ColumnInfo| ColumnName)[] = [
// if you wish for the thing to persist
export const StoreReviver = {
chars: StoreChars,
accs: StoreAccounts,
activeTable: StoreStr,
screen: StoreStr,
columns: StoreColSet,
@ -27,6 +28,7 @@ export const StoreReviver = {
export interface StoreProps {
invs: Map<string,TricksterInventory>
chars: Map<string, TricksterCharacter>
accs: Map<string, TricksterAccount>
orders: OrderTracker
activeTable: string
screen: string
@ -41,6 +43,7 @@ export const useStore = defineStore('state', {
let store = {
invs: new Map() as Map<string,TricksterInventory>,
chars: new Map() as Map<string,TricksterCharacter>,
accs: new Map() as Map<string,TricksterAccount>,
orders: new OrderTracker(),
activeTable: "none",
screen: "default",