allows to set and edit equipment icons

pull/49/head
macniel 2025-10-03 16:08:16 +02:00
parent 882ebf8392
commit 2eb2e8f9b5
3 changed files with 28 additions and 1 deletions

View File

@ -25,10 +25,15 @@ function buildStyles() {
}; };
function copySource() { function copySource() {
return src(['src/**/*', '!src/style/**/*.scss', '!src/packs/**/*']) return src(['src/**/*', '!src/assets/**/*', '!src/style/**/*.scss', '!src/packs/**/*'])
.pipe(dest('dist/')); .pipe(dest('dist/'));
} }
function copyAssets() {
return src(['src/assets/**/*'], {encoding: false})
.pipe(dest('dist/assets/'))
}
function updateManifestFile() { function updateManifestFile() {
return src('dist/system.json') return src('dist/system.json')
.pipe(replace('{{VERSION}}', process.env.VERSION)) .pipe(replace('{{VERSION}}', process.env.VERSION))
@ -61,6 +66,7 @@ function buildDB() {
export default series( export default series(
cleanDist, cleanDist,
copySource, copySource,
copyAssets,
buildStyles, buildStyles,
buildDB, buildDB,
updateManifestFile updateManifestFile

View File

@ -31,6 +31,26 @@
grid-area: name; grid-area: name;
} }
.name {
position: relative;
.img {
position: absolute;
right: 0;
bottom: 6px;
width: 24px;
height: 24px;
}
label {
position: absolute;
left: 0;
top: 0;
right: 26px;
bottom: 0;
}
}
.bottomline { .bottomline {
grid-area: bottomline; grid-area: bottomline;
display: grid; display: grid;

View File

@ -22,6 +22,7 @@
<div class="tab meta" data-group="primary" data-tab="meta"> <div class="tab meta" data-group="primary" data-tab="meta">
<div class="name"> <div class="name">
<img class="img" src="{{item.img}}" data-edit="img" title="{{item.name}}"/>
<label>Name <label>Name
<input name="name" type="text" value="{{item.name}}" placeholder="Name"/> <input name="name" type="text" value="{{item.name}}" placeholder="Name"/>
</label> </label>