mirror of
https://github.com/SECTL/SecScore.git
synced 2026-07-21 20:29:03 +08:00
Update project structure and dependencies
Key features implemented: - Updated .gitignore to include comprehensive ignore patterns for multiple languages and build artifacts - Removed auto-score related components and routes from ContentArea, Sidebar, mobile navigation, and preload types - Deleted AutoScoreManager, Rule builder, and associated service/engine files - Updated Settings component to remove auto_score_enabled setting handling - Cleaned up type definitions and navigation configurations to reflect feature removal The changes streamline the project by removing the auto-scoring feature while maintaining core functionality and improving project organization through updated ignore rules.
This commit is contained in:
@@ -1,71 +0,0 @@
|
||||
import { Service } from "../shared/kernel"
|
||||
import { ClientContext } from "../ClientContext"
|
||||
|
||||
export interface AutoScoreRule {
|
||||
id: number
|
||||
enabled: boolean
|
||||
name: string
|
||||
studentNames: string[]
|
||||
lastExecuted?: string
|
||||
triggers?: { event: string; value?: string; relation?: "AND" | "OR" }[]
|
||||
actions?: { event: string; value?: string; reason?: string }[]
|
||||
}
|
||||
|
||||
export interface AutoScoreRuleInput {
|
||||
enabled: boolean
|
||||
name: string
|
||||
studentNames: string[]
|
||||
triggers?: { event: string; value?: string; relation?: "AND" | "OR" }[]
|
||||
actions?: { event: string; value?: string; reason?: string }[]
|
||||
}
|
||||
|
||||
declare module "../shared/kernel" {
|
||||
interface Context {
|
||||
autoScore: AutoScoreService
|
||||
}
|
||||
}
|
||||
|
||||
export class AutoScoreService extends Service {
|
||||
constructor(ctx: ClientContext) {
|
||||
super(ctx, "autoScore")
|
||||
}
|
||||
|
||||
async getRules(): Promise<{ success: boolean; data?: AutoScoreRule[]; message?: string }> {
|
||||
return await (window as any).api.invoke("auto-score:getRules", {})
|
||||
}
|
||||
|
||||
async addRule(
|
||||
rule: AutoScoreRuleInput
|
||||
): Promise<{ success: boolean; data?: number; message?: string }> {
|
||||
return await (window as any).api.invoke("auto-score:addRule", rule)
|
||||
}
|
||||
|
||||
async updateRule(
|
||||
rule: Partial<AutoScoreRule> & { id: number }
|
||||
): Promise<{ success: boolean; data?: boolean; message?: string }> {
|
||||
return await (window as any).api.invoke("auto-score:updateRule", rule)
|
||||
}
|
||||
|
||||
async deleteRule(
|
||||
ruleId: number
|
||||
): Promise<{ success: boolean; data?: boolean; message?: string }> {
|
||||
return await (window as any).api.invoke("auto-score:deleteRule", ruleId)
|
||||
}
|
||||
|
||||
async toggleRule(
|
||||
ruleId: number,
|
||||
enabled: boolean
|
||||
): Promise<{ success: boolean; data?: boolean; message?: string }> {
|
||||
return await (window as any).api.invoke("auto-score:toggleRule", { ruleId, enabled })
|
||||
}
|
||||
|
||||
async sortRules(
|
||||
ruleIds: number[]
|
||||
): Promise<{ success: boolean; data?: boolean; message?: string }> {
|
||||
return await (window as any).api.invoke("auto-score:sortRules", ruleIds)
|
||||
}
|
||||
|
||||
async getStatus(): Promise<{ success: boolean; data?: { enabled: boolean }; message?: string }> {
|
||||
return await (window as any).api.invoke("auto-score:getStatus", {})
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user