import { isLoginPage , isSCU } from '@/helper/judger' ; import { FastEvaluation } from '@/plugins/fast-evaluation' ; import { Tooltip } from '@/plugins/tooltip' ; import { RecoverRememberMe } from '@/plugins/recover-remember-me' ; import { Rearrange } from '@/plugins/rearrange' ; import { Score } from '@/plugins/score' ; import { SubitemScore } from '@/plugins/subitem-score' ; import { DataAnalysis } from '@/plugins/data-analysis' ; import { About } from '@/plugins/about' ; import { Feedback } from '@/plugins/feedback' ; import { Changelog } from '@/plugins/changelog' ; import { Donate } from '@/plugins/donate' ; import { Beautify } from '@/plugins/beautify' ; import { Setting } from '@/plugins/setting' ; import textbookSelection from '@/plugins/textbook-selection' ; import { SUAPlugin } from '@/core/types' ; const necessaryPlugins = [ DataAnalysis , Tooltip ] ; const optionalPluginsBeforeLogin = [ RecoverRememberMe ] ; const optionalPluginsLoginedOnlySCU = [ ] ; const optionalPluginsLogined = [ Beautify , Rearrange , FastEvaluation , textbookSelection , Score , SubitemScore , ... ( isSCU ( ) ? optionalPluginsLoginedOnlySCU : [ ] ) , Setting , About , Donate , Feedback , Changelog ] ; function getAllPlugins ( ) { return [ ... necessaryPlugins , ... optionalPluginsBeforeLogin , ... optionalPluginsLogined ] ; } function getAvailablePluginsByLoginStatus ( ) { return [ ... necessaryPlugins , ... ( isLoginPage ( ) ? optionalPluginsBeforeLogin : optionalPluginsLogined ) ] ; } export { getAvailablePluginsByLoginStatus , getAllPlugins } ;