Skip to content

Commit 48f81e8

Browse files
committed
Do not show app footer for org embeds
1 parent 82c0cd0 commit 48f81e8

File tree

2 files changed

+36
-26
lines changed

2 files changed

+36
-26
lines changed

llmstack/apps/serializers.py

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,30 @@
11
from rest_framework import serializers
22

3-
from llmstack.apps.yaml_loader import get_app_template_by_slug
4-
5-
from .models import App, AppAccessPermission, AppData
6-
from .models import AppHub
7-
from .models import AppRunGraphEntry
8-
from .models import AppSession
9-
from .models import AppTemplate
10-
from .models import AppTemplateCategory
11-
from .models import AppType
12-
from .models import TestCase
13-
from .models import TestSet
143
from llmstack.apps.app_templates import AppTemplateFactory
154
from llmstack.apps.app_types import AppTypeFactory
5+
from llmstack.apps.yaml_loader import get_app_template_by_slug
6+
from llmstack.base.models import Profile
167
from llmstack.play.utils import convert_template_vars_from_legacy_format
178
from llmstack.processors.models import ApiBackend, Endpoint
18-
from llmstack.base.models import Profile
19-
from llmstack.processors.serializers import ApiBackendSerializer, ApiProviderSerializer, EndpointSerializer
9+
from llmstack.processors.serializers import (
10+
ApiBackendSerializer,
11+
ApiProviderSerializer,
12+
EndpointSerializer,
13+
)
14+
15+
from .models import (
16+
App,
17+
AppAccessPermission,
18+
AppData,
19+
AppHub,
20+
AppRunGraphEntry,
21+
AppSession,
22+
AppTemplate,
23+
AppTemplateCategory,
24+
AppType,
25+
TestCase,
26+
TestSet,
27+
)
2028

2129

2230
class DynamicFieldsModelSerializer(serializers.ModelSerializer):
@@ -125,7 +133,7 @@ def get_is_shareable(self, obj):
125133

126134
def get_has_footer(self, obj):
127135
profile = Profile.objects.get(user=obj.owner)
128-
return not profile.is_pro_subscriber() and not profile.organization
136+
return not profile.organization
129137

130138
def get_last_modified_by_email(self, obj):
131139
return obj.last_modified_by.email if obj.last_modified_by and obj.has_write_permission(self._request_user) else None

llmstack/client/src/components/apps/WebChatRender.jsx

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -508,18 +508,20 @@ export function WebChatRender({ app, isMobile, embed = false, ws }) {
508508
}}
509509
/>
510510
</ThemeProvider>
511-
{embed && (
512-
<Typography sx={{ textAlign: "center" }} variant="caption">
513-
Powered by{" "}
514-
<a
515-
href="https://trypromptly.com"
516-
target="_blank"
517-
rel="noreferrer"
518-
>
519-
Promptly
520-
</a>
521-
</Typography>
522-
)}
511+
{embed &&
512+
(app.has_footer ||
513+
!process.env.REACT_APP_ENABLE_SUBSCRIPTION_MANAGEMENT) && (
514+
<Typography sx={{ textAlign: "center" }} variant="caption">
515+
Powered by{" "}
516+
<a
517+
href="https://trypromptly.com"
518+
target="_blank"
519+
rel="noreferrer"
520+
>
521+
Promptly
522+
</a>
523+
</Typography>
524+
)}
523525
</Stack>
524526
</div>
525527
</>

0 commit comments

Comments
 (0)