all working after migration

This commit is contained in:
Vishnu Raghav B 2020-10-23 00:06:50 +05:30
parent 4388301db9
commit 07d3b76ff3
70 changed files with 630 additions and 21021 deletions

View file

@ -1,12 +0,0 @@
{
"name": "migration",
"paths": [
"hooks",
"webpack.config.js",
"package.json",
"package-lock.json",
"app/package.json",
"package.json",
"app/package.json"
]
}

View file

@ -1,9 +0,0 @@
{
"android": {
"v8Flags": "--expose_gc",
"markingMode": "none"
},
"main": "main",
"name": "ns",
"version": "1.0.0"
}

File diff suppressed because it is too large Load diff

View file

@ -1,45 +0,0 @@
{
"name": "ns",
"version": "1.0.0",
"description": "A native application built with NativeScript-Vue",
"author": "Vishnu Raghav B <design@vishnuraghav.com>",
"license": "GPL",
"nativescript": {
"id": "com.vishnuraghav.enrecipes",
"templateVersion": "v2",
"tns-android": {
"version": "6.5.0"
},
"tns-ios": {
"version": "6.5.0"
}
},
"scripts": {
"run": "tns run"
},
"dependencies": {
"@nativescript/theme": "^2.2.1",
"nativescript-camera": "^4.5.0",
"nativescript-couchbase-plugin": "^0.9.6",
"nativescript-datetimepicker": "^1.2.3",
"nativescript-mediafilepicker": "^4.0.0",
"nativescript-permissions": "^1.3.9",
"nativescript-toast": "^2.0.0",
"nativescript-ui-listview": "^8.2.0",
"nativescript-ui-sidedrawer": "^8.0.1",
"nativescript-vue": "^2.6.1",
"tns-core-modules": "^6.5.1",
"vuex": "^3.3.0"
},
"devDependencies": {
"@babel/core": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@types/node": "^14.0.27",
"babel-loader": "^8.1.0",
"nativescript-dev-webpack": "^1.5.1",
"nativescript-vue-template-compiler": "^2.6.0",
"nativescript-worker-loader": "~0.11.0",
"node-sass": "^4.13.1",
"vue-loader": "^15.9.1"
}
}

View file

@ -1,353 +0,0 @@
const { join, relative, resolve, sep } = require("path");
const webpack = require("webpack");
const CleanWebpackPlugin = require("clean-webpack-plugin");
const CopyWebpackPlugin = require("copy-webpack-plugin");
const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer");
const TerserPlugin = require("terser-webpack-plugin");
const VueLoaderPlugin = require('vue-loader/lib/plugin');
const NsVueTemplateCompiler = require("nativescript-vue-template-compiler");
const nsWebpack = require("nativescript-dev-webpack");
const nativescriptTarget = require("nativescript-dev-webpack/nativescript-target");
const { NativeScriptWorkerPlugin } = require("nativescript-worker-loader/NativeScriptWorkerPlugin");
const hashSalt = Date.now().toString();
module.exports = env => {
// Add your custom Activities, Services and other android app components here.
const appComponents = env.appComponents || [];
appComponents.push(...[
"tns-core-modules/ui/frame",
"tns-core-modules/ui/frame/activity",
]);
const platform = env && (env.android && "android" || env.ios && "ios" || env.platform);
if (!platform) {
throw new Error("You need to provide a target platform!");
}
const platforms = ["ios", "android"];
const projectRoot = __dirname;
if (env.platform) {
platforms.push(env.platform);
}
// Default destination inside platforms/<platform>/...
const dist = resolve(projectRoot, nsWebpack.getAppPath(platform, projectRoot));
const {
// The 'appPath' and 'appResourcesPath' values are fetched from
// the nsconfig.json configuration file.
appPath = "app",
appResourcesPath = "app/App_Resources",
// You can provide the following flags when running 'tns run android|ios'
snapshot, // --env.snapshot
production, // --env.production
report, // --env.report
hmr, // --env.hmr
sourceMap, // --env.sourceMap
hiddenSourceMap, // --env.hiddenSourceMap
unitTesting, // --env.unitTesting
verbose, // --env.verbose
snapshotInDocker, // --env.snapshotInDocker
skipSnapshotTools, // --env.skipSnapshotTools
compileSnapshot // --env.compileSnapshot
} = env;
const useLibs = compileSnapshot;
const isAnySourceMapEnabled = !!sourceMap || !!hiddenSourceMap;
const externals = nsWebpack.getConvertedExternals(env.externals);
const mode = production ? "production" : "development"
const appFullPath = resolve(projectRoot, appPath);
const hasRootLevelScopedModules = nsWebpack.hasRootLevelScopedModules({ projectDir: projectRoot });
let coreModulesPackageName = "tns-core-modules";
const alias = env.alias || {};
alias['~'] = appFullPath;
alias['@'] = appFullPath;
alias['vue'] = 'nativescript-vue';
if (hasRootLevelScopedModules) {
coreModulesPackageName = "@nativescript/core";
alias["tns-core-modules"] = coreModulesPackageName;
}
const appResourcesFullPath = resolve(projectRoot, appResourcesPath);
const entryModule = nsWebpack.getEntryModule(appFullPath, platform);
const entryPath = `.${sep}${entryModule}`;
const entries = env.entries || {};
entries.bundle = entryPath;
const areCoreModulesExternal = Array.isArray(env.externals) && env.externals.some(e => e.indexOf("tns-core-modules") > -1);
if (platform === "ios" && !areCoreModulesExternal) {
entries["tns_modules/tns-core-modules/inspector_modules"] = "inspector_modules";
};
console.log(`Bundling application for entryPath ${entryPath}...`);
let sourceMapFilename = nsWebpack.getSourceMapFilename(hiddenSourceMap, __dirname, dist);
const itemsToClean = [`${dist}/**/*`];
if (platform === "android") {
itemsToClean.push(`${join(projectRoot, "platforms", "android", "app", "src", "main", "assets", "snapshots")}`);
itemsToClean.push(`${join(projectRoot, "platforms", "android", "app", "build", "configurations", "nativescript-android-snapshot")}`);
}
nsWebpack.processAppComponents(appComponents, platform);
const config = {
mode: mode,
context: appFullPath,
externals,
watchOptions: {
ignored: [
appResourcesFullPath,
// Don't watch hidden files
"**/.*",
],
},
target: nativescriptTarget,
// target: nativeScriptVueTarget,
entry: entries,
output: {
pathinfo: false,
path: dist,
sourceMapFilename,
libraryTarget: "commonjs2",
filename: "[name].js",
globalObject: "global",
hashSalt
},
resolve: {
extensions: [".vue", ".ts", ".js", ".scss", ".css"],
// Resolve {N} system modules from tns-core-modules
modules: [
resolve(__dirname, `node_modules/${coreModulesPackageName}`),
resolve(__dirname, "node_modules"),
`node_modules/${coreModulesPackageName}`,
"node_modules",
],
alias,
// resolve symlinks to symlinked modules
symlinks: true,
},
resolveLoader: {
// don't resolve symlinks to symlinked loaders
symlinks: false,
},
node: {
// Disable node shims that conflict with NativeScript
"http": false,
"timers": false,
"setImmediate": false,
"fs": "empty",
"__dirname": false,
},
devtool: hiddenSourceMap ? "hidden-source-map" : (sourceMap ? "inline-source-map" : "none"),
optimization: {
runtimeChunk: "single",
noEmitOnErrors: true,
splitChunks: {
cacheGroups: {
vendor: {
name: "vendor",
chunks: "all",
test: (module) => {
const moduleName = module.nameForCondition ? module.nameForCondition() : '';
return /[\\/]node_modules[\\/]/.test(moduleName) ||
appComponents.some(comp => comp === moduleName);
},
enforce: true,
},
},
},
minimize: Boolean(production),
minimizer: [
new TerserPlugin({
parallel: true,
cache: true,
sourceMap: isAnySourceMapEnabled,
terserOptions: {
output: {
comments: false,
semicolons: !isAnySourceMapEnabled
},
compress: {
// The Android SBG has problems parsing the output
// when these options are enabled
'collapse_vars': platform !== "android",
sequences: platform !== "android",
},
keep_fnames: true,
},
}),
],
},
module: {
rules: [{
include: [join(appFullPath, entryPath + ".js"), join(appFullPath, entryPath + ".ts")],
use: [
// Require all Android app components
platform === "android" && {
loader: "nativescript-dev-webpack/android-app-components-loader",
options: { modules: appComponents },
},
{
loader: "nativescript-dev-webpack/bundle-config-loader",
options: {
registerPages: true, // applicable only for non-angular apps
loadCss: !snapshot, // load the application css if in debug mode
unitTesting,
appFullPath,
projectRoot,
ignoredFiles: nsWebpack.getUserDefinedEntries(entries, platform)
},
},
].filter(loader => Boolean(loader)),
},
{
test: /[\/|\\]app\.css$/,
use: [
'nativescript-dev-webpack/style-hot-loader',
{
loader: "nativescript-dev-webpack/css2json-loader",
options: { useForImports: true }
},
],
},
{
test: /[\/|\\]app\.scss$/,
use: [
'nativescript-dev-webpack/style-hot-loader',
{
loader: "nativescript-dev-webpack/css2json-loader",
options: { useForImports: true }
},
'sass-loader',
],
},
{
test: /\.css$/,
exclude: /[\/|\\]app\.css$/,
use: [
'nativescript-dev-webpack/style-hot-loader',
'nativescript-dev-webpack/apply-css-loader.js',
{ loader: "css-loader", options: { url: false } },
],
},
{
test: /\.scss$/,
exclude: /[\/|\\]app\.scss$/,
use: [
'nativescript-dev-webpack/style-hot-loader',
'nativescript-dev-webpack/apply-css-loader.js',
{ loader: "css-loader", options: { url: false } },
'sass-loader',
],
},
{
test: /\.js$/,
loader: 'babel-loader',
},
{
test: /\.ts$/,
loader: 'ts-loader',
options: {
appendTsSuffixTo: [/\.vue$/],
allowTsInNodeModules: true,
compilerOptions: {
declaration: false
}
},
},
{
test: /\.vue$/,
loader: "vue-loader",
options: {
compiler: NsVueTemplateCompiler,
},
},
],
},
plugins: [
// ... Vue Loader plugin omitted
// make sure to include the plugin!
new VueLoaderPlugin(),
// Define useful constants like TNS_WEBPACK
new webpack.DefinePlugin({
"global.TNS_WEBPACK": "true",
"TNS_ENV": JSON.stringify(mode),
"process": "global.process"
}),
// Remove all files from the out dir.
new CleanWebpackPlugin(itemsToClean, { verbose: !!verbose }),
// Copy assets to out dir. Add your own globs as needed.
new CopyWebpackPlugin([
{ from: { glob: "fonts/**" } },
{ from: { glob: "**/*.+(jpg|png)" } },
{ from: { glob: "assets/**/*" } },
], { ignore: [`${relative(appPath, appResourcesFullPath)}/**`] }),
new nsWebpack.GenerateNativeScriptEntryPointsPlugin("bundle"),
// For instructions on how to set up workers with webpack
// check out https://github.com/nativescript/worker-loader
new NativeScriptWorkerPlugin(),
new nsWebpack.PlatformFSPlugin({
platform,
platforms,
}),
// Does IPC communication with the {N} CLI to notify events when running in watch mode.
new nsWebpack.WatchStateLoggerPlugin()
],
};
if (unitTesting) {
config.module.rules.push(
{
test: /-page\.js$/,
use: "nativescript-dev-webpack/script-hot-loader"
},
{
test: /\.(html|xml)$/,
use: "nativescript-dev-webpack/markup-hot-loader"
},
{ test: /\.(html|xml)$/, use: "nativescript-dev-webpack/xml-namespace-loader" }
);
}
if (report) {
// Generate report files for bundles content
config.plugins.push(new BundleAnalyzerPlugin({
analyzerMode: "static",
openAnalyzer: false,
generateStatsFile: true,
reportFilename: resolve(projectRoot, "report", `report.html`),
statsFilename: resolve(projectRoot, "report", `stats.json`),
}));
}
if (snapshot) {
config.plugins.push(new nsWebpack.NativeScriptSnapshotPlugin({
chunk: "vendor",
requireModules: [
"tns-core-modules/bundle-entry-points",
],
projectRoot,
webpackConfig: config,
snapshotInDocker,
skipSnapshotTools,
useLibs
}));
}
if (hmr) {
config.plugins.push(new webpack.HotModuleReplacementPlugin());
}
return config;
};

