Don't require premium

This commit is contained in:
rxdn 2022-08-04 22:34:01 +01:00
parent d274477599
commit 5434895519
4 changed files with 11 additions and 8 deletions

View File

@ -2,7 +2,6 @@ package api
import ( import (
"errors" "errors"
"fmt"
"github.com/TicketsBot/GoPanel/botcontext" "github.com/TicketsBot/GoPanel/botcontext"
dbclient "github.com/TicketsBot/GoPanel/database" dbclient "github.com/TicketsBot/GoPanel/database"
"github.com/TicketsBot/GoPanel/rpc" "github.com/TicketsBot/GoPanel/rpc"
@ -196,7 +195,6 @@ func UpdatePanel(ctx *gin.Context) {
} }
} }
fmt.Println(panel.PanelId)
if err := dbclient.Client.PanelUserMention.Set(panel.PanelId, shouldMentionUser); err != nil { if err := dbclient.Client.PanelUserMention.Set(panel.PanelId, shouldMentionUser); err != nil {
ctx.AbortWithStatusJSON(500, utils.ErrorJson(err)) ctx.AbortWithStatusJSON(500, utils.ErrorJson(err))
return return

View File

@ -35,9 +35,15 @@
<Collapsible> <Collapsible>
<span slot="header">Footer</span> <span slot="header">Footer</span>
<div slot="content" class="row"> <div slot="content" class="row">
{#if footerPremiumOnly}
<Input col3 label="Footer Text" placeholder="Footer Text" badge="Premium" bind:value={data.footer.text}/> <Input col3 label="Footer Text" placeholder="Footer Text" badge="Premium" bind:value={data.footer.text}/>
<Input col3 label="Footer Icon URL (Optional)" badge="Premium" placeholder="https://example.com/image.png" <Input col3 label="Footer Icon URL (Optional)" badge="Premium" placeholder="https://example.com/image.png"
bind:value={data.footer.icon_url}/> bind:value={data.footer.icon_url}/>
{:else}
<Input col3 label="Footer Text" placeholder="Footer Text" bind:value={data.footer.text}/>
<Input col3 label="Footer Icon URL (Optional)" placeholder="https://example.com/image.png"
bind:value={data.footer.icon_url}/>
{/if}
<DateTimePicker col3 label="Footer Timestamp (Optional)" bind:value={data.timestamp}/> <DateTimePicker col3 label="Footer Timestamp (Optional)" bind:value={data.timestamp}/>
</div> </div>
</Collapsible> </Collapsible>
@ -92,6 +98,7 @@
import Button from "./Button.svelte"; import Button from "./Button.svelte";
export let data; export let data;
export let footerPremiumOnly = true;
if (data === undefined || data === null) { if (data === undefined || data === null) {
if (!data) { if (!data) {

View File

@ -21,7 +21,7 @@
</div> </div>
{#if data.use_embed} {#if data.use_embed}
<EmbedForm bind:data={data.embed}/> <EmbedForm footerPremiumOnly={false} bind:data={data.embed}/>
{/if} {/if}
</div> </div>
</div> </div>

2
go.sum
View File

@ -39,8 +39,6 @@ github.com/TicketsBot/archiverclient v0.0.0-20220326163414-558fd52746dc h1:n15W8
github.com/TicketsBot/archiverclient v0.0.0-20220326163414-558fd52746dc/go.mod h1:2KcfHS0JnSsgcxZBs3NyWMXNQzEo67mBSGOyzHPWOCc= github.com/TicketsBot/archiverclient v0.0.0-20220326163414-558fd52746dc/go.mod h1:2KcfHS0JnSsgcxZBs3NyWMXNQzEo67mBSGOyzHPWOCc=
github.com/TicketsBot/common v0.0.0-20220703211704-f792aa9f0c42 h1:3/qnbrEfL8gqSbjJ4o7WKkdoPngmhjAGEXFwteEjpqs= github.com/TicketsBot/common v0.0.0-20220703211704-f792aa9f0c42 h1:3/qnbrEfL8gqSbjJ4o7WKkdoPngmhjAGEXFwteEjpqs=
github.com/TicketsBot/common v0.0.0-20220703211704-f792aa9f0c42/go.mod h1:WxHh6bY7KhIqdayeOp5f0Zj2NNi/7QqCQfMEqHnpdAM= github.com/TicketsBot/common v0.0.0-20220703211704-f792aa9f0c42/go.mod h1:WxHh6bY7KhIqdayeOp5f0Zj2NNi/7QqCQfMEqHnpdAM=
github.com/TicketsBot/database v0.0.0-20220804212316-6ff58741a775 h1:QQwI2vEzGJmYESktKxDACA3EdtTBJWwo5elRcDxncbQ=
github.com/TicketsBot/database v0.0.0-20220804212316-6ff58741a775/go.mod h1:gAtOoQKZfCkQ4AoNWQUSl51Fnlqk+odzD/hZ1e1sXyI=
github.com/TicketsBot/database v0.0.0-20220804213011-190281e8f797 h1:1RIBwjPJqTmVrBztWQxE6OHKZjwTqxfXMRQrPuMaQzk= github.com/TicketsBot/database v0.0.0-20220804213011-190281e8f797 h1:1RIBwjPJqTmVrBztWQxE6OHKZjwTqxfXMRQrPuMaQzk=
github.com/TicketsBot/database v0.0.0-20220804213011-190281e8f797/go.mod h1:gAtOoQKZfCkQ4AoNWQUSl51Fnlqk+odzD/hZ1e1sXyI= github.com/TicketsBot/database v0.0.0-20220804213011-190281e8f797/go.mod h1:gAtOoQKZfCkQ4AoNWQUSl51Fnlqk+odzD/hZ1e1sXyI=
github.com/TicketsBot/logarchiver v0.0.0-20220326162808-cdf0310f5e1c h1:OqGjFH6mbE6gd+NqI2ARJdtH3UUvhiAkD0r0fhGJK2s= github.com/TicketsBot/logarchiver v0.0.0-20220326162808-cdf0310f5e1c h1:OqGjFH6mbE6gd+NqI2ARJdtH3UUvhiAkD0r0fhGJK2s=