From eef4adfab7458c3597d04b9ef482009d2304a59e Mon Sep 17 00:00:00 2001 From: Stefan Zermatten Date: Fri, 7 Jul 2023 09:55:55 +0200 Subject: [PATCH] Started on new Tabletop design idea --- .../api/creature/creatures/Creatures.js | 32 +++ .../selectedCreatureBar/CreaturePortrait.vue | 0 .../SelectedCreatureBar.vue | 206 ++++++++++++++++++ app/package-lock.json | 10 +- app/package.json | 2 +- 5 files changed, 244 insertions(+), 6 deletions(-) create mode 100644 app/imports/client/ui/tabletop/selectedCreatureBar/CreaturePortrait.vue create mode 100644 app/imports/client/ui/tabletop/selectedCreatureBar/SelectedCreatureBar.vue diff --git a/app/imports/api/creature/creatures/Creatures.js b/app/imports/api/creature/creatures/Creatures.js index b94fe7e4..846b184b 100644 --- a/app/imports/api/creature/creatures/Creatures.js +++ b/app/imports/api/creature/creatures/Creatures.js @@ -62,6 +62,34 @@ let CreatureSettingsSchema = new SimpleSchema({ }, }); +let IconGroupSchema = new SimpleSchema({ + name: { + type: String, + max: STORAGE_LIMITS.name, + optional: true, + }, + iconIds: { + type: Array, + max: 4, + defaultValue: [], + }, + 'iconIds.$': { + type: String, + max: STORAGE_LIMITS.variableName, + }, +}); + +let CreatureTabletopSettingsSchema = new SimpleSchema({ + iconGroups: { + type: Array, + defaultValue: [], + max: 10, + }, + 'iconGroups.$': { + type: IconGroupSchema, + }, +}); + let CreatureSchema = new SimpleSchema({ // Strings name: { @@ -182,6 +210,10 @@ let CreatureSchema = new SimpleSchema({ type: SimpleSchema.Integer, optional: true, }, + tabletopSettings: { + type: CreatureTabletopSettingsSchema, + optional: true, + }, // Settings settings: { diff --git a/app/imports/client/ui/tabletop/selectedCreatureBar/CreaturePortrait.vue b/app/imports/client/ui/tabletop/selectedCreatureBar/CreaturePortrait.vue new file mode 100644 index 00000000..e69de29b diff --git a/app/imports/client/ui/tabletop/selectedCreatureBar/SelectedCreatureBar.vue b/app/imports/client/ui/tabletop/selectedCreatureBar/SelectedCreatureBar.vue new file mode 100644 index 00000000..72cc1aee --- /dev/null +++ b/app/imports/client/ui/tabletop/selectedCreatureBar/SelectedCreatureBar.vue @@ -0,0 +1,206 @@ + + + + + \ No newline at end of file diff --git a/app/package-lock.json b/app/package-lock.json index daf70f03..74139826 100644 --- a/app/package-lock.json +++ b/app/package-lock.json @@ -1,6 +1,6 @@ { "name": "dicecloud", - "version": "2.0.51", + "version": "2.0.53", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -1917,7 +1917,7 @@ "lodash.omit": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.omit/-/lodash.omit-4.5.0.tgz", - "integrity": "sha512-XeqSp49hNGmlkj2EJlfrQFIzQ6lXdNro9sddtQzcJY8QaoC2GO0DT7xaIokHeyM+mIT0mPMlPvkYzg2xCuHdZg==" + "integrity": "sha1-brGa5aHuHdnfC5aeZs4Lf6MLXmA=" }, "lodash.template": { "version": "4.5.0", @@ -3920,9 +3920,9 @@ } }, "vue": { - "version": "2.6.14", - "resolved": "https://registry.npmjs.org/vue/-/vue-2.6.14.tgz", - "integrity": "sha512-x2284lgYvjOMj3Za7kqzRcUSxBboHqtgRE2zlos1qWaOye5yUmHn42LB1250NJBLRwEcdrB0JRwyPTEPhfQjiQ==" + "version": "2.6.10", + "resolved": "https://registry.npmjs.org/vue/-/vue-2.6.10.tgz", + "integrity": "sha512-ImThpeNU9HbdZL3utgMCq0oiMzAkt1mcgy3/E6zWC/G6AaQoeuFdsl9nDhTDU3X1R6FK7nsIUuRACVcjI+A2GQ==" }, "vue-eslint-parser": { "version": "7.11.0", diff --git a/app/package.json b/app/package.json index 75f76649..7be55595 100644 --- a/app/package.json +++ b/app/package.json @@ -126,4 +126,4 @@ ] } } -} \ No newline at end of file +}