Skip to content

Instantly share code, notes, and snippets.

View iamparthaonline's full-sized avatar

Partha Roy iamparthaonline

View GitHub Profile
<template>
<div class="vue-floating-btn-container" @click="clickHandler">
<span v-if="label">{{ label }}</span>
<img v-if="icon" :src="icon" />
</div>
</template>
<script>
export default {
name: "FloatingButton",
import { FlowRouter } from "meteor/kadira:flow-router";
Meteor.startup(function () {
if (Meteor.isCordova) {
universalLinks.subscribe("shareEvent", function (eventData) {
const shareParameters = eventData.path.split("/share")[1];
alert(`shareEvent: ${JSON.stringify(eventData)}`); // just to check event data - should be removed
if (shareParameters) {
const linkToOpen = `/share${shareParameters}`;
App.appendToConfig(`
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application" xmlns:android="http://schemas.android.com/apk/res/android">
<application android:usesCleartextTraffic="true"></application>
</edit-config>
`);
App.appendToConfig(`
<universal-links>
<host name="yourwebsite.com" scheme="https">
import React from "react";
const ParagraphSpans = function (spans) {
return (
<React.Fragment>
{spans.map((spanLabel) => (
<span>{spanLabel}</span>
))}
</React.Fragment>
);
import React from "react";
const FunctionalContentComponent = function (props) {
return (
<body>
{props.list.map(({ title, paragraph }, index) => (
<React.Fragment key={index}>
<h1>{title} </h1>
<p>{paragraph}</p>
</React.Fragment>
const FunctionalContentComponent = function (props) {
return (
<>
<h1>{props.title} </h1>
<p>{props.paragraph}</p>
</>
);
};
export default FunctionalContentComponent;
import React, { Component } from "react";
class UncontrolledComponent extends Component {
constructor(props) {
super(props);
this.inputRef = React.createRef();
}
render() {
return (
import React, { Component } from "react";
class ControlledComponent extends Component {
constructor(props) {
super(props);
this.state = {
text: ""
};
}
{
"name": "retest",
"short_name": "RT",
"background_color": "#ffffff",
"description": "A description about app.",
"display": "standalone",
"theme_color": "#ffffff",
"crossorigin": "use-credentials",
"start_url": "/index.html",
"icons": [{
const staticAssets = [
'./',
'./styles.css',
'./app.js'
];
self.addEventListener('install', async event => {
const cache = await caches.open('static-meme');
// cache.addAll(staticAssets);
});