File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { App , Plugin , PluginSettingTab , Setting } from "obsidian" ;
22import { TokenStyle } from "./metadata-utils" ;
3+ import { MigrationModal } from "./migration-modal" ;
34
45export interface EmbedMetadataSettings {
56 tokenStyle : TokenStyle ;
@@ -161,5 +162,25 @@ export class EmbedMetadataSettingTab extends PluginSettingTab {
161162 await this . plugin . saveSettings ( ) ;
162163 } ) ;
163164 } ) ;
165+
166+ containerEl . createEl ( "h3" , { text : "Migration" } ) ;
167+
168+ new Setting ( containerEl )
169+ . setName ( "Migrate from Dataview" )
170+ . setDesc ( "Convert backticked `=this.key` tokens to the selected format." )
171+ . addButton ( ( button ) => {
172+ button . setButtonText ( "Review" ) . onClick ( ( ) => {
173+ new MigrationModal ( this . app , this . plugin , "dataview" ) . open ( ) ;
174+ } ) ;
175+ } ) ;
176+
177+ new Setting ( containerEl )
178+ . setName ( "Migrate to current syntax" )
179+ . setDesc ( "Convert other supported token formats to the selected format." )
180+ . addButton ( ( button ) => {
181+ button . setButtonText ( "Review" ) . onClick ( ( ) => {
182+ new MigrationModal ( this . app , this . plugin , "otherSyntax" ) . open ( ) ;
183+ } ) ;
184+ } ) ;
164185 }
165186}
Original file line number Diff line number Diff line change 1717 padding : 0 2px ;
1818}
1919
20+ .embed-metadata-migration-actions {
21+ display : flex;
22+ gap : 8px ;
23+ align-items : center;
24+ margin-top : 12px ;
25+ }
26+
2027.embed-metadata-hoverable : hover {
2128 filter : brightness (1.15 );
2229}
You can’t perform that action at this time.
0 commit comments