@@ -1027,8 +1068,10 @@ function initAuth() {
// Toggle Admin visibility
if (currentUser.isAdmin) {
elements.tabUserAdmin.style.display = 'flex';
+ elements.mobileBtnAdmin.style.display = 'block';
} else {
elements.tabUserAdmin.style.display = 'none';
+ elements.mobileBtnAdmin.style.display = 'none';
}
// Reset view to My Cookbook on init
@@ -1073,8 +1116,10 @@ async function handleLogin(e) {
// Toggle Admin visibility
if (currentUser.isAdmin) {
elements.tabUserAdmin.style.display = 'flex';
+ elements.mobileBtnAdmin.style.display = 'block';
} else {
elements.tabUserAdmin.style.display = 'none';
+ elements.mobileBtnAdmin.style.display = 'none';
}
elements.loginForm.reset();
@@ -1094,7 +1139,7 @@ function logout() {
elements.authModal.classList.add('active');
elements.authModal.style.display = 'flex';
elements.userBadgeContainer.style.display = 'none';
- elements.tabUserAdmin.style.display = 'none';
+ elements.mobileBtnAdmin.style.display = 'none';
allRecipes = [];
// Reset tabs visual state
@@ -1119,6 +1164,11 @@ function switchTab(tabName) {
elements.tabUserAdmin.classList.remove('btn-primary');
elements.tabUserAdmin.classList.add('btn-outline');
+ // Mobile Tab Bar sync
+ elements.mobileTabCookbook.classList.remove('active');
+ elements.mobileTabCommunity.classList.remove('active');
+ elements.mobileTabProfile.classList.remove('active');
+
elements.recipesGrid.style.display = 'none';
elements.emptyState.style.display = 'none';
elements.userAdminPanel.style.display = 'none';
@@ -1126,19 +1176,33 @@ function switchTab(tabName) {
const filters = elements.librarySearch.closest('.filter-controls');
if (filters) filters.style.display = 'flex';
+ // Update Dynamic Mobile Header Title
+ if (elements.libraryViewTitle) {
+ if (tabName === 'my-cookbook') {
+ elements.libraryViewTitle.textContent = 'My Cookbook';
+ } else if (tabName === 'community-vault') {
+ elements.libraryViewTitle.textContent = 'Shared Cookbook';
+ } else if (tabName === 'user-admin') {
+ elements.libraryViewTitle.textContent = 'User Administration';
+ }
+ }
+
if (tabName === 'my-cookbook') {
elements.tabMyCookbook.classList.add('active');
+ elements.mobileTabCookbook.classList.add('active');
elements.recipesGrid.style.display = 'grid';
activeTab = 'my-cookbook';
fetchRecipes();
} else if (tabName === 'community-vault') {
elements.tabCommunityVault.classList.add('active');
+ elements.mobileTabCommunity.classList.add('active');
elements.recipesGrid.style.display = 'grid';
activeTab = 'community-vault';
fetchRecipes();
} else if (tabName === 'user-admin') {
elements.tabUserAdmin.classList.add('btn-primary');
elements.tabUserAdmin.classList.remove('btn-outline');
+ elements.mobileTabProfile.classList.add('active');
elements.userAdminPanel.style.display = 'block';
if (filters) filters.style.display = 'none';
activeTab = 'user-admin';
@@ -1654,3 +1718,48 @@ async function scanRecipeFile(file) {
alert(`Scanning Failed: ${error.message}\n\nPlease verify your internet connection and check that your Gemini API Key is correct.`);
}
}
+
+// -------------------------------------------------------------
+// MOBILE PORTAL CONTROLS & GESTURES
+// -------------------------------------------------------------
+
+function openMobileProfile() {
+ if (!currentUser) return;
+
+ elements.mobileProfileUsername.textContent = `@${currentUser.username}`;
+
+ // Set role text
+ let roleText = 'Chef Account';
+ if (currentUser.isAdmin) {
+ roleText = 'Administrator';
+ } else if (currentUser.isRecipeManager) {
+ roleText = 'Recipe Manager';
+ }
+ elements.mobileProfileRole.textContent = roleText;
+
+ // Handle theme icon inside profile drawer
+ const isDark = document.body.classList.contains('dark-theme');
+ const sunIcon = elements.mobileBtnThemeToggle.querySelector('.sun-icon');
+ const moonIcon = elements.mobileBtnThemeToggle.querySelector('.moon-icon');
+ if (sunIcon && moonIcon) {
+ if (isDark) {
+ sunIcon.style.display = 'block';
+ moonIcon.style.display = 'none';
+ } else {
+ sunIcon.style.display = 'none';
+ moonIcon.style.display = 'block';
+ }
+ }
+
+ openModal('mobile-profile-modal');
+}
+
+function handleFabClick() {
+ // If not on cookbook tab, switch back to list first
+ if (activeTab !== 'my-cookbook') {
+ switchTab('my-cookbook');
+ }
+ // Open the manual recipe creator
+ openManualAdd();
+}
+
diff --git a/public/index.html b/public/index.html
index 860f728..5bf5724 100644
--- a/public/index.html
+++ b/public/index.html
@@ -16,12 +16,13 @@
-
+
ForkFolio
+
@chef
@@ -37,6 +38,22 @@
+
+
+
+
+
+
+
+
@@ -74,7 +91,7 @@
My Cookbook
@@ -87,6 +104,9 @@
+
+
My Cookbook
+
@@ -95,7 +115,7 @@
-
Your vault is empty
+
Your cookbook is empty
Insert a cooking web link above or create one manually to build your digital recipe collections.
@@ -193,7 +213,7 @@
Share with ForkFolio Community (Public)
-
If enabled, this recipe will be shared to the global Community Vault feed for everyone to view and clone.
+
If enabled, this recipe will be shared to the global Shared Cookbook feed for everyone to view and clone.
@@ -450,11 +470,11 @@
- If enabled, this chef's private recipes will be transferred to a public archive in the Community Vault. If disabled, all recipes owned by this chef will be purged.
+ If enabled, this chef's private recipes will be transferred to a public archive in the Shared Cookbook. If disabled, all recipes owned by this chef will be purged.