Removed references to tagsMode setting

This commit is contained in:
Alejandro Celaya 2022-12-17 19:59:55 +01:00
parent 37caa1ad19
commit 170f45d46b
3 changed files with 0 additions and 16 deletions

View file

@ -11,12 +11,5 @@ export const migrateDeprecatedSettings = (state: Partial<ShlinkState>): Partial<
state.settings.visits && (state.settings.visits.defaultInterval = 'last180Days');
}
// The "tags display mode" option has been moved from "ui" to "tags"
state.settings.tags = {
...state.settings.tags,
defaultMode: state.settings.tags?.defaultMode ?? (state.settings.ui as any)?.tagsMode,
};
state.settings.ui && delete (state.settings.ui as any).tagsMode;
return state;
};

View file

@ -28,8 +28,6 @@ export interface ShortUrlCreationSettings {
forwardQuery?: boolean;
}
export type TagsMode = 'cards' | 'list';
export interface UiSettings {
theme: Theme;
}
@ -40,7 +38,6 @@ export interface VisitsSettings {
export interface TagsSettings {
defaultOrdering?: TagsOrder;
defaultMode?: TagsMode;
}
export interface ShortUrlsListSettings {

View file

@ -14,9 +14,6 @@ describe('settings-helpers', () => {
visits: {
defaultInterval: 'last180days' as any,
},
ui: {
tagsMode: 'list',
} as any,
},
});
@ -25,9 +22,6 @@ describe('settings-helpers', () => {
visits: {
defaultInterval: 'last180Days',
},
tags: {
defaultMode: 'list',
},
}),
}));
});