Skip to content

Commit

Permalink
fix: footer change and modify icon
Browse files Browse the repository at this point in the history
  • Loading branch information
farreledwin committed Jun 21, 2024
1 parent aa9a048 commit 4a1a651
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 15 deletions.
42 changes: 30 additions & 12 deletions packages/core/client/src/powered-by/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,39 @@ export const PoweredBy = () => {

return (
<div className="font-family-golos" style={{ marginTop: '2em' }}>
<div style={{ display: 'flex', justifyContent: 'center', color: '#00000073' }}>
<div>Rantir Cloud</div>
<div style={{ marginRight: '5em', marginLeft: '10em', color: '#00000073' }}>
<svg width="15" height="14" viewBox="0 0 15 14" fill="none" xmlns="http://www.w3.org/2000/svg">
<div style={{ textAlign: 'center', marginTop: '1em', color: '#00000073' }}>
<span>
Rantir Cloud
<svg
style={{ position: 'relative', top: '0.5em', marginLeft: '0.5em', marginRight: '1em' }}
width="20"
height="27"
viewBox="0 0 26 27"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<rect x="0.5" y="0.600098" width="25" height="25" rx="3.5" fill="#303030" />
<rect x="0.5" y="0.600098" width="25" height="25" rx="3.5" stroke="#EEF2F3" />
<path
d="M7.49375 0.191407C3.62969 0.189844 0.5 3.31797 0.5 7.17891C0.5 10.232 2.45781 12.8273 5.18438 13.7805C5.55156 13.8727 5.49531 13.6117 5.49531 13.4336V12.2227C3.375 12.4711 3.28906 11.068 3.14688 10.8336C2.85938 10.343 2.17969 10.218 2.38281 9.98359C2.86563 9.73516 3.35781 10.0461 3.92813 10.8883C4.34063 11.4992 5.14531 11.3961 5.55313 11.2945C5.64219 10.9273 5.83281 10.5992 6.09531 10.3445C3.89844 9.95078 2.98281 8.61016 2.98281 7.01641C2.98281 6.24297 3.2375 5.53203 3.7375 4.95859C3.41875 4.01328 3.76719 3.20391 3.81406 3.08359C4.72188 3.00234 5.66563 3.73359 5.73906 3.79141C6.25469 3.65234 6.84375 3.57891 7.50313 3.57891C8.16563 3.57891 8.75625 3.65547 9.27656 3.79609C9.45313 3.66172 10.3281 3.03359 11.1719 3.11016C11.2172 3.23047 11.5578 4.0211 11.2578 4.95391C11.7641 5.52891 12.0219 6.2461 12.0219 7.0211C12.0219 8.61797 11.1 9.96016 8.89688 10.3477C9.08558 10.5332 9.23541 10.7546 9.33763 10.9987C9.43984 11.2428 9.49238 11.5049 9.49219 11.7695V13.5273C9.50469 13.668 9.49219 13.807 9.72656 13.807C12.4938 12.8742 14.4859 10.2602 14.4859 7.18047C14.4859 3.31797 11.3547 0.191407 7.49375 0.191407Z"
fill="black"
fillOpacity="0.45"
d="M20 7.16319V9.48495C20 10.1245 19.4789 10.6481 18.8322 10.6481H11.8345C11.1924 10.6481 10.6667 11.1671 10.6667 11.8113V18.8368C10.6667 19.4763 10.1456 20 9.49884 20H7.16783C6.52576 20 6 19.481 6 18.8368V11.8113C6 11.1718 6.52111 10.6481 7.16783 10.6481H9.49884C10.1409 10.6481 10.6667 10.1291 10.6667 9.48495V7.16319C10.6667 6.52367 11.1878 6 11.8345 6H18.8322C19.4742 6 20 6.51904 20 7.16319Z"
fill="url(#paint0_linear_179_47595)"
/>
<defs>
<linearGradient
id="paint0_linear_179_47595"
x1="17.7963"
y1="6.90741"
x2="9.37037"
y2="18.963"
gradientUnits="userSpaceOnUse"
>
<stop offset="0.158166" stopColor="#EFF0F6" />
<stop offset="1" stopColor="#EAEBEF" />
</linearGradient>
</defs>
</svg>
</div>
<div style={{ color: '#00000073' }}>Made With Love From Rantir</div>
</div>
<div style={{ textAlign: 'center', marginTop: '1em', color: '#00000073' }}>
<span>Copyright ©2024 Rantir, Inc. All rights reserved. Join us in the AI, No-Code Revolution</span>
Copyright ©2024 Rantir, Inc. All rights reserved. Join us in the AI, No-Code Revolution
</span>
</div>
</div>
);
Expand Down
58 changes: 55 additions & 3 deletions packages/plugins/@my-project/plugin-theme/src/client/modifyicon.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*/

function addButtonWhenParentExists() {
console.log('ada');
const intervalId = setInterval(() => {
// Select the parent div with the specific class
const parentDiv = document.querySelector('.css-14exgtg');
Expand Down Expand Up @@ -48,6 +49,11 @@ function addButtonWhenParentExists() {
'ant-btn css-dev-only-do-not-override-10e56at ant-btn-default ant-btn-icon-only ant-tooltip-open',
);

// Add onclick event to redirect
databaseButton.addEventListener('click', () => {
window.location.href = '/admin/settings/data-source-manager/list'; // Replace with the desired URL
});

// Set inner HTML for the button
newButton.innerHTML = `
<span class="ant-btn-icon">
Expand Down Expand Up @@ -90,9 +96,9 @@ function addButtonWhenParentExists() {
`;

// Append the button to the parent div
parentDiv.appendChild(partitionButton);
parentDiv.appendChild(databaseButton);
parentDiv.appendChild(newButton);
parentDiv.insertBefore(partitionButton, parentDiv.children[2]);
parentDiv.insertBefore(databaseButton, parentDiv.children[2]);
parentDiv.insertBefore(newButton, parentDiv.children[2]);

// Add click event listener to the button
newButton.addEventListener('click', () => {
Expand Down Expand Up @@ -167,3 +173,49 @@ function addClassByAriaLabel(ariaLabel, className) {

// Usage example
addClassByAriaLabel('action-Action-Sign in', 'font-family-golos');

function deleteElementHelpIcon(dataTestId) {
const intervalId = setInterval(() => {
// Select the element with the specific data-test-id attribute
const element = document.querySelector('[data-testid="' + dataTestId + '"]');

const divToDelete = document.getElementsByClassName('css-junazh');

if (divToDelete.length > 0) {
// Remove the first element from the DOM
divToDelete[0].remove();
} else {
console.log('No elements found with class name');
}

// Check if the element exists
if (element !== null) {
// Remove the element from the DOM
console.log('masuk element ', element);
element.parentNode.removeChild(element);

// Clear the interval to stop checking
clearInterval(intervalId);
}
}, 100); // Check every 100 milliseconds
}

deleteElementHelpIcon('help-button');

function deleteDivDivider(className) {
const intervalId = setInterval(() => {
// Select the div with the specific class name
const divToDelete = document.querySelector('.' + className);

// Check if the div exists
if (divToDelete !== null) {
// Remove the div from the DOM
divToDelete.remove();

// Clear the interval to stop checking
clearInterval(intervalId);
}
}, 100); // Check every 100 milliseconds
}

deleteDivDivider('ant-divider');

0 comments on commit 4a1a651

Please sign in to comment.