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.
52 lines
1.6 KiB
52 lines
1.6 KiB
3 years ago
|
package com.fr.plugin.xx.theme.jsd10028;
|
||
|
|
||
|
import com.fr.decision.config.AppearanceConfig;
|
||
|
import com.fr.intelli.record.Focus;
|
||
|
import com.fr.intelli.record.Original;
|
||
|
import com.fr.plugin.context.PluginContexts;
|
||
|
import com.fr.plugin.transform.FunctionRecorder;
|
||
|
import com.fr.record.analyzer.EnableMetrics;
|
||
|
import com.fr.web.struct.Component;
|
||
|
import com.fr.web.struct.Filter;
|
||
|
import com.fr.web.struct.category.ParserType;
|
||
|
import com.fr.web.struct.category.ScriptPath;
|
||
|
import com.fr.web.struct.category.StylePath;
|
||
|
|
||
|
@EnableMetrics
|
||
|
@FunctionRecorder
|
||
|
public class KunlunComponent extends Component {
|
||
|
public static final KunlunComponent KEY = new KunlunComponent();
|
||
|
|
||
|
private KunlunComponent() {
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
@Focus(id = Constants.PLUGIN_ID, text = "Visit Sky Theme", source = Original.PLUGIN)
|
||
|
@Override
|
||
|
public ScriptPath script() {
|
||
|
if (!PluginContexts.currentContext().isAvailable()) {
|
||
|
return ScriptPath.build("");
|
||
|
}
|
||
|
return ScriptPath.build("/com/fr/plugin/xx/theme/kunlun/resource/theme.js", ParserType.PLAIN);
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public StylePath style() {
|
||
|
if (!PluginContexts.currentContext().isAvailable()) {
|
||
|
return StylePath.build("");
|
||
|
}
|
||
|
|
||
|
return StylePath.build("/com/fr/plugin/xx/theme/kunlun/resource/style.css", ParserType.PLAIN);
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public Filter filter() {
|
||
|
return new Filter() {
|
||
|
@Override
|
||
|
public boolean accept() {
|
||
|
return Constants.PLUGIN_ID.equals(AppearanceConfig.getInstance().getThemeId());
|
||
|
}
|
||
|
};
|
||
|
}
|
||
|
}
|