Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #75

Merged
merged 3 commits into from
Jul 1, 2021
Merged

Dev #75

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion web/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ export function app(): express.Express {
server.set('views', distFolder);

// Example Express Rest API endpoints
// server.get('/api/**', (req, res) => { });
server.get('/api/shares/ShareId', (req, res) => {
res.status(200).send({status: 'OK'});
});
// Serve static files from /browser
server.get('*.*', express.static(distFolder, {
maxAge: '1w'
Expand Down
23 changes: 21 additions & 2 deletions web/src/app/downloads/downloads.component.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Component, OnInit } from '@angular/core';
import { Title } from '@angular/platform-browser';
import { MessagesService } from '../services/messages.service';
import { Meta, Title } from '@angular/platform-browser';

import { collection, getDocs, getFirestore, orderBy, query, where } from 'firebase/firestore';

Expand All @@ -19,12 +19,31 @@ export class DownloadsComponent implements OnInit {
constructor(
private htmltitle: Title,
private msg: MessagesService,
private meta: Meta,
) {}

ngOnInit(): void {
this.isFromPhone = this.detectMob();
//const coll = this.db.collection('waik').doc('website').collection('downloads', (ref) => ref.orderBy('timestamp'));
this.htmltitle.setTitle('Letöltések');
this.htmltitle.setTitle('Waik | Letöltések');
this.meta.addTag({ property: 'og:title', content: 'Waik | Letöltések' });
this.meta.addTag({
property: 'og:image',
content:
'https://firebasestorage.googleapis.com/v0/b/zal1000.net/o/waik%2Fpublic%2Fwaik_cup.jpg?alt=media&token=5c3a6c28-644a-492a-ba4d-74d9e52470e2',
});
this.meta.addTag({
property: 'og:description',
content: 'Itt találhatóak a letölthető dolgok a waik csapattal kapcsolatban',
});
this.meta.addTag({ property: 'twitter:site', content: 'https://waik.hu/' });
this.meta.addTag({
property: 'twitter:creator',
content: '@zal1000original',
});
this.meta.addTag({ property: 'twitter:image:alt', content: 'Waik' });
this.meta.addTag({ property: 'fb:app_id', content: '581458672492860' });
this.meta.addTag({ property: 'og:url', content: 'https://waik.hu/' });
const q = query(collection(this.db, 'waik/website/downloads'), where('visible', '==', true), orderBy('timestamp'));

getDocs(q).then(coll => {
Expand Down
4 changes: 2 additions & 2 deletions web/src/app/home/home.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ export class HomeComponent implements OnInit {

ngOnInit(): void {
this.isFromPhone = this.detectMob();
this.htmltitle.setTitle('Főoldal');
this.meta.addTag({ property: 'og:title', content: 'Waik weboldal' });
this.htmltitle.setTitle('Waik | Főoldal');
this.meta.addTag({ property: 'og:title', content: 'Waik | Főoldal' });
this.meta.addTag({
property: 'og:image',
content:
Expand Down