fix(fe/cron): use proper name for cron jobs
This commit is contained in:
parent
fb219c90b7
commit
191146ac7c
5 changed files with 16 additions and 16 deletions
|
@ -34,7 +34,7 @@ export class Cron {
|
|||
};
|
||||
}
|
||||
|
||||
const cronTable = new Cron();
|
||||
export const CronTable = (): Cron => {
|
||||
return cronTable;
|
||||
const cronJobs = new Cron();
|
||||
export const CronJobs = (): Cron => {
|
||||
return cronJobs;
|
||||
};
|
||||
|
|
|
@ -32,7 +32,7 @@ import {
|
|||
loadingCtrl,
|
||||
} from "../common/controls";
|
||||
import { HotkeyHandler } from "../common/hotkeys";
|
||||
import { CronTable } from "../common/cron";
|
||||
import { CronJobs } from "../common/cron";
|
||||
import { Title } from "./visual/title";
|
||||
import { NotFoundBanner } from "./visual/banner_notfound";
|
||||
|
||||
|
@ -107,7 +107,7 @@ export class FilesPanel extends React.Component<Props, State, {}> {
|
|||
}
|
||||
|
||||
componentDidMount(): void {
|
||||
CronTable().setInterval("refreshFileList", {
|
||||
CronJobs().setInterval("refreshFileList", {
|
||||
func: updater().refreshFiles,
|
||||
args: [],
|
||||
delay: 5000,
|
||||
|
@ -123,7 +123,7 @@ export class FilesPanel extends React.Component<Props, State, {}> {
|
|||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
CronTable().clearInterval("refreshFileList");
|
||||
CronJobs().clearInterval("refreshFileList");
|
||||
|
||||
document.removeEventListener("keyup", this.hotkeyHandler.handle);
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ import { NotFoundBanner } from "./visual/banner_notfound";
|
|||
import { Title } from "./visual/title";
|
||||
import { shareIDQuery } from "../client/files";
|
||||
import { loadingCtrl, ctrlOn, ctrlOff } from "../common/controls";
|
||||
import { CronTable } from "../common/cron";
|
||||
import { CronJobs } from "../common/cron";
|
||||
|
||||
export interface SharingsProps {
|
||||
sharings: Map<string, string>;
|
||||
|
@ -40,7 +40,7 @@ export class SharingsPanel extends React.Component<Props, State, {}> {
|
|||
}
|
||||
|
||||
componentDidMount(): void {
|
||||
CronTable().setInterval("listSharings", {
|
||||
CronJobs().setInterval("listSharings", {
|
||||
func: updater().listSharings,
|
||||
args: [],
|
||||
delay: 5000,
|
||||
|
@ -48,7 +48,7 @@ export class SharingsPanel extends React.Component<Props, State, {}> {
|
|||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
CronTable().clearInterval("listSharings");
|
||||
CronJobs().clearInterval("listSharings");
|
||||
}
|
||||
|
||||
setLoading = (state: boolean) => {
|
||||
|
|
|
@ -11,7 +11,7 @@ import { LoginProps } from "./pane_login";
|
|||
import { Layers } from "./layers";
|
||||
import { AdminProps } from "./pane_admin";
|
||||
import { TopBar } from "./topbar";
|
||||
import { CronTable } from "../common/cron";
|
||||
import { CronJobs } from "../common/cron";
|
||||
import { updater } from "./state_updater";
|
||||
|
||||
export const controlName = "panelTabs";
|
||||
|
@ -33,7 +33,7 @@ export class RootFrame extends React.Component<Props, State, {}> {
|
|||
}
|
||||
|
||||
componentDidMount(): void {
|
||||
CronTable().setInterval("autoSwitchTheme", {
|
||||
CronJobs().setInterval("autoSwitchTheme", {
|
||||
func: updater().autoSwitchTheme,
|
||||
args: [],
|
||||
delay: 60 * 1000,
|
||||
|
@ -41,7 +41,7 @@ export class RootFrame extends React.Component<Props, State, {}> {
|
|||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
CronTable().clearInterval("autoSwitchTheme");
|
||||
CronJobs().clearInterval("autoSwitchTheme");
|
||||
}
|
||||
|
||||
makeBgStyle = (): Object => {
|
||||
|
@ -171,7 +171,7 @@ export class RootFrame extends React.Component<Props, State, {}> {
|
|||
</span>
|
||||
</div>
|
||||
|
||||
<div id="tail" className="container-center">
|
||||
<div id="footer" className="container-center">
|
||||
<a href="https://github.com/ihexxa/quickshare">Quickshare</a> -
|
||||
Quick and simple file sharing.
|
||||
</div>
|
||||
|
|
|
@ -14,7 +14,7 @@ import { UsersClient } from "../client/users";
|
|||
import { SettingsClient } from "../client/settings";
|
||||
import { IUsersClient, IFilesClient, ISettingsClient } from "../client";
|
||||
import { loadingCtrl, ctrlOn, ctrlOff } from "../common/controls";
|
||||
import { CronTable } from "../common/cron";
|
||||
import { CronJobs } from "../common/cron";
|
||||
|
||||
export interface Props {}
|
||||
export interface State extends ICoreState {}
|
||||
|
@ -35,7 +35,7 @@ export class StateMgr extends React.Component<Props, State, {}> {
|
|||
}
|
||||
|
||||
componentDidMount(): void {
|
||||
CronTable().setInterval("refreshState", {
|
||||
CronJobs().setInterval("refreshState", {
|
||||
func: this.update,
|
||||
args: [updater().updateAll],
|
||||
delay: 1000,
|
||||
|
@ -43,7 +43,7 @@ export class StateMgr extends React.Component<Props, State, {}> {
|
|||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
CronTable().clearInterval("refreshState");
|
||||
CronJobs().clearInterval("refreshState");
|
||||
}
|
||||
|
||||
setUsersClient = (client: IUsersClient) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue