Remove newbie mode

9ae7325100ec736bc64da08dd22d35c53ea0b947

Cohee <18619528+Cohee1207@users.noreply.github.com>

3 files changed, +1 -53Showing whitespace changes
public/index.html+0 -19
@@ -3759,10 +3759,6 @@
3759 <div class="flex-container">3759 <div class="flex-container">
3760 <div class="flex-container flexnowrap alignItemsBaseline">3760 <div class="flex-container flexnowrap alignItemsBaseline">
3761 <h3 class="margin0"><span data-i18n="User Settings">User Settings</span></h3>3761 <h3 class="margin0"><span data-i18n="User Settings">User Settings</span></h3>
3762 <select id="ui_mode_select" class="margin0 widthNatural">
3763 <option value="0" data-i18n="Simple">Simple</option>
3764 <option value="1" data-i18n="Advanced">Advanced</option>
3765 </select>
3766 </div>3762 </div>
3767 </div>3763 </div>
3768 <div id="UI-language-block" class="flex-container alignItemsBaseline">3764 <div id="UI-language-block" class="flex-container alignItemsBaseline">
@@ -5882,21 +5878,6 @@
5882 <b data-i18n="SillyTavern is aimed at advanced users.">5878 <b data-i18n="SillyTavern is aimed at advanced users.">
5883 SillyTavern is aimed at advanced users.5879 SillyTavern is aimed at advanced users.
5884 </b>5880 </b>
5885 <div>
5886 <span data-i18n="If you're new to this, enable the simplified UI mode below.">
5887 If you're new to this, enable the simplified UI mode below.
5888 </span>
5889 <br>
5890 <span data-i18n="Change it later in the 'User Settings' panel.">
5891 Change it later in the 'User Settings' panel.
5892 </span>
5893 </div>
5894 <label class="checkbox_label">
5895 <input type="checkbox" name="enable_simple_mode" />
5896 <span data-i18n="Enable simple UI mode">
5897 Enable simple UI mode
5898 </span>
5899 </label>
5900 <div class="expander"></div>5881 <div class="expander"></div>
5901 <div class="textAlignCenter">5882 <div class="textAlignCenter">
5902 <h3 data-i18n="Looking for AI characters?">5883 <h3 data-i18n="Looking for AI characters?">
public/script.js+1 -13
@@ -78,8 +78,6 @@ import {
78 renderStoryString,78 renderStoryString,
79 sortEntitiesList,79 sortEntitiesList,
80 registerDebugFunction,80 registerDebugFunction,
81 ui_mode,
82 switchSimpleMode,
83 flushEphemeralStoppingStrings,81 flushEphemeralStoppingStrings,
84 context_presets,82 context_presets,
85 resetMovableStyles,83 resetMovableStyles,
@@ -6320,15 +6318,11 @@ export function setUserName(value) {
6320}6318}
63216319
6322async function doOnboarding(avatarId) {6320async function doOnboarding(avatarId) {
6323 let simpleUiMode = false;
6324 const template = $('#onboarding_template .onboarding');6321 const template = $('#onboarding_template .onboarding');
6325 template.find('input[name="enable_simple_mode"]').on('input', function () {
6326 simpleUiMode = $(this).is(':checked');
6327 });
6328 let userName = await callGenericPopup(template, POPUP_TYPE.INPUT, currentUser?.name || name1, { rows: 2, wide: true, large: true });6322 let userName = await callGenericPopup(template, POPUP_TYPE.INPUT, currentUser?.name || name1, { rows: 2, wide: true, large: true });
63296323
6330 if (userName) {6324 if (userName) {
6331 userName = userName.replace('\n', ' ');6325 userName = String(userName).replace('\n', ' ');
6332 setUserName(userName);6326 setUserName(userName);
6333 console.log(`Binding persona ${avatarId} to name ${userName}`);6327 console.log(`Binding persona ${avatarId} to name ${userName}`);
6334 power_user.personas[avatarId] = userName;6328 power_user.personas[avatarId] = userName;
@@ -6337,12 +6331,6 @@ async function doOnboarding(avatarId) {
6337 position: persona_description_positions.IN_PROMPT,6331 position: persona_description_positions.IN_PROMPT,
6338 };6332 };
6339 }6333 }
6340
6341 if (simpleUiMode) {
6342 power_user.ui_mode = ui_mode.SIMPLE;
6343 $('#ui_mode_select').val(power_user.ui_mode);
6344 switchSimpleMode();
6345 }
6346}6334}
63476335
6348function reloadLoop() {6336function reloadLoop() {
public/scripts/power-user.js+0 -21
@@ -75,11 +75,6 @@ const defaultStoryString = '{{#if system}}{{system}}\n{{/if}}{{#if description}}
75const defaultExampleSeparator = '***';75const defaultExampleSeparator = '***';
76const defaultChatStart = '***';76const defaultChatStart = '***';
7777
78export const ui_mode = {
79 SIMPLE: 0,
80 POWER: 1,
81};
82
83const avatar_styles = {78const avatar_styles = {
84 ROUND: 0,79 ROUND: 0,
85 RECTANGULAR: 1,80 RECTANGULAR: 1,
@@ -132,7 +127,6 @@ let power_user = {
132 smooth_streaming: false,127 smooth_streaming: false,
133 smooth_streaming_speed: 50,128 smooth_streaming_speed: 50,
134129
135 ui_mode: ui_mode.POWER,
136 fast_ui_mode: true,130 fast_ui_mode: true,
137 avatar_style: avatar_styles.ROUND,131 avatar_style: avatar_styles.ROUND,
138 chat_display: chat_styles.DEFAULT,132 chat_display: chat_styles.DEFAULT,
@@ -331,12 +325,6 @@ const debug_functions = [];
331325
332const setHotswapsDebounced = debounce(favsToHotswap);326const setHotswapsDebounced = debounce(favsToHotswap);
333327
334export function switchSimpleMode() {
335 $('[data-newbie-hidden]').each(function () {
336 $(this).toggleClass('displayNone', power_user.ui_mode === ui_mode.SIMPLE);
337 });
338}
339
340function playMessageSound() {328function playMessageSound() {
341 if (!power_user.play_message_sound) {329 if (!power_user.play_message_sound) {
342 return;330 return;
@@ -1586,7 +1574,6 @@ async function loadPowerUserSettings(settings, data) {
1586 $('#bot-mes-blur-tint-color-picker').attr('color', power_user.bot_mes_blur_tint_color);1574 $('#bot-mes-blur-tint-color-picker').attr('color', power_user.bot_mes_blur_tint_color);
1587 $('#shadow-color-picker').attr('color', power_user.shadow_color);1575 $('#shadow-color-picker').attr('color', power_user.shadow_color);
1588 $('#border-color-picker').attr('color', power_user.border_color);1576 $('#border-color-picker').attr('color', power_user.border_color);
1589 $('#ui_mode_select').val(power_user.ui_mode).find(`option[value="${power_user.ui_mode}"]`).attr('selected', true);
1590 $('#reduced_motion').prop('checked', power_user.reduced_motion);1577 $('#reduced_motion').prop('checked', power_user.reduced_motion);
1591 $('#auto-connect-checkbox').prop('checked', power_user.auto_connect);1578 $('#auto-connect-checkbox').prop('checked', power_user.auto_connect);
1592 $('#auto-load-chat-checkbox').prop('checked', power_user.auto_load_chat);1579 $('#auto-load-chat-checkbox').prop('checked', power_user.auto_load_chat);
@@ -1620,7 +1607,6 @@ async function loadPowerUserSettings(settings, data) {
1620 switchSpoilerMode();1607 switchSpoilerMode();
1621 loadMovingUIState();1608 loadMovingUIState();
1622 loadCharListState();1609 loadCharListState();
1623 switchSimpleMode();
1624}1610}
16251611
1626async function loadCharListState() {1612async function loadCharListState() {
@@ -3686,13 +3672,6 @@ $(document).ready(() => {
3686 showDebugMenu();3672 showDebugMenu();
3687 });3673 });
36883674
3689 $('#ui_mode_select').on('change', function () {
3690 const value = $(this).find(':selected').val();
3691 power_user.ui_mode = Number(value);
3692 switchSimpleMode();
3693 saveSettingsDebounced();
3694 });
3695
3696 $('#bogus_folders').on('input', function () {3675 $('#bogus_folders').on('input', function () {
3697 power_user.bogus_folders = !!$(this).prop('checked');3676 power_user.bogus_folders = !!$(this).prop('checked');
3698 printCharactersDebounced();3677 printCharactersDebounced();