@@ -35,6 +35,7 @@ import {
3535} from "./components/AutoComplete" ;
3636import { HabitList } from "./components/HabitSettingList" ;
3737import { ConfirmModal } from "./components/ConfirmModal" ;
38+ import { getTasksAPI } from "./utils" ;
3839
3940export class TaskProgressBarSettingTab extends PluginSettingTab {
4041 plugin : TaskProgressBarPlugin ;
@@ -934,6 +935,49 @@ export class TaskProgressBarSettingTab extends PluginSettingTab {
934935 . setDesc ( t ( "Configure task status settings" ) )
935936 . setHeading ( ) ;
936937
938+ // Check if Tasks plugin is installed and show compatibility warning
939+ const tasksAPI = getTasksAPI ( this . plugin ) ;
940+ if ( tasksAPI ) {
941+ const warningBanner = containerEl . createDiv ( {
942+ cls : "tasks-compatibility-warning" ,
943+ } ) ;
944+
945+ warningBanner . createEl ( "div" , {
946+ cls : "tasks-warning-icon" ,
947+ text : "⚠️" ,
948+ } ) ;
949+
950+ const warningContent = warningBanner . createDiv ( {
951+ cls : "tasks-warning-content" ,
952+ } ) ;
953+
954+ warningContent . createEl ( "div" , {
955+ cls : "tasks-warning-title" ,
956+ text : t ( "Tasks Plugin Detected" ) ,
957+ } ) ;
958+
959+ const warningText = warningContent . createEl ( "div" , {
960+ cls : "tasks-warning-text" ,
961+ } ) ;
962+
963+ warningText . createEl ( "span" , {
964+ text : t (
965+ "Current status management and date management may conflict with the Tasks plugin. Please check the "
966+ ) ,
967+ } ) ;
968+
969+ const compatibilityLink = warningText . createEl ( "a" , {
970+ text : t ( "compatibility documentation" ) ,
971+ href : "https://taskgenius.md/docs/compatibility" ,
972+ } ) ;
973+ compatibilityLink . setAttribute ( "target" , "_blank" ) ;
974+ compatibilityLink . setAttribute ( "rel" , "noopener noreferrer" ) ;
975+
976+ warningText . createEl ( "span" , {
977+ text : t ( " for more information." ) ,
978+ } ) ;
979+ }
980+
937981 new Setting ( containerEl )
938982 . setName ( t ( "Auto complete parent task" ) )
939983 . setDesc (
0 commit comments