Skip to content

Commit

Permalink
Merge pull request #17 from incpi/Dev
Browse files Browse the repository at this point in the history
v1.3.2
  • Loading branch information
Incpi authored Jul 25, 2024
2 parents bb8b3b0 + 0e7592c commit e7c992b
Show file tree
Hide file tree
Showing 10 changed files with 473 additions and 397 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,12 @@ The extension comes with the following predefined themes:

If you want to create your own custom theme, you can modify the `themeMap` object in the source code. Add a new key-value pair, where the key represents the theme name (to be used in the URL parameter), and the value is an object containing the CSS styles for your custom theme.

##
## Changelogs

### v1.3.0
### v1.3.2
- [Bugfix] SAP UI theme Horizon dark fix (Trace half screnn non visible)
- [Bugfix] Mapping fields are invisible in mmap Files.
- [Bugfix] Simulation error color is not correct.
- [feature] Now supports addtional application such as **SAP Builds workzone** and it's theme designer.
- [improvement] UI changes for popup.

Expand Down
28 changes: 22 additions & 6 deletions Whatsnew/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,37 @@
samples: {features: [ { description: "Feature 1", author: "Omkar" },]}
*/
const data_updates = {
features: [{ description: "Now supports addtional application such as <b>SAP Builds workzone</b> and it's theme designer." }],
improvements: [{ description: "UI improvement: UI changes for popup." }],
bugFixes: [
{
description:
"SAP UI theme Horizon dark fix (Trace half screnn non visible)",
author: "Omkar",
},
{ description: "Mapping fields are invisible in mmap Files." },
{ description: "Simulation error color is not correct." },
],
features: [
{
description:
"Now supports addtional application such as <b>SAP Builds workzone</b> and it's theme designer.",
},
],
improvements: [{ description: "UI improvement: UI changes for popup." }],
};

/*
@type: @label for type
Note: above section are orderd by below data order
*/
const data_sections = {
features: "Features",
improvements: "Improvements",
bugFixes: "Bug Fixes",
bugFixes: "Bug Fixes",
features: "Features",
improvements: "Improvements",
};
/*
@name: @developer link
*/
const data_authors = {
"Omkar": "https://github.com/incpi",
Omkar: "https://github.com/incpi",
};
60 changes: 31 additions & 29 deletions Whatsnew/whatsnew.js
Original file line number Diff line number Diff line change
@@ -1,36 +1,38 @@

function loadDynamicContent() {
const contentDiv = document.getElementById('dynamicContent');
contentDiv.innerHTML = '';

for (const [key, title] of Object.entries(data_sections)) {
if (data_updates[key] && data_updates[key].length > 0) {
const section = document.createElement('div');
const sectionTitle = document.createElement('h3');
sectionTitle.className = 'text-xl font-semibold py-2';
sectionTitle.innerHTML = title;

const list = document.createElement('ul');
list.className = 'list-disc list-inside ml-4';
const contentDiv = document.getElementById("dynamicContent");
contentDiv.innerHTML = "<br>";

data_updates[key].forEach(item => {
const listItem = document.createElement('li');
listItem.innerHTML = item.description;
for (const [key, title] of Object.entries(data_sections)) {
if (data_updates[key] && data_updates[key].length > 0) {
const section = document.createElement("div");
const sectionTitle = document.createElement("h3");
sectionTitle.className = "text-xl font-semibold py-2";
sectionTitle.innerHTML = title;

if (item.author) {
const authorLink = document.createElement('a');
authorLink.href = data_authors[item.author] || '#';
authorLink.innerHTML = ` (${item.author})`;
authorLink.className = 'text-blue-500 hover:underline';
listItem.appendChild(authorLink);
}
const list = document.createElement("ol");
list.className = "list-disc list-inside ml-4";

list.appendChild(listItem);
});
data_updates[key].forEach((item) => {
const listItem = document.createElement("li");
listItem.innerHTML = item.description;

section.appendChild(sectionTitle);
section.appendChild(list);
contentDiv.appendChild(section);
if (item.author) {
const authorLink = document.createElement("a");
authorLink.href = data_authors[item.author] || "#";
authorLink.innerHTML = `By (${item.author})`;
authorLink.className = "link link-primary";
listItem.appendChild(authorLink);
}

list.appendChild(listItem);
});
section.appendChild(sectionTitle);
section.appendChild(document.createElement("br"));
section.appendChild(list);
section
.appendChild(document.createElement("div"))
.classList.add("divider");
contentDiv.appendChild(section);
}
}
}
}
Binary file modified bin/Dark-CPI-Web-Extension.zip
Binary file not shown.
Loading

0 comments on commit e7c992b

Please sign in to comment.