Skip to content

Commit

Permalink
Use native bootstrap switches (NamelessMC#2633)
Browse files Browse the repository at this point in the history
Co-authored-by: Robin <robin+git@rkslot.nl>
Co-authored-by: TeemoCell <11705513+TeemoCell@users.noreply.github.com>
  • Loading branch information
3 people authored Mar 19, 2022
1 parent 9853dbb commit a8c10fc
Show file tree
Hide file tree
Showing 61 changed files with 1,330 additions and 1,369 deletions.
9 changes: 0 additions & 9 deletions core/assets/plugins/switchery/LICENSE.md

This file was deleted.

1 change: 0 additions & 1 deletion core/assets/plugins/switchery/switchery.min.css

This file was deleted.

1 change: 0 additions & 1 deletion core/assets/plugins/switchery/switchery.min.js

This file was deleted.

2 changes: 1 addition & 1 deletion custom/languages/Chinese/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
'upgrade_php_version' => 'Please upgrade your PHP version to at least 7.4 - the next Nameless release will no longer support the version you are using.',

// Core
'mode_toggle' => 'Dark/Light Mode',
'mode_toggle' => 'Dark Mode',
'settings' => '設置',
'general_settings' => '基本設置',
'sitename' => '網站名稱',
Expand Down
2 changes: 1 addition & 1 deletion custom/languages/Czech/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
'upgrade_php_version' => 'AKtualizujte prosím PHP alespoň na verzi 7.4 - další vydání Nameless již nebude podporovat verzi, kterou používáte.',

// Core
'mode_toggle' => 'Světlý / tmavý režim',
'mode_toggle' => 'Světlý režim',
'settings' => 'Nastavení',
'general_settings' => 'Obecná nastavení',
'sitename' => 'Název webu',
Expand Down
2 changes: 1 addition & 1 deletion custom/languages/Danish/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
'upgrade_php_version' => 'Please upgrade your PHP version to at least 7.4 - the next Nameless release will no longer support the version you are using.',

// Core
'mode_toggle' => 'Mørk/Lys Mode',
'mode_toggle' => 'Mørk Mode',
'settings' => 'Indstillinger',
'general_settings' => 'Generelle Indstillinger',
'sitename' => 'Side Navn',
Expand Down
2 changes: 1 addition & 1 deletion custom/languages/Dutch/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
'upgrade_php_version' => 'Upgrade alstublieft uw PHP versie naar tenminste 7.4 - de volgende Nameless release zal de versie die u gebruikt niet langer ondersteunen.',

// Core
'mode_toggle' => 'Donkere/Lichte modus',
'mode_toggle' => 'Donkere modus',
'settings' => 'Instellingen',
'general_settings' => 'Algemene Instellingen',
'sitename' => 'Site naam',
Expand Down
2 changes: 1 addition & 1 deletion custom/languages/EnglishUK/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
'upgrade_php_version' => 'Please upgrade your PHP version to at least 7.4 - the next Nameless release will no longer support the version you are using.',

// Core
'mode_toggle' => 'Dark/Light Mode',
'mode_toggle' => 'Dark Mode',
'settings' => 'Settings',
'general_settings' => 'General Settings',
'sitename' => 'Site Name',
Expand Down
2 changes: 1 addition & 1 deletion custom/languages/EnglishUS/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
'upgrade_php_version' => 'Please upgrade your PHP version to at least 7.4 - the next Nameless release will no longer support the version you are using.',

// Core
'mode_toggle' => 'Dark/Light Mode',
'mode_toggle' => 'Dark Mode',
'settings' => 'Settings',
'general_settings' => 'General Settings',
'sitename' => 'Site Name',
Expand Down
2 changes: 1 addition & 1 deletion custom/languages/French/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
'upgrade_php_version' => 'Please upgrade your PHP version to at least 7.4 - the next Nameless release will no longer support the version you are using.',

// Core
'mode_toggle' => 'Mode sombre/clair',
'mode_toggle' => 'Mode sombre',
'settings' => 'Paramètres',
'general_settings' => 'Paramètres généraux',
'sitename' => 'Nom du site',
Expand Down
4 changes: 2 additions & 2 deletions custom/languages/German/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
'upgrade_php_version' => 'Bitte aktualisiere deine PHP-Version auf mindestens 7.4 - die nächste Nameless-Version wird die von dir verwendete Version nicht mehr unterstützen.',

// Core
'mode_toggle' => 'Dunkler/Heller Modus',
'mode_toggle' => 'Heller Modus',
'settings' => 'Einstellungen',
'general_settings' => 'Allgemeine Einstellungen',
'sitename' => 'Seiten Name',
Expand Down Expand Up @@ -765,4 +765,4 @@
'identifier' => 'Identifier',
'unlink_account_confirm' => 'Bist du sicher, dass du diesen Anbieter zwangsweise von diesem Benutzer trennen willst?',
'unlink_account_success' => 'Erfolgreich ihr Konto von {x} entkoppelt.', // Don't replace {x}
];
];
2 changes: 1 addition & 1 deletion custom/languages/Greek/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
'upgrade_php_version' => 'Please upgrade your PHP version to at least 7.4 - the next Nameless release will no longer support the version you are using.',

