Skip to content

Commit

Permalink
j
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Jul 21, 2024
1 parent 1a14800 commit c3a62d1
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions src/Tray.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,12 @@ class Tray {
clickArea.classList.add('tray-click-area');
clickArea.style.flexGrow = '1';
clickArea.style.cursor = 'pointer';

const createdTime = document.createElement('span');
createdTime.classList.add('tray-created-time');
createdTime.textContent = this.formatCreatedTime();
createdTime.style.fontSize = '0.8em';
createdTime.style.color = '#888';
createdTime.style.marginLeft = '10px';
const checkbox = document.createElement('input');
checkbox.type = 'checkbox';
checkbox.classList.add('tray-checkbox');
Expand Down Expand Up @@ -146,10 +151,12 @@ class Tray {
foldButton.textContent = '▼';
foldButton.addEventListener('click', this.toggleFold.bind(this));
foldButton.style.display = "none";

titleContainer.appendChild(foldButton);
titleContainer.appendChild(contextMenuButton);
titleContainer.appendChild(checkboxContainer);
titleContainer.appendChild(title);
titleContainer.appendChild(createdTime);
titleContainer.appendChild(labelsElement);

// titleContainer.appendChild(clickArea)
Expand Down Expand Up @@ -190,9 +197,16 @@ class Tray {
children: ['1-1', '1-0', '0-1', '0-0'],
}
,

};

};
formatCreatedTime() {
return new Date(this.created_dt).toLocaleString('ja-JP', {
year: 'numeric',
month: '2-digit',
day: '2-digit',
hour: '2-digit',
minute: '2-digit'
})}
showTemplateSelectionDialog() {
const dialog = document.createElement('div');
dialog.classList.add('template-selection-dialog');
Expand Down

0 comments on commit c3a62d1

Please sign in to comment.