Compare commits
No commits in common. "014dff9c2d3d05ea2b4d76e727f2a022f13015fc" and "53ec803f2c399aaa499018c00f1e9a5d53f0c080" have entirely different histories.
014dff9c2d
...
53ec803f2c
6 changed files with 8 additions and 34 deletions
|
@ -40,8 +40,7 @@ function copyInvite(type: "link" | "code") {
|
||||||
if (!invite.value) return;
|
if (!invite.value) return;
|
||||||
|
|
||||||
if (type == "link") {
|
if (type == "link") {
|
||||||
const runtimeConfig = useRuntimeConfig();
|
const inviteUrl = URL.parse(`invite/${invite.value}`, `${window.location.protocol}//${window.location.host}`);
|
||||||
const inviteUrl = URL.parse(`invite/${invite.value}`, `${window.location.protocol}//${window.location.host}${runtimeConfig.app.baseURL}`);
|
|
||||||
if (inviteUrl) {
|
if (inviteUrl) {
|
||||||
navigator.clipboard.writeText(inviteUrl.href);
|
navigator.clipboard.writeText(inviteUrl.href);
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,8 +34,7 @@
|
||||||
<span class="theme-title" :style="{color:`${layout.complementaryColor}`}">
|
<span class="theme-title" :style="{color:`${layout.complementaryColor}`}">
|
||||||
{{ layout.displayName }}
|
{{ layout.displayName }}
|
||||||
</span>
|
</span>
|
||||||
<!-- this breaks if it's a nuxtimg, i don't know why -->
|
<NuxtImg class="layout-preview" :src="layout.previewImageUrl"></NuxtImg>
|
||||||
<img class="layout-preview" :src="layout.previewImageUrl"></img>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -61,8 +60,8 @@ import { settingSave, settingsLoad } from '#imports';
|
||||||
|
|
||||||
const runtimeConfig = useRuntimeConfig()
|
const runtimeConfig = useRuntimeConfig()
|
||||||
const baseURL = runtimeConfig.app.baseURL;
|
const baseURL = runtimeConfig.app.baseURL;
|
||||||
const styleFolder = `${baseURL}/themes/style`
|
const styleFolder = `${baseURL}themes/style`
|
||||||
const layoutFolder = `${baseURL}/themes/layout`
|
const layoutFolder = `${baseURL}themes/layout`
|
||||||
|
|
||||||
const timeFormatTextStrings = ["Auto", "12-Hour", "24-Hour"]
|
const timeFormatTextStrings = ["Auto", "12-Hour", "24-Hour"]
|
||||||
|
|
||||||
|
@ -116,7 +115,6 @@ async function parseTheme(url: string): Promise<Theme | void> {
|
||||||
break
|
break
|
||||||
case "previewImageUrl":
|
case "previewImageUrl":
|
||||||
previewImageUrl = `${layoutFolder}/${lineArray[1].trim()}`
|
previewImageUrl = `${layoutFolder}/${lineArray[1].trim()}`
|
||||||
console.log(previewImageUrl)
|
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ const storedWidth = ref<string>();
|
||||||
const contextMenu = useState<ContextMenuInterface>("contextMenu");
|
const contextMenu = useState<ContextMenuInterface>("contextMenu");
|
||||||
|
|
||||||
const menuItems: ContextMenuItem[] = [
|
const menuItems: ContextMenuItem[] = [
|
||||||
{ name: "Reset", type: "normal", callback: () => {
|
{ name: "Reset", callback: () => {
|
||||||
const defaultWidth = props.width ?? props.minWidth;
|
const defaultWidth = props.width ?? props.minWidth;
|
||||||
resizableSidebar.value!.style.width = defaultWidth;
|
resizableSidebar.value!.style.width = defaultWidth;
|
||||||
if (props.localStorageName) {
|
if (props.localStorageName) {
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
export const enum Permission {
|
|
||||||
SendMessage = 1,
|
|
||||||
ManageChannel = 2,
|
|
||||||
ManageRole = 4,
|
|
||||||
CreateInvite = 8,
|
|
||||||
ManageInvite = 16,
|
|
||||||
ManageGuild = 32,
|
|
||||||
ManageMember = 64,
|
|
||||||
BanMember = 128,
|
|
||||||
KickMember = 256
|
|
||||||
}
|
|
|
@ -19,17 +19,16 @@ export interface GuildResponse {
|
||||||
description: string | null,
|
description: string | null,
|
||||||
icon: string | null,
|
icon: string | null,
|
||||||
owner_uuid: string,
|
owner_uuid: string,
|
||||||
roles: RoleResponse[],
|
roles: [],
|
||||||
member_count: number
|
member_count: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface GuildMemberResponse {
|
export interface GuildMemberResponse {
|
||||||
uuid: string,
|
uuid: string,
|
||||||
nickname: string,
|
nickname: string,
|
||||||
|
user_uuid: string,
|
||||||
guild_uuid: string,
|
guild_uuid: string,
|
||||||
is_owner: boolean,
|
user: UserResponse
|
||||||
user: UserResponse,
|
|
||||||
roles: RoleResponse[]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface GuildMembersResponse {
|
export interface GuildMembersResponse {
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
import type { Permission } from "~/types/enums";
|
|
||||||
import type { GuildMemberResponse } from "~/types/interfaces";
|
|
||||||
|
|
||||||
export default (member: GuildMemberResponse, permission: Permission) => {
|
|
||||||
for (const role of member.roles) {
|
|
||||||
if (role.permissions & permission) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
Loading…
Add table
Add a link
Reference in a new issue