// Core
'mode_toggle' => 'Dark/Light Mode',
'mode_toggle' => 'Dark Mode',
'settings' => 'Ρυθμίσης',
'general_settings' => 'Γενικές Ρυθμίσεις',
'sitename' => 'Ονομα ιστοσελίδας',
Expand Down
2 changes: 1 addition & 1 deletion custom/languages/Italian/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
'upgrade_php_version' => 'Please upgrade your PHP version to at least 7.4 - the next Nameless release will no longer support the version you are using.',

// Core
'mode_toggle' => 'Dark/Light Mode',
'mode_toggle' => 'Dark Mode',
'settings' => 'Impostazioni',
'general_settings' => 'Impostazioni Generali',
'sitename' => 'Nome Sito',
Expand Down
2 changes: 1 addition & 1 deletion custom/languages/Lithuanian/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
'upgrade_php_version' => 'Please upgrade your PHP version to at least 7.4 - the next Nameless release will no longer support the version you are using.',

// Core
'mode_toggle' => 'Dark/Light Mode',
'mode_toggle' => 'Dark Mode',
'settings' => 'Nustatymai',
'general_settings' => 'Bendrieji nustatymai',
'sitename' => 'Svetainės pavadinimas',
Expand Down
2 changes: 1 addition & 1 deletion custom/languages/Norwegian/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
'upgrade_php_version' => 'Please upgrade your PHP version to at least 7.4 - the next Nameless release will no longer support the version you are using.',

// Core
'mode_toggle' => 'Dark/Light Mode',
'mode_toggle' => 'Dark Mode',
'settings' => 'Innstillinger',
'general_settings' => 'Generelle innstillinger',
'sitename' => 'Nettsidens navn',
Expand Down
2 changes: 1 addition & 1 deletion custom/languages/Polish/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
'upgrade_php_version' => 'Please upgrade your PHP version to at least 7.4 - the next Nameless release will no longer support the version you are using.',

// Core
'mode_toggle' => 'Ciemny/Jasny Tryb',
'mode_toggle' => 'Ciemny Tryb',
'settings' => 'Ustawienia',
'general_settings' => 'Główne ustawienia',
'sitename' => 'Nazwa strony',
Expand Down
2 changes: 1 addition & 1 deletion custom/languages/Portuguese/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
'upgrade_php_version' => 'Por favor, atualize sua versão PHP para pelo menos 7.4, a próxima versão Nameless não suportará mais a versão que você está usando.',

// Core
'mode_toggle' => 'Modo Escuro/Claro',
'mode_toggle' => 'Modo Escuro',
'settings' => 'Configurações',
'general_settings' => 'Configurações Gerais',
'sitename' => 'Nome do site',
Expand Down
2 changes: 1 addition & 1 deletion custom/languages/Romanian/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
'upgrade_php_version' => 'Please upgrade your PHP version to at least 7.4 - the next Nameless release will no longer support the version you are using.',

// Core
'mode_toggle' => 'Dark/Light Mode',
'mode_toggle' => 'Dark Mode',
'settings' => 'Setări',
'general_settings' => 'Setări generale',
'sitename' => 'Nume site',
Expand Down
2 changes: 1 addition & 1 deletion custom/languages/Russian/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
'upgrade_php_version' => 'Пожалуйста обновите вашу PHP версию до 7.4 - следуящая релиз Nameless не будет поддерживать версию которую вы используете.',

