Files
dashtab/app/components/settings-button.gjs
raucao 4f8011647d WIP: Use Feather icons for the settings dialog
Swap the settings nav and button icons to Feather equivalents (settings, clock, link, bell, calendar, info, x). The paint brush and puzzle piece stay Heroicons because Feather has no match. The settings button now uses Feather's sliders glyph.

Icons are stored as arrays of SVG paths so multi-element Feather shapes can render, and the nav renders one path per entry.
2026-11-06 13:51:59 +04:00

53 lines
1.4 KiB
Plaintext

import Component from '@glimmer/component';
import { action } from '@ember/object';
import { on } from '@ember/modifier';
import { service } from '@ember/service';
import GlobalSettings from './settings/global-settings.gjs';
// Feather "sliders" (https://feathericons.com), one path per line segment.
const SLIDERS_ICON = [
'M4 21v-7',
'M4 10V3',
'M12 21v-9',
'M12 8V3',
'M20 21v-5',
'M20 12V3',
'M1 14h6',
'M9 8h6',
'M17 16h6',
];
// Button pinned to the bottom left of the dashboard that opens the global
// settings dialog.
export default class SettingsButtonComponent extends Component {
@service modal;
@action
open() {
this.modal.open({ component: GlobalSettings, size: 'settings' });
}
<template>
<button
type="button"
{{on "click" this.open}}
aria-label="Open settings"
title="Settings"
class="rounded-md p-2 text-white opacity-90 transition-opacity hover:opacity-100 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-white/70"
>
<svg
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="1.5"
aria-hidden="true"
class="size-5"
>
{{#each SLIDERS_ICON as |d|}}
<path d={{d}} stroke-linecap="round" stroke-linejoin="round" />
{{/each}}
</svg>
</button>
</template>
}