You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.4 KiB
51 lines
1.4 KiB
package com.fr.plugin; |
|
|
|
import com.fr.decision.config.AppearanceConfig; |
|
import com.fr.plugin.context.PluginContexts; |
|
import com.fr.web.struct.AssembleComponent; |
|
import com.fr.web.struct.Atom; |
|
import com.fr.web.struct.Component; |
|
import com.fr.web.struct.browser.RequestClient; |
|
import com.fr.web.struct.category.FileType; |
|
import com.fr.web.struct.category.ParserType; |
|
import com.fr.web.struct.category.ScriptPath; |
|
import com.fr.web.struct.category.StylePath; |
|
import com.fr.web.struct.Filter; |
|
|
|
|
|
public class SimpleComponent extends AssembleComponent { |
|
|
|
public static final SimpleComponent KEY = new SimpleComponent(); |
|
|
|
|
|
@Override |
|
public Atom[] refer() { |
|
return new Atom[]{ |
|
|
|
}; |
|
} |
|
|
|
@Override |
|
public ScriptPath script() { |
|
if (PluginContexts.currentContext().isAvailable()) { |
|
return ScriptPath.build("com/fr/plugin/theme/simple-only/web/theme.js"); |
|
}else{ |
|
return ScriptPath.build("com/fr/plugin/theme/simple-only/web/themebuy.js"); |
|
|
|
} |
|
} |
|
|
|
@Override |
|
public StylePath style() { |
|
return StylePath.build("com/fr/plugin/theme/simple/web/style.css", ParserType.DYNAMIC); |
|
} |
|
|
|
@Override |
|
public Filter filter() { |
|
return new Filter() { |
|
public boolean accept() { |
|
return "com.eco.plugin.xxxx.theme.simple".equals(AppearanceConfig.getInstance().getThemeId()); |
|
} |
|
}; |
|
} |
|
}
|
|
|