// Core
'mode_toggle' => 'Чёрная/Белая Тема',
'mode_toggle' => 'Чёрная Тема',
'settings' => 'Настройки',
'general_settings' => 'Общие Настройки',
'sitename' => 'Название Сайта',
Expand Down
2 changes: 1 addition & 1 deletion custom/languages/Slovak/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
'upgrade_php_version' => 'Aktualizujte svoju PHP verziu aspoň na 7.4 – ďalšie Nameless vydanie už nebude podporovať verziu, ktorú používate.',

// Core
'mode_toggle' => 'Tmavý/Svetlý režim',
'mode_toggle' => 'Tmavý režim',
'settings' => 'Nastavenia',
'general_settings' => 'Všeobecné nastavenia',
'sitename' => 'Názov stránky',
Expand Down
2 changes: 1 addition & 1 deletion custom/languages/Spanish/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
'upgrade_php_version' => 'Por favor, actualice su versión de PHP al menos a la 7.4 - la próxima versión de NamelessMC ya no soportará la versión que está utilizando.',

// Core
'mode_toggle' => 'Modo oscuro/claro',
'mode_toggle' => 'Modo oscuro',
'settings' => 'Ajustes',
'general_settings' => 'Ajustes generales',
'sitename' => 'Nombre del sitio',
Expand Down
2 changes: 1 addition & 1 deletion custom/languages/SpanishES/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
'upgrade_php_version' => 'Please upgrade your PHP version to at least 7.4 - the next Nameless release will no longer support the version you are using.',

// Core
'mode_toggle' => 'Modo oscuro/claro',
'mode_toggle' => 'Modo oscuro',
'settings' => 'Configuración',
'general_settings' => 'Configuración general',
'sitename' => 'Nombre del sitio web',
Expand Down
2 changes: 1 addition & 1 deletion custom/languages/SwedishSE/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
'upgrade_php_version' => 'Please upgrade your PHP version to at least 7.4 - the next Nameless release will no longer support the version you are using.',

// Core
'mode_toggle' => 'Mörker/Ljus Läge',
'mode_toggle' => 'Mörker Läge',
'settings' => 'Inställningar',
'general_settings' => 'Allmänna Inställningar',
'sitename' => 'Sido namn',
Expand Down
2 changes: 1 addition & 1 deletion custom/languages/Turkish/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
'upgrade_php_version' => 'Please upgrade your PHP version to at least 7.4 - the next Nameless release will no longer support the version you are using.',

// Core
'mode_toggle' => 'Dark/Light Mode',
'mode_toggle' => 'Dark Mode',
'settings' => 'Ayarlar',
'general_settings' => 'Genel Ayarlar',
'sitename' => 'Site Adı',
Expand Down
17 changes: 8 additions & 9 deletions custom/panel_templates/Default/assets/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ body {
background-color: var(--dark-color-3);
}

.dark .switchery>small,
.dark input[type="radio"] {
background-color: var(--dark-text-shade-1) !important;
}
Expand Down Expand Up @@ -380,10 +379,6 @@ body {
border-radius: .35rem !important;
}

.dark-switch-text {
padding-left: 10px;
}

.thumbnails li img {
width: 60px;
}
Expand Down Expand Up @@ -442,10 +437,6 @@ i,
form .col-md-6:last-child {
padding-top: 10px;
}

.dark-switch-text {
display: none;
}
}

