Fixed first issue, added release script

This commit is contained in:
2026-02-23 15:19:15 +01:00
parent b03d9bf998
commit 4d00936719
16 changed files with 142 additions and 38 deletions

View File

@@ -1 +0,0 @@
import{l as o,a as r}from"../chunks/niSfElle.js";export{o as load_css,r as start};

View File

@@ -0,0 +1 @@
import{l as o,a as r}from"../chunks/BEXiALSO.js";export{o as load_css,r as start};

View File

@@ -1 +1 @@
import{f as u,a as h}from"../chunks/K5GTgIDA.js";import{i as g}from"../chunks/DgU0EQmz.js";import{z as l,a8 as v,K as d,B as _,D as s,F as e,C as x}from"../chunks/DxMC-E2z.js";import{s as o}from"../chunks/V6M2jInR.js";import{s as $,p}from"../chunks/niSfElle.js";const k={get error(){return p.error},get status(){return p.status}};$.updated.check;const m=k;var b=u("<h1> </h1> <p> </p>",1);function F(i,f){l(f,!1),g();var t=b(),r=v(t),n=s(r,!0);e(r);var a=x(r,2),c=s(a,!0);e(a),d(()=>{o(n,m.status),o(c,m.error?.message)}),h(i,t),_()}export{F as component};
import{f as u,a as h}from"../chunks/K5GTgIDA.js";import{i as g}from"../chunks/DgU0EQmz.js";import{z as l,a8 as v,K as d,B as _,D as s,F as e,C as x}from"../chunks/DxMC-E2z.js";import{s as o}from"../chunks/V6M2jInR.js";import{s as $,p}from"../chunks/BEXiALSO.js";const k={get error(){return p.error},get status(){return p.status}};$.updated.check;const m=k;var b=u("<h1> </h1> <p> </p>",1);function F(i,f){l(f,!1),g();var t=b(),r=v(t),n=s(r,!0);e(r);var a=x(r,2),c=s(a,!0);e(a),d(()=>{o(n,m.status),o(c,m.error?.message)}),h(i,t),_()}export{F as component};

View File

