Skip to content

Commit b42e4aa

Browse files
committed
migration layout
1 parent b9d9c87 commit b42e4aa

29 files changed

Lines changed: 520 additions & 333 deletions

lang/en-US.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@
169169
"description": "Pano is successfully installed and ready for use. 🚀 <br /> Here's what you can do to get started:",
170170
"connect-server": "Connect Server",
171171
"connect-server-description": "Connect your game server and access more management features.",
172+
"import-data": "Import Data",
172173
"menu-title": "The Menu",
173174
"links-title": "Links",
174175
"publish-your-first-post": "Publish First Post",
@@ -745,8 +746,8 @@
745746
"register-ip": "Register IP"
746747
},
747748
"migration": {
748-
"platforms-title": "From platforms & CMS to Pano",
749-
"plugins-title": "From plugins to Pano",
749+
"platforms-title": "Import from Platform",
750+
"plugins-title": "Import from Plugins",
750751
"not-available": "Not available.",
751752
"craftweb-tribute": "We remember CraftWeb with respect, which started us on this journey. There is no migration here, but our gratitude lives on.",
752753
"authme": {

lang/ru.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -740,8 +740,8 @@
740740
"register-ip": "IP-адрес при регистрации"
741741
},
742742
"migration": {
743-
"platforms-title": "Миграция из платформ и CMS в Pano",
744-
"plugins-title": "Миграция из плагинов в Pano",
743+
"platforms-title": "Импорт из платформы",
744+
"plugins-title": "Импорт из плагинов",
745745
"not-available": "Недоступно.",
746746
"craftweb-tribute": "Мы с уважением вспоминаем CraftWeb, который начал этот путь. Здесь нет миграции, но наша благодарность живёт.",
747747
"authme": {

lang/tr.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@
169169
"description": "Pano başarıyla kuruldu ve kullanıma hazır. \uD83D\uDE80 <br /> İşte başlarken yapabileceklerin:",
170170
"connect-server": "Sunucu Bağla",
171171
"connect-server-description": "Oyun sunucunu bağla ve daha fazla yönetim özelliklerine eriş.",
172+
"import-data": "Verileri İçe Aktar",
172173
"menu-title": "Menü",
173174
"links-title": "Bağlantılar",
174175
"publish-your-first-post": "İlk Yazıyı Yayımla",
@@ -745,8 +746,8 @@
745746
"register-ip": "Kayıt IP"
746747
},
747748
"migration": {
748-
"platforms-title": "Platformlardan & CMS'lerden Pano'ya",
749-
"plugins-title": "Eklentilerden Pano'ya",
749+
"platforms-title": "Platform",
750+
"plugins-title": "Minecraft Eklenti",
750751
"not-available": "Henüz mevcut değil.",
751752
"craftweb-tribute": "Bizi bu yolculuğa başlatan CraftWeb'i saygıyla anıyoruz. Burada bir migration yok, ancak minnettarlığımız yaşamaya devam ediyor.",
752753
"authme": {
@@ -960,7 +961,7 @@
960961
"settings-layout": {
961962
"website": "Website",
962963
"platform": "Platform",
963-
"migration": "Taşıma",
964+
"migration": "Migrasyon",
964965
"updates": "Güncellemeler",
965966
"about": "Hakkında"
966967
},

src/lib/components/FailedLoginPanoStoreAlert.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="animate__animated animate__fadeInUp">
1+
<div>
22
<div class="alert alert-danger d-flex align-items-center mb-0" role="alert">
33
<i class="fa-solid fa-triangle-exclamation me-2"></i>
44
<span>{$_('components.failed-login-pano-store')}</span>

src/lib/components/Navbar.svelte

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<i class="nav-link fa-solid fa-spinner fa-spin"></i>
2323
{:else}
2424
<button
25-
use:tooltip={[$_('components.navbar.panel-theme')]}
25+
use:tooltip={[$_('components.navbar.panel-theme')]}
2626
aria-label={$_('components.navbar.panel-theme')}
2727
class="nav-link"
2828
data-bs-toggle="dropdown"
@@ -31,7 +31,7 @@
3131
disabled={selectingPanelTheme}>
3232
<i class="fa-solid fa-palette"></i>
3333
</button>
34-
<ul class="dropdown-menu dropdown-menu-start animate__animated animate__fadeIn" style="animation-duration: 500ms;">
34+
<ul class="dropdown-menu dropdown-menu-start">
3535
<h6 class="dropdown-header">{$_('components.navbar.panel-theme')}</h6>
3636
{#each panelThemes as theme}
3737
<li>
@@ -101,9 +101,7 @@
101101
{/if}
102102
</button>
103103

104-
<div
105-
style="width: 300px;"
106-
class="dropdown-menu dropdown-menu-end animate__animated animate__zoomIn">
104+
<div style="width: 300px;" class="dropdown-menu dropdown-menu-end">
107105
<h6 class="dropdown-header">
108106
{$_('components.navbar.notifications')}
109107
{$notificationCount === 0 ? '' : '(' + $notificationCount + ')'}
@@ -179,10 +177,10 @@
179177
src="/api/profile/picture/{$user.username}?{$avatarVersion}"
180178
width="20"
181179
height="20"
182-
class="rounded-circle animate__animated animate__zoomIn"
180+
class="rounded-circle"
183181
alt={$user.username} />
184182
</button>
185-
<ul class="dropdown-menu dropdown-menu-end animate__animated animate__zoomIn">
183+
<ul class="dropdown-menu dropdown-menu-end">
186184
<h6 class="dropdown-header">{$user.username}</h6>
187185
<li>
188186
<a class="dropdown-item focus-ring" href="{base}/players/detail/{$user.username}">
@@ -213,7 +211,14 @@
213211
import { page } from '$app/stores';
214212
215213
import ApiUtil from '$lib/api.util';
216-
import { logout, logoutLoading, options, quickNotifications, toggleSidebar, avatarVersion } from '$lib/Store';
214+
import {
215+
logout,
216+
logoutLoading,
217+
options,
218+
quickNotifications,
219+
toggleSidebar,
220+
avatarVersion,
221+
} from '$lib/Store';
217222
218223
import { currentLanguage } from '$lib/language.util';
219224

src/lib/components/Sidebar.svelte

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
@media (min-width: 992px) {
33
.offcanvas-lg {
44
min-height: 100dvh !important;
5-
height: 100dvh !important;
65
position: sticky !important;
76
top: 0;
87
width: 280px !important;

src/lib/components/Splash.svelte

Lines changed: 18 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,10 @@
44
top: 50%;
55
left: 50%;
66
transform: translate(-50%, -50%);
7-
display: flex;
8-
align-items: center;
9-
justify-content: center;
107
}
118
129
.logo-wrapper {
13-
background-color: var(--bs-primary);
14-
padding: 8px;
1510
border-radius: 12px;
16-
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
1711
width: 64px;
1812
height: 64px;
1913
}
@@ -92,24 +86,6 @@
9286
}
9387
}
9488
95-
.logo-img {
96-
width: 100%;
97-
height: 100%;
98-
object-fit: contain;
99-
}
100-
101-
.mc-img {
102-
height: 100%;
103-
width: 100%;
104-
object-fit: contain;
105-
}
106-
107-
.hytale-img {
108-
height: 100%;
109-
width: 100%;
110-
object-fit: contain;
111-
}
112-
11389
.pulse {
11490
animation: pulse 1.5s infinite ease-in-out;
11591
}
@@ -143,19 +119,28 @@
143119
<div class="loader-content position-relative" style="height: 100px; width: 100px;">
144120
{#if networkErrors}
145121
<div
146-
class="logo-wrapper position-absolute center-content"
122+
class="logo-wrapper bg-primary p-2 shadow-sm position-absolute center-content d-flex align-items-center justify-content-center"
147123
class:pulse={$retryingNetworkErrors}>
148-
<img alt="Pano" src="{base}/assets/img/logo.svg" class="logo-img" />
124+
<img alt="Pano" src="{base}/assets/img/logo.svg" class="w-100 h-100 object-fit-contain" />
149125
</div>
150126
{:else}
151-
<div class="logo-wrapper pano-anim center-content">
152-
<img alt="Pano" src="{base}/assets/img/logo.svg" class="logo-img" />
127+
<div
128+
class="logo-wrapper bg-primary p-2 shadow-sm pano-anim center-content d-flex align-items-center justify-content-center">
129+
<img alt="Pano" src="{base}/assets/img/logo.svg" class="w-100 h-100 object-fit-contain" />
153130
</div>
154-
<div class="mc-img-wrapper mc-anim center-content">
155-
<img alt="Minecraft" src="{base}/assets/img/minecraft-icon.png" class="mc-img" />
131+
<div
132+
class="mc-img-wrapper mc-anim center-content d-flex align-items-center justify-content-center">
133+
<img
134+
alt="Minecraft"
135+
src="{base}/assets/img/minecraft-icon.png"
136+
class="w-100 h-100 object-fit-contain" />
156137
</div>
157-
<div class="hytale-img-wrapper hytale-anim center-content">
158-
<img alt="Hytale" src="{base}/assets/img/hytale-icon.png" class="hytale-img" />
138+
<div
139+
class="hytale-img-wrapper hytale-anim center-content d-flex align-items-center justify-content-center">
140+
<img
141+
alt="Hytale"
142+
src="{base}/assets/img/hytale-icon.png"
143+
class="w-100 h-100 object-fit-contain" />
159144
</div>
160145
{/if}
161146
</div>
@@ -203,7 +188,7 @@
203188
retryingNetworkErrors,
204189
} from '$lib/Store';
205190
import { base } from '$app/paths';
206-
import { browser } from "$app/environment";
191+
import { browser } from '$app/environment';
207192
208193
let networkErrors = false;
209194
let showStuckUI = false;

src/lib/components/Toast.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div
22
id="appToast{id}"
3-
class="animate__animated animate__bounceInUp toast align-items-center shadow-lg text-bg-tertiary opacity-100"
3+
class="toast align-items-center shadow-lg text-bg-tertiary opacity-100"
44
role="alert"
55
aria-live="assertive"
66
aria-atomic="true"

src/lib/components/sidebar/SiteNavigationMenu.svelte

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,13 @@
9797
text: 'components.site-navigation-menu.logs',
9898
startsWith: true,
9999
},
100+
{
101+
href: '/migration',
102+
icon: 'fas fa-right-left',
103+
text: 'components.settings-layout.migration',
104+
startsWith: true,
105+
permission: Permissions.MANAGE_PLATFORM_SETTINGS,
106+
},
100107
{
101108
href: '/settings',
102109
icon: 'fas fa-cog',
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<!-- Migration Contents -->
2+
<div class="container vstack gap-3">
3+
<PageActions>
4+
<div slot="left">
5+
<PageNav>
6+
<PageNavItem href="/migration">{$_('pages.migration.platforms-title')}</PageNavItem>
7+
<PageNavItem href="/migration/plugins" startsWith
8+
>{$_('pages.migration.plugins-title')}</PageNavItem>
9+
</PageNav>
10+
</div>
11+
</PageActions>
12+
<slot />
13+
</div>
14+
15+
<script context="module">
16+
import { redirect } from '@sveltejs/kit';
17+
18+
import { base } from '$app/paths';
19+
20+
import { hasPermission, Permissions } from '$lib/auth.util.js';
21+
22+
/**
23+
* @type {import('@sveltejs/kit').LayoutLoad}
24+
*/
25+
export async function load({ parent }) {
26+
const parentData = await parent();
27+
const { user } = parentData;
28+
29+
if (!hasPermission(Permissions.MANAGE_PLATFORM_SETTINGS, user)) {
30+
throw redirect(302, base);
31+
}
32+
33+
return parentData;
34+
}
35+
</script>
36+
37+
<script>
38+
import { _ } from 'svelte-i18n';
39+
40+
import PageActions from '$lib/components/PageActions.svelte';
41+
import PageNav from '$lib/components/PageNav.svelte';
42+
import PageNavItem from '$lib/components/PageNavItem.svelte';
43+
44+
export let data;
45+
</script>

0 commit comments

Comments
 (0)