mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-20 10:12:18 +00:00
Merge remote-tracking branch 'origin/main' into samehkhamis/kit-sweep-entity-card
# Conflicts: # docs/VUE-MIGRATION.md # scripts/format-scope.json
This commit is contained in:
commit
66446a7cae
20 files changed
+539
-131
No files matched your search
@@ -12,6 +12,7 @@ import UiSlider from '../../kit/UiSlider.js';
|
||||
import { useDisplayStore } from '../../stores/display.js';
|
||||
import UiButton from '../../kit/UiButton.vue';
|
||||
import UiCheckbox from '../../kit/UiCheckbox.vue';
|
||||
import UiIcon from '../../kit/UiIcon.vue';
|
||||
import UiSelect from '../../kit/UiSelect.js';
|
||||
import { StyleParameterRows } from '../../styleParameters.js';
|
||||
import VisualPresets from './VisualPresets.vue';
|
||||
@@ -85,10 +86,10 @@ const allocationOptions = computed(() => [
|
||||
<p class="pp-section-heading">{{ t('Overlay') }}</p>
|
||||
<Teleport :to="cockpitPortal?.hud ?? 'body'" :disabled="!cockpitPortal?.hud">
|
||||
<div class="pp-toggle-group">
|
||||
<button class="pp-toggle-btn" :class="{ active: hud?.visible }" :aria-pressed="String(Boolean(hud?.visible))" id="hud-toggle" @click="act('toggleHud')" :title="t('Intelligence HUD (H)')">
|
||||
<UiButton class="pp-toggle-btn" :pressed="Boolean(hud?.visible)" pressed-class="active" id="hud-toggle" @click="act('toggleHud')" :title="t('Intelligence HUD (H)')">
|
||||
<span class="pp-icon">◎</span>
|
||||
<span class="pp-label" translate="no">HUD</span>
|
||||
</button>
|
||||
</UiButton>
|
||||
<div class="pp-slider-row" :class="{ visible: hud?.visible }" id="hud-layout-row">
|
||||
<span class="pp-slider-mini-label">{{ t('Layout') }}</span>
|
||||
<UiSelect id="hud-layout-select" class="pp-select gev-field gev-field--compact" :model-value="hud?.variant ?? 'tactical'" @update:model-value="act('setHudLayout', $event)" :aria-label="t('HUD layout')">
|
||||
@@ -184,7 +185,7 @@ const allocationOptions = computed(() => [
|
||||
</Teleport>
|
||||
<div class="pp-toggle-group">
|
||||
<UiCheckbox class="pp-toggle-btn pp-scope-toggle" :title="t('Scope — the circular viewport mask')" input-id="scope-toggle" trailing :model-value="scopeOn" @update:model-value="act('setScopeEnabled', $event)">
|
||||
<span class="pp-icon material-symbols-outlined" aria-hidden="true">adjust</span>
|
||||
<UiIcon class="pp-icon" name="adjust" :size="null" />
|
||||
<span class="pp-label">{{ t('Scope') }}</span>
|
||||
</UiCheckbox>
|
||||
<div class="pp-slider-row visible" id="scope-slider-row">
|
||||
@@ -198,21 +199,21 @@ const allocationOptions = computed(() => [
|
||||
<span class="pp-slider-value" id="scope-opacity-value">{{ pct(scopeOpacity) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<button class="pp-toggle-btn" id="clean-view-toggle" @click="act('toggleCleanView')" :title="t('Hide UI chrome')">
|
||||
<UiButton class="pp-toggle-btn" id="clean-view-toggle" @click="act('toggleCleanView')" :title="t('Hide UI chrome')">
|
||||
<span class="pp-icon">□</span>
|
||||
<span class="pp-label">{{ t('Clean UI') }}</span>
|
||||
</button>
|
||||
</UiButton>
|
||||
<p class="pp-section-heading">{{ t('Effects') }}</p>
|
||||
<div class="pp-toggle-group">
|
||||
<UiButton class="pp-toggle-btn" :pressed="celestial?.active ?? false" pressed-class="active" id="celestial-toggle" @click="act('toggleCelestial')" :title="celestialTitle" :disabled="celestial ? !celestial.supported : undefined" :aria-disabled="celestial ? String(!celestial.supported) : undefined">
|
||||
<span class="pp-icon material-symbols-outlined" aria-hidden="true">flare</span>
|
||||
<UiIcon class="pp-icon" name="flare" :size="null" />
|
||||
<span class="pp-label">{{ t('Celestial') }}</span>
|
||||
</UiButton>
|
||||
</div>
|
||||
<!-- Sky: only where the renderer has a sky to set. -->
|
||||
<div v-if="sky" class="pp-toggle-group" id="sky-group">
|
||||
<UiCheckbox v-for="row in skyRows" :key="row.key" class="pp-toggle-btn pp-scope-toggle" :id="`sky-${row.key}-row`" :input-id="`sky-${row.key}-toggle`" trailing :model-value="sky.switches[row.key]" @update:model-value="act('setSkySwitch', row.key, $event)">
|
||||
<span class="pp-icon material-symbols-outlined" aria-hidden="true">{{ row.icon }}</span>
|
||||
<UiIcon class="pp-icon" :name="row.icon" :size="null" />
|
||||
<span class="pp-label">{{ row.label }}</span>
|
||||
</UiCheckbox>
|
||||
<div class="pp-slider-row visible" id="sky-milkyway-row">
|
||||
@@ -225,7 +226,7 @@ const allocationOptions = computed(() => [
|
||||
<div v-for="group in groups" :key="group.id" class="pp-toggle-group" :id="`${group.id}-group`">
|
||||
<template v-for="row in group.rows" :key="row.id">
|
||||
<UiCheckbox v-if="row.kind === 'toggle'" class="pp-toggle-btn pp-scope-toggle" :title="row.title" :input-id="`${group.id}-${row.id}-toggle`" trailing :model-value="row.checked" @update:model-value="row.onChange?.($event)">
|
||||
<span v-if="row.icon" class="pp-icon material-symbols-outlined" aria-hidden="true">{{ row.icon }}</span>
|
||||
<UiIcon v-if="row.icon" class="pp-icon" :name="row.icon" :size="null" />
|
||||
<span class="pp-label">{{ row.label }}</span>
|
||||
</UiCheckbox>
|
||||
<div v-else-if="row.kind === 'note'" class="pp-slider-row visible" :id="`${group.id}-${row.id}`">
|
||||
@@ -239,28 +240,28 @@ const allocationOptions = computed(() => [
|
||||
</template>
|
||||
</div>
|
||||
<div class="pp-toggle-group">
|
||||
<button class="pp-toggle-btn" :class="{ active: view?.bloom.active }" :aria-pressed="String(Boolean(view?.bloom.active))" id="bloom-toggle" @click="act('toggleBloom')" :title="t('Bloom / Glow')">
|
||||
<UiButton class="pp-toggle-btn" :pressed="Boolean(view?.bloom.active)" pressed-class="active" id="bloom-toggle" @click="act('toggleBloom')" :title="t('Bloom / Glow')">
|
||||
<span class="pp-icon">✨</span>
|
||||
<span class="pp-label">{{ t('Bloom') }}</span>
|
||||
</button>
|
||||
</UiButton>
|
||||
<div class="pp-slider-row" :class="{ visible: view?.bloom.active }" id="bloom-slider-row">
|
||||
<UiSlider class="pp-slider" id="bloom-intensity-slider" @update:model-value="act('setBloomIntensity', $event)" min="0" max="200" :model-value="view?.bloom.intensity ?? 0" :aria-label="t('Bloom intensity')" />
|
||||
<span class="pp-slider-value" id="bloom-intensity-value">{{ pct(view?.bloom.intensity ?? 0) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pp-toggle-group">
|
||||
<button class="pp-toggle-btn" :class="{ active: view?.sharpen.active }" :aria-pressed="String(Boolean(view?.sharpen.active))" id="sharpen-toggle" @click="act('toggleSharpen')" :title="t('Sharpening')">
|
||||
<UiButton class="pp-toggle-btn" :pressed="Boolean(view?.sharpen.active)" pressed-class="active" id="sharpen-toggle" @click="act('toggleSharpen')" :title="t('Sharpening')">
|
||||
<span class="pp-icon">🔍</span>
|
||||
<span class="pp-label">{{ t('Sharpen') }}</span>
|
||||
</button>
|
||||
</UiButton>
|
||||
<div class="pp-slider-row" :class="{ visible: view?.sharpen.active }" id="sharpen-slider-row">
|
||||
<UiSlider class="pp-slider" id="sharpen-intensity-slider" @update:model-value="act('setSharpenIntensity', $event)" min="0" max="100" :model-value="view?.sharpen.intensity ?? 49" :aria-label="t('Sharpen intensity')" />
|
||||
<span class="pp-slider-value" id="sharpen-intensity-value">{{ pct(view?.sharpen.intensity ?? 49) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" class="pp-reset-btn" :title="t('Reset Visual to its defaults: Normal look, HUD, scope, labels and effects')" @click="act('resetVisual')">
|
||||
<span class="material-symbols-outlined" aria-hidden="true">restart_alt</span>{{ t('Reset to default') }}
|
||||
</button>
|
||||
<UiButton class="pp-reset-btn" :title="t('Reset Visual to its defaults: Normal look, HUD, scope, labels and effects')" @click="act('resetVisual')">
|
||||
<UiIcon name="restart_alt" :size="null" />{{ t('Reset to default') }}
|
||||
</UiButton>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -16,6 +16,8 @@ import { useGlobeActionsStore } from '../../stores/globeActions.js';
|
||||
import { useLocationStore } from '../../stores/location.js';
|
||||
import { useOmnibarStore } from '../../stores/omnibar.js';
|
||||
import { useVoiceStore } from '../../stores/voice.js';
|
||||
import UiButton from '../../kit/UiButton.vue';
|
||||
import UiIcon from '../../kit/UiIcon.vue';
|
||||
|
||||
// One field for places, layers and questions. Places run through the location
|
||||
// controls, layers through the shell's omnibar actions, and anything else can
|
||||
@@ -1028,7 +1030,7 @@ watch(
|
||||
<section id="gev-omnibar" :class="{ 'has-results': showResults }" :aria-label="t('Search')">
|
||||
<div class="omnibar-field">
|
||||
<span class="omnibar-edge" aria-hidden="true"></span>
|
||||
<span class="material-symbols-outlined omnibar-search-icon" aria-hidden="true">search</span>
|
||||
<UiIcon class="omnibar-search-icon" name="search" :size="null" />
|
||||
<input
|
||||
ref="input"
|
||||
id="gev-omnibar-input"
|
||||
@@ -1055,9 +1057,9 @@ watch(
|
||||
@blur="focused = false"
|
||||
/>
|
||||
<kbd class="omnibar-kbd" aria-hidden="true">{{ shortcut }}</kbd>
|
||||
<button type="button" class="omnibar-mic" :class="{ active: voiceOn }" :disabled="!voice.controls" :aria-pressed="String(voiceOn)" :aria-label="t('Talk to GEV')" :title="t('Talk to GEV')" @click="onMic(true)">
|
||||
<UiButton class="omnibar-mic" :pressed="voiceOn" pressed-class="active" :disabled="!voice.controls" :label="t('Talk to GEV')" @click="onMic(true)">
|
||||
<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.8" aria-hidden="true"><rect x="9" y="3" width="6" height="11" rx="3" /><path d="M5.5 11a6.5 6.5 0 0 0 13 0M12 17.5V21" /></svg>
|
||||
</button>
|
||||
</UiButton>
|
||||
</div>
|
||||
<div v-show="showResults" ref="results" class="omnibar-results" :class="{ 'has-feedback': showFeedback }">
|
||||
<p id="omnibar-error" v-show="showFeedback" role="alert">{{ feedback }}</p>
|
||||
@@ -1065,11 +1067,10 @@ watch(
|
||||
<li v-if="strip" class="omnibar-strip" role="group" :aria-label="strip.title">
|
||||
<span class="omnibar-strip__title" aria-hidden="true">{{ strip.title }}</span>
|
||||
<div ref="stripChips" class="omnibar-strip__chips" role="presentation" @wheel="onStripWheel">
|
||||
<button
|
||||
<UiButton
|
||||
v-for="(chip, index) in strip.chips"
|
||||
:id="`gev-omnibar-chip-${index}`"
|
||||
:key="chip.key"
|
||||
type="button"
|
||||
tabindex="-1"
|
||||
class="omnibar-strip__chip"
|
||||
:class="{ active: chip.pressed, focused: inStrip && index === chipIndex }"
|
||||
@@ -1079,8 +1080,8 @@ watch(
|
||||
@mousedown.prevent
|
||||
@click="chooseChip(chip)"
|
||||
>
|
||||
<span class="material-symbols-outlined" aria-hidden="true">{{ chip.icon }}</span>{{ chip.name }}
|
||||
</button>
|
||||
<UiIcon :name="chip.icon" :size="null" />{{ chip.name }}
|
||||
</UiButton>
|
||||
</div>
|
||||
</li>
|
||||
<li
|
||||
@@ -1095,7 +1096,7 @@ watch(
|
||||
@click="choose(item)"
|
||||
@mousemove="inStrip = false"
|
||||
>
|
||||
<span v-if="item.icon" class="material-symbols-outlined omnibar-item-icon" aria-hidden="true">{{ item.icon }}</span>
|
||||
<UiIcon v-if="item.icon" class="omnibar-item-icon" :name="item.icon" :size="null" />
|
||||
<svg v-else class="omnibar-item-icon" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.8" aria-hidden="true"><path d="M4 5h16v11H9l-5 4z" /></svg>
|
||||
<span class="omnibar-item-label">{{ item.label }}</span>
|
||||
<small>{{ item.hint }}</small>
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
<script setup>
|
||||
import UiButton from '../../kit/UiButton.vue';
|
||||
import UiCloseButton from '../../kit/UiCloseButton.vue';
|
||||
|
||||
// The Omnibar's guided walk: the spotlight ring and the callout beside it,
|
||||
// teleported to the end of `to` (the page's body). `startGuide()` in
|
||||
// src/ui/omnibarGuide.js owns every decision and every word: it renders this
|
||||
// with the `view` it computes for each step and keeps the parts the template
|
||||
// never binds: the guide's `visible` class, the callout's entrance replay
|
||||
// (its `swap` class), place and side, the ring's and the extra rings' boxes,
|
||||
// and focus. It finds those elements in the rendered tree itself.
|
||||
defineProps({
|
||||
to: { type: Object, required: true },
|
||||
view: { type: Object, required: true },
|
||||
onClose: { type: Function, required: true },
|
||||
onSkip: { type: Function, required: true },
|
||||
onOffer: { type: Function, required: true },
|
||||
onNext: { type: Function, required: true },
|
||||
});
|
||||
|
||||
/** A progress segment's attributes: no class at all for one still to come. */
|
||||
const dot = (name) => (name ? { class: name } : {});
|
||||
</script>
|
||||
|
||||
<!-- Only line breaks inside tags: the markup has no whitespace between elements. -->
|
||||
<template><Teleport :to="to"
|
||||
><div class="gev-guide"
|
||||
><div class="gev-guide-ring"><i></i></div
|
||||
><div
|
||||
class="gev-guide-callout"
|
||||
role="dialog"
|
||||
aria-modal="false"
|
||||
tabindex="-1"
|
||||
aria-labelledby="gev-guide-title"
|
||||
aria-describedby="gev-guide-text"
|
||||
><div class="gev-guide-head"
|
||||
><p id="gev-guide-title" class="gev-guide-title">{{ view.title }}</p
|
||||
><p class="gev-guide-count">{{ view.count }}</p
|
||||
><UiCloseButton
|
||||
class="gev-guide-close"
|
||||
:label="view.endLabel"
|
||||
:title="view.endLabel"
|
||||
@click="onClose()" /></div
|
||||
><ol class="gev-guide-progress" aria-hidden="true"
|
||||
><li
|
||||
v-for="(name, i) in view.progress"
|
||||
:key="`${view.step}-${i}`"
|
||||
v-bind="dot(name)"></li></ol
|
||||
><div class="gev-guide-body"
|
||||
><p id="gev-guide-text" class="gev-guide-text">{{ view.text }}</p
|
||||
><p class="gev-guide-hint" :hidden="view.hintHidden"
|
||||
><span class="gev-guide-hint-dot"></span
|
||||
><span>{{ view.hint }}</span></p
|
||||
></div
|
||||
><div class="gev-guide-actions"
|
||||
><p class="gev-guide-keys" :hidden="view.keysHidden"
|
||||
><kbd>{{ view.keyCap }}</kbd><span>{{ view.keyText }}</span></p
|
||||
><span
|
||||
><UiButton
|
||||
class="gev-guide-skip"
|
||||
:hidden="view.skipHidden"
|
||||
@click="onSkip()"
|
||||
>{{ view.skipLabel }}</UiButton
|
||||
><UiButton
|
||||
class="gev-guide-offer"
|
||||
:hidden="view.offerHidden"
|
||||
@click="onOffer()"
|
||||
>{{ view.offerLabel }}</UiButton
|
||||
><UiButton
|
||||
class="gev-guide-next"
|
||||
:class="{ quiet: view.nextQuiet }"
|
||||
:hidden="view.nextHidden"
|
||||
@click="onNext()"
|
||||
>{{ view.nextLabel }}</UiButton
|
||||
></span
|
||||
></div
|
||||
><p class="gev-guide-status" role="status" aria-live="polite">{{
|
||||
view.status
|
||||
}}</p></div
|
||||
></div
|
||||
></Teleport
|
||||
></template>
|
||||
Reference in new issue
Block a user