Skip to content

Commit

Permalink
0.8.3
Browse files Browse the repository at this point in the history
  • Loading branch information
averrin committed Aug 4, 2022
1 parent fbf49b9 commit f1ce96e
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 8 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,20 @@ All notable changes to this project will be documented in this file. Dates are d

## [Unreleased]

## [0.8.3](https://github.com/averrin/director/compare/0.8.2...0.8.3)
Fixed:
* Broken by v10 show/hide in the Selection tab
* Toggle token magic doesn't work if targets are selected by Tagger
* Size in the Selection tab isn't rounded
* Tag color selection doesn't work in the mutual tag input
* "Create action" from the selection tab made it with "undefined" type


## [0.8.2](https://github.com/averrin/director/compare/0.8.1...0.8.2)
Added:
* More compact collapsed mode
* Actions and Hooks can be global
* "Run Macro" action

Fixed:
* Tagger component acts weird sometimes if there are more than one instance on page
Expand Down
9 changes: 9 additions & 0 deletions src/modules/API.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@ const API = {
return seq;
},

listActions: () => {
let acts;
actions.update(a => {
acts = a;
return a;
});
return acts;
},

findSequence: (name) => {
let seq;
sequences.update(seqs => {
Expand Down
3 changes: 3 additions & 0 deletions src/modules/Integrations.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ function initTokenMagicIntegration() {
group: 'Token Magic',
execute: (object, action, event) => {
if (!object) return;
if (!object.document) {
object = object.object;
}
object.getFlag = object.document.getFlag.bind(object.document);
if (TokenMagic.hasFilterType(object, action.args[0])) {
TokenMagic.deleteFilters(object, action.args[0]);
Expand Down
2 changes: 1 addition & 1 deletion src/modules/Specs.js
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ export const argSpecs = [
{ id: "float", var_types: ["float", "int", "expression"], default: 0 },
{ id: "macro", var_types: ["macro", "string", "expression"] },
{ id: "string", var_types: ["string", "expression"] },
{ id: "color", var_types: ["string", "color", "expression"] },
{ id: "color", var_types: ["string", "color", "expression"], default: "#ffffff" },
{ id: "code", var_types: ["code", "string", "expression"] },
{ id: "expression", var_types: ["expression"] },
{
Expand Down
3 changes: 2 additions & 1 deletion src/view/MainUI.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import { getContext, onDestroy, setContext } from "svelte";
import Action from "../modules/Actions";
import { actionTypes } from "../modules/Specs";
const { application } = getContext("external");
const position = application.position;
position.scale = game.settings.get(moduleId, SETTINGS.UI_SCALE);
Expand All @@ -50,7 +51,7 @@
function createAction(_, tags) {
actions.update((actions) => {
actions = [Action.fromPlain({ id: uuidv4(), value: tags, type: "" }), ...actions];
actions = [Action.fromPlain({ id: uuidv4(), value: tags, type: actionTypes[0] }), ...actions];
return actions;
});
mode = "actions";
Expand Down
9 changes: 8 additions & 1 deletion src/view/components/ActionsTab.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,14 @@
<h3 class="ui-py-4 ui-font-bold ui-text-lg">Edit action</h3>
<div class="ui-flex ui-flex-row ui-items-center ui-gap-2">
<div class="ui-flex ui-flex-row ui-flex-1 ui-items-center ui-gap-2 ui-flex-wrap">
<ArgInput type="color" label="color" bind:value={editItem.color} hideSign={true} widthAuto={true} />
<ArgInput
type="color"
label="color"
bind:value={editItem.color}
hideSign={true}
widthAuto={true}
defaultValue="#46525D"
/>
<ArgInput type="icon" label="icon" bind:value={editItem.icon} hideSign={true} widthAuto={true} />
<ArgInput
type="bool"
Expand Down
11 changes: 6 additions & 5 deletions src/view/components/SelectionTab.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
on:tags={(e) => globalThis.debounce(onTagsSelected(e, -1), 100)}
tags={tagsMutual}
colors={$tagColors}
{onTagClick}
/>
</div>
</div>
Expand Down Expand Up @@ -157,15 +158,15 @@
Token: {tile.name}
{/if}
{#if true}
<span class="ui-badge">{tile.width}x{tile.height}</span>
<span class="ui-badge">{Math.round(tile.width)}x{Math.round(tile.height)}</span>
{/if}
<span
class="ui-badge"
class:ui-badge-ghost={tile.hidden}
class:ui-badge-success={!tile.hidden}
on:click={() => tile.document.update({ hidden: !tile.hidden })}
class:ui-badge-ghost={tile.hidden || tile.data.hidden}
class:ui-badge-success={!tile.hidden || tile.data.hidden}
on:click={() => tile.document.update({ hidden: !(tile.hidden || tile.data.hidden) })}
>
{tile.hidden ? "hidden" : "visible"}
{tile.hidden || tile.data.hidden ? "hidden" : "visible"}
</span>
</h2>
Expand Down

0 comments on commit f1ce96e

Please sign in to comment.