Edit fixes
This commit is contained in:
parent
f5dff928b7
commit
2f2111d576
@ -162,7 +162,6 @@ func WebChatWs(ctx *gin.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if permLevel < permission.Admin {
|
if permLevel < permission.Admin {
|
||||||
fmt.Println(3)
|
|
||||||
conn.Close()
|
conn.Close()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -184,7 +183,6 @@ func WebChatWs(ctx *gin.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if premiumTier == premium.None {
|
if premiumTier == premium.None {
|
||||||
fmt.Println(4)
|
|
||||||
conn.Close()
|
conn.Close()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
|
||||||
|
|
||||||
<label class="form-label">{label}</label>
|
<label class="form-label">{label}</label>
|
||||||
<div class="multiselect-super">
|
<div class="multiselect-super">
|
||||||
<Select placeholder="Select..." items={panels} optionIdentifier="panel_id" getOptionLabel={labelMapper}
|
<Select placeholder="Select..." items={panels} optionIdentifier="panel_id" getOptionLabel={labelMapper}
|
||||||
@ -7,6 +9,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Select from 'svelte-select';
|
import Select from 'svelte-select';
|
||||||
|
import {onMount} from "svelte";
|
||||||
|
|
||||||
export let label;
|
export let label;
|
||||||
export let panels = [];
|
export let panels = [];
|
||||||
@ -25,4 +28,12 @@
|
|||||||
|
|
||||||
selected = panelsRaw.map((panel) => panel.panel_id);
|
selected = panelsRaw.map((panel) => panel.panel_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function applyOverrides() {
|
||||||
|
panelsRaw = panels.filter((p) => selected.includes(p.panel_id));
|
||||||
|
}
|
||||||
|
|
||||||
|
onMount(() => {
|
||||||
|
applyOverrides();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
@ -25,9 +25,10 @@
|
|||||||
import Input from "../form/Input.svelte";
|
import Input from "../form/Input.svelte";
|
||||||
import Textarea from "../form/Textarea.svelte";
|
import Textarea from "../form/Textarea.svelte";
|
||||||
import Colour from "../form/Colour.svelte";
|
import Colour from "../form/Colour.svelte";
|
||||||
import {colourToInt} from "../../js/util";
|
import {colourToInt, intToColour} from "../../js/util";
|
||||||
import ChannelDropdown from "../ChannelDropdown.svelte";
|
import ChannelDropdown from "../ChannelDropdown.svelte";
|
||||||
import PanelDropdown from "../PanelDropdown.svelte";
|
import PanelDropdown from "../PanelDropdown.svelte";
|
||||||
|
import {onMount} from "svelte";
|
||||||
|
|
||||||
export let data = {};
|
export let data = {};
|
||||||
|
|
||||||
@ -49,6 +50,16 @@
|
|||||||
function updateColour() {
|
function updateColour() {
|
||||||
data.colour = colourToInt(tempColour);
|
data.colour = colourToInt(tempColour);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function applyOverrides() {
|
||||||
|
tempColour = intToColour(data.colour);
|
||||||
|
}
|
||||||
|
|
||||||
|
onMount(() => {
|
||||||
|
if (!seedDefault) {
|
||||||
|
applyOverrides();
|
||||||
|
}
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
@ -67,7 +67,7 @@
|
|||||||
import ChannelDropdown from "../ChannelDropdown.svelte";
|
import ChannelDropdown from "../ChannelDropdown.svelte";
|
||||||
|
|
||||||
import {createEventDispatcher, onMount} from 'svelte';
|
import {createEventDispatcher, onMount} from 'svelte';
|
||||||
import {colourToInt} from "../../js/util";
|
import {colourToInt, intToColour} from "../../js/util";
|
||||||
import CategoryDropdown from "../CategoryDropdown.svelte";
|
import CategoryDropdown from "../CategoryDropdown.svelte";
|
||||||
import EmojiInput from "../form/EmojiInput.svelte";
|
import EmojiInput from "../form/EmojiInput.svelte";
|
||||||
import Select from 'svelte-select';
|
import Select from 'svelte-select';
|
||||||
@ -175,6 +175,8 @@
|
|||||||
if (data.mentions) {
|
if (data.mentions) {
|
||||||
$: data.mentions.forEach((id) => mentionsRaw.push(mentionValues.find((val) => val.value === id)));
|
$: data.mentions.forEach((id) => mentionsRaw.push(mentionValues.find((val) => val.value === id)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tempColour = intToColour(data.colour);
|
||||||
}
|
}
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package utils
|
package utils
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"github.com/gin-gonic/contrib/sessions"
|
"github.com/gin-gonic/contrib/sessions"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -9,7 +8,6 @@ func IsLoggedIn(store sessions.Session) bool {
|
|||||||
requiredKeys := []string{"access_token", "expiry", "refresh_token", "userid", "name", "avatar", "csrf"}
|
requiredKeys := []string{"access_token", "expiry", "refresh_token", "userid", "name", "avatar", "csrf"}
|
||||||
for _, key := range requiredKeys {
|
for _, key := range requiredKeys {
|
||||||
if store.Get(key) == nil {
|
if store.Get(key) == nil {
|
||||||
fmt.Println(key)
|
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user