[feat] added community links
This commit is contained in:
1
public/discord-mark-white.svg
Normal file
1
public/discord-mark-white.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 127.14 96.36"><defs><style>.cls-1{fill:#fff;}</style></defs><g id="图层_2" data-name="图层 2"><g id="Discord_Logos" data-name="Discord Logos"><g id="Discord_Logo_-_Large_-_White" data-name="Discord Logo - Large - White"><path class="cls-1" d="M107.7,8.07A105.15,105.15,0,0,0,81.47,0a72.06,72.06,0,0,0-3.36,6.83A97.68,97.68,0,0,0,49,6.83,72.37,72.37,0,0,0,45.64,0,105.89,105.89,0,0,0,19.39,8.09C2.79,32.65-1.71,56.6.54,80.21h0A105.73,105.73,0,0,0,32.71,96.36,77.7,77.7,0,0,0,39.6,85.25a68.42,68.42,0,0,1-10.85-5.18c.91-.66,1.8-1.34,2.66-2a75.57,75.57,0,0,0,64.32,0c.87.71,1.76,1.39,2.66,2a68.68,68.68,0,0,1-10.87,5.19,77,77,0,0,0,6.89,11.1A105.25,105.25,0,0,0,126.6,80.22h0C129.24,52.84,122.09,29.11,107.7,8.07ZM42.45,65.69C36.18,65.69,31,60,31,53s5-12.74,11.43-12.74S54,46,53.89,53,48.84,65.69,42.45,65.69Zm42.24,0C78.41,65.69,73.25,60,73.25,53s5-12.74,11.44-12.74S96.23,46,96.12,53,91.08,65.69,84.69,65.69Z"/></g></g></g></svg>
|
||||
|
After Width: | Height: | Size: 985 B |
@@ -254,5 +254,6 @@ export const languageEnglish = {
|
||||
otherBots:'Other Bots',
|
||||
user:"User",
|
||||
additionalAssets:"Additional Assets",
|
||||
editDisplay: "Modify Display"
|
||||
editDisplay: "Modify Display",
|
||||
community: "Community"
|
||||
}
|
||||
|
||||
@@ -238,6 +238,7 @@ export const languageKorean = {
|
||||
chatBot:'채팅 봇',
|
||||
otherBots:'기타 봇',
|
||||
user:"유저",
|
||||
editDisplay: "디스플레이 수정"
|
||||
editDisplay: "디스플레이 수정",
|
||||
community: "커뮤니티"
|
||||
|
||||
}
|
||||
16
src/lib/Setting/Pages/Communities.svelte
Normal file
16
src/lib/Setting/Pages/Communities.svelte
Normal file
@@ -0,0 +1,16 @@
|
||||
<script lang="ts">
|
||||
import { language } from "src/lang";
|
||||
import { openURL } from "src/ts/globalApi";
|
||||
</script>
|
||||
|
||||
<h2 class="mb-2 text-2xl font-bold mt-2">{language.community}</h2>
|
||||
<button
|
||||
on:click={async () => {openURL("https://github.com/kwaroran/RisuAI")}}
|
||||
class="drop-shadow-lg p-3 border-borderc border-solid mt-2 flex justify-center items-center ml-2 mr-2 border-1 hover:bg-selected text-sm">
|
||||
Github
|
||||
</button>
|
||||
<button
|
||||
on:click={async () => {openURL("https://discord.gg/JzP8tB9ZK8")}}
|
||||
class="drop-shadow-lg p-3 border-borderc border-solid mt-2 flex justify-center items-center ml-2 mr-2 border-1 hover:bg-selected text-sm">
|
||||
Discord
|
||||
</button>
|
||||
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { ActivityIcon, BotIcon, CodeIcon, FolderIcon, MonitorIcon, Sailboat, UserIcon, XCircleIcon } from "lucide-svelte";
|
||||
import { ActivityIcon, BotIcon, BoxIcon, CodeIcon, FolderIcon, MonitorIcon, Sailboat, UserIcon, XCircleIcon } from "lucide-svelte";
|
||||
import { language } from "src/lang";
|
||||
import DisplaySettings from "./Pages/DisplaySettings.svelte";
|
||||
import UserSettings from "./Pages/UserSettings.svelte";
|
||||
@@ -10,6 +10,7 @@
|
||||
import AdvancedSettings from "./Pages/AdvancedSettings.svelte";
|
||||
import { SizeStore, settingsOpen } from "src/ts/stores";
|
||||
import Botpreset from "./botpreset.svelte";
|
||||
import Communities from "./Pages/Communities.svelte";
|
||||
let selected = -1
|
||||
let openPresetList = false
|
||||
if(window.innerWidth >= 700){
|
||||
@@ -64,6 +65,12 @@
|
||||
<ActivityIcon />
|
||||
<span>{language.advancedSettings}</span>
|
||||
</button>
|
||||
<button class="text-gray-400 flex gap-2 items-center hover:text-gray-200" class:text-white={selected === 7} on:click={() => {
|
||||
selected = 7
|
||||
}}>
|
||||
<BoxIcon />
|
||||
<span>{language.community}</span>
|
||||
</button>
|
||||
{#if window.innerWidth < 700}
|
||||
<button class="absolute top-2 right-2 hover:text-green-500 text-white" on:click={() => {
|
||||
settingsOpen.set(false)
|
||||
@@ -87,6 +94,8 @@
|
||||
<FilesSettings />
|
||||
{:else if selected === 6}
|
||||
<AdvancedSettings />
|
||||
{:else if selected === 7}
|
||||
<Communities />
|
||||
{/if}
|
||||
<button class="absolute top-2 right-2 hover:text-green-500" on:click={() => {
|
||||
if(window.innerWidth >= 700){
|
||||
|
||||
@@ -5,6 +5,7 @@ import { convertFileSrc, invoke } from "@tauri-apps/api/tauri"
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import { appDataDir, join } from "@tauri-apps/api/path";
|
||||
import { get } from "svelte/store";
|
||||
import {open} from '@tauri-apps/api/shell'
|
||||
import { DataBase, loadedStore, setDatabase, type Database, updateTextTheme, defaultSdDataFunc } from "./database";
|
||||
import pako from "pako";
|
||||
import { appWindow } from "@tauri-apps/api/window";
|
||||
@@ -661,4 +662,13 @@ export function getRequestLog(){
|
||||
}
|
||||
console.log(logString)
|
||||
return logString
|
||||
}
|
||||
|
||||
export function openURL(url:string){
|
||||
if(isTauri){
|
||||
open(url)
|
||||
}
|
||||
else{
|
||||
window.open(url, "_blank")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user