Skip to content

Commit cecfd61

Browse files
committed
remove obsolete
1 parent b6f2d46 commit cecfd61

File tree

2 files changed

+0
-44
lines changed

2 files changed

+0
-44
lines changed

src/dashboard/Settings/DashboardSettings/DashboardSettings.react.js

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ export default class DashboardSettings extends DashboardView {
4242
passwordInput: '',
4343
passwordHidden: true,
4444
migrationLoading: false,
45-
hasServerViews: false,
4645
storagePreference: 'local', // Will be updated in componentDidMount
4746
copyData: {
4847
data: '',
@@ -64,7 +63,6 @@ export default class DashboardSettings extends DashboardView {
6463
initializeViewPreferencesManager() {
6564
if (this.context) {
6665
this.viewPreferencesManager = new ViewPreferencesManager(this.context);
67-
this.checkServerViews();
6866
this.loadStoragePreference();
6967
}
7068
}
@@ -86,17 +84,6 @@ export default class DashboardSettings extends DashboardView {
8684
}
8785
}
8886

89-
async checkServerViews() {
90-
if (this.viewPreferencesManager) {
91-
try {
92-
const hasServerViews = await this.viewPreferencesManager.hasServerViews(this.context.applicationId);
93-
this.setState({ hasServerViews });
94-
} catch (error) {
95-
console.error('Failed to check server views:', error);
96-
}
97-
}
98-
}
99-
10087
async migrateToServer() {
10188
if (!this.viewPreferencesManager) {
10289
this.showNote('ViewPreferencesManager not initialized');
@@ -115,7 +102,6 @@ export default class DashboardSettings extends DashboardView {
115102
if (result.success) {
116103
if (result.viewCount > 0) {
117104
this.showNote(`Successfully migrated ${result.viewCount} view(s) to server storage.`);
118-
this.setState({ hasServerViews: true });
119105
} else {
120106
this.showNote('No views found to migrate.');
121107
}
@@ -524,17 +510,6 @@ export default class DashboardSettings extends DashboardView {
524510
/>
525511
}
526512
/>
527-
{this.state.hasServerViews && (
528-
<Field
529-
label={
530-
<Label
531-
text="Server Configuration Status"
532-
description="Views are currently being loaded from server storage."
533-
/>
534-
}
535-
input={<div style={{color: 'green', fontWeight: 'bold'}}>✓ Using Server Storage</div>}
536-
/>
537-
)}
538513
</Fieldset>
539514
)}
540515
{this.state.copyData.show && copyData}

src/lib/ViewPreferencesManager.js

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -106,25 +106,6 @@ export default class ViewPreferencesManager {
106106
}
107107
}
108108

109-
/**
110-
* Checks if there are views stored on the server
111-
* @param {string} appId - The application ID
112-
* @returns {Promise<boolean>}
113-
*/
114-
async hasServerViews(appId) {
115-
if (!this.serverStorage.isServerConfigEnabled()) {
116-
return false;
117-
}
118-
119-
try {
120-
const serverViews = await this._getViewsFromServer(appId);
121-
return serverViews && serverViews.length > 0;
122-
} catch (error) {
123-
console.error('Failed to check server views:', error);
124-
return false;
125-
}
126-
}
127-
128109
/**
129110
* Sets the storage preference for the app
130111
* @param {string} appId - The application ID

0 commit comments

Comments
 (0)