notes-to-strapi-export-article-ai 3.0.170 → 3.0.171

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/manifest.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "notes-to-strapi-export-article-ai",
3
3
  "name": "Strapi Exporter AI",
4
- "version": "3.0.170",
4
+ "version": "3.0.171",
5
5
  "minAppVersion": "1.7.0",
6
6
  "description": "Effortlessly export your notes to Strapi CMS with AI-powered handling and SEO optimization.",
7
7
  "author": "Cinquin Andy",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "notes-to-strapi-export-article-ai",
3
- "version": "3.0.170",
3
+ "version": "3.0.171",
4
4
  "description": "Effortlessly export your Obsidian notes to Strapi CMS with AI-powered image handling and SEO optimization. Replace all the images in your notes by uploaded images in Strapi, and add SEO metadata to uploaded images.",
5
5
  "main": "main.js",
6
6
  "scripts": {
@@ -41,7 +41,11 @@ export class Configuration {
41
41
  this.plugin = plugin
42
42
  this.containerEl = containerEl
43
43
  this.app = plugin.app
44
- this.currentRouteId = this.plugin.settings.routes[0]?.id || ''
44
+ // Use persisted route ID or default to first route
45
+ this.currentRouteId =
46
+ this.plugin.settings.currentConfigRouteId ||
47
+ this.plugin.settings.routes[0]?.id ||
48
+ ''
45
49
 
46
50
  // Initialiser les services avec la clé API
47
51
  this.initializeServices()
@@ -115,6 +119,9 @@ export class Configuration {
115
119
  dropdown.setValue(this.currentRouteId)
116
120
  dropdown.onChange(async value => {
117
121
  this.currentRouteId = value
122
+ // Persist the selected route ID
123
+ this.plugin.settings.currentConfigRouteId = value
124
+ await this.plugin.saveSettings()
118
125
  await this.updateConfigurationFields()
119
126
  })
120
127
  })
@@ -492,6 +499,11 @@ export class Configuration {
492
499
  currentRoute.language || 'en'
493
500
  )
494
501
  }
502
+ if (this.components.contentFieldInput) {
503
+ this.components.contentFieldInput.setValue(
504
+ currentRoute.contentField || 'content'
505
+ )
506
+ }
495
507
  }
496
508
  } catch (error) {
497
509
  this.showError('Failed to update configuration fields' + error.message)
@@ -9,6 +9,7 @@ export interface StrapiExporterSettings {
9
9
 
10
10
  // UI Settings
11
11
  currentTab: string
12
+ currentConfigRouteId?: string // Persist selected route in Configuration tab
12
13
 
13
14
  // Routes Configuration
14
15
  routes: RouteConfig[]