Skip to content

Commit

Permalink
creating yaml file to store all helptext items, adding loader to webp…
Browse files Browse the repository at this point in the history
…ack config, using yaml key to populate help text storage for simple quota example
  • Loading branch information
assuntad23 committed Sep 20, 2023
1 parent e14c3e6 commit 96f26f8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
4 changes: 1 addition & 3 deletions client/src/components/Masthead/QuotaMeter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ export default {
//
return {
usingString: this.l("Using"),
helpTextString:
"This is your Quota storage meter. It is an indication of how much storage you are using. To learn more about Quota Storage, check out this GTN tutorial.",
};
},
computed: {
Expand Down Expand Up @@ -97,7 +95,7 @@ export default {
},
methods: {
callHelpMode() {
this.helpModeTextStore.addHelpModeText(this.helpTextString);
this.helpModeTextStore.addHelpModeText("quotaMeterHelpString");
},
},
};
Expand Down
4 changes: 3 additions & 1 deletion client/src/stores/helpmode/helpModeTextStore.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { defineStore } from "pinia";

import config from './helpTextConfig.yml';

export const useHelpModeTextStore = defineStore("helpModeText", {
state: () => {
return {
Expand All @@ -9,7 +11,7 @@ export const useHelpModeTextStore = defineStore("helpModeText", {

actions: {
addHelpModeText(text) {
this.helpmodetext = text;
this.helpmodetext = config[text];
},
},
});
2 changes: 2 additions & 0 deletions client/src/stores/helpmode/helpTextConfig.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
quotaMeterHelpString: This is your Quota storage meter. It is an indication of how much storage you are using. To learn more about Quota Storage, check out this GTN tutorial.s
4 changes: 4 additions & 0 deletions client/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ module.exports = (env = {}, argv = {}) => {
test: /\.vue$/,
loader: "vue-loader",
},
{
test: /\.ya?ml$/,
loader: "yaml-loader",
},
{
test: /\.tsx?$/,
exclude: /node_modules/,
Expand Down

0 comments on commit 96f26f8

Please sign in to comment.