Skip to content

Feature - iconscout intergration #1547

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Apr 19, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
0639f1b
integrate iconscout in icon button and image comp
raheeliftikhar5 Jul 2, 2024
6879f3b
integrate iconscout with jsonLottie comp
raheeliftikhar5 Jul 3, 2024
65111f9
added dotlottie option in lottie comp
raheeliftikhar5 Feb 20, 2025
9dfe557
download asset from icon-scout and save as base64 string
raheeliftikhar5 Feb 24, 2025
7ee4135
updated naming for iconScoutAsset
raheeliftikhar5 Feb 24, 2025
fdc8050
updated naming for iconScoutAsset
raheeliftikhar5 Feb 24, 2025
b29b1dd
used dotLottie player for different modes
raheeliftikhar5 Feb 24, 2025
09d7e9d
added option in IconComp to select icons from IconScout
raheeliftikhar5 Feb 24, 2025
60e4561
fixed asset selection popup
raheeliftikhar5 Feb 25, 2025
5a73042
show free/premium assets + redirect to subscription page on clicking …
raheeliftikhar5 Feb 25, 2025
6dea7b9
show loading when user select's an icon to download
raheeliftikhar5 Feb 25, 2025
aff1582
added autoHeight and aspectRatio options in json lottie
raheeliftikhar5 Feb 25, 2025
0dc69c6
fixed selected icon preview in controlButton
raheeliftikhar5 Feb 26, 2025
6886a0e
added fit/align controls in json lottie comp
raheeliftikhar5 Feb 26, 2025
a29d735
Changing to Flow API
Feb 26, 2025
516d9d2
Search and AssetURL APis changed to Flow Endpoint
Feb 26, 2025
4b50843
added events + exposed play/pause/stop methods with json lottie comp
raheeliftikhar5 Feb 27, 2025
99f5725
allow media pack subscribers to use icon scout assets
raheeliftikhar5 Apr 18, 2025
9aaa4be
Merge branch 'dev' into feature-iconscout-intergration
FalkWolsky Apr 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
allow media pack subscribers to use icon scout assets
  • Loading branch information
raheeliftikhar5 committed Apr 18, 2025
commit 99f572515e29285e72e4a6096a1f647fe8ca2a1c
57 changes: 30 additions & 27 deletions client/packages/lowcoder/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ import GlobalInstances from 'components/GlobalInstances';
import { fetchHomeData, fetchServerSettingsAction } from "./redux/reduxActions/applicationActions";
import { getNpmPackageMeta } from "./comps/utils/remote";
import { packageMetaReadyAction, setLowcoderCompsLoading } from "./redux/reduxActions/npmPluginActions";
import { SimpleSubscriptionContextProvider } from "./util/context/SimpleSubscriptionContext";

const LazyUserAuthComp = React.lazy(() => import("pages/userAuth"));
const LazyInviteLanding = React.lazy(() => import("pages/common/inviteLanding"));
Expand Down Expand Up @@ -310,33 +311,35 @@ class AppIndex extends React.Component<AppIndexProps, any> {
component={LazyPublicAppEditor}
/>

<LazyRoute
fallback="layout"
path={APP_EDITOR_URL}
component={LazyAppEditor}
/>
<LazyRoute
fallback="layout"
path={[
USER_PROFILE_URL,
NEWS_URL,
ORG_HOME_URL,
ALL_APPLICATIONS_URL,
DATASOURCE_CREATE_URL,
DATASOURCE_EDIT_URL,
DATASOURCE_URL,
SUPPORT_URL,
QUERY_LIBRARY_URL,
FOLDERS_URL,
FOLDER_URL,
TRASH_URL,
SETTING_URL,
MARKETPLACE_URL,
ADMIN_APP_URL
]}
// component={ApplicationListPage}
component={LazyApplicationHome}
/>
<SimpleSubscriptionContextProvider>
<LazyRoute
fallback="layout"
path={APP_EDITOR_URL}
component={LazyAppEditor}
/>
<LazyRoute
fallback="layout"
path={[
USER_PROFILE_URL,
NEWS_URL,
ORG_HOME_URL,
ALL_APPLICATIONS_URL,
DATASOURCE_CREATE_URL,
DATASOURCE_EDIT_URL,
DATASOURCE_URL,
SUPPORT_URL,
QUERY_LIBRARY_URL,
FOLDERS_URL,
FOLDER_URL,
TRASH_URL,
SETTING_URL,
MARKETPLACE_URL,
ADMIN_APP_URL
]}
// component={ApplicationListPage}
component={LazyApplicationHome}
/>
</SimpleSubscriptionContextProvider>
<LazyRoute exact path={ADMIN_AUTH_URL} component={LazyUserAuthComp} />
<LazyRoute path={USER_AUTH_URL} component={LazyUserAuthComp} />
<LazyRoute
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ import LoadingOutlined from "@ant-design/icons/LoadingOutlined";
import Badge from "antd/es/badge";
import { CrownFilled } from "@ant-design/icons";
import { SUBSCRIPTION_SETTING } from "@lowcoder-ee/constants/routesURL";
import { useSimpleSubscriptionContext } from "@lowcoder-ee/util/context/SimpleSubscriptionContext";
import { SubscriptionProductsEnum } from "@lowcoder-ee/constants/subscriptionConstants";

const ButtonWrapper = styled.div`
width: 100%;
Expand Down Expand Up @@ -227,6 +229,11 @@ export const IconPicker = (props: {
const [ downloading, setDownloading ] = useState(false)
const [ searchText, setSearchText ] = useState<string>('')
const [ searchResults, setSearchResults ] = useState<Array<any>>([]);
const { subscriptions } = useSimpleSubscriptionContext();

const mediaPackSubscription = subscriptions.find(
sub => sub.product === SubscriptionProductsEnum.MEDIAPACKAGE && sub.status === 'active'
);

const onChangeRef = useRef(props.onChange);
onChangeRef.current = props.onChange;
Expand Down Expand Up @@ -319,7 +326,7 @@ export const IconPicker = (props: {
onClick={() => {
// check if premium content then show subscription popup
// TODO: if user has subscription then skip this if block
if (icon.price !== 0) {
if (!mediaPackSubscription) {
CustomModal.confirm({
title: trans("iconScout.buySubscriptionTitle"),
content: trans("iconScout.buySubscriptionContent"),
Expand Down
Loading
Loading