diff --git a/LICENSE b/LICENSE index be7b269..17edf5a 100644 --- a/LICENSE +++ b/LICENSE @@ -1,95 +1,9 @@ -Business Source License 1.1 +MIT License -License text copyright (c) 2017 MariaDB Corporation Ab, All Rights Reserved. -"Business Source License" is a trademark of MariaDB Corporation Ab. +Copyright 2024 TON Community ------------------------------------------------------------------------------ +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -Parameters +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -Licensor: Nujan - -Additional Use Grant: Any uses listed and defined at - https://nujan.io/ - -Applied Date: 13-03-2023 - - ------------------------------------------------------------------------------ - -Terms - -The Licensor hereby grants you the right to copy, modify, create derivative -works, redistribute, and make non-production use of the Licensed Work. The -Licensor may make an Additional Use Grant, above, permitting limited -production use. - -Effective on the Change Date, or the fourth anniversary of the first publicly -available distribution of a specific version of the Licensed Work under this -License, whichever comes first, the Licensor hereby grants you rights under -the terms of the Change License, and the rights granted in the paragraph -above terminate. - -If your use of the Licensed Work does not comply with the requirements -currently in effect as described in this License, you must purchase a -commercial license from the Licensor, its affiliated entities, or authorized -resellers, or you must refrain from using the Licensed Work. - -All copies of the original and modified Licensed Work, and derivative works -of the Licensed Work, are subject to this License. This License applies -separately for each version of the Licensed Work and the Change Date may vary -for each version of the Licensed Work released by Licensor. - -You must conspicuously display this License on each original or modified copy -of the Licensed Work. If you receive the Licensed Work in original or -modified form from a third party, the terms and conditions set forth in this -License apply to your use of that work. - -Any use of the Licensed Work in violation of this License will automatically -terminate your rights under this License for the current and all other -versions of the Licensed Work. - -This License does not grant you any right in any trademark or logo of -Licensor or its affiliates (provided that you may use a trademark or logo of -Licensor as expressly required by this License). - -TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON -AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, -EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND -TITLE. - -MariaDB hereby grants you permission to use this License’s text to license -your works, and to refer to it using the trademark "Business Source License", -as long as you comply with the Covenants of Licensor below. - ------------------------------------------------------------------------------ - -Covenants of Licensor - -In consideration of the right to use this License’s text and the "Business -Source License" name and trademark, Licensor covenants to MariaDB, and to all -other recipients of the licensed work to be provided by Licensor: - -1. To specify as the Change License the GPL Version 2.0 or any later version, - or a license that is compatible with GPL Version 2.0 or a later version, - where "compatible" means that software provided under the Change License can - be included in a program with software provided under GPL Version 2.0 or a - later version. Licensor may specify additional Change Licenses without - limitation. - -2. To either: (a) specify an additional grant of rights to use that does not - impose any additional restriction on the right granted in this License, as - the Additional Use Grant; or (b) insert the text "None". - -3. To specify a Change Date. - -4. Not to modify this License in any other way. - ------------------------------------------------------------------------------ - -Notice - -The Business Source License (this document, or the "License") is not an Open -Source license. However, the Licensed Work will eventually be made available -under an Open Source License, as stated in this License. \ No newline at end of file +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index ae00916..eebfe7b 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ ![](https://res.cloudinary.com/don6qaqms/image/upload/v1696056044/k8w16co4k2nsjsrn7sup.jpg) -# What is Nujan? +# What is TON Web IDE? -Web IDE, powered by Nujan, is your ultimate browser-based IDE designed to simplify the journey of writing, testing, compiling, deploying, and interacting with smart contracts on TON. Write smart contracts from anywhere, No setups, no downloads, just pure convenience and versatility. +It is your ultimate browser-based IDE designed to simplify the journey of writing, testing, compiling, deploying, and interacting with smart contracts on TON. Write smart contracts from anywhere, No setups, no downloads, just pure convenience and versatility. # What we offer 🤝 @@ -78,4 +78,4 @@ We have put significant effort into developing and refining our codebase, and we ## License -[Business Source License 1.1](https://github.com/rahulyadav-57/ton-ide/blob/main/LICENSE) +MIT diff --git a/package-lock.json b/package-lock.json index 3cbeb06..4829ba0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "nujan-ton-ide", + "name": "ton-web-ide", "version": "0.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "nujan-ton-ide", + "name": "ton-web-ide", "version": "0.1.0", "dependencies": { "@codingame/monaco-jsonrpc": "^0.3.1", diff --git a/package.json b/package.json index ac1f1c2..62194ca 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,10 @@ { - "name": "nujan-ton-ide", + "name": "ton-web-ide", "version": "0.1.0", - "private": true, + "author": { + "name": "Rahul Yadav", + "url": "https://github.com/rahulyadav-57/" + }, "scripts": { "dev": "next dev", "build": "next build", diff --git a/public/assets/ton/tonconnect-manifest.json b/public/assets/ton/tonconnect-manifest.json index c5810a6..a70dede 100644 --- a/public/assets/ton/tonconnect-manifest.json +++ b/public/assets/ton/tonconnect-manifest.json @@ -1,5 +1,5 @@ { "url": "https://ide.nujan.io/", - "name": "Nujan", + "name": "TON Web IDE", "iconUrl": "https://ide.nujan.io/images/logo.png" } diff --git a/public/html/testcases.html b/public/html/testcases.html index edcd8e4..ff9bd8c 100644 --- a/public/html/testcases.html +++ b/public/html/testcases.html @@ -85,7 +85,7 @@ !event.data || typeof event.data !== "object" || !event.data?.type || - event.data?.name !== "nujan-ton-ide" || + event.data?.name !== "ton-web-ide" || event.data?.type !== "test-cases" ) { return; diff --git a/public/html/tonweb.html b/public/html/tonweb.html index aedbc6d..e07badd 100644 --- a/public/html/tonweb.html +++ b/public/html/tonweb.html @@ -16,7 +16,7 @@ !event.data || typeof event.data !== "object" || !event.data?.type || - event.data?.name !== "nujan-ton-ide" + event.data?.name !== "ton-web-ide" ) { return; } @@ -48,7 +48,7 @@ } const response = { - name: "nujan-ton-ide", + name: "ton-web-ide", data: cellValue, type: event.data?.type, }; @@ -72,7 +72,7 @@ }); const _error = `Error: ${error.message} \n${errorStack.join("\n")}`; const response = { - name: "nujan-ton-ide", + name: "ton-web-ide", error: _error, type: event.data?.type, }; diff --git a/public/images/ton_logo.svg b/public/images/ton_logo.svg new file mode 100644 index 0000000..34fe731 --- /dev/null +++ b/public/images/ton_logo.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/components/shared/LogView/LogView.tsx b/src/components/shared/LogView/LogView.tsx index e60cea6..cc1de19 100644 --- a/src/components/shared/LogView/LogView.tsx +++ b/src/components/shared/LogView/LogView.tsx @@ -128,7 +128,7 @@ const LogView: FC = ({ filter }) => { _terminal.open(appTerminal); _terminal.writeln( - `${colorMap.info}Welcome to ${AppConfig.name} IDE${colorMap.reset}`, + `${colorMap.info}Welcome to ${AppConfig.name}${colorMap.reset}`, ); _searchAddon.activate(_terminal); _fitAddon.fit(); diff --git a/src/components/ui/AppLogo/AppLogo.tsx b/src/components/ui/AppLogo/AppLogo.tsx index 348fb58..0eae57c 100644 --- a/src/components/ui/AppLogo/AppLogo.tsx +++ b/src/components/ui/AppLogo/AppLogo.tsx @@ -10,7 +10,7 @@ interface Props { } const AppLogo: FC = ({ - src = '/images/logo-icon.svg', + src = '/images/ton_logo.svg', href = '/', className = '', }) => { diff --git a/src/components/workspace/BuildProject/BuildProject.tsx b/src/components/workspace/BuildProject/BuildProject.tsx index 596cbf8..9d8a40d 100644 --- a/src/components/workspace/BuildProject/BuildProject.tsx +++ b/src/components/workspace/BuildProject/BuildProject.tsx @@ -426,7 +426,7 @@ const BuildProject: FC = ({ projectId, contract, updateContract }) => { cellBuilderRef.current.contentWindow.postMessage( { - name: 'nujan-ton-ide', + name: 'ton-web-ide', type: 'state-init-data', code: finalJsoutput, language: activeProject?.language, @@ -653,7 +653,7 @@ const BuildProject: FC = ({ projectId, contract, updateContract }) => { if ( typeof event.data !== 'object' || event.data.type !== 'state-init-data' || - event.data.name !== 'nujan-ton-ide' + event.data.name !== 'ton-web-ide' ) { return; } diff --git a/src/components/workspace/ContractInteraction/FuncContractInteraction.tsx b/src/components/workspace/ContractInteraction/FuncContractInteraction.tsx index edab0f7..ec6537e 100644 --- a/src/components/workspace/ContractInteraction/FuncContractInteraction.tsx +++ b/src/components/workspace/ContractInteraction/FuncContractInteraction.tsx @@ -1,7 +1,7 @@ import { useFile } from '@/hooks'; import { useContractAction } from '@/hooks/contract.hooks'; import { useLogActivity } from '@/hooks/logActivity.hooks'; -import { useProject } from '@/hooks/projectV2.hooks'; +import { baseProjectPath, useProject } from '@/hooks/projectV2.hooks'; import { CellABI, ProjectSetting } from '@/interfaces/workspace.interface'; import { buildTs } from '@/utility/typescriptHelper'; import { Cell } from '@ton/core'; @@ -70,7 +70,7 @@ const FuncContractInteraction: FC = ({ cellBuilderRef.current.contentWindow.postMessage( { - name: 'nujan-ton-ide', + name: 'ton-web-ide', type: 'abi-data', code: finalJsoutput, }, @@ -133,7 +133,7 @@ const FuncContractInteraction: FC = ({ if ( typeof event.data !== 'object' || event.data.type !== 'abi-data' || - event.data.name !== 'nujan-ton-ide' + event.data.name !== 'ton-web-ide' ) { setIsLoading(''); return; @@ -170,10 +170,13 @@ const FuncContractInteraction: FC = ({ src="/html/tonweb.html" sandbox="allow-scripts allow-same-origin" /> -

