-
Notifications
You must be signed in to change notification settings - Fork 112
Koala-Theme: Plans - temporary mode warning, link to plan settings #3147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
c14866f
Add warning text and settings link button
Brett-S-OWB a900d40
Add settings link
Brett-S-OWB 9c3ae2c
store clean up
Brett-S-OWB a93f44a
formatting
Brett-S-OWB 50fcfe7
Add time charging plan settings link
Brett-S-OWB cee5a7d
update store time charging plans
Brett-S-OWB 9edbc8f
Reuseable component for warning messages
Brett-S-OWB f9c137a
always return a string for prop "message" - prevent console warnings.
Brett-S-OWB 9af8c48
Rename prop
Brett-S-OWB 9694c36
ensure "temporaryChargeModeActive" not undefined
Brett-S-OWB c24543b
Rename link button
Brett-S-OWB ce24d07
update time plans with "BaseMessage" component
Brett-S-OWB b5f85a4
message text improvements
Brett-S-OWB a1f0f2b
formatting
Brett-S-OWB 414bffe
formatting
Brett-S-OWB 8a4ebdf
1 warning message, update link button
Brett-S-OWB 86d76c4
Ensure boolean in store computed property
Brett-S-OWB 6dcccd7
change charge plan link button color (dark-mode), better contrast
Brett-S-OWB 1ed4977
Repair reactivity in components
Brett-S-OWB cd92df2
Add prop to BaseMessage - warning messages can be fully displayed
Brett-S-OWB 1ddb30f
Text-Formatting
Brett-S-OWB bf58351
Make function naming consistent
Brett-S-OWB af63ae5
Add guard for button link, ensure link id is defined
Brett-S-OWB 0e837de
Add guard for button link - time charging plans
Brett-S-OWB 040353b
Use standard quasar rounded-borders for warn/info boxes
Brett-S-OWB 966653e
Formatting
Brett-S-OWB 6ae82b2
No plan info message as BaseMessage component
Brett-S-OWB cf7b5bd
width -> max-width
benderl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
58 changes: 58 additions & 0 deletions
58
packages/modules/web_themes/koala/source/src/components/BaseMessage.vue
This file contains hidden or 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,58 @@ | ||
| <template> | ||
| <div | ||
| v-if="showMessage" | ||
| class="row q-mt-sm q-pa-sm text-white no-wrap cursor-pointer rounded-borders" | ||
| :class="[{ 'items-center': collapsed }, messageClass]" | ||
| @click="toggleCollapse" | ||
| > | ||
| <q-icon :name="iconName" size="sm" class="q-mr-xs" /> | ||
| <div :class="{ ellipsis: collapsed }"> | ||
| {{ message }} | ||
| </div> | ||
| </div> | ||
| </template> | ||
|
|
||
| <script setup lang="ts"> | ||
| import { computed, ref } from 'vue'; | ||
|
|
||
| const props = withDefaults( | ||
| defineProps<{ | ||
| showMessage?: boolean; | ||
| message: string; | ||
| type?: 'info' | 'warning' | 'error'; | ||
| collapsed?: boolean; | ||
| }>(), | ||
| { | ||
| collapsed: true, | ||
| showMessage: true, | ||
| }, | ||
| ); | ||
|
|
||
| const collapsed = ref(props.collapsed); | ||
|
|
||
| const toggleCollapse = () => { | ||
| collapsed.value = !collapsed.value; | ||
| }; | ||
|
|
||
| const messageClass = computed(() => { | ||
| switch (props.type) { | ||
| case 'warning': | ||
| return 'bg-warning'; | ||
| case 'error': | ||
| return 'bg-negative'; | ||
| default: | ||
| return 'bg-primary'; | ||
| } | ||
| }); | ||
|
|
||
| const iconName = computed(() => { | ||
| switch (props.type) { | ||
| case 'warning': | ||
| return 'warning'; | ||
| case 'error': | ||
| return 'error'; | ||
| default: | ||
| return 'info'; | ||
| } | ||
| }); | ||
| </script> | ||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.