move history out of form

remove unused gear icon
remove debugging code
This commit is contained in:
David Tsay 2024-08-21 15:23:51 -07:00
parent 5cce8d747c
commit a0291879e9
4 changed files with 25 additions and 56 deletions

View File

@ -48,12 +48,11 @@
@pan-axis="pan"
@zoom-axis="zoom"
/>
<div
role="button"
class="c-not-button c-not-button--compact c-compact-tc__gear icon-gear"
aria-label="Time Conductor Settings"
></div>
<ConductorHistory
v-if="!isIndependent"
class="c-conductor__history-select"
title="Select and apply previously entered time intervals."
/>
<ConductorPopUp
v-if="showConductorPopup"
ref="conductorPopup"
@ -71,6 +70,7 @@ import { inject, provide } from 'vue';
import ConductorAxis from './ConductorAxis.vue';
import ConductorClock from './ConductorClock.vue';
import ConductorHistory from './ConductorHistory.vue';
import ConductorInputsFixed from './ConductorInputsFixed.vue';
import ConductorInputsRealtime from './ConductorInputsRealtime.vue';
import ConductorMode from './ConductorMode.vue';
@ -90,6 +90,7 @@ export default {
ConductorTimeSystem,
ConductorClock,
ConductorMode,
ConductorHistory,
ConductorInputsRealtime,
ConductorInputsFixed,
ConductorAxis,

View File

@ -24,11 +24,9 @@
<div class="c-menu-button c-ctrl-wrapper c-ctrl-wrapper--menus-left">
<button
aria-label="Time Conductor History"
class="c-button--menu c-history-button icon-history c-icon-button"
class="c-button--minor c-history-button icon-history c-icon-button"
@click.prevent.stop="showHistoryMenu"
>
<span class="c-button__label">History</span>
</button>
/>
</div>
</div>
</template>

View File

@ -27,11 +27,6 @@
class="c-conductor__time-system-select"
title="Sets the Time Conductor's time system."
/>
<ConductorHistory
v-if="!isIndependent"
class="c-conductor__history-select"
title="Select and apply previously entered time intervals."
/>
</div>
<ConductorInputsFixed v-if="isFixedTimeMode" @dismiss-inputs-fixed="dismiss" />
<ConductorInputsRealtime v-else @dismiss-inputs-realtime="dismiss" />
@ -40,7 +35,6 @@
<script>
import ConductorClock from './ConductorClock.vue';
import ConductorHistory from './ConductorHistory.vue';
import ConductorInputsFixed from './ConductorInputsFixed.vue';
import ConductorInputsRealtime from './ConductorInputsRealtime.vue';
import ConductorMode from './ConductorMode.vue';
@ -55,7 +49,6 @@ export default {
IndependentMode,
IndependentClock,
ConductorTimeSystem,
ConductorHistory,
ConductorInputsFixed,
ConductorInputsRealtime
},

View File

@ -52,12 +52,6 @@
:read-only="true"
:compact="true"
/>
<div
v-if="independentTCEnabled"
role="button"
class="c-not-button c-not-button--compact c-compact-tc__gear icon-gear"
aria-label="Independent Time Conductor Settings"
></div>
<ConductorPopUp
v-if="showConductorPopup"
@ -73,7 +67,7 @@
</template>
<script>
import { inject, provide, watch } from 'vue';
import { inject, provide, toRaw } from 'vue';
import ConductorModeIcon from '@/plugins/timeConductor/ConductorModeIcon.vue';
@ -121,22 +115,6 @@ export default {
const { clock, getAllClockMetadata, getClockMetadata } = useClock(openmct, timeContext);
const { offsets } = useClockOffsets(openmct, timeContext);
watch(timeContext, () => {
console.log('context changed setup');
});
watch(() => props.domainObject, () => {
console.log('domainObject changed setup');
});
watch(() => props.domainObject.configuration.useIndependentTime, () => {
console.log('domainObject configuration changed setup');
});
watch(() => props.objectPath, () => {
console.log('objectPath changed setup');
});
provide('timeContext', timeContext);
provide('timeSystemFormatter', timeSystemFormatter);
provide('timeSystemDurationFormatter', timeSystemDurationFormatter);
@ -153,10 +131,6 @@ export default {
provide('getAllClockMetadata', getAllClockMetadata);
provide('getClockMetadata', getClockMetadata);
function getReactiveObjectPath() {
return props.objectPath;
}
return {
timeContext,
timeMode,
@ -172,7 +146,7 @@ export default {
data() {
return {
keyString: this.openmct.objects.makeKeyString(this.domainObject.identifier),
independentTCEnabled: this.domainObject.configuration.useIndependentTime === true,
independentTCEnabled: this.domainObject.configuration.useIndependentTime === true
};
},
computed: {
@ -280,10 +254,13 @@ export default {
);
},
setTimeOptions() {
this.timeOptions = this.domainObject.configuration.timeOptions ?? {
clockOffsets: this.offsets,
fixedOffsets: this.bounds
};
this.timeOptions = toRaw(this.domainObject.configuration.timeOptions);
if (!this.timeOptions) {
this.timeOptions = {
clockOffsets: this.offsets,
fixedOffsets: this.bounds
};
}
if (!this.timeOptions.clock) {
// can remove openmct.time.getClock() if timeContexts have clock in fixed time
@ -312,7 +289,7 @@ export default {
this.updateTimeOptions();
},
saveClock() {
this.timeOptions.clock = this.clock.key;
this.timeOptions.clock = this.clock?.key;
this.updateTimeOptions();
},
updateTimeOptions() {
@ -322,7 +299,7 @@ export default {
registerIndependentTimeContext() {
const bounds = this.timeOptions.fixedOffsets ?? this.bounds;
const offsets = this.timeOptions.clockOffsets ?? this.offsets;
const clockKey = this.timeOptions.clock?.key || this.clock.key;
const clockKey = this.timeOptions.clock || this.clock.key;
const independentTimeContextBoundsOrOffsets = this.isFixedTimeMode ? bounds : offsets;
const independentTimeContextClockKey = this.isFixedTimeMode ? undefined : clockKey;
@ -336,16 +313,16 @@ export default {
independentTimeContextClockKey
);
} else {
if (this.isRealTimeMode) {
independentTimeContext.setClock(this.timeOptions.clock);
}
// if (this.isRealTimeMode) {
// independentTimeContext.setClock(this.timeOptions.clock);
// }
independentTimeContext.setMode(this.timeOptions.mode, independentTimeContextBoundsOrOffsets);
// independentTimeContext.setMode(this.timeOptions.mode, independentTimeContextBoundsOrOffsets);
}
},
registerIndependentTimeOffsets() {
// const timeContext = this.openmct.time.getIndependentContext(this.keyString);
const clockKey = this.timeOptions.clock?.key || this.clock.key;
const clockKey = this.timeOptions.clock || this.clock.key;
let offsets;
if (this.isFixedTimeMode) {