|
1 | 1 | <script>
|
2 |
| - import { currentRegionInfo, currentSensor, metaDataManager, selectByInfo } from '../../stores'; |
| 2 | + import { currentRegionInfo, currentSensor, currentMode, metaDataManager, selectByInfo } from '../../stores'; |
3 | 3 | import { DEFAULT_SENSOR } from '../../stores/constants';
|
4 | 4 | import AboutSection from '../../components/AboutSection.svelte';
|
5 | 5 | import SensorSearch from '../../components/SensorSearch.svelte';
|
|
15 | 15 | import SensorBadges from '../../components/SensorBadges.svelte';
|
16 | 16 | import GeoLevelBadge from '../../components/GeoLevelBadge.svelte';
|
17 | 17 | import SourceBadges from '../../components/SourceBadges.svelte';
|
| 18 | + import chevronLeftIcon from '!raw-loader!@fortawesome/fontawesome-free/svgs/solid/chevron-left.svg'; |
| 19 | + import { modeByID } from '..'; |
18 | 20 |
|
19 | 21 | $: sensor = $metaDataManager.getSensor($currentSensor) || $metaDataManager.getSensor(DEFAULT_SENSOR);
|
20 | 22 | $: source = sensor ? $metaDataManager.getSource(sensor) : undefined;
|
|
25 | 27 | $: metaData = $metaDataManager.getMetaData(sensor);
|
26 | 28 | $: name = sensor ? sensor.name : 'Signal';
|
27 | 29 |
|
| 30 | + function switchMode() { |
| 31 | + currentMode.set(modeByID['indicator-source']); |
| 32 | + } |
| 33 | +
|
28 | 34 | function formatDateOrWeek(sensor, date, week) {
|
29 | 35 | return sensor.isWeeklySignal ? formatWeek(week) : formatDateISO(date);
|
30 | 36 | }
|
|
33 | 39 | <div class="mobile-root">
|
34 | 40 | <div class="mobile-header-line-bg">
|
35 | 41 | <div class="mobile-header-line">
|
| 42 | + <button class="mobile-back inline-svg-icon" on:click={switchMode}> |
| 43 | + {@html chevronLeftIcon} |
| 44 | + </button> |
36 | 45 | <h2>Indicator Status of <span>{name}</span></h2>
|
37 | 46 | </div>
|
38 | 47 | <div class="uk-container content-grid">
|
|
75 | 84 | {/if}
|
76 | 85 | </AboutSection>
|
77 | 86 | <AboutSection className="uk-margin-small-top uk-margin-small-bottom">
|
78 |
| - <h3 class="mobile-h3">About {source ? source.name : ''}</h3> |
| 87 | + <h3 class="mobile-h3">Provided by {source ? source.name : ''}</h3> |
79 | 88 | {#if source}
|
80 | 89 | <div>
|
81 | 90 | <SourceBadges {source} />
|
|
123 | 132 | <div>
|
124 | 133 | <KPI text={metaData ? formatDateOrWeek(sensor, metaData.maxTime, metaData.maxWeek) : '?'} />
|
125 | 134 | </div>
|
126 |
| - <div class="sub">Latest Data Available</div> |
| 135 | + <div class="sub" title="Most recent date for which data is available">Latest Data Available</div> |
127 | 136 | </div>
|
128 | 137 | <div>
|
129 | 138 | <div>
|
|
135 | 144 | <div>
|
136 | 145 | <KPI text={metaData ? formatDateOrWeek(sensor, metaData.maxIssue, metaData.maxIssueWeek) : '?'} />
|
137 | 146 | </div>
|
138 |
| - <div class="sub">Latest Issue</div> |
| 147 | + <div class="sub" title="Date the most recent update was published by Delphi">Latest Issue</div> |
139 | 148 | </div>
|
140 | 149 | </div>
|
141 | 150 | </div>
|
|
0 commit comments