Skip to content

Commit 85bd0c0

Browse files
committed
v0.2.1
1 parent 54eb6f4 commit 85bd0c0

5 files changed

Lines changed: 14 additions & 22 deletions

File tree

.github/workflows/build.yml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
workflow_dispatch:
55
push:
66
branches:
7-
- main
7+
- v12
88
paths:
99
- 'package.json'
1010

@@ -52,18 +52,6 @@ jobs:
5252
token: ${{ secrets.GITHUB_TOKEN }}
5353
artifacts: './module.json,./notelicker.zip' # don't forget to rename module zip thing
5454
tag: ${{ steps.get-version.outputs.release_version }} # Use the version as the tag
55-
- name: Create Latest Release
56-
id: create_latest_release
57-
uses: ncipollo/release-action@v1
58-
if: endsWith(github.ref, 'main') # Only update the latest release when pushing to the master branch
59-
with:
60-
allowUpdates: true
61-
name: Latest
62-
draft: false
63-
prerelease: false
64-
token: ${{ secrets.GITHUB_TOKEN }}
65-
artifacts: './module.json,./notelicker.zip' # don't forget to rename module zip thing
66-
tag: latest
6755
- name: Discord notification
6856
env:
6957
DISCORD_WEBHOOK: ${{ secrets.DISCORD_HOOK }}
@@ -78,4 +66,4 @@ jobs:
7866
url: 'https://api.foundryvtt.com/_api/packages/release_version'
7967
method: 'POST'
8068
customHeaders: '{"Content-Type": "application/json", "Authorization" : "${{ secrets.FOUNDRY_KEY }}"}'
81-
data: '{"dry_run": false, "id" : "notelicker", "release": {"version" : "${{ steps.get-version.outputs.release_version }}", "manifest": "https://github.com/${{ github.repository }}/releases/download/${{ steps.get-version.outputs.release_version }}/module.json", "notes" : "https://github.com/${{ github.repository }}/blob/main/CHANGELOG.md", "compatibility" : {"minimum": "11", "verified": "12", "maximum": ""} } }'
69+
data: '{"dry_run": false, "id" : "notelicker", "release": {"version" : "${{ steps.get-version.outputs.release_version }}", "manifest": "https://github.com/${{ github.repository }}/releases/download/${{ steps.get-version.outputs.release_version }}/module.json", "notes" : "https://github.com/${{ github.repository }}/blob/main/CHANGELOG.md", "compatibility" : {"minimum": "11", "verified": "12", "maximum": "12"} } }'

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 0.2.1
2+
3+
- Disable auto icon option was missing in v12.
4+
15
# 0.2.0
26

37
- v10 support dropped, fixed some deprecation warnings in v12.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "notelicker",
3-
"version": "0.2.0",
3+
"version": "0.2.1",
44
"author": "MrPrimate",
55
"description": "Foundry VTT module for enhancing notes and their icons",
66
"private": true,

src/hooks/anchorInjection.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ export function anchorInjection() {
100100
const update = setSlugProperties({ _id: documentSheet.document.id }, selectedSlug, documentSheet.document.label);
101101
await canvas.scene.updateEmbeddedDocuments("Note", [update]);
102102
}
103+
game.canvas.notes.draw();
103104
});
104105
}
105106
});

src/hooks/dynamicIcons.mjs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,23 @@ export async function dynamicIcons() {
88

99
Hooks.on("renderNoteConfig", (noteConfig, html, data) => {
1010
const sourceTexture = noteConfig.object?._source?.texture?.src;
11+
const customItemElement = html.find("file-picker[name='icon.custom'] > input")
12+
?? html.find("input[name='icon.custom']");
1113
if (Icons.textureExists(noteConfig.object.texture.src) && sourceTexture) {
12-
noteConfig.object.texture.src = `${noteConfig.object._source.texture.src}`;
14+
// noteConfig.object.texture.src = `${noteConfig.object._source.texture.src}`;
1315
const customIcon = !Object.values(CONFIG.JournalEntry.noteIcons).includes(sourceTexture);
1416
const icon = {
1517
selected: customIcon ? "" : sourceTexture,
1618
custom: customIcon ? sourceTexture : "",
1719
};
1820
data.icon = icon;
19-
if (customIcon) {
20-
html.find("input[name='icon.custom']")[0].value = sourceTexture;
21-
} else {
22-
html.find("input[name='icon.custom']")[0].value = "";
23-
html.find("select[name='icon.selected']")[0].value = sourceTexture;
21+
if (!customIcon) {
22+
customItemElement[0].value = "";
2423
}
2524
}
2625
// add disable selector
2726
const disableAutoIcon = Icons.disableAutoIcon(noteConfig.document);
28-
const globalGroup = html.find("input[name='icon.custom']").closest(".form-group");
27+
const globalGroup = customItemElement.closest(".form-group");
2928
const label = game.i18n.localize(`${CONSTANTS.SHORT_NAME}.Labels.DisableAutoIcon`);
3029
globalGroup.after(`
3130
<div class="form-group">

0 commit comments

Comments
 (0)