diff --git a/config/additional_projects.json b/config/additional_projects.json index ab02784..f1c9b03 100644 --- a/config/additional_projects.json +++ b/config/additional_projects.json @@ -1,5 +1,11 @@ { "projects": [ + "FirebaseExtended::firebase-framework-tools::docs::angular", + "FirebaseExtended::firebase-framework-tools::docs::nextjs", + "FirebaseExtended::firebase-framework-tools::docs::astro", + "FirebaseExtended::firebase-framework-tools::docs::nitro", + "FirebaseExtended::firebase-framework-tools::docs::nuxt", + "angular::angularfire2", "angular::angularfire2", "googlesamples::easypermissions", "tylermcginnis::re-base", diff --git a/firebase.json b/firebase.json index dc482e6..c525b93 100644 --- a/firebase.json +++ b/firebase.json @@ -13,7 +13,7 @@ }, { "source": "**", - "destination": "/404.html" + "destination": "/index.html" } ] }, diff --git a/frontend/components/HeaderBar.vue b/frontend/components/HeaderBar.vue index 69d2abb..7fee640 100644 --- a/frontend/components/HeaderBar.vue +++ b/frontend/components/HeaderBar.vue @@ -15,7 +15,11 @@ to="/" class="logo" > - + Firebase Open Source diff --git a/frontend/components/HomePage.vue b/frontend/components/HomePage.vue index 35f28f0..c1c13a4 100644 --- a/frontend/components/HomePage.vue +++ b/frontend/components/HomePage.vue @@ -61,6 +61,7 @@ const subheaderTabs = [ { title: 'Web', href: '/platform/web' }, { title: 'Admin', href: '/platform/admin' }, { title: 'Games', href: '/platform/games' }, + { title: 'App Hosting', href: '/platform/app_hosting' }, ] as const const { diff --git a/frontend/components/Project/Detail.vue b/frontend/components/Project/Detail.vue index 74fc117..775f232 100644 --- a/frontend/components/Project/Detail.vue +++ b/frontend/components/Project/Detail.vue @@ -98,9 +98,8 @@ const info = { stars: projectConfig.stars, } -const projectPath = `/projects/${org}/${repo}`.toLowerCase() - const isStaging = env === Env.STAGING +const projectPath = `/projects${isStaging ? '-staging' : ''}/${org}/${repo}`.toLowerCase() function getSubheaderTabs() { const tabs = [ diff --git a/frontend/components/SearchInput.vue b/frontend/components/SearchInput.vue index 754d8a8..2a461ad 100644 --- a/frontend/components/SearchInput.vue +++ b/frontend/components/SearchInput.vue @@ -1,10 +1,26 @@ - + - - - + + Search @@ -19,7 +35,7 @@ \ No newline at end of file + diff --git a/frontend/components/WelcomeCard.vue b/frontend/components/WelcomeCard.vue index c2e55aa..2e156f2 100644 --- a/frontend/components/WelcomeCard.vue +++ b/frontend/components/WelcomeCard.vue @@ -8,7 +8,11 @@ class="content welcomeCard" > - + Firebase ❤️ Open Source diff --git a/frontend/nuxt.config.ts b/frontend/nuxt.config.ts index 365ec41..6a2173c 100644 --- a/frontend/nuxt.config.ts +++ b/frontend/nuxt.config.ts @@ -35,11 +35,11 @@ export default async () => { type: 'image/x-icon', href: '/favicon.ico', }, { - rel: "shortcut icon", - href: "https://www.gstatic.com/devrel-devsite/prod/v38a693baeb774512feb42f10aac8f755d8791ed41119b5be7a531f8e16f8279f/firebase/images/favicon.png", + rel: 'shortcut icon', + href: 'https://www.gstatic.com/devrel-devsite/prod/v38a693baeb774512feb42f10aac8f755d8791ed41119b5be7a531f8e16f8279f/firebase/images/favicon.png', }, { - rel: "apple-touch-icon", - href: "https://www.gstatic.com/devrel-devsite/prod/v38a693baeb774512feb42f10aac8f755d8791ed41119b5be7a531f8e16f8279f/firebase/images/touchicon-180.png", + rel: 'apple-touch-icon', + href: 'https://www.gstatic.com/devrel-devsite/prod/v38a693baeb774512feb42f10aac8f755d8791ed41119b5be7a531f8e16f8279f/firebase/images/touchicon-180.png', }, { rel: 'preconnect', href: 'https://www.google-analytics.com', @@ -62,8 +62,8 @@ gtag('config', 'UA-110728272-1');`, name: 'viewport', content: 'width=device-width, initial-scale=1', }, { - content: "https://firebase.google.com/images/social.png", - name: "image" + content: 'https://firebase.google.com/images/social.png', + name: 'image', }, { hid: 'description', name: 'description', diff --git a/frontend/pages/projects/[org]/[repo]/[...parts].vue b/frontend/pages/projects/[org]/[repo]/[...parts].vue index 2e79a45..0727913 100644 --- a/frontend/pages/projects/[org]/[repo]/[...parts].vue +++ b/frontend/pages/projects/[org]/[repo]/[...parts].vue @@ -10,18 +10,41 @@ diff --git a/frontend/utils/db.ts b/frontend/utils/db.ts index 40c4ff6..d65f7cd 100644 --- a/frontend/utils/db.ts +++ b/frontend/utils/db.ts @@ -79,6 +79,13 @@ export class Util { // Categories used for the subheader const ALL_CATEGORIES = [ + { + title: 'App Hosting', + icon: 'web', + platform: 'app_hosting', + projects: [], + featured: [], + }, { title: 'Android', icon: 'android', diff --git a/functions/src/index.ts b/functions/src/index.ts index c289711..65f3dce 100644 --- a/functions/src/index.ts +++ b/functions/src/index.ts @@ -42,23 +42,29 @@ const DEFAULT_PARAMS: GetParams = { exports.stageProject = functions .runWith(RUNTIME_OPTS) .https.onRequest(async (request, response) => { - const org = request.params.org; - const repo = request.params.repo; - const branch = request.params.branch || "master"; - console.log(`stageProject(${org}, ${repo}, ${branch})`); + const org = request.query.org as string; + const repo = request.query.repo as string; + const branch = (request.query.branch as string | undefined) || "master"; + const path = request.query.path as string | undefined; + console.log(`stageProject(${org}, ${repo}, ${branch}, ${path || "/"})`); const p = new Project({ env: Env.STAGING, branch }); - const id = Util.normalizeId(`${org}::${repo}`); + const pathParts = path?.split("/"); + const id = Util.normalizeId( + `${org}::${repo}${pathParts ? "::" + pathParts.join("::") : ""}` + ); try { await p.recursiveStoreProject(id); response .status(200) .send( - `Visit https://firebaseopensource.com/projects-staging/${org}/${repo}` + `Visit https://firebaseopensource.com/projects-staging/${org}/${repo}${ + path ? `::${pathParts.join("::")}` : "" + } to see the staged project.\n` ); } catch (e) { console.warn(e); diff --git a/functions/src/project.ts b/functions/src/project.ts index 9e0127d..0d04138 100644 --- a/functions/src/project.ts +++ b/functions/src/project.ts @@ -28,6 +28,7 @@ import { } from "../../shared/types"; import * as admin from "firebase-admin"; +import { Timestamp } from "firebase-admin/firestore"; const cjson = require("comment-json"); @@ -199,7 +200,7 @@ export class Project { return this.github .getRepoMetadata(idParsed.owner, idParsed.repo) .then(meta => { - if (meta.description) { + if (meta.description && !config.description) { config.description = meta.description; } @@ -223,7 +224,7 @@ export class Project { const docId = Util.normalizeId(id); // Add server timestamp - data.last_fetched = admin.firestore.FieldValue.serverTimestamp(); + data.last_fetched = Timestamp.now(); // Get path to the config document in the database const configPath = Util.configPath(docId, this.params.env);