File diff suppressed because it is too large Load diff

View file

@ -1,36 +0,0 @@
{
"name": "ns",
"version": "1.0.0",
"description": "A native application built with NativeScript-Vue",
"author": "Vishnu Raghav B <design@vishnuraghav.com>",
"license": "GPL",
"scripts": {
"run": "ns run android"
},
"dependencies": {
"@nativescript/theme": "^2.2.1",
"nativescript-camera": "^4.5.0",
"nativescript-couchbase-plugin": "^0.9.6",
"nativescript-datetimepicker": "^1.2.3",
"nativescript-mediafilepicker": "^4.0.0",
"nativescript-permissions": "^1.3.9",
"nativescript-toast": "^2.0.0",
"nativescript-ui-listview": "^8.2.0",
"nativescript-ui-sidedrawer": "^8.0.1",
"nativescript-vue": "^2.6.1",
"vuex": "^3.3.0",
"@nativescript/core": "7.0.0",
"@nativescript/webpack": "3.0.0"
},
"devDependencies": {
"@babel/core": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@nativescript/android": "7.0.1",
"@types/node": "^14.0.27",
"babel-loader": "^8.1.0",
"nativescript-vue-template-compiler": "^2.6.0",
"node-sass": "^4.13.1",
"vue-loader": "^15.9.1"
},
"main": "main"
}

View file

