Files
tekton/format_report_final.js
T
adtpdn decdb74ade chore: release version 2.3.5 and refactor lobby
Bump export_presets.cfg version to 2.3.5. Update CHANGELOG_DRAFT.md.
Refactor lobby.gd into LobbyChat, LobbyMainMenu, LobbyRoomList, LobbyRoom.
Move Nakama config to environment variables in nakama_manager.gd.
Derive auth_manager.gd encryption key from OS.get_unique_id().sha256_text().
Remove Steam email auth fallback. Require auth ticket.
Make GachaManager.pull() async in gacha_panel.gd.
Remove dummy wallet seeding. Add store_type to IAP payload.
Validate IAP receipts server-side in economy.lua.
Register gacha module in main.lua.
Clean backend_service.gd stubs.
Fix featured_banners type safety in gacha_manager.gd. Guards non-array responses.
Move tiles_armagedon_a1.res to assets/models/meshes/. Fix import fallback_path.
2026-05-22 12:08:11 +08:00

159 lines
5.1 KiB
JavaScript

/* Build fancy Adaptive Card report with icons and status */
function getTitle(item) {
if (item.json.Name && item.json.Name.title && Array.isArray(item.json.Name.title) && item.json.Name.title.length > 0) {
return item.json.Name.title[0].plain_text;
}
if (item.json.title && Array.isArray(item.json.title) && item.json.title.length > 0) {
return item.json.title[0].plain_text;
}
return "Untitled";
}
const items = $input.all();
const taskBlocks = [];
if (items.length === 0) {
taskBlocks.push({
type: 'TextBlock',
text: 'No tasks were completed today. 💤',
color: 'warning',
weight: 'Bolder'
});
} else {
items.forEach((item, index) => {
const projectType = item.json.ProjectType || '';
const priority = item.json.Priority || '';
const taskName = getTitle(item);
const description = item.json.Description || 'No description provided.';
const status = item.json.Status || '';
const prefix = [projectType, priority].filter(Boolean).join('-');
const title = prefix ? `[${prefix}]: ${taskName}` : taskName;
// Determine status icon and color
let statusIcon = 'https://cdn-icons-png.flaticon.com/512/190/190411.png';
let statusColor = 'Good';
let statusText = 'DONE';
if (status === 'In Progress') {
statusIcon = 'https://cdn-icons-png.flaticon.com/512/992/992697.png';
statusColor = 'Accent';
statusText = 'IN PROGRESS';
} else if (status === 'Pending' || status === '') {
statusIcon = 'https://cdn-icons-png.flaticon.com/512/1828/1828645.png';
statusColor = 'Default';
statusText = 'PENDING';
}
taskBlocks.push({
type: 'ColumnSet',
spacing: 'Medium',
separator: true,
columns: [
{
type: 'Column',
width: 'auto',
verticalContentAlignment: 'Center',
items: [
{
type: 'Image',
url: statusIcon,
width: '24px',
altText: statusText
}
]
},
{
type: 'Column',
width: 'stretch',
items: [
{
type: 'TextBlock',
text: title,
size: 'Medium',
weight: 'Bolder',
color: statusColor,
wrap: true
},
{
type: 'TextBlock',
text: description,
isSubtle: true,
size: 'Small',
wrap: true,
spacing: 'None'
}
]
}
]
});
});
}
return [{
json: {
type: 'message',
attachments: [{
contentType: 'application/vnd.microsoft.card.adaptive',
content: {
$schema: 'http://adaptivecards.io/schemas/adaptive-card.json',
type: 'AdaptiveCard',
version: '1.4',
body: [
{
type: 'ColumnSet',
style: 'emphasis',
columns: [
{
type: 'Column',
width: 'auto',
items: [
{
type: 'Image',
url: 'https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/godot.png',
width: '40px',
altText: 'Godot Logo'
}
]
},
{
type: 'Column',
width: 'stretch',
verticalContentAlignment: 'Center',
items: [
{
type: 'TextBlock',
text: 'ADT Report : Tekton Dash',
weight: 'Bolder',
size: 'Large',
color: 'Accent'
},
{
type: 'TextBlock',
text: new Date().toLocaleDateString(),
isSubtle: true,
size: 'Small',
spacing: 'None'
}
]
}
]
},
...taskBlocks,
{
type: 'ActionSet',
actions: [
{
type: 'Action.OpenUrl',
title: 'Open PR Game Dev',
url: 'https://www.notion.so/danchiego-game/36433be43b29800c8422ed5bdd65671b?v=36433be43b2980de8635000c0a910a0d',
style: 'positive'
}
]
}
]
}
}]
}
}];