Browse Source

change default local_settings

closed-social-glitch-2
欧醚 1 year ago
parent
commit
3799df29db
3 changed files with 6 additions and 6 deletions
  1. +1
    -1
      app/javascript/flavours/glitch/actions/local_settings.js
  2. +1
    -1
      app/javascript/flavours/glitch/initial_state.js
  3. +4
    -4
      app/javascript/flavours/glitch/reducers/local_settings.js

+ 1
- 1
app/javascript/flavours/glitch/actions/local_settings.js View File

@ -72,6 +72,6 @@ export function deleteLocalSetting(key) {
export function saveLocalSettings() {
return (_, getState) => {
const localSettings = getState().get('local_settings').toJS();
localStorage.setItem('mastodon-settings', JSON.stringify(localSettings));
localStorage.setItem('mastodon-settings:v2', JSON.stringify(localSettings));
};
}

+ 1
- 1
app/javascript/flavours/glitch/initial_state.js View File

@ -97,7 +97,7 @@ const initialState = element?.textContent && JSON.parse(element.textContent);
// Glitch-soc-specific “local settings”
try {
initialState.local_settings = JSON.parse(localStorage.getItem('mastodon-settings'));
initialState.local_settings = JSON.parse(localStorage.getItem('mastodon-settings:v2'));
} catch (e) {
initialState.local_settings = {};
}

+ 4
- 4
app/javascript/flavours/glitch/reducers/local_settings.js View File

@ -20,7 +20,7 @@ const initialState = ImmutableMap({
preselect_on_reply: true,
inline_preview_cards: true,
hicolor_privacy_icons: false,
show_content_type_choice: false,
show_content_type_choice: true,
tag_misleading_links: true,
rewrite_mentions: 'no',
content_warnings : ImmutableMap({
@ -47,7 +47,7 @@ const initialState = ImmutableMap({
}),
media : ImmutableMap({
letterbox : true,
fullwidth : true,
fullwidth : false,
reveal_behind_cw : false,
pop_in_player : true,
pop_in_position : 'right',
@ -57,10 +57,10 @@ const initialState = ImmutableMap({
tab_badge : true,
}),
status_icons : ImmutableMap({
language: true,
language: false,
reply: true,
local_only: true,
media: true,
media: false,
visibility: true,
}),
});

Loading…
Cancel
Save