@ -1,369 +0,0 @@
const { join, relative, resolve, sep } = require("path");
const webpack = require("webpack");
const { CleanWebpackPlugin } = require("clean-webpack-plugin");
const CopyWebpackPlugin = require("copy-webpack-plugin");
const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer");
const TerserPlugin = require("terser-webpack-plugin");
const VueLoaderPlugin = require('vue-loader/lib/plugin');
const NsVueTemplateCompiler = require("nativescript-vue-template-compiler");
const nsWebpack = require("@nativescript/webpack");
const nativescriptTarget = require("@nativescript/webpack/nativescript-target");
const { NativeScriptWorkerPlugin } = require("nativescript-worker-loader/NativeScriptWorkerPlugin");
const hashSalt = Date.now().toString();
module.exports = env => {
// Add your custom Activities, Services and other android app components here.
const appComponents = env.appComponents || [];
appComponents.push(...[
"@nativescript/core/ui/frame",
"@nativescript/core/ui/frame/activity",
]);
const platform = env && (env.android && "android" || env.ios && "ios" || env.platform);
if (!platform) {
throw new Error("You need to provide a target platform!");
}
const platforms = ["ios", "android"];
const projectRoot = __dirname;
if (env.platform) {
platforms.push(env.platform);
}
// Default destination inside platforms/<platform>/...
const dist = resolve(projectRoot, nsWebpack.getAppPath(platform, projectRoot));
const {
// The 'appPath' and 'appResourcesPath' values are fetched from
// the nsconfig.json configuration file.
appPath = "app",
appResourcesPath = "app/App_Resources",
// You can provide the following flags when running 'tns run android|ios'
snapshot, // --env.snapshot
production, // --env.production
report, // --env.report
hmr, // --env.hmr
sourceMap, // --env.sourceMap
hiddenSourceMap, // --env.hiddenSourceMap
unitTesting, // --env.unitTesting
testing, // --env.testing
verbose, // --env.verbose
snapshotInDocker, // --env.snapshotInDocker
skipSnapshotTools, // --env.skipSnapshotTools
compileSnapshot // --env.compileSnapshot
} = env;
const useLibs = compileSnapshot;
const isAnySourceMapEnabled = !!sourceMap || !!hiddenSourceMap;
const externals = nsWebpack.getConvertedExternals(env.externals);
const mode = production ? "production" : "development"
const appFullPath = resolve(projectRoot, appPath);
const hasRootLevelScopedModules = nsWebpack.hasRootLevelScopedModules({ projectDir: projectRoot });
let coreModulesPackageName = "tns-core-modules";
const alias = env.alias || {};
alias['~/package.json'] = resolve(projectRoot, 'package.json');
alias['~'] = appFullPath;
alias['@'] = appFullPath;
alias['vue'] = 'nativescript-vue';
if (hasRootLevelScopedModules) {
coreModulesPackageName = "@nativescript/core";
alias["tns-core-modules"] = coreModulesPackageName;
}
const appResourcesFullPath = resolve(projectRoot, appResourcesPath);
const copyIgnore = { ignore: [`${relative(appPath, appResourcesFullPath)}/**`] };
const entryModule = nsWebpack.getEntryModule(appFullPath, platform);
const entryPath = `.${sep}${entryModule}`;
const entries = env.entries || {};
entries.bundle = entryPath;
const areCoreModulesExternal = Array.isArray(env.externals) && env.externals.some(e => e.indexOf("@nativescript") > -1);
if (platform === "ios" && !areCoreModulesExternal && !testing) {
entries["tns_modules/@nativescript/core/inspector_modules"] = "inspector_modules";
};
console.log(`Bundling application for entryPath ${entryPath}...`);
let sourceMapFilename = nsWebpack.getSourceMapFilename(hiddenSourceMap, __dirname, dist);
const itemsToClean = [`${dist}/**/*`];
if (platform === "android") {
itemsToClean.push(`${join(projectRoot, "platforms", "android", "app", "src", "main", "assets", "snapshots")}`);
itemsToClean.push(`${join(projectRoot, "platforms", "android", "app", "build", "configurations", "nativescript-android-snapshot")}`);
}
nsWebpack.processAppComponents(appComponents, platform);
const config = {
mode: mode,
context: appFullPath,
externals,
watchOptions: {
ignored: [
appResourcesFullPath,
// Don't watch hidden files
"**/.*",
],
},
target: nativescriptTarget,
// target: nativeScriptVueTarget,
entry: entries,
output: {
pathinfo: false,
path: dist,
sourceMapFilename,
libraryTarget: "commonjs2",
filename: "[name].js",
globalObject: "global",
hashSalt
},
resolve: {
extensions: [".vue", ".ts", ".js", ".scss", ".css"],
// Resolve {N} system modules from @nativescript/core
modules: [
resolve(__dirname, `node_modules/${coreModulesPackageName}`),
resolve(__dirname, "node_modules"),
`node_modules/${coreModulesPackageName}`,
"node_modules",
],
alias,
// resolve symlinks to symlinked modules
symlinks: true,
},
resolveLoader: {
// don't resolve symlinks to symlinked loaders
symlinks: false,
},
node: {
// Disable node shims that conflict with NativeScript
"http": false,
"timers": false,
"setImmediate": false,
"fs": "empty",
"__dirname": false,
},
devtool: hiddenSourceMap ? "hidden-source-map" : (sourceMap ? "inline-source-map" : "none"),
optimization: {
runtimeChunk: "single",
noEmitOnErrors: true,
splitChunks: {
cacheGroups: {
vendor: {
name: "vendor",
chunks: "all",
test: (module) => {
const moduleName = module.nameForCondition ? module.nameForCondition() : '';
return /[\\/]node_modules[\\/]/.test(moduleName) ||
appComponents.some(comp => comp === moduleName);
},
enforce: true,
},
},
},
minimize: Boolean(production),
minimizer: [
new TerserPlugin({
parallel: true,
cache: true,
sourceMap: isAnySourceMapEnabled,
terserOptions: {
output: {
comments: false,
semicolons: !isAnySourceMapEnabled
},
compress: {
// The Android SBG has problems parsing the output
// when these options are enabled
'collapse_vars': platform !== "android",
sequences: platform !== "android",
},
keep_fnames: true,
},
}),
],
},
module: {
rules: [{
include: [join(appFullPath, entryPath + ".js"), join(appFullPath, entryPath + ".ts")],
use: [
// Require all Android app components
platform === "android" && {
loader: "@nativescript/webpack/helpers/android-app-components-loader",
options: { modules: appComponents },
},
{
loader: "@nativescript/webpack/bundle-config-loader",
options: {
registerPages: true, // applicable only for non-angular apps
loadCss: !snapshot, // load the application css if in debug mode
unitTesting,
appFullPath,
projectRoot,
ignoredFiles: nsWebpack.getUserDefinedEntries(entries, platform)
},
},
].filter(loader => Boolean(loader)),
},
{
test: /[\/|\\]app\.css$/,
use: [
'@nativescript/webpack/helpers/style-hot-loader',
{
loader: "@nativescript/webpack/helpers/css2json-loader",
options: { useForImports: true }
},
],
},
{
test: /[\/|\\]app\.scss$/,
use: [
'@nativescript/webpack/helpers/style-hot-loader',
{
loader: "@nativescript/webpack/helpers/css2json-loader",
options: { useForImports: true }
},
'sass-loader',
],
},
{
test: /\.css$/,
exclude: /[\/|\\]app\.css$/,
use: [
'@nativescript/webpack/helpers/style-hot-loader',
'@nativescript/webpack/helpers/apply-css-loader.js',
{ loader: "css-loader", options: { url: false } },
],
},
{
test: /\.scss$/,
exclude: /[\/|\\]app\.scss$/,
use: [
'@nativescript/webpack/helpers/style-hot-loader',
'@nativescript/webpack/helpers/apply-css-loader.js',
{ loader: "css-loader", options: { url: false } },
'sass-loader',
],
},
{
test: /\.js$/,
loader: 'babel-loader',
},
{
test: /\.ts$/,
loader: 'ts-loader',
options: {
appendTsSuffixTo: [/\.vue$/],
allowTsInNodeModules: true,
compilerOptions: {
declaration: false
},
getCustomTransformers: (program) => ({
before: [
require("@nativescript/webpack/transformers/ns-transform-native-classes").default
]
})
},
},
{
test: /\.vue$/,
loader: "vue-loader",
options: {
compiler: NsVueTemplateCompiler,
},
},
],
},
plugins: [
// ... Vue Loader plugin omitted
// make sure to include the plugin!
new VueLoaderPlugin(),
// Define useful constants like TNS_WEBPACK
new webpack.DefinePlugin({
"global.TNS_WEBPACK": "true",
"global.isAndroid": platform === 'android',
"global.isIOS": platform === 'ios',
"TNS_ENV": JSON.stringify(mode),
"process": "global.process"
}),
// Remove all files from the out dir.
new CleanWebpackPlugin({
cleanOnceBeforeBuildPatterns: itemsToClean,
verbose: !!verbose
}),
// Copy assets
new CopyWebpackPlugin({
patterns: [
{ from: 'assets/**', noErrorOnMissing: true, globOptions: { dot: false, ...copyIgnore } },
{ from: 'fonts/**', noErrorOnMissing: true, globOptions: { dot: false, ...copyIgnore } },
{ from: '**/*.+(jpg|png)', noErrorOnMissing: true, globOptions: { dot: false, ...copyIgnore } }
],
}),
new nsWebpack.GenerateNativeScriptEntryPointsPlugin("bundle"),
// For instructions on how to set up workers with webpack
// check out https://github.com/nativescript/worker-loader
new NativeScriptWorkerPlugin(),
new nsWebpack.PlatformFSPlugin({
platform,
platforms,
}),
// Does IPC communication with the {N} CLI to notify events when running in watch mode.
new nsWebpack.WatchStateLoggerPlugin()
],
};
if (unitTesting) {
config.module.rules.push(
{
test: /-page\.js$/,
use: "@nativescript/webpack/helpers/script-hot-loader"
},
{
test: /\.(html|xml)$/,
use: "@nativescript/webpack/helpers/markup-hot-loader"
},
{ test: /\.(html|xml)$/, use: "@nativescript/webpack/helpers/xml-namespace-loader" }
);
}
if (report) {
// Generate report files for bundles content
config.plugins.push(new BundleAnalyzerPlugin({
analyzerMode: "static",
openAnalyzer: false,
generateStatsFile: true,
reportFilename: resolve(projectRoot, "report", `report.html`),
statsFilename: resolve(projectRoot, "report", `stats.json`),
}));
}
if (snapshot) {
config.plugins.push(new nsWebpack.NativeScriptSnapshotPlugin({
chunk: "vendor",
requireModules: [
"@nativescript/core/bundle-entry-points",
],
projectRoot,
webpackConfig: config,
snapshotInDocker,
skipSnapshotTools,
useLibs
}));
}
if (hmr) {
config.plugins.push(new webpack.HotModuleReplacementPlugin());
}
return config;
};

View file

@ -5,7 +5,7 @@
<solid android:color="#ff7043" />
</shape>
</item>
<item android:left="64dp" android:right="64dp">
<item>
<bitmap android:gravity="center" android:src="@drawable/logo" />
</item>
</layer-list>

View file

@ -20,12 +20,12 @@
<!-- theme to use AFTER launch screen is loaded-->
<style name="AppThemeBase" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:forceDarkAllowed">true</item>
<item name="toolbarStyle">@style/NativeScriptToolbarStyle</item>
<item name="colorPrimary">@color/ns_primary</item>
<item name="colorPrimaryDark">@color/ns_primaryDark</item>
<item name="colorAccent">@color/ns_accent</item>
<item name="android:forceDarkAllowed">true</item>
</style>
<style name="AppTheme" parent="AppThemeBase">

View file

@ -1,122 +0,0 @@
{
"images" : [
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "icon-20@2x.png",
"scale" : "2x"
},
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "icon-20@3x.png",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "icon-29.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "icon-29@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "icon-29@3x.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "icon-40@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "icon-40@3x.png",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "icon-60@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "icon-60@3x.png",
"scale" : "3x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "icon-20.png",
"scale" : "1x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "icon-20@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "icon-29.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "icon-29@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "icon-40.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "icon-40@2x.png",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "icon-76.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "icon-76@2x.png",
"scale" : "2x"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "icon-83.5@2x.png",
"scale" : "2x"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "icon-1024.png",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

View file

@ -1,6 +0,0 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}

