-
-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add mobile menu navigation to experimental settings
feat: use browsers locale to set dates on the dashboard
- Loading branch information
Showing
31 changed files
with
421 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
require_once '../../includes/connect_endpoint.php'; | ||
|
||
if (!isset($_SESSION['loggedin']) || $_SESSION['loggedin'] !== true) { | ||
die(json_encode([ | ||
"success" => false, | ||
"message" => translate('session_expired', $i18n) | ||
])); | ||
} | ||
|
||
if ($_SERVER["REQUEST_METHOD"] === "POST") { | ||
$postData = file_get_contents("php://input"); | ||
$data = json_decode($postData, true); | ||
|
||
$mobile_nav = $data['value']; | ||
|
||
$stmt = $db->prepare('UPDATE settings SET mobile_nav = :mobile_nav WHERE user_id = :userId'); | ||
$stmt->bindParam(':mobile_nav', $mobile_nav, SQLITE3_INTEGER); | ||
$stmt->bindParam(':userId', $userId, SQLITE3_INTEGER); | ||
|
||
if ($stmt->execute()) { | ||
die(json_encode([ | ||
"success" => true, | ||
"message" => translate("success", $i18n) | ||
])); | ||
} else { | ||
die(json_encode([ | ||
"success" => false, | ||
"message" => translate("error", $i18n) | ||
])); | ||
} | ||
} | ||
« | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,35 @@ | ||
</main> | ||
</main> | ||
|
||
<div class="toast" id="errorToast"> | ||
<div class="toast-content"> | ||
<i class="fas fa-solid fa-x toast-icon error"></i> | ||
<div class="message"> | ||
<span class="text text-1"><?= translate("error", $i18n) ?></span> | ||
<span class="text text-2 errorMessage"></span> | ||
</div> | ||
<div class="toast" id="errorToast"> | ||
<div class="toast-content"> | ||
<i class="fas fa-solid fa-x toast-icon error"></i> | ||
<div class="message"> | ||
<span class="text text-1"><?= translate("error", $i18n) ?></span> | ||
<span class="text text-2 errorMessage"></span> | ||
</div> | ||
<i class="fa-solid fa-xmark close close-error"></i> | ||
<div class="progress error"></div> | ||
</div> | ||
<i class="fa-solid fa-xmark close close-error"></i> | ||
<div class="progress error"></div> | ||
</div> | ||
|
||
<div class="toast" id="successToast"> | ||
<div class="toast-content"> | ||
<i class="fas fa-solid fa-check toast-icon success"></i> | ||
<div class="message"> | ||
<span class="text text-1"><?= translate("success", $i18n) ?></span> | ||
<span class="text text-2 successMessage"></span> | ||
</div> | ||
<div class="toast" id="successToast"> | ||
<div class="toast-content"> | ||
<i class="fas fa-solid fa-check toast-icon success"></i> | ||
<div class="message"> | ||
<span class="text text-1"><?= translate("success", $i18n) ?></span> | ||
<span class="text text-2 successMessage"></span> | ||
</div> | ||
<i class="fa-solid fa-xmark close close-success"></i> | ||
<div class="progress success"></div> | ||
</div> | ||
<i class="fa-solid fa-xmark close close-success"></i> | ||
<div class="progress success"></div> | ||
</div> | ||
|
||
<?php | ||
if (isset($db)) { | ||
$db->close(); | ||
} | ||
?> | ||
<?php | ||
if (isset($db)) { | ||
$db->close(); | ||
} | ||
?> | ||
|
||
</body> | ||
</body> | ||
|
||
</html> |
Oops, something went wrong.