Filter progress
parent
5b0877382f
commit
15d34a0838
|
@ -27,7 +27,7 @@ const distDirectory = "./dist";
|
||||||
const stylesDirectory = `${sourceDirectory}/styles`;
|
const stylesDirectory = `${sourceDirectory}/styles`;
|
||||||
const stylesExtension = "less";
|
const stylesExtension = "less";
|
||||||
const sourceFileExtension = "js";
|
const sourceFileExtension = "js";
|
||||||
const staticFiles = ["assets", "fonts", "lang", "packs", "templates", "module.json"];
|
const staticFiles = ["assets", "fonts", "lang", "packs", "templates", "module.json", "components/styles.vue.css"];
|
||||||
|
|
||||||
/** ******************/
|
/** ******************/
|
||||||
/* BUILD */
|
/* BUILD */
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -18,7 +18,10 @@
|
||||||
"verified": "11"
|
"verified": "11"
|
||||||
},
|
},
|
||||||
"esmodules": ["module/compendium-browser.js"],
|
"esmodules": ["module/compendium-browser.js"],
|
||||||
"styles": ["styles/compendium-browser.css"],
|
"styles": [
|
||||||
|
"styles/compendium-browser.css",
|
||||||
|
"components/styles.vue.css"
|
||||||
|
],
|
||||||
"languages": [
|
"languages": [
|
||||||
{
|
{
|
||||||
"lang": "en",
|
"lang": "en",
|
||||||
|
|
|
@ -22,56 +22,35 @@
|
||||||
<button type="reset" @click="resetFilters()">{{ game.i18n.localize('Reset Filters') }}</button>
|
<button type="reset" @click="resetFilters()">{{ game.i18n.localize('Reset Filters') }}</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="filtercontainer">
|
||||||
<!-- Level range slider. -->
|
<h3>{{ game.i18n.localize('General') }}</h3>
|
||||||
<!-- <div class="unit unit--input">
|
<!-- Level range slider. -->
|
||||||
<label class="unit-title" for="compendiumBrowser.level">{{ game.i18n.localize('ARCHMAGE.level') }}</label>
|
<div class="filter">
|
||||||
<div class="level-range flexrow">
|
<dt class="unit-title" for="compendiumBrowser.level">{{ game.i18n.localize('Challenge Rating') }}</dt>
|
||||||
<div class="level-label"><span>{{ levelRange[0] }}</span><span v-if="levelRange[0] !== levelRange[1]"> - {{ levelRange[1] }}</span></div>
|
<div class="level-range flexrow">
|
||||||
<div class="level-input slider-wrapper flexrow">
|
<div class="level-label"><span>{{ crRange[0] }}</span><span v-if="crRange[0] !== crRange[1]"> - {{ crRange[1] }}</span></div>
|
||||||
<Slider v-model="levelRange" :min="1" :max="15" :tooltips="false"/>
|
<div class="level-input slider-wrapper flexrow">
|
||||||
|
<Slider v-model="crRange" :min="1" :max="30" :tooltips="false"/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div> -->
|
<!-- Size filter. -->
|
||||||
|
<div class="filter">
|
||||||
<!-- Type filter. -->
|
<dt class="unit-title" for="compendiumBrowser.size">{{ game.i18n.localize('Size') }}</dt>
|
||||||
<!-- <div class="unit unit--input">
|
<dd>
|
||||||
<label class="unit-title" for="compendiumBrowser.type">{{ game.i18n.localize('ARCHMAGE.type') }}</label>
|
<Multiselect
|
||||||
<Multiselect
|
v-model="size"
|
||||||
v-model="type"
|
mode="tags"
|
||||||
mode="tags"
|
:searchable="false"
|
||||||
:searchable="false"
|
:create-option="false"
|
||||||
:create-option="false"
|
:options="getOptions(CONFIG.DND5E.actorSizes)"
|
||||||
:options="CONFIG.ARCHMAGE.creatureTypes"
|
/>
|
||||||
/>
|
</dd>
|
||||||
</div> -->
|
</div>
|
||||||
|
</div>
|
||||||
<!-- Role filter. -->
|
|
||||||
<!-- <div class="unit unit--input">
|
|
||||||
<label class="unit-title" for="compendiumBrowser.role">{{ game.i18n.localize('ARCHMAGE.role') }}</label>
|
|
||||||
<Multiselect
|
|
||||||
v-model="role"
|
|
||||||
mode="tags"
|
|
||||||
:searchable="false"
|
|
||||||
:create-option="false"
|
|
||||||
:options="CONFIG.ARCHMAGE.creatureRoles"
|
|
||||||
/>
|
|
||||||
</div> -->
|
|
||||||
|
|
||||||
<!-- Size filter. -->
|
|
||||||
<!-- <div class="unit unit--input">
|
|
||||||
<label class="unit-title" for="compendiumBrowser.size">{{ game.i18n.localize('ARCHMAGE.size') }}</label>
|
|
||||||
<Multiselect
|
|
||||||
v-model="size"
|
|
||||||
mode="tags"
|
|
||||||
:searchable="false"
|
|
||||||
:create-option="false"
|
|
||||||
:options="CONFIG.ARCHMAGE.creatureSizes"
|
|
||||||
/>
|
|
||||||
</div> -->
|
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<div class="list-area flexcol">
|
<div class="list-area flexcol">
|
||||||
<!-- Creatures results. -->
|
<!-- Creatures results. -->
|
||||||
<!-- <section class="section section--npcs section--main flexcol"> -->
|
<!-- <section class="section section--npcs section--main flexcol"> -->
|
||||||
|
@ -196,6 +175,16 @@ export default {
|
||||||
this.crRange = [1, 30];
|
this.crRange = [1, 30];
|
||||||
this.size = [];
|
this.size = [];
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* Get multiselect options.
|
||||||
|
*/
|
||||||
|
getOptions(config) {
|
||||||
|
const options = {};
|
||||||
|
for (let [key, value] of Object.entries(config)) {
|
||||||
|
options[key] = value.label;
|
||||||
|
}
|
||||||
|
return options;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
entries() {
|
entries() {
|
||||||
|
@ -309,8 +298,7 @@ export default {
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less">
|
<style>
|
||||||
// Import our component styles.
|
|
||||||
@import "@vueform/slider/themes/default.css";
|
@import "@vueform/slider/themes/default.css";
|
||||||
@import "@vueform/multiselect/themes/default.css";
|
@import "@vueform/multiselect/themes/default.css";
|
||||||
</style>
|
</style>
|
|
@ -13,9 +13,7 @@ export default defineConfig({
|
||||||
},
|
},
|
||||||
css: {
|
css: {
|
||||||
preprocessorOptions: {
|
preprocessorOptions: {
|
||||||
less: {
|
less: {}
|
||||||
additionalData: '@import "src/styles/compendium-browser.less";'
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
build: {
|
build: {
|
||||||
|
|
Loading…
Reference in New Issue