Remove newbie mode

This commit is contained in:
Cohee 2024-09-01 17:39:36 +03:00
parent f1a6303760
commit 9ae7325100
3 changed files with 2 additions and 54 deletions

View File

@ -3759,10 +3759,6 @@
<div class="flex-container">
<div class="flex-container flexnowrap alignItemsBaseline">
<h3 class="margin0"><span data-i18n="User Settings">User Settings</span></h3>
<select id="ui_mode_select" class="margin0 widthNatural">
<option value="0" data-i18n="Simple">Simple</option>
<option value="1" data-i18n="Advanced">Advanced</option>
</select>
</div>
</div>
<div id="UI-language-block" class="flex-container alignItemsBaseline">
@ -5882,21 +5878,6 @@
<b data-i18n="SillyTavern is aimed at advanced users.">
SillyTavern is aimed at advanced users.
</b>
<div>
<span data-i18n="If you're new to this, enable the simplified UI mode below.">
If you're new to this, enable the simplified UI mode below.
</span>
<br>
<span data-i18n="Change it later in the 'User Settings' panel.">
Change it later in the 'User Settings' panel.
</span>
</div>
<label class="checkbox_label">
<input type="checkbox" name="enable_simple_mode" />
<span data-i18n="Enable simple UI mode">
Enable simple UI mode
</span>
</label>
<div class="expander"></div>
<div class="textAlignCenter">
<h3 data-i18n="Looking for AI characters?">
@ -6610,4 +6591,4 @@
</script>
</body>
</html>
</html>

View File

@ -78,8 +78,6 @@ import {
renderStoryString,
sortEntitiesList,
registerDebugFunction,
ui_mode,
switchSimpleMode,
flushEphemeralStoppingStrings,
context_presets,
resetMovableStyles,
@ -6320,15 +6318,11 @@ export function setUserName(value) {
}
async function doOnboarding(avatarId) {
let simpleUiMode = false;
const template = $('#onboarding_template .onboarding');
template.find('input[name="enable_simple_mode"]').on('input', function () {
simpleUiMode = $(this).is(':checked');
});
let userName = await callGenericPopup(template, POPUP_TYPE.INPUT, currentUser?.name || name1, { rows: 2, wide: true, large: true });
if (userName) {
userName = userName.replace('\n', ' ');
userName = String(userName).replace('\n', ' ');
setUserName(userName);
console.log(`Binding persona ${avatarId} to name ${userName}`);
power_user.personas[avatarId] = userName;
@ -6337,12 +6331,6 @@ async function doOnboarding(avatarId) {
position: persona_description_positions.IN_PROMPT,
};
}
if (simpleUiMode) {
power_user.ui_mode = ui_mode.SIMPLE;
$('#ui_mode_select').val(power_user.ui_mode);
switchSimpleMode();
}
}
function reloadLoop() {

View File

@ -75,11 +75,6 @@ const defaultStoryString = '{{#if system}}{{system}}\n{{/if}}{{#if description}}
const defaultExampleSeparator = '***';
const defaultChatStart = '***';
export const ui_mode = {
SIMPLE: 0,
POWER: 1,
};
const avatar_styles = {
ROUND: 0,
RECTANGULAR: 1,
@ -132,7 +127,6 @@ let power_user = {
smooth_streaming: false,
smooth_streaming_speed: 50,
ui_mode: ui_mode.POWER,
fast_ui_mode: true,
avatar_style: avatar_styles.ROUND,
chat_display: chat_styles.DEFAULT,
@ -331,12 +325,6 @@ const debug_functions = [];
const setHotswapsDebounced = debounce(favsToHotswap);
export function switchSimpleMode() {
$('[data-newbie-hidden]').each(function () {
$(this).toggleClass('displayNone', power_user.ui_mode === ui_mode.SIMPLE);
});
}
function playMessageSound() {
if (!power_user.play_message_sound) {
return;
@ -1586,7 +1574,6 @@ async function loadPowerUserSettings(settings, data) {
$('#bot-mes-blur-tint-color-picker').attr('color', power_user.bot_mes_blur_tint_color);
$('#shadow-color-picker').attr('color', power_user.shadow_color);
$('#border-color-picker').attr('color', power_user.border_color);
$('#ui_mode_select').val(power_user.ui_mode).find(`option[value="${power_user.ui_mode}"]`).attr('selected', true);
$('#reduced_motion').prop('checked', power_user.reduced_motion);
$('#auto-connect-checkbox').prop('checked', power_user.auto_connect);
$('#auto-load-chat-checkbox').prop('checked', power_user.auto_load_chat);
@ -1620,7 +1607,6 @@ async function loadPowerUserSettings(settings, data) {
switchSpoilerMode();
loadMovingUIState();
loadCharListState();
switchSimpleMode();
}
async function loadCharListState() {
@ -3686,13 +3672,6 @@ $(document).ready(() => {
showDebugMenu();
});
$('#ui_mode_select').on('change', function () {
const value = $(this).find(':selected').val();
power_user.ui_mode = Number(value);
switchSimpleMode();
saveSettingsDebounced();
});
$('#bogus_folders').on('input', function () {
power_user.bogus_folders = !!$(this).prop('checked');
printCharactersDebounced();