- You are using code that has been imported from an external source. - Exercise caution with the contract code before executing it. -

+ {activeProject?.path === `${baseProjectPath}/temp` && ( +

+ You are using code that has been imported from an external source. + Exercise caution with the contract code before executing it. +

+ )} +

Below options will be used to send internal message and call getter method on contract after the contract is deployed. diff --git a/src/components/workspace/ContractInteraction/TactContractInteraction.tsx b/src/components/workspace/ContractInteraction/TactContractInteraction.tsx index 6dcb147..aef58a4 100644 --- a/src/components/workspace/ContractInteraction/TactContractInteraction.tsx +++ b/src/components/workspace/ContractInteraction/TactContractInteraction.tsx @@ -1,3 +1,4 @@ +import { baseProjectPath, useProject } from '@/hooks/projectV2.hooks'; import { TactType } from '@/interfaces/workspace.interface'; import { FC } from 'react'; import { TactABIUi } from '../ABIUi'; @@ -10,16 +11,20 @@ const TactContractInteraction: FC = ({ network, contract = null, }) => { + const { activeProject } = useProject(); + if (!contractAddress || !abi) { return <>; } return (

-

- You are using code that has been imported from an external source. - Exercise caution with the contract code before executing it. -

+ {activeProject?.path === `${baseProjectPath}/temp` && ( +

+ You are using code that has been imported from an external source. + Exercise caution with the contract code before executing it. +

+ )}

Below options will be used to call receiver and call getter method on contract after the contract is deployed. diff --git a/src/components/workspace/WorkspaceSidebar/WorkspaceSidebar.tsx b/src/components/workspace/WorkspaceSidebar/WorkspaceSidebar.tsx index a66d0a3..caf6658 100644 --- a/src/components/workspace/WorkspaceSidebar/WorkspaceSidebar.tsx +++ b/src/components/workspace/WorkspaceSidebar/WorkspaceSidebar.tsx @@ -4,7 +4,7 @@ import { AppData } from '@/constant/AppData'; import { useSettingAction } from '@/hooks/setting.hooks'; import { Form, Input, Popover, Select, Switch } from 'antd'; import Link from 'next/link'; -import { FC } from 'react'; +import { FC, useEffect } from 'react'; import s from './WorkspaceSidebar.module.scss'; export type WorkSpaceMenu = 'code' | 'build' | 'test-cases' | 'setting'; @@ -61,6 +61,12 @@ const WorkspaceSidebar: FC = ({ }, ]; + useEffect(() => { + if (!projectName) { + onMenuClicked('code'); + } + }, []); + const settingContent = () => (

diff --git a/src/config/AppConfig.ts b/src/config/AppConfig.ts index 07e6089..e4e8fbd 100644 --- a/src/config/AppConfig.ts +++ b/src/config/AppConfig.ts @@ -1,7 +1,7 @@ export const AppConfig = { - name: 'Nujan', + name: 'TON Web IDE', seo: { - title: 'Nujan IDE', + title: 'TON Web IDE', }, network: 'testnet', API_URL: process.env.NEXT_PUBLIC_API_URL ?? 'http://127.0.0.1:3000', diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index c90414e..4daa5a4 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -37,7 +37,7 @@ export default function App({ file: { contents: ` { - "name": "nujan-app", + "name": "ton-web-ide-app", "type": "module", "dependencies": { "jest": "29.6.2", @@ -82,7 +82,11 @@ export default function App({ {AppConfig.seo.title} - + diff --git a/src/pages/_document.tsx b/src/pages/_document.tsx index a7daabf..a160dea 100644 --- a/src/pages/_document.tsx +++ b/src/pages/_document.tsx @@ -7,7 +7,7 @@ export default function Document() { diff --git a/src/styles/global.scss b/src/styles/global.scss index b08d25a..d5c78a8 100644 --- a/src/styles/global.scss +++ b/src/styles/global.scss @@ -1,8 +1,8 @@ :root { --primary: #0098ea; --brand-color-2: rgba(19, 226, 218, 1); - --font-title: 'Poppins', sans-serif; - --font-body: 'Poppins', sans-serif; + --font-title: 'Inter', sans-serif; + --font-body: 'Inter', sans-serif; --text-color: #f7f7f7; --black-500: #0e0e10; --grey: #4f4e4e; @@ -23,20 +23,15 @@ rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.6) 100% ); - --primary-gradient: linear-gradient( - 45deg, - rgba(186, 74, 255, 1), - rgba(144, 85, 255, 1), - rgba(19, 226, 218, 1) - ); + --primary-gradient: linear-gradient(45deg, #2d83ec, #1ac9ff); --modal-bg: linear-gradient( 0deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.5) 100% ), #232328; - --btn-primary: linear-gradient(90deg, #2d83ec -3.34%, #1ac9ff 100%); - --btn-primary-hover: linear-gradient(90deg, #2d82ea -3.34%, #16b0df 100%); + --btn-primary: #0098ea; + --btn-primary-hover: #00a6ff; --btn-disabled: rgba(255, 255, 255, 0.1); }