-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ #133 add configuration menu section with real data
- Loading branch information
Showing
17 changed files
with
324 additions
and
117 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
23 changes: 23 additions & 0 deletions
23
src/application/components/menu/ConfigurationTab/ConfigurationList.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<template> | ||
<div class="row my-2 h-100 configuration-tab"> | ||
<div class="col"> | ||
<div class="card bg-transparent"> | ||
<div class="card-body p-0"> | ||
<div class="list-group"> | ||
<ConfigurationListItemSwitch | ||
configuration-id="general_refresh_rate" | ||
/> | ||
<ConfigurationListItemSelect configuration-id="general_port" /> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script setup> | ||
import ConfigurationListItemSelect from '@/application/components/menu/ConfigurationTab/ConfigurationListItemSelect.vue'; | ||
import ConfigurationListItemSwitch from '@/application/components/menu/ConfigurationTab/ConfigurationListItemSwitch.vue'; | ||
</script> | ||
|
||
<style lang="scss" scoped></style> |
34 changes: 34 additions & 0 deletions
34
src/application/components/menu/ConfigurationTab/ConfigurationListItem.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<template> | ||
<div class="list-group-item bg-acrylic light text-white"> | ||
<div class="d-flex-center-center"> | ||
<div | ||
class="d-flex justify-content-center align-items-start flex-column w-100" | ||
> | ||
<div class="d-flex justify-content-start align-items-center"> | ||
<Tag class="ms-0">#{{ configurationItem.target }}</Tag> | ||
<span class="mx-1">{{ configurationItem.label }}</span> | ||
</div> | ||
<small class="text-muted">{{ configurationItem.description }}</small> | ||
</div> | ||
<div> | ||
<slot /> | ||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script setup> | ||
import Tag from '@/application/ui/Tag/Tag.vue'; | ||
import { retrieveConfigurationSettings } from '@/domain/configuration/configurationLibrary.util.js'; | ||
const props = defineProps({ | ||
configurationId: { | ||
type: String, | ||
required: true | ||
} | ||
}); | ||
const configurationItem = retrieveConfigurationSettings(props.configurationId); | ||
</script> | ||
|
||
<style lang="scss" scoped></style> |
26 changes: 26 additions & 0 deletions
26
src/application/components/menu/ConfigurationTab/ConfigurationListItemSelect.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<template> | ||
<ConfigurationListItem :configuration-id="configurationId"> | ||
<select | ||
class="form-select form-select-sm" | ||
aria-label="Default select example" | ||
> | ||
<option selected>Open this select menu</option> | ||
<option value="1">One</option> | ||
<option value="2">Two</option> | ||
<option value="3">Three</option> | ||
</select> | ||
</ConfigurationListItem> | ||
</template> | ||
|
||
<script setup> | ||
import ConfigurationListItem from '@/application/components/menu/ConfigurationTab/ConfigurationListItem.vue'; | ||
defineProps({ | ||
configurationId: { | ||
type: String, | ||
required: true | ||
} | ||
}); | ||
</script> | ||
|
||
<style lang="scss" scoped></style> |
19 changes: 19 additions & 0 deletions
19
src/application/components/menu/ConfigurationTab/ConfigurationListItemSwitch.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<template> | ||
<ConfigurationListItem :configuration-id="configurationId"> | ||
<Switch /> | ||
</ConfigurationListItem> | ||
</template> | ||
|
||
<script setup> | ||
import ConfigurationListItem from '@/application/components/menu/ConfigurationTab/ConfigurationListItem.vue'; | ||
import Switch from '@/application/ui/Switch/Switch.vue'; | ||
defineProps({ | ||
configurationId: { | ||
type: String, | ||
required: true | ||
} | ||
}); | ||
</script> | ||
|
||
<style lang="scss" scoped></style> |
53 changes: 53 additions & 0 deletions
53
src/application/components/menu/ConfigurationTab/ConfigurationSearchBar.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<template> | ||
<div class="row my-2 configuration-tab"> | ||
<div class="col-12"> | ||
<!-- <div class="d-flex-center-center">--> | ||
<div class="input-group"> | ||
<input | ||
type="search" | ||
class="form-control bg-acrylic" | ||
placeholder="Type to search..." | ||
/> | ||
<!-- <button--> | ||
<!-- class="btn btn-acrylic dropdown-toggle d-flex-center-center px-2 py-1 m-0 d-flex-center-center"--> | ||
<!-- type="button"--> | ||
<!-- data-bs-toggle="dropdown"--> | ||
<!-- aria-expanded="false"--> | ||
<!-- >--> | ||
<!-- <i class="icon-endpoint"></i>--> | ||
<!-- </button>--> | ||
<!-- <ul class="dropdown-menu">--> | ||
<!-- <li>--> | ||
<!-- <Tag>#jagfx</Tag>--> | ||
<!-- </li>--> | ||
<!-- <li>--> | ||
<!-- <Tag>#jagfx</Tag>--> | ||
<!-- </li>--> | ||
<!-- <li>--> | ||
<!-- <Tag>#jagfx</Tag>--> | ||
<!-- </li>--> | ||
<!-- </ul>--> | ||
<button | ||
class="btn btn-acrylic px-2 py-1 pe-3 m-0 d-flex-center-center" | ||
type="button" | ||
> | ||
<i class="icon-location_arrow"></i> | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
<!-- <div class="row my-2 configuration-tab">--> | ||
<!-- <div class="col d-flex justify-content-start align-items-center">--> | ||
<!-- <Tag>#jagfx</Tag>--> | ||
<!-- <Tag>#jagfx</Tag>--> | ||
<!-- <Tag>#jagfx</Tag>--> | ||
<!-- <div class="d-flex-center-center text-muted mx-1">--> | ||
<!-- <i class="icon-endpoint"></i>--> | ||
<!-- </div>--> | ||
<!-- </div>--> | ||
<!-- </div>--> | ||
</template> | ||
|
||
<script setup></script> | ||
|
||
<style lang="scss" scoped></style> |
13 changes: 13 additions & 0 deletions
13
src/application/components/menu/ConfigurationTab/ConfigurationTab.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<template> | ||
<div> | ||
<ConfigurationSearchBar /> | ||
<ConfigurationList /> | ||
</div> | ||
</template> | ||
|
||
<script setup> | ||
import ConfigurationList from '@/application/components/menu/ConfigurationTab/ConfigurationList.vue'; | ||
import ConfigurationSearchBar from '@/application/components/menu/ConfigurationTab/ConfigurationSearchBar.vue'; | ||
</script> | ||
|
||
<style lang="scss"></style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { | ||
applyFiltersToConfigurationsSettingsList, | ||
convertJsonObjectToConfigurationItem | ||
} from '@/domain/configuration/configurationLibrary.util.js'; | ||
import { computed, reactive, readonly } from 'vue'; | ||
import configurationMap from '@/domain/configuration/configuration.library.json'; | ||
|
||
const state = reactive({ | ||
search: '' | ||
}); | ||
|
||
const getters = { | ||
search: computed(() => state.search), | ||
configurationMatchWithSearch: computed(() => | ||
applyFiltersToConfigurationsSettingsList( | ||
{ | ||
label: state.search | ||
}, | ||
configurationMap.map((configurationItem) => | ||
convertJsonObjectToConfigurationItem(configurationItem) | ||
) | ||
) | ||
) | ||
}; | ||
|
||
const actions = {}; | ||
|
||
export const useConfigurationLibrary = () => ({ | ||
state: readonly(state), | ||
...getters, | ||
...actions | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/** | ||
* @author: Emmanuel SMITH <[email protected]> | ||
* project: ets2-dashboard-skin | ||
* file: _tab-config.scss | ||
* file: _tab-configuration.scss | ||
* Date: 21/05/2020 | ||
* Time: 15:22 | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.