View file

@ -1,212 +0,0 @@
{
"images" : [
{
"extent" : "full-screen",
"idiom" : "iphone",
"subtype" : "2688h",
"filename" : "Default-Portrait-XS-Max.png",
"minimum-system-version" : "12.0",
"orientation" : "portrait",
"scale" : "3x"
},
{
"extent" : "full-screen",
"idiom" : "iphone",
"subtype" : "2688h",
"filename" : "Default-Landscape-XS-Max.png",
"minimum-system-version" : "12.0",
"orientation" : "landscape",
"scale" : "3x"
},
{
"extent" : "full-screen",
"idiom" : "iphone",
"subtype" : "1792h",
"filename" : "Default-Portrait-XR.png",
"minimum-system-version" : "12.0",
"orientation" : "portrait",
"scale" : "2x"
},
{
"extent" : "full-screen",
"idiom" : "iphone",
"subtype" : "1792h",
"filename" : "Default-Landscape-XR.png",
"minimum-system-version" : "12.0",
"orientation" : "landscape",
"scale" : "2x"
},
{
"extent" : "full-screen",
"idiom" : "iphone",
"subtype" : "2436h",
"filename" : "Default-1125h.png",
"minimum-system-version" : "11.0",
"orientation" : "portrait",
"scale" : "3x"
},
{
"extent" : "full-screen",
"idiom" : "iphone",
"subtype" : "2436h",
"filename" : "Default-Landscape-X.png",
"minimum-system-version" : "11.0",
"orientation" : "landscape",
"scale" : "3x"
},
{
"extent" : "full-screen",
"idiom" : "iphone",
"subtype" : "736h",
"filename" : "Default-736h@3x.png",
"minimum-system-version" : "8.0",
"orientation" : "portrait",
"scale" : "3x"
},
{
"extent" : "full-screen",
"idiom" : "iphone",
"subtype" : "736h",
"filename" : "Default-Landscape@3x.png",
"minimum-system-version" : "8.0",
"orientation" : "landscape",
"scale" : "3x"
},
{
"extent" : "full-screen",
"idiom" : "iphone",
"subtype" : "667h",
"filename" : "Default-667h@2x.png",
"minimum-system-version" : "8.0",
"orientation" : "portrait",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
"filename" : "Default@2x.png",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "2x"
},
{
"extent" : "full-screen",
"idiom" : "iphone",
"subtype" : "retina4",
"filename" : "Default-568h@2x.png",
"minimum-system-version" : "7.0",
"orientation" : "portrait",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"filename" : "Default-Portrait.png",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "1x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"filename" : "Default-Landscape.png",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "1x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"filename" : "Default-Portrait@2x.png",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "2x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"filename" : "Default-Landscape@2x.png",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
"filename" : "Default.png",
"extent" : "full-screen",
"scale" : "1x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
"filename" : "Default@2x.png",
"extent" : "full-screen",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
"filename" : "Default-568h@2x.png",
"extent" : "full-screen",
"subtype" : "retina4",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"extent" : "to-status-bar",
"scale" : "1x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"filename" : "Default-Portrait.png",
"extent" : "full-screen",
"scale" : "1x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"extent" : "to-status-bar",
"scale" : "1x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"filename" : "Default-Landscape.png",
"extent" : "full-screen",
"scale" : "1x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"extent" : "to-status-bar",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"filename" : "Default-Portrait@2x.png",
"extent" : "full-screen",
"scale" : "2x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"extent" : "to-status-bar",
"scale" : "2x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"filename" : "Default-Landscape@2x.png",
"extent" : "full-screen",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

View file

@ -1,23 +0,0 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "LaunchScreen-AspectFill.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "LaunchScreen-AspectFill@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "LaunchScreen-AspectFill@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 KiB

View file

@ -1,23 +0,0 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "LaunchScreen-Center.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "LaunchScreen-Center@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "LaunchScreen-Center@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

View file

@ -1,51 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiresFullScreen</key>
<true/>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleLightContent</string>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
</plist>

View file

@ -1,53 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina5_9" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="LaunchScreen.AspectFill" translatesAutoresizingMaskIntoConstraints="NO" id="wtH-rr-YfP">
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
</imageView>
<imageView userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="LaunchScreen.Center" translatesAutoresizingMaskIntoConstraints="NO" id="s1z-aa-wYv">
<rect key="frame" x="0.0" y="150" width="375" height="512"/>
</imageView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="s1z-aa-wYv" secondAttribute="trailing" id="4Rf-kf-vql"/>
<constraint firstAttribute="bottom" secondItem="wtH-rr-YfP" secondAttribute="bottom" id="5CS-At-4ka"/>
<constraint firstItem="wtH-rr-YfP" firstAttribute="top" secondItem="Ze5-6b-2t3" secondAttribute="top" id="Awn-b8-xf1"/>
<constraint firstItem="s1z-aa-wYv" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" id="BpJ-vb-eKA"/>
<constraint firstItem="s1z-aa-wYv" firstAttribute="trailing" secondItem="wtH-rr-YfP" secondAttribute="trailing" id="QIM-7J-OZz"/>
<constraint firstAttribute="trailing" secondItem="wtH-rr-YfP" secondAttribute="trailing" id="RXg-rW-UK8"/>
<constraint firstItem="s1z-aa-wYv" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="Rcp-LG-48z"/>
<constraint firstItem="wtH-rr-YfP" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" id="cch-8E-tYu"/>
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="509.60000000000002" y="237.93103448275863"/>
</scene>
</scenes>
<resources>
<image name="LaunchScreen.AspectFill" width="768" height="1024"/>
<image name="LaunchScreen.Center" width="384" height="512"/>
</resources>
</document>

View file

@ -1,7 +0,0 @@
// You can add custom settings here
// for example you can uncomment the following line to force distribution code signing
// CODE_SIGN_IDENTITY = iPhone Distribution
// To build for device with Xcode 8 you need to specify your development team. More info: https://developer.apple.com/library/prerelease/content/releasenotes/DeveloperTools/RN-Xcode/Introduction.html
// DEVELOPMENT_TEAM = YOUR_TEAM_ID;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;

View file

@ -39,22 +39,16 @@ Page {
ActionBar,
SearchBar,
TabView {
background: $grayL4;
color: $grayD4;
background: $grayL4;
}
TabView {
tab-background-color: $grayL4;
tab-text-color: $gray;
selected-tab-text-color: $grayD4;
}
.hr {
border-color: $grayL2;
}
TextField,
TextView,
TimePickerField {
border-color: $gray;
}
.sd,
.fieldLabel {
background: $grayL4;
@ -62,18 +56,11 @@ Page {
.option-highlight {
background: $grayL2;
}
.recipe-li {
background: white;
}
.sd-item,
.sd-group-header,
.recipe-time {
color: $grayD2;
}
.selected-sd-item {
background: $paleOrange;
color: $orange;
}
.option,
.icon-option {
.bx,
@ -85,8 +72,8 @@ Page {
}
}
.view-imageHolder {
background: $grayL2;
color: $grayL1;
background: $grayL2;
}
.view-other {
color: $grayD2;
@ -98,31 +85,23 @@ Page {
.view-instruction {
border-color: $grayD4;
}
.instructionWOBorder {
border-color: transparent;
}
}
.ns-dark {
Page,
ActionBar,
SearchBar,
TabView {
background: $grayD4;
color: $grayL4;
background: $grayD4;
}
TabView {
tab-background-color: $grayD4;
tab-text-color: $gray;
selected-tab-text-color: $grayL4;
}
.hr {
border-color: #111;
}
TextField,
TextView,
TimePickerField {
border-color: $gray;
}
.sd,
.fieldLabel {
background: $grayD4;
@ -136,10 +115,7 @@ Page {
.recipe-time {
color: $grayL2;
}
.selected-sd-item {
background: $paleOrange;
color: $orange;
}
.option,
.icon-option {
.bx,
@ -151,8 +127,8 @@ Page {
}
}
.view-imageHolder {
background: black;
color: $grayD4;
background: #111;
}
.view-other {
color: $grayL2;
@ -164,9 +140,6 @@ Page {
.view-instruction {
border-color: $grayL4;
}
.instructionWOBorder {
border-color: transparent;
}
}
// Elements
@ -179,11 +152,15 @@ TimePickerField {
padding: 14;
margin: 8 0 0 0;
border-radius: 4;
border-color: $gray;
placeholder-color: $gray;
}
TextView {
line-height: 12;
}
TabView {
tab-text-color: $gray;
}
.inputField {
margin-top: 16;
}
@ -192,7 +169,16 @@ TextView {
margin-left: 8;
padding: 0 8;
}
// DateTimePicker
.date-time-picker,
.date-time-picker-spinners {
color: $grayD4;
background: $grayL4;
&.ns-dark {
color: $grayL4;
background: $grayD4;
}
}
// ActionBar
ActionBar {
width: 100%;
@ -233,6 +219,10 @@ SearchBar {
.bx, Label {
vertical-alignment: center;
}
&.selected-sd-item {
background: $paleOrange;
color: $orange;
}
}
.sd-group-header {
width: 100%;
@ -245,6 +235,7 @@ RadListView {
margin-bottom: 128;
}
.recipe-li {
background: white;
margin: 8 16;
border-radius: 6;
.recipe-info {
@ -365,6 +356,9 @@ RadListView {
margin: 0 0 0 15;
border-width: 0 0 0 2;
}
.view-instruction.instructionWOBorder {
border-color: transparent;
}
.view-note {
border-width: 0;
@ -372,9 +366,20 @@ RadListView {
.view-reference {
border-width: 0;
}
#btnFabContainer {
width: 100%;
height: 100%;
}
// Edit Recipe
.btnFab {
.fab-button {
color: white;
height: 56;
width: 56;
background-color: #ff7043;
horizontal-align: center;
vertical-align: center;
border-radius: 100;
padding: 16;
margin: 16;
}
.sectionTitle {
@ -391,3 +396,38 @@ RadListView {
padding: 4;
margin-top: 16;
}
// Dialogs
.dialogContainer {
&.light {
color: $grayD4;
background: $grayL4;
}
&.dark {
color: $grayL4;
background: $grayD4;
}
.dialogTitle {
padding: 24 24 12;
font-size: 20;
}
.dialogDescription {
font-size: 16;
padding: 0 24 16;
}
.action {
padding: 24 24 24 8;
font-size: 12;
color: #ff7043;
}
.actionItem {
width: 100%;
font-size: 16;
padding: 8 20;
}
.cancel {
padding: 24;
font-size: 12;
color: #ff7043;
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

View file

@ -1,5 +1,5 @@
<template>
<Page @loaded="setCurrentComponent">
<Page @loaded="initializePage">
<ActionBar :flat="viewIsScrolled ? false : true">
<!-- Settings Actionbar -->
<GridLayout rows="*" columns="auto, *" class="actionBarContainer">
@ -80,20 +80,21 @@
</template>
<script>
import * as utils from "tns-core-modules/utils/utils"
import { Utils } from "@nativescript/core"
import { mapState, mapActions } from "vuex"
export default {
props: ["highlight", "viewIsScrolled", "showDrawer", "title"],
computed: {
...mapState(["icon",'currentComponent']),
...mapState(["icon", "currentComponent"]),
},
methods: {
setCurrentComponent() {
this.$store.dispatch("setCurrentComponent", "About")
...mapActions(["setCurrentComponentAction"]),
initializePage() {
this.setCurrentComponentAction("About")
},
openURL(args, url) {
this.highlight(args)
utils.openUrl(url)
Utils.openUrl(url)
},
},
}

View file

@ -117,20 +117,23 @@
</template>
<script>
import * as utils from "tns-core-modules/utils/utils"
import * as application from "tns-core-modules/application"
import {
Utils,
ApplicationSettings,
AndroidApplication,
} from "@nativescript/core"
import { getString } from "application-settings"
import Theme from "@nativescript/theme"
import * as Toast from "nativescript-toast"
import * as application from "tns-core-modules/application"
import EnRecipes from "./EnRecipes.vue"
import Settings from "./Settings.vue"
import About from "./About.vue"
import PromptDialog from "./modal/PromptDialog.vue"
import { mapState } from "vuex"
import { mapState, mapActions } from "vuex"
import { Couchbase, ConcurrencyMode } from "nativescript-couchbase-plugin"
const cb = new Couchbase("enrecipes")
let page
export default {
@ -186,6 +189,7 @@ export default {
},
},
methods: {
...mapActions(["setCurrentComponentAction", "renameCategoryAction"]),
toggleCatEdit() {
this.catEditMode = !this.catEditMode
this.setComponent("EnRecipes")
@ -194,7 +198,7 @@ export default {
this.$refs.enrecipes.updateFilter()
},
setComponent(comp) {
this.$store.dispatch("setCurrentComponent", comp)
this.setCurrentComponentAction(comp)
},
editCategory(item) {
this.releaseGlobalBackEvent()
@ -210,7 +214,7 @@ export default {
if (this.categories.includes(result)) {
Toast.makeText("Category already exists!", "long").show()
} else {
this.$store.dispatch("renameCategory", {
this.renameCategoryAction({
current: item,
updated: result,
})
@ -232,14 +236,14 @@ export default {
this.closeDrawer()
},
hijackGlobalBackEvent() {
application.android.on(
application.AndroidApplication.activityBackPressedEvent,
AndroidApplication.on(
AndroidApplication.activityBackPressedEvent,
this.globalBackEvent
)
},
releaseGlobalBackEvent() {
application.android.off(
application.AndroidApplication.activityBackPressedEvent,
AndroidApplication.off(
AndroidApplication.activityBackPressedEvent,
this.globalBackEvent
)
},
@ -332,12 +336,12 @@ export default {
},
donate(args) {
this.highlight(args)
utils.openUrl("https://www.vishnuraghav.com/donate/")
Utils.openUrl("https://www.vishnuraghav.com/donate/")
},
},
created() {
let themeName = getString("application-theme", "Light")
Theme.setMode(Theme[themeName])
let themeName = ApplicationSettings.getString("application-theme", "Light")
setTimeout((e) => Theme.setMode(Theme[themeName]), 50)
},
}
</script>

View file

@ -1,5 +1,5 @@
<template>
<Page @loaded="setCurrentComponent" @unloaded="releaseBackEvent">
<Page @loaded="initializePage" @unloaded="releaseBackEvent">
<ActionBar :flat="viewIsScrolled ? false : true">
<GridLayout rows="*" columns="auto, *, auto," class="actionBarContainer">
<Label
@ -57,17 +57,17 @@
>
<Label
v-if="recipeContent.imageSrc"
class="bx btnFab"
@tap="removePicture"
class="bx fab-button"
:text="icon.close"
androidElevation="8"
@tap="removePicture()"
/>
<Label
v-else
class="bx btnFab"
@tap="takePicture"
class="bx fab-button"
:text="icon.camera"
androidElevation="8"
@tap="takePicture()"
/>
</StackLayout>
</AbsoluteLayout>
@ -93,6 +93,7 @@
<GridLayout columns="*, 8, *">
<AbsoluteLayout class="inputField" col="0">
<TimePickerField
titleTextColor="red"
timeFormat="HH:mm"
pickerTitle="Approx. preparation time"
@timeChange="onPrepTimeChange"
@ -259,10 +260,11 @@
</template>
<script>
import { screen } from "tns-core-modules/platform"
import { Screen, AndroidApplication } from "@nativescript/core"
import { Mediafilepicker } from "nativescript-mediafilepicker"
import { mapState, mapActions } from "vuex"
import * as application from "tns-core-modules/application"
import ActionDialog from "./modal/ActionDialog.vue"
import PromptDialog from "./modal/PromptDialog.vue"
import ConfirmDialog from "./modal/ConfirmDialog.vue"
@ -301,7 +303,7 @@ export default {
computed: {
...mapState(["icon", "units", "categories", "currentComponent", "recipes"]),
screenWidth() {
return screen.mainScreen.widthDIPs
return Screen.mainScreen.widthDIPs
},
hasEnoughDetails() {
if (this.recipeIndex) {
@ -315,9 +317,15 @@ export default {
},
},
methods: {
setCurrentComponent() {
...mapActions([
"setCurrentComponentAction",
"overwriteRecipeAction",
"addRecipeAction",
"addCategoryAction",
]),
initializePage() {
setTimeout((e) => {
this.$store.dispatch("setCurrentComponent", "EditRecipe")
this.setCurrentComponentAction("EditRecipe")
}, 500)
this.title = this.recipeIndex >= 0 ? "Edit recipe" : "New recipe"
if (this.recipeIndex >= 0) {
@ -368,12 +376,12 @@ export default {
this.clearEmptyFields()
this.recipeContent.lastModified = new Date()
if (this.recipeIndex >= 0) {
this.$store.dispatch("overwriteRecipe", {
this.overwriteRecipeAction({
index: this.recipeIndex,
recipe: this.recipeContent,
})
} else {
this.$store.dispatch("addRecipe", this.recipeContent)
this.addRecipeAction(this.recipeContent)
}
this.$navigateBack()
},
@ -394,7 +402,7 @@ export default {
props: {
title: "Category",
list: [...this.categories],
height: "75%",
height: "60%",
action: "NEW CATEGORY",
},
}).then((action) => {
@ -408,7 +416,7 @@ export default {
this.hijackBackEvent()
if (result.length) {
this.recipeContent.category = result
this.$store.dispatch("addCategory", result)
this.addCategoryAction(result)
}
})
} else if (action) {
@ -443,14 +451,14 @@ export default {
}
},
hijackBackEvent() {
application.android.on(
application.AndroidApplication.activityBackPressedEvent,
AndroidApplication.on(
AndroidApplication.activityBackPressedEvent,
this.backEvent
)
},
releaseBackEvent() {
application.android.off(
application.AndroidApplication.activityBackPressedEvent,
AndroidApplication.off(
AndroidApplication.activityBackPressedEvent,
this.backEvent
)
},

View file

@ -1,5 +1,5 @@
<template>
<Page @loaded="setCurrentComponent">
<Page @loaded="initializePage">
<ActionBar :flat="viewIsScrolled ? false : true">
<!-- Search Actionbar -->
<GridLayout
@ -123,7 +123,7 @@
<Label
row="1"
col="1"
class="bx btnFab"
class="bx fab-button"
:text="icon.plus"
androidElevation="8"
@tap="addRecipe"
@ -134,13 +134,9 @@
</template>
<script>
import * as utils from "tns-core-modules/utils/utils"
import * as application from "tns-core-modules/application"
import * as gestures from "tns-core-modules/ui/gestures"
import { Utils, AndroidApplication } from "@nativescript/core"
import * as Toast from "nativescript-toast"
import { ObservableArray } from "tns-core-modules/data/observable-array"
import EditRecipe from "./EditRecipe.vue"
import ViewRecipe from "./ViewRecipe.vue"
import ActionDialog from "./modal/ActionDialog.vue"
@ -196,20 +192,21 @@ export default {
},
},
methods: {
...mapActions(["setCurrentComponentAction", "deleteRecipeAction"]),
openSearch() {
this.showSearch = true
this.hijackLocalBackEvent()
},
hijackLocalBackEvent() {
this.releaseGlobalBackEvent()
application.android.on(
application.AndroidApplication.activityBackPressedEvent,
AndroidApplication.on(
AndroidApplication.activityBackPressedEvent,
this.searchBackEvent
)
},
releaseLocalBackEvent() {
application.android.off(
application.AndroidApplication.activityBackPressedEvent,
AndroidApplication.off(
AndroidApplication.activityBackPressedEvent,
this.searchBackEvent
)
this.hijackGlobalBackEvent()
@ -220,7 +217,7 @@ export default {
},
closeSearch() {
this.searchQuery = ""
utils.ad.dismissSoftInput()
Utils.ad.dismissSoftInput()
this.showSearch = false
this.updateFilter()
this.releaseLocalBackEvent()
@ -231,7 +228,7 @@ export default {
props: {
title: "Sort by",
list: ["Natural order", "Title", "Duration", "Last modified"],
height: "auto",
height: "195", // 48*4 + 3 1dip separators
},
}).then((action) => {
if (action && action !== "Cancel" && this.sortType !== action) {
@ -272,7 +269,7 @@ export default {
}
},
setComponent(comp) {
this.$store.dispatch("setCurrentComponent", comp)
this.setCurrentComponentAction(comp)
this.hijackGlobalBackEvent()
},
updateFilter() {
@ -300,7 +297,7 @@ export default {
}
},
setCurrentComponent() {
initializePage() {
this.filterFavorites
? this.setComponent("Favorites")
: this.filterMustTry
@ -334,7 +331,7 @@ export default {
},
}).then((action) => {
if (action) {
this.$store.dispatch("deleteRecipe", index)
this.deleteRecipeAction(index)
}
})
},

View file

@ -1,5 +1,5 @@
<template>
<Page @loaded="setCurrentComponent">
<Page @loaded="initializePage">
<ActionBar :flat="viewIsScrolled ? false : true">
<!-- Settings Actionbar -->
<GridLayout rows="*" columns="auto, *" class="actionBarContainer">
@ -58,10 +58,9 @@
</template>
<script>
import { ApplicationSettings } from "@nativescript/core"
import * as permissions from "nativescript-permissions"
import * as application from "tns-core-modules/application"
import { getString, setString } from "application-settings"
import Theme from "@nativescript/theme"
import ActionDialog from "./modal/ActionDialog.vue"
import ConfirmDialog from "./modal/ConfirmDialog.vue"
@ -110,8 +109,9 @@ export default {
...mapState(["icon", "currentComponent"]),
},
methods: {
setCurrentComponent() {
this.$store.dispatch("setCurrentComponent", "Settings")
...mapActions(["setCurrentComponentAction"]),
initializePage() {
this.setCurrentComponentAction("Settings")
this.releaseGlobalBackEvent()
},
showDialog(args) {
@ -124,7 +124,7 @@ export default {
props: {
title: "Theme",
list: ["Light", "Dark"],
height: "96",
height: "97",
},
}).then((action) => {
if (action && action !== "Cancel" && this.themeName !== action) {
@ -139,7 +139,7 @@ export default {
}).then((result) => {
if (result) {
this.interface.theme.subTitle = this.themeName = action
setString("application-theme", action)
ApplicationSettings.setString("application-theme", action)
setTimeout((e) => this.restartApp(), 250)
}
})
@ -184,7 +184,7 @@ export default {
},
},
created() {
this.interface.theme.subTitle = this.themeName = getString(
this.interface.theme.subTitle = this.themeName = ApplicationSettings.getString(
"application-theme",
"Light"
)

View file

@ -1,5 +1,5 @@
<template>
<Page @loaded="setCurrentComponent">
<Page @loaded="initializePage">
<ActionBar height="128" margin="0" flat="true">
<GridLayout
rows="64, 64"
@ -222,12 +222,12 @@
<GridLayout id="btnFabContainer" rows="*,88" columns="*,88">
<Label
v-if="!busy"
@tap="editRecipe"
row="1"
col="1"
class="bx btnFab"
class="bx fab-button"
:text="icon.edit"
androidElevation="8"
@tap="editRecipe"
/>
<ActivityIndicator v-else row="1" col="1" :busy="busy" />
</GridLayout>
@ -236,15 +236,13 @@
</template>
<script>
import { screen } from "tns-core-modules/platform"
import * as utils from "tns-core-modules/utils/utils"
import { getNumber, setNumber } from "application-settings"
import { Screen, Utils } from "@nativescript/core"
import * as Toast from "nativescript-toast"
import EditRecipe from "./EditRecipe.vue"
import { mapState, mapActions } from "vuex"
import EditRecipe from "./EditRecipe.vue"
export default {
props: ["recipeIndex", "hijackGlobalBackEvent", "releaseGlobalBackEvent"],
data() {
@ -259,7 +257,7 @@ export default {
return this.recipes[this.recipeIndex]
},
screenWidth() {
return screen.mainScreen.widthDIPs
return Screen.mainScreen.widthDIPs
},
isPortionScalePositive() {
return this.portionScale && !isNaN(this.portionScale)
@ -268,6 +266,11 @@ export default {
},
},
methods: {
...mapActions([
"toggleFavoriteAction",
"toggleMustTryAction",
"setCurrentComponentAction",
]),
roundedQuantity(quantity, unit) {
return Math.round(quantity * this.isPortionScalePositive * 100) / 100
},
@ -290,14 +293,14 @@ export default {
? Toast.makeText("Removed from Favorites").show()
: Toast.makeText("Added to Favorites").show()
this.$store.dispatch("toggleFavorite", this.recipeIndex)
this.toggleFavoriteAction(this.recipeIndex)
},
toggleMustTry() {
this.recipe.tried
? Toast.makeText("Added to Must-Try").show()
: Toast.makeText("Removed from Must-Try").show()
this.$store.dispatch("toggleMustTry", this.recipeIndex)
this.toggleMustTryAction(this.recipeIndex)
},
getTime(time) {
let t = time.split(":")
@ -306,13 +309,13 @@ export default {
return h !== "00" ? `${h}h ${m}m` : `${m}m`
},
openURL(args, url) {
utils.openUrl(url)
Utils.openUrl(url)
},
setCurrentComponent() {
initializePage() {
this.releaseGlobalBackEvent()
this.busy = false
setTimeout((e) => {
this.$store.dispatch("setCurrentComponent", "ViewRecipe")
this.setCurrentComponentAction("ViewRecipe")
}, 500)
},
},

View file

@ -1,22 +1,23 @@
<template>
<Page>
<StackLayout class="dialogContainer">
<StackLayout
class="dialogContainer"
:class="isLightTheme ? 'light' : 'dark'"
>
<Label class="dialogTitle orkm" :text="title" />
<StackLayout class="actionsContainer">
<ListView
width="100%"
:height="height"
for="item in list"
@itemTap="tapAction"
separatorColor="transparent"
>
<v-template>
<StackLayout class="actionItem">
<Label :text="item" />
</StackLayout>
</v-template>
</ListView>
</StackLayout>
<ListView
width="100%"
:height="height"
for="item in list"
@itemTap="tapAction"
separatorColor="transparent"
>
<v-template>
<StackLayout class="actionItem">
<Label :text="item" />
</StackLayout>
</v-template>
</ListView>
<GridLayout rows="auto" columns="auto, *, auto">
<Label
v-if="action"
@ -37,28 +38,21 @@
</template>
<script>
import Theme from "@nativescript/theme"
export default {
props: ["title", "list", "height", "action"],
data() {
return {
isLightTheme: true,
}
},
methods: {
tapAction({ item }) {
this.$modal.close(item)
},
},
created() {
this.isLightTheme = Theme.getMode() == "ns-light" ? true : false
},
}
</script>
<style lang="scss" scoped>
.dialogTitle {
padding: 24 24 12;
font-size: 20;
}
.actionItem {
width: 100%;
font-size: 16;
padding: 8 20;
}
.cancel {
padding: 24;
font-size: 12;
color: #ff7043;
}
</style>

View file

@ -1,6 +1,9 @@
<template>
<Page>
<StackLayout class="dialogContainer">
<StackLayout
class="dialogContainer"
:class="isLightTheme ? 'light' : 'dark'"
>
<Label class="dialogTitle orkm" :text="title" />
<Label class="dialogDescription" :text="description" textWrap="true" />
<StackLayout
@ -9,12 +12,12 @@
horizontalAlignment="right"
>
<Label
class="action orkm pull-right"
class="action orkm"
:text="cancelButtonText"
@tap="$modal.close(false)"
/>
<Label
class="action orkm pull-right"
class="action orkm"
:text="okButtonText"
@tap="$modal.close(true)"
/>
@ -24,22 +27,16 @@
</template>
<script>
import Theme from "@nativescript/theme"
export default {
props: ["title", "description", "cancelButtonText", "okButtonText"],
data() {
return {
isLightTheme: true,
}
},
created() {
this.isLightTheme = Theme.getMode() == "ns-light" ? true : false
},
}
</script>
<style lang="scss" scoped>
.dialogTitle {
padding: 24 24 12;
font-size: 20;
}
.dialogDescription {
font-size: 16;
padding: 0 24 16;
}
.action {
padding: 24 24 24 8;
font-size: 12;
color: #ff7043;
}
</style>

View file

@ -1,6 +1,9 @@
<template>
<Page>
<StackLayout class="dialogContainer">
<StackLayout
class="dialogContainer"
:class="isLightTheme ? 'light' : 'dark'"
>
<Label class="dialogTitle orkm" :text="title" />
<TextField
width="100%"
@ -21,13 +24,18 @@
</template>
<script>
import Theme from "@nativescript/theme"
export default {
props: ["title", "hint", "action"],
data() {
return {
category: null,
isLightTheme: true,
}
},
created() {
this.isLightTheme = Theme.getMode() == "ns-light" ? true : false
},
}
</script>
<style lang="scss" scoped>

View file

@ -5,7 +5,7 @@ import store from "./store"
import RadListView from "nativescript-ui-listview/vue"
Vue.use(RadListView)
import DateTimePicker from "nativescript-datetimepicker/vue"
import DateTimePicker from "@nativescript/datetimepicker/vue"
Vue.use(DateTimePicker)
Vue.registerElement(
@ -13,6 +13,11 @@ Vue.registerElement(
() => require("nativescript-ui-sidedrawer").RadSideDrawer
)
Vue.registerElement(
"Fab",
() => require("@nstudio/nativescript-floatingactionbutton").Fab
)
if (TNS_ENV !== "production") {
// Vue.use(VueDevtools)
}

View file

@ -6,178 +6,178 @@ Vue.use(Vuex)
export default new Vuex.Store({
state: {
recipes: [
// {
// imageSrc: null,
// title: "Mediterranean Salad",
// category: "Salads",
// prepTime: "12:25",
// cookTime: "00:30",
// portionSize: 1,
// ingredients: [
// {
// item: "Cucumbers, Seeded And Sliced",
// quantity: 3,
// unit: "unit",
// },
// {
// item: "Crumbled Feta Cheese",
// quantity: 1.5,
// unit: "cup",
// },
// {
// item: "Black Olives, Pitted And Sliced",
// quantity: 1,
// unit: "cup",
// },
// {
// item: "Diced Roma Tomatoes",
// quantity: 3,
// unit: "cup",
// },
// {
// item: "Diced Oil Packed Sun Dried Tomatoes, Drained, Oil Reserved",
// quantity: 0.3,
// unit: "cup",
// },
// {
// item: "Onion, Sliced",
// quantity: 1.5,
// unit: "unit",
// },
// {
// item: "Cucumbers, Seeded And Sliced",
// quantity: 3,
// unit: "unit",
// },
// {
// item: "Crumbled Feta Cheese",
// quantity: 1.5,
// unit: "cup",
// },
// {
// item: "Black Olives, Pitted And Sliced",
// quantity: 1,
// unit: "cup",
// },
// {
// item: "Diced Roma Tomatoes",
// quantity: 3,
// unit: "cup",
// },
// {
// item: "Diced Oil Packed Sun Dried Tomatoes, Drained, Oil Reserved",
// quantity: 0.3,
// unit: "cup",
// },
// {
// item: "Onion, Sliced",
// quantity: 1.5,
// unit: "unit",
// },
// {
// item: "Cucumbers, Seeded And Sliced",
// quantity: 3,
// unit: "unit",
// },
// {
// item: "Crumbled Feta Cheese",
// quantity: 1.5,
// unit: "cup",
// },
// {
// item: "Black Olives, Pitted And Sliced",
// quantity: 1,
// unit: "cup",
// },
// {
// item: "Diced Roma Tomatoes",
// quantity: 3,
// unit: "cup",
// },
// {
// item: "Diced Oil Packed Sun Dried Tomatoes, Drained, Oil Reserved",
// quantity: 0.3,
// unit: "cup",
// },
// {
// item: "Onion, Sliced",
// quantity: 1.5,
// unit: "unit",
// },
// ],
// instructions: [
// "In a large salad bowl, toss together the cucumbers, feta cheese, olives, roma tomatoes, sun-dried tomatoes, 2 tablespoons reserved sun-dried tomato oil, and red onion.",
// "Chill until serving.",
// "In a large salad bowl, toss together the cucumbers, feta cheese, olives, roma tomatoes, sun-dried tomatoes, 2 tablespoons reserved sun-dried tomato oil, and red onion. In a large salad bowl, toss together the cucumbers, feta cheese, olives, roma tomatoes, sun-dried tomatoes, 2 tablespoons reserved sun-dried tomato oil, and red onion.",
// "Chill until serving.",
// "Chill until serving.",
// "In a large salad bowl, toss together the cucumbers, feta cheese, olives, roma tomatoes, sun-dried tomatoes, 2 tablespoons reserved sun-dried tomato oil, and red onion.",
// "Chill until serving.",
// "Chill until serving.",
// "Chill until serving.",
// "Chill until serving.",
// "Chill until serving.",
// ],
// notes: [
// "Per Serving: 130.6 calories; protein 5.5g 11% DV; carbohydrates 9.3g 3% DV; fat 8.8g 14% DV; cholesterol 25mg 8% DV; sodium 486.4mg 20% DV.",
// "Per Serving: 130.6 calories; protein 5.5g 11% DV; carbohydrates 9.3g 3% DV; fat 8.8g 14% DV; cholesterol 25mg 8% DV; sodium 486.4mg 20% DV.",
// "Per Serving: 130.6 calories; protein 5.5g 11% DV; carbohydrates 9.3g 3% DV; fat 8.8g 14% DV; cholesterol 25mg 8% DV; sodium 486.4mg 20% DV.",
// ],
// references: [
// "https://www.allrecipes.com/recipe/14403/mediterranean-greek-salad/",
// "https://www.allrecipes.com/recipe/14403/mediterranean-greek-salad/",
// "https://www.allrecipes.com/recipe/14403/mediterranean-greek-salad/",
// "https://www.allrecipes.com/recipe/14403/mediterranean-greek-salad/",
// ],
// isFavorite: true,
// tried: false,
// lastModified: "2020-10-18T17:37:51.798Z",
// },
// {
// imageSrc: null,
// title: "Fresh Tomato Sauce",
// category: "Sauces",
// prepTime: "00:45",
// cookTime: "00:35",
// portionSize: 1,
// ingredients: [],
// instructions: [],
// notes: [],
// references: [],
// isFavorite: true,
// tried: true,
// lastModified: "2020-10-15T17:37:51.798Z",
// },
// {
// imageSrc: null,
// title: "Creamy Mushroom Herb Pasta",
// category: "Lunch",
// prepTime: "00:10",
// cookTime: "00:15",
// portionSize: 1,
// ingredients: [],
// instructions: [],
// notes: [],
// references: [],
// isFavorite: false,
// tried: false,
// lastModified: "2020-10-12T17:37:51.798Z",
// },
// {
// imageSrc: null,
// title: "Grilled Cheese Sandwich",
// category: "Lunch",
// prepTime: "00:50",
// cookTime: "00:12",
// portionSize: 1,
// ingredients: [],
// instructions: [],
// notes: [],
// references: [],
// isFavorite: false,
// tried: true,
// lastModified: "2020-10-03T17:37:51.798Z",
// },
{
imageSrc: null,
title: "Mediterranean Salad",
category: "Salads",
prepTime: "12:25",
cookTime: "00:30",
portionSize: 1,
ingredients: [
{
item: "Cucumbers, Seeded And Sliced",
quantity: 3,
unit: "unit",
},
{
item: "Crumbled Feta Cheese",
quantity: 1.5,
unit: "cup",
},
{
item: "Black Olives, Pitted And Sliced",
quantity: 1,
unit: "cup",
},
{
item: "Diced Roma Tomatoes",
quantity: 3,
unit: "cup",
},
{
item: "Diced Oil Packed Sun Dried Tomatoes, Drained, Oil Reserved",
quantity: 0.3,
unit: "cup",
},
{
item: "Onion, Sliced",
quantity: 1.5,
unit: "unit",
},
{
item: "Cucumbers, Seeded And Sliced",
quantity: 3,
unit: "unit",
},
{
item: "Crumbled Feta Cheese",
quantity: 1.5,
unit: "cup",
},
{
item: "Black Olives, Pitted And Sliced",
quantity: 1,
unit: "cup",
},
{
item: "Diced Roma Tomatoes",
quantity: 3,
unit: "cup",
},
{
item: "Diced Oil Packed Sun Dried Tomatoes, Drained, Oil Reserved",
quantity: 0.3,
unit: "cup",
},
{
item: "Onion, Sliced",
quantity: 1.5,
unit: "unit",
},
{
item: "Cucumbers, Seeded And Sliced",
quantity: 3,
unit: "unit",
},
{
item: "Crumbled Feta Cheese",
quantity: 1.5,
unit: "cup",
},
{
item: "Black Olives, Pitted And Sliced",
quantity: 1,
unit: "cup",
},
{
item: "Diced Roma Tomatoes",
quantity: 3,
unit: "cup",
},
{
item: "Diced Oil Packed Sun Dried Tomatoes, Drained, Oil Reserved",
quantity: 0.3,
unit: "cup",
},
{
item: "Onion, Sliced",
quantity: 1.5,
unit: "unit",
},
],
instructions: [
"In a large salad bowl, toss together the cucumbers, feta cheese, olives, roma tomatoes, sun-dried tomatoes, 2 tablespoons reserved sun-dried tomato oil, and red onion.",
"Chill until serving.",
"In a large salad bowl, toss together the cucumbers, feta cheese, olives, roma tomatoes, sun-dried tomatoes, 2 tablespoons reserved sun-dried tomato oil, and red onion. In a large salad bowl, toss together the cucumbers, feta cheese, olives, roma tomatoes, sun-dried tomatoes, 2 tablespoons reserved sun-dried tomato oil, and red onion.",
"Chill until serving.",
"Chill until serving.",
"In a large salad bowl, toss together the cucumbers, feta cheese, olives, roma tomatoes, sun-dried tomatoes, 2 tablespoons reserved sun-dried tomato oil, and red onion.",
"Chill until serving.",
"Chill until serving.",
"Chill until serving.",
"Chill until serving.",
"Chill until serving.",
],
notes: [
"Per Serving: 130.6 calories; protein 5.5g 11% DV; carbohydrates 9.3g 3% DV; fat 8.8g 14% DV; cholesterol 25mg 8% DV; sodium 486.4mg 20% DV.",
"Per Serving: 130.6 calories; protein 5.5g 11% DV; carbohydrates 9.3g 3% DV; fat 8.8g 14% DV; cholesterol 25mg 8% DV; sodium 486.4mg 20% DV.",
"Per Serving: 130.6 calories; protein 5.5g 11% DV; carbohydrates 9.3g 3% DV; fat 8.8g 14% DV; cholesterol 25mg 8% DV; sodium 486.4mg 20% DV.",
],
references: [
"https://www.allrecipes.com/recipe/14403/mediterranean-greek-salad/",
"https://www.allrecipes.com/recipe/14403/mediterranean-greek-salad/",
"https://www.allrecipes.com/recipe/14403/mediterranean-greek-salad/",
"https://www.allrecipes.com/recipe/14403/mediterranean-greek-salad/",
],
isFavorite: true,
tried: false,
lastModified: "2020-10-18T17:37:51.798Z",
},
{
imageSrc: null,
title: "Fresh Tomato Sauce",
category: "Sauces",
prepTime: "00:45",
cookTime: "00:35",
portionSize: 1,
ingredients: [],
instructions: [],
notes: [],
references: [],
isFavorite: true,
tried: true,
lastModified: "2020-10-15T17:37:51.798Z",
},
{
imageSrc: null,
title: "Creamy Mushroom Herb Pasta",
category: "Lunch",
prepTime: "00:10",
cookTime: "00:15",
portionSize: 1,
ingredients: [],
instructions: [],
notes: [],
references: [],
isFavorite: false,
tried: false,
lastModified: "2020-10-12T17:37:51.798Z",
},
{
imageSrc: null,
title: "Grilled Cheese Sandwich",
category: "Lunch",
prepTime: "00:50",
cookTime: "00:12",
portionSize: 1,
ingredients: [],
instructions: [],
notes: [],
references: [],
isFavorite: false,
tried: true,
lastModified: "2020-10-03T17:37:51.798Z",
},
],
viewIsScrolled: false,
icon: {
@ -304,28 +304,28 @@ export default new Vuex.Store({
},
},
actions: {
addRecipe({ commit }, recipe) {
addRecipeAction({ commit }, recipe) {
commit("addRecipe", recipe)
},
addCategory({ commit }, category) {
addCategoryAction({ commit }, category) {
commit("addCategory", category)
},
overwriteRecipe({ commit }, updatedRecipe) {
overwriteRecipeAction({ commit }, updatedRecipe) {
commit("overwriteRecipe", updatedRecipe)
},
deleteRecipe({ commit }, index) {
deleteRecipeAction({ commit }, index) {
commit("deleteRecipe", index)
},
toggleFavorite({ commit }, index) {
toggleFavoriteAction({ commit }, index) {
commit("toggleFavorite", index)
},
toggleMustTry({ commit }, index) {
toggleMustTryAction({ commit }, index) {
commit("toggleMustTry", index)
},
setCurrentComponent({ commit }, comp) {
setCurrentComponentAction({ commit }, comp) {
commit("setCurrentComponent", comp)
},
renameCategory({ commit }, category) {
renameCategoryAction({ commit }, category) {
commit("renameCategory", category)
},
},

2558
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -9,27 +9,26 @@
},
"dependencies": {
"@nativescript/core": "~7.0.0",
"@nativescript/theme": "^2.2.1",
"@nativescript/datetimepicker": "^2.0.4",
"@nativescript/theme": "^3.0.0",
"@nstudio/nativescript-floatingactionbutton": "^3.0.3",
"nativescript-camera": "^4.5.0",
"nativescript-couchbase-plugin": "^0.9.6",
"nativescript-datetimepicker": "^1.2.3",
"nativescript-mediafilepicker": "^4.0.0",
"nativescript-permissions": "^1.3.9",
"nativescript-toast": "^2.0.0",
"nativescript-ui-listview": "^8.2.0",
"nativescript-ui-sidedrawer": "^8.0.1",
"nativescript-ui-listview": "^9.0.4",
"nativescript-ui-sidedrawer": "^9.0.3",
"nativescript-vue": "^2.6.1",
"tns-core-modules": "^6.5.20",
"vuex": "^3.3.0"
},
"devDependencies": {
"@babel/core": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@nativescript/android": "7.0.1",
"@nativescript/webpack": "~3.0.0",
"@nativescript/webpack": "^3.0.8",
"@types/node": "^14.0.27",
"babel-loader": "^8.1.0",
"nativescript-dev-webpack": "^1.5.1",
"nativescript-vue-template-compiler": "^2.6.0",
"node-sass": "^4.13.1",
"vue-loader": "^15.9.1"