mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-17 21:24:11 +00:00
Remove public event feature (#1645)
This commit is contained in:
committed by
Carlos Valente
parent
0649678dca
commit
08d9e24871
@@ -36,11 +36,10 @@ import { logAxiosError } from '../api/utils';
|
||||
import { useEditorSettings } from '../stores/editorSettings';
|
||||
|
||||
export type EventOptions = Partial<{
|
||||
// options to any new block (event / delay / block)
|
||||
// options of any new entries (event / delay / block)
|
||||
after: MaybeString;
|
||||
before: MaybeString;
|
||||
// options to blocks of type OntimeEvent
|
||||
defaultPublic: boolean;
|
||||
// options of entries of type OntimeEvent
|
||||
linkPrevious: boolean;
|
||||
lastEventId: MaybeString;
|
||||
}>;
|
||||
@@ -51,7 +50,6 @@ export type EventOptions = Partial<{
|
||||
export const useEntryActions = () => {
|
||||
const queryClient = useQueryClient();
|
||||
const {
|
||||
defaultPublic,
|
||||
linkPrevious,
|
||||
defaultTimeStrategy,
|
||||
defaultDuration,
|
||||
@@ -95,7 +93,6 @@ export const useEntryActions = () => {
|
||||
const applicationOptions = {
|
||||
after: options?.after,
|
||||
before: options?.before,
|
||||
defaultPublic: options?.defaultPublic ?? defaultPublic,
|
||||
lastEventId: options?.lastEventId,
|
||||
linkPrevious: options?.linkPrevious ?? linkPrevious,
|
||||
};
|
||||
@@ -111,7 +108,6 @@ export const useEntryActions = () => {
|
||||
|
||||
// Override event with options from editor settings
|
||||
newEntry.linkStart = applicationOptions.linkPrevious;
|
||||
newEntry.isPublic = applicationOptions.defaultPublic;
|
||||
|
||||
if (newEntry.duration === undefined && newEntry.timeEnd === undefined) {
|
||||
newEntry.duration = parseUserTime(defaultDuration);
|
||||
@@ -157,7 +153,6 @@ export const useEntryActions = () => {
|
||||
defaultDangerTime,
|
||||
defaultDuration,
|
||||
defaultEndAction,
|
||||
defaultPublic,
|
||||
defaultTimerType,
|
||||
defaultTimeStrategy,
|
||||
defaultWarnTime,
|
||||
|
||||
Reference in New Issue
Block a user