@@ -1 +1 @@
import{f as w,a as d}from"../chunks/K5GTgIDA.js";import{i as J}from"../chunks/DgU0EQmz.js";import{z as O,A as t,B as P,C as r,D as o,F as i,G as v,I as g,J as b,K as S}from"../chunks/DxMC-E2z.js";import{e as T,s as j}from"../chunks/V6M2jInR.js";import{i as z}from"../chunks/BJWcdj5l.js";import{r as h}from"../chunks/HgGInnYf.js";import{b as _}from"../chunks/Cp1RMksV.js";import{g as A}from"../chunks/niSfElle.js";var B=w('<p class="error svelte-1uha8ag"> </p>'),D=w('<form class="login svelte-1uha8ag"><h2>Login</h2> <label class="svelte-1uha8ag">User <input type="text" required/></label> <label class="svelte-1uha8ag">Password <input type="password" required/></label> <button>Login</button> <!></form>');function M(y,x){O(x,!1);let s=v(""),e=v({username:"",password:""});async function k(){try{const a=await fetch("/login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(t(e))});if(!a.ok){b(s,await a.text());return}A("/shadowrun")}catch(a){b(s,a.message)}}J();var n=D(),l=r(o(n),2),u=r(o(l));h(u),i(l);var p=r(l,2),f=r(o(p));h(f),i(p);var c=r(p,2),C=r(c,2);{var L=a=>{var m=B(),q=o(m,!0);i(m),S(()=>j(q,t(s))),d(a,m)};z(C,a=>{t(s)&&a(L)})}i(n),_(u,()=>t(e).username,a=>g(e,t(e).username=a)),_(f,()=>t(e).password,a=>g(e,t(e).password=a)),T("click",c,k),d(y,n),P()}export{M as component};
import{f as w,a as d}from"../chunks/K5GTgIDA.js";import{i as J}from"../chunks/DgU0EQmz.js";import{z as O,A as t,B as P,C as r,D as o,F as i,G as v,I as g,J as b,K as S}from"../chunks/DxMC-E2z.js";import{e as T,s as j}from"../chunks/V6M2jInR.js";import{i as z}from"../chunks/BJWcdj5l.js";import{r as h}from"../chunks/HgGInnYf.js";import{b as _}from"../chunks/Cp1RMksV.js";import{g as A}from"../chunks/BEXiALSO.js";var B=w('<p class="error svelte-1uha8ag"> </p>'),D=w('<form class="login svelte-1uha8ag"><h2>Login</h2> <label class="svelte-1uha8ag">User <input type="text" required/></label> <label class="svelte-1uha8ag">Password <input type="password" required/></label> <button>Login</button> <!></form>');function M(y,x){O(x,!1);let s=v(""),e=v({username:"",password:""});async function k(){try{const a=await fetch("/login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(t(e))});if(!a.ok){b(s,await a.text());return}A("/shadowrun")}catch(a){b(s,a.message)}}J();var n=D(),l=r(o(n),2),u=r(o(l));h(u),i(l);var p=r(l,2),f=r(o(p));h(f),i(p);var c=r(p,2),C=r(c,2);{var L=a=>{var m=B(),q=o(m,!0);i(m),S(()=>j(q,t(s))),d(a,m)};z(C,a=>{t(s)&&a(L)})}i(n),_(u,()=>t(e).username,a=>g(e,t(e).username=a)),_(f,()=>t(e).password,a=>g(e,t(e).password=a)),T("click",c,k),d(y,n),P()}export{M as component};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
{"version":"1771789536194"}
{"version":"1771856210381"}

View File

@@ -5,11 +5,11 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
<link rel="modulepreload" href="./_app/immutable/entry/start.BnAWgAKt.js">
<link rel="modulepreload" href="./_app/immutable/chunks/niSfElle.js">
<link rel="modulepreload" href="./_app/immutable/entry/start.DL8ghe8B.js">
<link rel="modulepreload" href="./_app/immutable/chunks/BEXiALSO.js">
<link rel="modulepreload" href="./_app/immutable/chunks/DxMC-E2z.js">
<link rel="modulepreload" href="./_app/immutable/chunks/CgHyU30y.js">
<link rel="modulepreload" href="./_app/immutable/entry/app.CJZl1xEf.js">
<link rel="modulepreload" href="./_app/immutable/entry/app.fM2IB28Y.js">
<link rel="modulepreload" href="./_app/immutable/chunks/V6M2jInR.js">
<link rel="modulepreload" href="./_app/immutable/chunks/K5GTgIDA.js">
<link rel="modulepreload" href="./_app/immutable/chunks/BJWcdj5l.js">
@@ -20,15 +20,15 @@
<div style="display: contents">
<script>
{
__sveltekit_q0ydb3 = {
__sveltekit_dfa247 = {
base: new URL(".", location).pathname.slice(0, -1)
};
const element = document.currentScript.parentElement;
Promise.all([
import("./_app/immutable/entry/start.BnAWgAKt.js"),
import("./_app/immutable/entry/app.CJZl1xEf.js")
import("./_app/immutable/entry/start.DL8ghe8B.js"),
import("./_app/immutable/entry/app.fM2IB28Y.js")
]).then(([kit, app]) => {
kit.start(app, element);
});

View File

@@ -1,5 +0,0 @@
{
"http_port" : 3011,
"db_path": "shadowrun.db",
"domain": "http://192.168.1.101:3011"
}

View File

@@ -5,11 +5,11 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
<link rel="modulepreload" href="./_app/immutable/entry/start.BnAWgAKt.js">
<link rel="modulepreload" href="./_app/immutable/chunks/niSfElle.js">
<link rel="modulepreload" href="./_app/immutable/entry/start.DL8ghe8B.js">
<link rel="modulepreload" href="./_app/immutable/chunks/BEXiALSO.js">
<link rel="modulepreload" href="./_app/immutable/chunks/DxMC-E2z.js">
<link rel="modulepreload" href="./_app/immutable/chunks/CgHyU30y.js">
<link rel="modulepreload" href="./_app/immutable/entry/app.CJZl1xEf.js">
<link rel="modulepreload" href="./_app/immutable/entry/app.fM2IB28Y.js">
<link rel="modulepreload" href="./_app/immutable/chunks/V6M2jInR.js">
<link rel="modulepreload" href="./_app/immutable/chunks/K5GTgIDA.js">
<link rel="modulepreload" href="./_app/immutable/chunks/BJWcdj5l.js">
@@ -20,15 +20,15 @@
<div style="display: contents">
<script>
{
__sveltekit_q0ydb3 = {
__sveltekit_dfa247 = {
base: new URL(".", location).pathname.slice(0, -1)
};
const element = document.currentScript.parentElement;
Promise.all([
import("./_app/immutable/entry/start.BnAWgAKt.js"),
import("./_app/immutable/entry/app.CJZl1xEf.js")
import("./_app/immutable/entry/start.DL8ghe8B.js"),
import("./_app/immutable/entry/app.fM2IB28Y.js")
]).then(([kit, app]) => {
kit.start(app, element);
});

View File

@@ -1,6 +1,5 @@
<script lang="ts">
import { onMount } from 'svelte';
//import { API_BASE } from '$lib/config';
import { Defaults } from './defaults.svelte';
import type { Skill, Connection} from './types.svelte';
import { autoGrow } from '$lib/common/autogrow';
@@ -24,8 +23,10 @@
characterData.NegativeQualities ??= [];
characterData.PysicalCondition ??= Defaults.PysicalCondition
characterData.StunCondition ??= Defaults.StunCondition
characterData.Inventory ??= {};
characterData.Inventory ??= [];
characterData.Notes ??= {};
characterData.KnowledgeSkills ??= [];
characterData.Proficiencies ??= [];
let selectedDate : any = null // YYYY-MM-DD format
const characterInfoTypes = {
@@ -211,6 +212,65 @@
</table>
<button on:click={() => add("Skills")}>+</button>
<h2>Proficiencies</h2>
<table>
<thead>
<tr>
<th>Name</th>
<th>Page</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
{#each characterData.Proficiencies as proficiency, i}
<tr>
<td><textarea use:autoGrow class="input-height" rows="1" bind:value={characterData.Proficiencies[i].Name}></textarea></td>
<td><input type="number" min=1 max=354 bind:value={characterData.Proficiencies[i].Page} /></td>
<td><button on:click={() => viewPage(characterData.Proficiencies[i].Page)}>View</button></td>
<td><button class="red-button" on:click={() => remove("Proficiencies", i)}>X</button></td>
</tr>
{/each}
</tbody>
</table>
<button on:click={() => add("Proficiencies")}>+</button>
<h2>Knowledge Skills</h2>
<table>
<thead>
<tr>
<th>Name</th>
<th>Rating</th>
<th>Attribute</th>
<th>Dice</th>
<th>Page</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
{#each characterData.KnowledgeSkills as skill, i}
<tr>
<td><textarea use:autoGrow class="input-height" rows="1" bind:value={characterData.KnowledgeSkills[i].Name}></textarea></td>
<td><input type="number" min=0 max=100 bind:value={characterData.KnowledgeSkills[i].Rating} /></td>
<td><select bind:value={characterData.KnowledgeSkills[i].Attribute}>
{#each Object.keys(Defaults.Attributes) as attr}
<option value={attr}>{attr}</option>
{/each}
</select></td>
<td><span>{skill.Rating + characterData.Attributes[skill.Attribute]}</span></td>
<td><input type="number" min=1 max=354 bind:value={characterData.KnowledgeSkills[i].Page} /></td>
<td><button on:click={() => viewPage(characterData.KnowledgeSkills[i].Page)}>View</button></td>
<td><button class="red-button" on:click={() => remove("KnowledgeSkills", i)}>X</button></td>
</tr>
{/each}
</tbody>
</table>
<button on:click={() => add("KnowledgeSkills")}>+</button>
<h2>Contacts</h2>
<table>
<thead>
@@ -339,11 +399,12 @@
<tr>
<th>Cyberware</th>
<th>Rating</th>
<th>Capacity</th>
<th>Essence</th>
<th>Notes</th>
<th>Page</th>
<th></th>
<th></th> <!-- for remove button -->
<th></th>
</tr>
</thead>
<tbody>
@@ -351,6 +412,7 @@
<tr>
<td><input placeholder="Cyberware" bind:value={characterData.Cyberware[i].Implant} /></td>
<td><input type="number" min=0 max=100 bind:value={characterData.Cyberware[i].Rating} /></td>
<td><input type="number" min=0 max=100 bind:value={characterData.Cyberware[i].Capacity} /></td>
<td><input type="number" min=0 max=100 bind:value={characterData.Cyberware[i].Essence} /></td>
<td><input placeholder="Notes" bind:value={characterData.Cyberware[i].Notes} /></td>
<td><input type="number" min=1 max=354 bind:value={characterData.Connections[i].Page} /></td>
@@ -368,6 +430,7 @@
<tr>
<th>Bioware</th>
<th>Rating</th>
<th>Capacity</th>
<th>Essence</th>
<th>Notes</th>
<th>Page</th>
@@ -379,8 +442,9 @@
{#each characterData.Bioware as Bioware, i}
<tr>
<td><input placeholder="Bioware" bind:value={characterData.Bioware[i].Implant} /></td>
<td><input type="number" min="0" bind:value={characterData.Bioware[i].Rating} /></td>
<td><input type="number" min="0" bind:value={characterData.Bioware[i].Essence} /></td>
<td><input type="number" min=0 max=100 bind:value={characterData.Bioware[i].Rating} /></td>
<td><input type="number" min=0 max=100 bind:value={characterData.Bioware[i].Capacity} /></td>
<td><input type="number" min=0 max=100 bind:value={characterData.Bioware[i].Essence} /></td>
<td><input placeholder="Notes" bind:value={characterData.Bioware[i].Notes} /></td>
<td><input type="number" min=1 max=354 bind:value={characterData.Connections[i].Page} /></td>
<td><button on:click={() => viewPage(characterData.Connections[i].Page)}>View</button></td>
@@ -423,7 +487,7 @@
<th>Quality</th>
<th>Page</th>
<th></th>
<th></th> <!-- for remove button -->
<th></th>
</tr>
</thead>
<tbody>
@@ -491,8 +555,8 @@
{#each characterData.Inventory as inventory, i}
<tr>
<td><input placeholder="Item" bind:value={characterData.Inventory[i].Item} /></td>
<td><input type="number" min=1 max=354 bind:value={characterData.NegativeQualities[i].Quantity} /></td>
<td><input placeholder="Notes" bind:value={characterData.NegativeQualities[i].Notes} /></td>
<td><input type="number" min=1 max=354 bind:value={characterData.Inventory[i].Quantity} /></td>
<td><input placeholder="Notes" bind:value={characterData.Inventory[i].Notes} /></td>
<td><input type="number" min=1 max=354 bind:value={characterData.Inventory[i].Page} /></td>
<td><button on:click={() => viewPage(characterData.Inventory[i].Page)}>View</button></td>
<td><button class="red-button" on:click={() => remove("Inventory", i)}>X</button></td>

View File

@@ -30,7 +30,13 @@ const Attributes = {
const Skill = {
Name: "",
Rating: 0,
Attribute: Object.keys(Attributes)[0]
Attribute: Object.keys(Attributes)[0],
Page: 1,
}
const Proficiency = {
Name: "",
Page: 1,
}
const Connection = {
@@ -48,6 +54,7 @@ const RangedWeapon = {
RC: 0,
Ammo: 0,
Availabiliy: "",
Page: 1,
}
const MeleeWeapon = {
@@ -56,17 +63,21 @@ const MeleeWeapon = {
Damage: 1,
"Strength Multiplier" : 0.5,
AP: 0,
Page: 1,
};
const Implant = {
Implant: "",
Rating: 0,
Capacity: 0,
Essence: 0,
Notes: "",
Page: 1,
}
const Qualitiy = {
Qualitiy : ""
Qualitiy : "",
Page: 1,
}
const PysicalCondition = Array.from({ length: 6 }, () =>
@@ -78,20 +89,23 @@ const StunCondition = Array.from({ length: 4 }, () =>
const Armor = {
Armor: "",
Ballistic: 0,
Impact: 0
Impact: 0,
Page: 1,
}
const Inventory = {
Item: "",
Quantity: 1,
Notes: "",
Page: 1
Page: 1,
}
export const Defaults = {
Info: Info,
Attributes: Attributes,
Skills: Skill,
Proficiencies: Proficiency,
KnowledgeSkills: Skill,
Connections: Connection,
RangedWeapons : RangedWeapon,
MeleeWeapons : MeleeWeapon,

29
release.sh Executable file
View File

@@ -0,0 +1,29 @@
# get the varaibles from PKGBUILD
source ./PKGBUILD
# assets to pack in the tar ball
ASSETS=(
"source/"
"modules/"
"assets/"
"frontend/build/"
"shadowrun-server.service"
"CMakeLists.txt"
"shadowrun-server.install"
)
# create the tar ball
tar czf ${pkgname}-${pkgver}.tar.gz "${ASSETS[@]}"
# create the package
makepkg -f
# create the release directory and store all files there
RELEASE_DIR="release-${pkgver}/"
mkdir -p ${RELEASE_DIR}
mv ${pkgname}-${pkgver}.tar.gz ${RELEASE_DIR}
mv ${pkgname}-${pkgver}-1-x86_64.pkg.tar.zst ${RELEASE_DIR}
mv ${pkgname}-debug-${pkgver}-1-x86_64.pkg.tar.zst ${RELEASE_DIR}
mv src/ ${RELEASE_DIR}
#scp ${RELEASE_DIR}${pkgname}-${pkgver}-1-x86_64.pkg.tar.zst lukas@192.168.1.101:/home/lukas/Drive/archrepo/x86_64/

View File

@@ -22,7 +22,9 @@ namespace shadowrun {
PositiveQualities = 9,
NegativeQualities = 10,
Notes = 11,
Inventory = 12,
Inventory = 12,
KnowledgeSkills = 13,
Proficiencies = 14,
};
struct ShadowrunCharacter {