Skip to content

Commit

Permalink
Added Personas in settings
Browse files Browse the repository at this point in the history
  • Loading branch information
driver-deploy-2 committed Dec 13, 2024
1 parent 2044bbb commit 73f32fb
Show file tree
Hide file tree
Showing 99 changed files with 436 additions and 0 deletions.
Binary file added src/assets/personas/business_woman1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/personas/business_woman2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/personas/business_woman3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/personas/business_woman4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/personas/climate_girl1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/personas/climate_girl2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/personas/climate_girl3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/personas/climate_girl4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/personas/construction_worker1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/personas/construction_worker2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/personas/construction_worker3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/personas/construction_worker4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/personas/cook1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/personas/cook2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/personas/cook3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/personas/elderly_man1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/personas/elderly_man2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/personas/elderly_man3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/personas/elderly_man4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/personas/elderly_man_wheelchair1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/personas/elderly_man_wheelchair2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/personas/elderly_man_wheelchair3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/personas/families1.jpg
Binary file added src/assets/personas/families10.jpg
Binary file added src/assets/personas/families11.jpg
Binary file added src/assets/personas/families12.jpg
Binary file added src/assets/personas/families13.jpg
Binary file added src/assets/personas/families14.jpg
Binary file added src/assets/personas/families15.jpg
Binary file added src/assets/personas/families2.jpg
Binary file added src/assets/personas/families3.jpg
Binary file added src/assets/personas/families4.jpg
Binary file added src/assets/personas/families5.jpg
Binary file added src/assets/personas/families6.jpg
Binary file added src/assets/personas/families7.jpg
Binary file added src/assets/personas/families8.jpg
Binary file added src/assets/personas/families9.jpg
Binary file added src/assets/personas/farmer1.jpg
Binary file added src/assets/personas/farmer2.jpg
Binary file added src/assets/personas/farmer3.jpg
Binary file added src/assets/personas/female_speaker1.jpg
Binary file added src/assets/personas/female_speaker2.jpg
Binary file added src/assets/personas/female_speaker3.jpg
Binary file added src/assets/personas/female_speaker4.jpg
Binary file added src/assets/personas/female_student1.jpg
Binary file added src/assets/personas/female_student2.jpg
Binary file added src/assets/personas/female_teacher1.jpg
Binary file added src/assets/personas/female_teacher2.jpg
Binary file added src/assets/personas/male_indian_student1.jpg
Binary file added src/assets/personas/male_indian_student2.jpg
Binary file added src/assets/personas/male_indian_student3.jpg
Binary file added src/assets/personas/male_indian_student4.jpg
Binary file added src/assets/personas/male_teacher1.jpg
Binary file added src/assets/personas/male_teacher2.jpg
Binary file added src/assets/personas/male_zzp1.jpg
Binary file added src/assets/personas/male_zzp2.jpg
Binary file added src/assets/personas/male_zzp3.jpg
Binary file added src/assets/personas/male_zzp4.jpg
Binary file added src/assets/personas/middleaged_man_suit1.jpg
3 changes: 3 additions & 0 deletions src/assets/personas/middleaged_man_suit1.jpg:Zone.Identifier
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[ZoneTransfer]
ZoneId=3
HostUrl=https://www.bing.com/
Binary file added src/assets/personas/middleaged_man_suit2.jpg
3 changes: 3 additions & 0 deletions src/assets/personas/middleaged_man_suit2.jpg:Zone.Identifier
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[ZoneTransfer]
ZoneId=3
HostUrl=https://www.bing.com/
Binary file added src/assets/personas/middleaged_man_suit3.jpg
3 changes: 3 additions & 0 deletions src/assets/personas/middleaged_man_suit3.jpg:Zone.Identifier
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[ZoneTransfer]
ZoneId=3
HostUrl=https://www.bing.com/
Binary file added src/assets/personas/middleaged_man_suit4.jpg
3 changes: 3 additions & 0 deletions src/assets/personas/middleaged_man_suit4.jpg:Zone.Identifier
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[ZoneTransfer]
ZoneId=3
HostUrl=https://www.bing.com/
Binary file added src/assets/personas/nurse1.jpg
Binary file added src/assets/personas/nurse2.jpg
Binary file added src/assets/personas/nurse3.jpg
Binary file added src/assets/personas/nurse4.jpg
Binary file added src/assets/personas/taxi_driver1.jpg
Binary file added src/assets/personas/taxi_driver2.jpg
Binary file added src/assets/personas/taxi_driver3.jpg
Binary file added src/assets/personas/taxi_driver4.jpg
Binary file added src/assets/personas/tech_guy1.jpg
Binary file added src/assets/personas/tech_guy2.jpg
Binary file added src/assets/personas/tech_guy3.jpg
Binary file added src/assets/personas/tech_guy4.jpg
Binary file added src/assets/personas/young_mother1.jpg
Binary file added src/assets/personas/young_mother2.jpg
Binary file added src/assets/personas/young_mother3.jpg
Binary file added src/assets/personas/young_mother4.jpg
50 changes: 50 additions & 0 deletions src/components/settings-page.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import m, { FactoryComponent } from 'mithril';
import {
Dashboards,
DataModel,
ID,
Inconsistencies,
PersonaImages,
Scenario,
emptyModel,
} from '../models';
Expand Down Expand Up @@ -335,6 +337,54 @@ export const SettingsPage: MeiosisComponent = () => {
]
),
},
{
title: t('PERSONA', 2),
vnode: m(
'.row',
m(LayoutForm, {
obj: model,
i18n: i18n.i18n,
form: [
{
id: 'personas',
label: t('PERSONA', 2),
repeat: true,
pageSize: 100,
type: [
{ id: 'id', autogenerate: 'id' },
{
id: 'label',
type: 'text',
className: 'col s12 m6',
label: t('NAME'),
},
{
id: 'url',
type: 'select',
className: 'col s12 m6',
options: PersonaImages,
label: t('IMAGE'),
},
{
id: 'desc',
type: 'textarea',
className: 'col s12',
label: t('DESCRIPTION'),
},
// {
// type: 'md',
// readonly: true,
// value: `<img src="{{url}}"/>`,
// },
],
},
] as UIForm<any>,
onchange: async () => {
await saveModel(attrs, model);
},
} as FormAttributes<DataModel>)
),
},
],
}),
m(ModalPanel, {
Expand Down
4 changes: 4 additions & 0 deletions src/models/data-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ export type DataModel = {
scenario: Scenario;
/** List of other possible scenarios, excluding the current scenario */
scenarios: Scenario[];
personas?: Persona[];
};

export type Persona = Item;

export type OldDataModel = {
scenarios: {
current: {
Expand Down Expand Up @@ -363,6 +366,7 @@ export const emptyModel = () =>
lastUpdate: new Date().valueOf(),
scenarios: [],
scenario: newScenario(),
personas: [],
} as DataModel);

/**
Expand Down
1 change: 1 addition & 0 deletions src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ export * from './data-model';
export * from './nominatim';
export * from './overpassresult';
export * from './osm';
export * from './persona-images';
Loading

0 comments on commit 73f32fb

Please sign in to comment.