Updated Profectus
This commit is contained in:
parent
a195c2819f
commit
3e4eaa8c18
4 changed files with 1661 additions and 177 deletions
1772
package-lock.json
generated
1772
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -56,6 +56,6 @@
|
|||
"vue-tsc": "^0.38.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "16.x"
|
||||
"node": "19.x"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,26 +3,13 @@
|
|||
<template v-slot:header>
|
||||
<div class="header">
|
||||
<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>
|
||||
</template>
|
||||
<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" />
|
||||
<component :is="settingFieldsComponent" />
|
||||
<Toggle :title="showTPSTitle" v-model="showTPS" />
|
||||
<Toggle :title="alignModifierUnitsTitle" v-model="alignUnits" />
|
||||
</div>
|
||||
<Select :title="themeTitle" :options="themes" v-model="theme" />
|
||||
<component :is="settingFieldsComponent" />
|
||||
<Toggle :title="showTPSTitle" v-model="showTPS" />
|
||||
<Toggle :title="alignModifierUnitsTitle" v-model="alignUnits" />
|
||||
</template>
|
||||
</Modal>
|
||||
</template>
|
||||
|
|
|
@ -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>) {
|
||||
|
|
Loading…
Add table
Reference in a new issue