.CodeMirror {
Expand All @@ -471,3 +462,11 @@ footer.sticky-footer {
.text-github {
color: rgba(0, 0, 0) !important;
}

.custom-switch > .custom-control-label::before {
/* slightly larger than default */
top: 0.20rem;
height: 1.1rem;
width: 1.85rem;
border-radius: 0.6rem;
}
6 changes: 3 additions & 3 deletions custom/panel_templates/Default/core/announcements_form.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@
<label for="icon">{$ORDER}</label>
<input type="number" step="1.00" name="order" id="order" class="form-control" value="{$ANNOUNCEMENT->order|escape}">
</div>
<div class="form-group">
<label for="closable">{$CLOSABLE}</label>
<input id="closable" name="closable" type="checkbox" class="js-switch"
<div class="form-group custom-control custom-switch">
<input id="closable" name="closable" type="checkbox" class="custom-control-input"
value="1" {if $ANNOUNCEMENT->closable} checked{/if} />
<label for="closable" class="custom-control-label">{$CLOSABLE}</label>
</div>
<strong style="margin-bottom: 10px; display:block">Groups</strong>
<script>
Expand Down
35 changes: 16 additions & 19 deletions custom/panel_templates/Default/core/api.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -74,41 +74,38 @@
</div>
</div>

<div class="form-group">
<label for="enable_api" style="margin-right:10px">{$ENABLE_API}</label>
<div class="form-group custom-control custom-switch">
<input type="hidden" name="enable_api" value="0">
<input id="enable_api" name="enable_api" type="checkbox"
class="js-switch"
value="1"{if $API_ENABLED eq 1} checked{/if} />
<input type="checkbox" class="custom-control-input" id="enable_api" name="enable_api"
value="1"{if $API_ENABLED eq 1} checked{/if}>
<label class="custom-control-label" for="enable_api">{$ENABLE_API}</label>
</div>

<div class="form-group">
<label for="verification" style="margin-right:10px">{$EMAIL_VERIFICATION}</label>
<input name="verification" id="verification" type="checkbox"
class="js-switch"{if $EMAIL_VERIFICATION_VALUE eq 1} checked{/if} />
<div class="form-group custom-control custom-switch">
<input name="verification" id="verification" type="checkbox" class="custom-control-input"
{if $EMAIL_VERIFICATION_VALUE eq 1} checked{/if} />
<label class="custom-control-label" for="verification" style="margin-right:10px">{$EMAIL_VERIFICATION}</label>
</div>

<div class="form-group">
<label for="api_verification">{$API_VERIFICATION}</label> <span class="badge badge-info"
style="margin-right:10px"
<div class="form-group custom-control custom-switch">
<input name="api_verification" id="api_verification" type="checkbox"
class="custom-control-input" {if $API_VERIFICATION_VALUE eq 1} checked{/if} />
<label class="custom-control-label" for="api_verification">{$API_VERIFICATION}</label> <span class="badge badge-info"
data-toggle="popover"
data-title="{$INFO}"
data-content="{$API_VERIFICATION_INFO}"><i
class="fas fa-question-circle"></i></span>
<input name="api_verification" id="api_verification" type="checkbox"
class="js-switch"{if $API_VERIFICATION_VALUE eq 1} checked{/if} />
</div>

<div class="form-group">
<label for="username_sync">{$USERNAME_SYNC}</label> <span class="badge badge-info"
style="margin-right:10px"
<div class="form-group custom-control custom-switch">
<input name="username_sync" id="username_sync" type="checkbox"
class="custom-control-input" {if $USERNAME_SYNC_VALUE eq 1} checked{/if} />
<label class="custom-control-label" for="username_sync">{$USERNAME_SYNC}</label> <span class="badge badge-info"
data-toggle="popover"
data-html="true"
data-title="{$INFO}"
data-content="{$USERNAME_SYNC_INFO}"><i
class="fas fa-question-circle"></i></span>
<input name="username_sync" id="username_sync" type="checkbox"
class="js-switch"{if $USERNAME_SYNC_VALUE eq 1} checked{/if} />
</div>

<div class="form-group">
Expand Down
6 changes: 3 additions & 3 deletions custom/panel_templates/Default/core/avatars.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@
{include file='includes/alerts.tpl'}

<form action="" method="post">
<div class="form-group">
<label for="inputCustomAvatars">{$CUSTOM_AVATARS}</label>
<div class="form-group custom-control custom-switch">
<input type="hidden" name="custom_avatars" value="0">
<input id="inputCustomAvatars" name="custom_avatars" type="checkbox" class="js-switch"
<input id="inputCustomAvatars" name="custom_avatars" type="checkbox" class="custom-control-input"
value="1" {if $CUSTOM_AVATARS_VALUE eq 1} checked{/if} />
<label class="custom-control-label" for="inputCustomAvatars">{$CUSTOM_AVATARS}</label>
</div>
<div class="form-group">
<label for="inputDefaultAvatar">{$DEFAULT_AVATAR}</label>
Expand Down
Loading

0 comments on commit a8c10fc

Please sign in to comment.