Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion packages/uhk-web/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ export default tsEslint.config(
...angular.configs.templateAccessibility,
],
rules: {
'@angular-eslint/template/alt-text': 'off',
'@angular-eslint/template/click-events-have-key-events': 'off',
'@angular-eslint/template/elements-content': 'off',
'@angular-eslint/template/interactive-supports-focus': 'off',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@
</ng-select>
</div>
<div class="keymap-container">
<div class="empty" *ngIf="!selectedKeymap?.abbreviation">
<img src="assets/images/base-layer--blank.svg">

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't have this asset so I dropped the whole outer element.
I tried to test it with manually modify the user config but it not loading if the config is invalid. so as I see it was a dead branch

</div>
<svg-keyboard *ngIf="selectedKeymap?.abbreviation"
[moduleConfig]="selectedKeymap.layers[0].modules"
[embedded]="true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,3 @@
padding: 1rem;
background-color: var(--color-keymap-tab-background);
}

.empty {
display: flex;

img {
display: flex;
width: 100%;
height: 100%;
position: relative;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ import { initLayerOptions } from './layer-options';
export function calculateLayerOptionsOfKeymap(keymap: Keymap): Map<number, LayerOption> {
const layerOptions = initLayerOptions();

// it can happen when the user changes the URL to invalid keymap abbreviation
if (!keymap) {
return layerOptions;
}

for (const layer of keymap.layers) {
layerOptions.get(layer.id).selected = true;
}
Expand Down
Loading