Updated Profectus
Some checks failed
Build and Deploy / build-and-deploy (push) Successful in 1m7s
Run Tests / test (push) Failing after 2m5s

This commit is contained in:
thepaperpilot 2024-01-28 12:27:09 -06:00
parent a195c2819f
commit 3e4eaa8c18
4 changed files with 1661 additions and 177 deletions

1772
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -56,6 +56,6 @@
"vue-tsc": "^0.38.1" "vue-tsc": "^0.38.1"
}, },
"engines": { "engines": {
"node": "16.x" "node": "19.x"
} }
} }

View file

@ -3,26 +3,13 @@
<template v-slot:header> <template v-slot:header>
<div class="header"> <div class="header">
<h2>Settings</h2> <h2>Settings</h2>
<div class="option-tabs">
<button :class="{selected: isTab('behaviour')}" @click="setTab('behaviour')">Behaviour</button>
<button :class="{selected: isTab('appearance')}" @click="setTab('appearance')">Appearance</button>
</div>
</div> </div>
</template> </template>
<template v-slot:body> <template v-slot:body>
<div v-if="isTab('behaviour')">
<Toggle :title="unthrottledTitle" v-model="unthrottled" />
<Toggle v-if="projInfo.enablePausing" :title="isPausedTitle" v-model="isPaused" />
<Toggle :title="offlineProdTitle" v-model="offlineProd" />
<Toggle :title="autosaveTitle" v-model="autosave" />
<FeedbackButton v-if="!autosave" class="button save-button" @click="save()">Manually save</FeedbackButton>
</div>
<div v-if="isTab('appearance')">
<Select :title="themeTitle" :options="themes" v-model="theme" /> <Select :title="themeTitle" :options="themes" v-model="theme" />
<component :is="settingFieldsComponent" /> <component :is="settingFieldsComponent" />
<Toggle :title="showTPSTitle" v-model="showTPS" /> <Toggle :title="showTPSTitle" v-model="showTPS" />
<Toggle :title="alignModifierUnitsTitle" v-model="alignUnits" /> <Toggle :title="alignModifierUnitsTitle" v-model="alignUnits" />
</div>
</template> </template>
</Modal> </Modal>
</template> </template>

View file

@ -72,49 +72,6 @@ globalBus.on("loadSettings", settings => {
} }
} }
); );
registerSettingField(
jsx(() => (
<>
<Text
title="Server URL"
onUpdate:modelValue={value => (settings.server = value)}
modelValue={settings.server}
/>
<div style="font-style: italic; font-size: small; margin-top: -10px;">
{connected.value ? (
<span>Connected!</span>
) : connectionError.value ? (
<span style="color: red">{connectionError.value}</span>
) : (
<span>Connecting...</span>
)}
</div>
</>
))
);
registerSettingField(
jsx(() => (
<>
<Text
title={jsx(() => (
<span>
Nickname
<button
class="button"
style="position: absolute; right: 0px; top: 2px;"
onClick={() => (settings.nickname = randomName())}
>
<span class="material-icons">casino</span>
</button>
</span>
))}
onUpdate:modelValue={value => (settings.nickname = value)}
modelValue={settings.nickname}
/>
</>
))
);
}); });
function setupSocket(socket: Socket<ServerToClientEvents, ClientToServerEvents>) { function setupSocket(socket: Socket<ServerToClientEvents, ClientToServerEvents>) {