Fix i18n CI runtime menu checks
This commit is contained in:
@@ -5,6 +5,7 @@ import { releaseUpdateState, shortReleaseCommit } from "@/services/releaseUpdate
|
||||
import { forceFrontendUpdateAndClearLocal } from "@/services/frontendMaintenance.js";
|
||||
|
||||
const SHIFT_PRESS_WINDOW_MS = 1200;
|
||||
const CLOSE_EVENT = "frontend-maintenance-menu:close";
|
||||
|
||||
const { t } = useI18n({ useScope: "global" });
|
||||
const isOpen = ref(false);
|
||||
@@ -49,10 +50,12 @@ const forceUpdateAndClearLocal = async () => {
|
||||
|
||||
onMounted(() => {
|
||||
window.addEventListener("keydown", handleKeydown);
|
||||
window.addEventListener(CLOSE_EVENT, closeMenu);
|
||||
});
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
window.removeEventListener("keydown", handleKeydown);
|
||||
window.removeEventListener(CLOSE_EVENT, closeMenu);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@ const REQUEST_INSIGHT_DEFINITIONS = Object.freeze([
|
||||
]);
|
||||
const SHIFT_MULTI_PRESS_WINDOW_MS = 700;
|
||||
const SYSTEM_SEARCH_CLOSE_EVENT = "system-search:close";
|
||||
const FRONTEND_MAINTENANCE_MENU_CLOSE_EVENT = "frontend-maintenance-menu:close";
|
||||
|
||||
const isExpanded = ref(REQUEST_QUEUE_CONFIG.inspector.expandedByDefault);
|
||||
const isShortcutActivated = ref(false);
|
||||
@@ -366,6 +367,9 @@ const handleWindowKeydown = (event) => {
|
||||
}
|
||||
|
||||
if (shiftKeyPressCount.value >= 3) {
|
||||
event.preventDefault?.();
|
||||
event.stopImmediatePropagation?.();
|
||||
window.dispatchEvent(new CustomEvent(FRONTEND_MAINTENANCE_MENU_CLOSE_EVENT));
|
||||
closeSystemSearchForSuperuser();
|
||||
isShortcutActivated.value = true;
|
||||
isExpanded.value = true;
|
||||
@@ -1496,4 +1500,3 @@ onBeforeUnmount(() => {
|
||||
opacity: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@@ -14,6 +14,16 @@ const REVIEWED_NON_LITERAL_CALLS = new Set([
|
||||
'src/views/dashboards/superUserDashboard/system/ReplicationManagement.vue|t|<li v-for="key in redisComposeInstructionKeys" :key="key">{{ t(key) }}</li>',
|
||||
'src/views/dashboards/superUserDashboard/system/ReplicationManagement.vue|t|<li v-for="key in minioComposeInstructionKeys" :key="key">{{ t(key) }}</li>',
|
||||
"src/views/dashboards/superUserDashboard/system/ReplicationManagement.vue|t|<td>{{ t(`replication.roles.${host.role}`) }}</td>",
|
||||
"src/views/dashboards/superUserDashboard/configuration/ConfigurationReleaseManager.vue|t|const tr = (key, params = {}) => t(`configuration.release_manager.${key}`, params);",
|
||||
"src/views/dashboards/superUserDashboard/configuration/ConfigurationReleaseManager.vue|t|const translated = t(fullKey, params);",
|
||||
"src/views/dashboards/superUserDashboard/ErrorReports.vue|t|const value = t(key);",
|
||||
'src/views/dashboards/userDashboard/wash/components/LaneSelectionSection.vue|$t|:title="option.titleKey ? $t(option.titleKey) : null"',
|
||||
'src/views/dashboards/userDashboard/wash/components/LaneSelectionSection.vue|$t|:aria-label="option.titleKey ? $t(option.titleKey) : null"',
|
||||
"src/views/dashboards/userDashboard/wash/components/LaneSelectionSection.vue|$t|{{ $t(option.statusLabelKey) }}",
|
||||
"src/views/dashboards/userDashboard/wash/components/WashTypeSelector.vue|$t|{{ $t(option.labelKey) }}",
|
||||
"src/views/dashboards/userDashboard/wash/components/WashTypeSelector.vue|$t|{{ $t(option.statusLabelKey) }}",
|
||||
'src/views/dashboards/userDashboard/wash/MyWashStart.vue|$t|:vehicle-step-guidance="vehicleStepGuidanceKey ? $t(vehicleStepGuidanceKey) : null"',
|
||||
"src/views/dashboards/userDashboard/wash/MyWashStart.vue|$t|{{ $t(confirmActionLabelKey) }}",
|
||||
]);
|
||||
|
||||
const readLocale = (locale: (typeof ACTIVE_LOCALES)[number]) => {
|
||||
|
||||
Reference in New Issue
Block a user