Move sync settings to separate page

V2_Rewrite
Skylar Ittner 6 years ago
parent ec2fac4ee4
commit 87c01fe2ce

@ -18,5 +18,5 @@ ALTER TABLE `groups`
CHANGE COLUMN `groupid` `groupid` INT(11) NOT NULL AUTO_INCREMENT;
SET FOREIGN_KEY_CHECKS = 1;
ALTER TABLE `accounthub`.`accounts`
ALTER TABLE `accounts`
ADD COLUMN `pin` VARCHAR(10) NULL DEFAULT NULL AFTER `authsecret`;

@ -1,5 +1,4 @@
<?php
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@ -88,9 +87,23 @@ if (!is_empty($_GET['page'])) {
<div class="collapse navbar-collapse" id="navbar-collapse">
<ul class="nav navbar-nav">
<?php
$counter = 0;
$more = "";
$curpagefound = false;
foreach (PAGES as $id => $pg) {
if ($pg['navbar'] === TRUE) {
$counter++;
if ($counter > ($curpagefound ? 4 : 3) && $pageid != $id) {
$item = '<a href="home.php?page=' . $id . '">';
if (isset($pg['icon'])) {
$item .= '<i class="fa fa-' . $pg['icon'] . ' fa-fw"></i>';
}
$item .= lang($pg['title'], false) . '</a>';
echo '<li class="hidden-sm hidden-md">' . $item . "</li>";
$more .= '<li>' . $item . "</li>";
} else {
if ($pageid == $id) {
$curpagefound = true;
?>
<li class="active">
<?php
@ -110,11 +123,19 @@ if (!is_empty($_GET['page'])) {
<?php
}
}
}
if ($counter > 4) {
?>
<li class="dropdown hidden-lg hidden-xs">
<a href="" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-ellipsis-v fa-fw"></i> <?php lang("more"); ?></a>
<ul class="dropdown-menu"><?php echo $more; ?></ul>
</li>
<?php } ?>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="home.php"><i class="fa fa-user fa-fw"></i> <?php echo $_SESSION['realname'] ?></a></li>
<li><a href="action.php?action=signout"><i class="fa fa-sign-out fa-fw"></i> <?php lang("sign out") ?></a></li>
<li><a href="home.php"><i class="fa fa-user fa-fw"></i> <span class=""><?php echo $_SESSION['realname'] ?></span></a></li>
<li><a href="action.php?action=signout"><i class="fa fa-sign-out fa-fw"></i> <span class=""><?php lang("sign out") ?></span></a></li>
</ul>
</div>
</nav>

@ -29,6 +29,7 @@ $STRINGS = [
"account security" => "Account security",
"security options" => "Security options",
"account options" => "Account options",
"sync" => "Sync settings",
"options" => "Options",
"sign out" => "Sign out",
"settings" => "Settings",

@ -12,9 +12,14 @@ define("PAGES", [
"icon" => "home"
],
"security" => [
"title" => "account options",
"title" => "account security",
"navbar" => true,
"icon" => "cogs"
"icon" => "lock"
],
"sync" => [
"title" => "sync",
"navbar" => true,
"icon" => "mobile"
],
"404" => [
"title" => "404 error",
@ -33,10 +38,12 @@ define("APPS", [
"account_security"
],
"security" => [
"sync_mobile",
"change_password",
"change_pin",
"setup_2fa",
"change_pin"
],
"sync" => [
"sync_mobile",
],
"404" => [
"404_error"

Loading…
Cancel
Save