diff --git a/App_Resources/Android/app.gradle b/App_Resources/Android/app.gradle
index 4178b7d..6625a2e 100644
--- a/App_Resources/Android/app.gradle
+++ b/App_Resources/Android/app.gradle
@@ -13,8 +13,8 @@ android {
targetSdkVersion 31
// Version Information
- versionCode 4
- versionName "1.0.2"
+ versionCode 6
+ versionName "1.0.6"
generatedDensities = []
}
diff --git a/app/_app-common.scss b/app/_app-common.scss
index b629d29..af3fb04 100644
--- a/app/_app-common.scss
+++ b/app/_app-common.scss
@@ -83,6 +83,18 @@
font-size: 18;
}
+ .name {
+ color: #212121;
+ font-size: 14;
+ }
+ .message {
+ color: #616161;
+ font-size: 13;
+ }
+ .country {
+ color: #757575;
+ font-size: 12;
+ }
.date-time {
color: #757575;
}
diff --git a/app/about/about-page.xml b/app/about/about-page.xml
index c469201..e5ee009 100644
--- a/app/about/about-page.xml
+++ b/app/about/about-page.xml
@@ -26,7 +26,10 @@
-
+
+
+
+
diff --git a/app/global_helper.js b/app/global_helper.js
index 84b82a0..96edb57 100644
--- a/app/global_helper.js
+++ b/app/global_helper.js
@@ -459,8 +459,17 @@ export function getCurrentTime() {
],
monthName = months[d.getMonth()];
- var days = ["Minggu", "Senin", "Selasa", "Rabu", "Kamis", "Jum'at", "Sabtu"],
- dayName = days[d.getDay()];
+ // var days = ["Minggu", "Senin", "Selasa", "Rabu", "Kamis", "Jum'at", "Sabtu"];
+ var days = [
+ "Sunday",
+ "Monday",
+ "Tuesday",
+ "Wednesday",
+ "Thursday",
+ "Friday",
+ "Saturday",
+ ];
+ var dayName = days[d.getDay()];
var result =
dayName +
diff --git a/app/history/history-page.js b/app/history/history-page.js
index 2bec36d..ecdf209 100644
--- a/app/history/history-page.js
+++ b/app/history/history-page.js
@@ -7,11 +7,15 @@ import {
Dialogs,
} from "@nativescript/core";
import { shareText } from "@nativescript/social-share";
+import { Clipboard } from "@nativescript-use/nativescript-clipboard";
+import { SnackBar } from "@nativescript-community/ui-material-snackbar";
var model = GlobalModel([]);
var context;
const dataHistory = new ObservableArray([]);
+const clipboard = new Clipboard();
+const snackbar = new SnackBar();
export function onLoaded() {
__loadData();
@@ -33,7 +37,10 @@ export function __loadData() {
if (data.length > 0) {
for (let i = 0; i < data.length; i++) {
dataHistory.push({
+ name: data[i].name,
phone: data[i].phone,
+ message: data[i].message,
+ country: data[i].countryName,
flag: data[i].countryFlag,
dateTime: data[i].dateTime,
});
@@ -57,7 +64,14 @@ export function clearTap() {
if (result) {
LSdrop();
__loadData();
- alert("Successfully cleared history data :)");
+ snackbar.action({
+ message: "Successfully cleared history data :)",
+ actionText: "X",
+ textColor: "#FFFFFF",
+ actionTextColor: "#FFFFFF",
+ backgroundColor: "#1565C0",
+ hideDelay: 2000,
+ });
}
});
}
@@ -75,7 +89,7 @@ export function onItemTap(args) {
title: "Actions for " + itemTapData.phone,
message: "",
cancelButtonText: "Cancel",
- actions: ["Go to WhatsApp", "Share To", "Remove"],
+ actions: ["Go to WhatsApp", "Copy Phone Number", "Share To", "Remove"],
cancelable: true, // Android only
};
@@ -89,6 +103,18 @@ export function onItemTap(args) {
Utils.openUrl(fullUrl);
break;
+ case "COPY PHONE NUMBER":
+ clipboard.copy(itemTapData.phone);
+ snackbar.action({
+ message: itemTapData.phone + " has been copied",
+ actionText: "X",
+ textColor: "#333333",
+ actionTextColor: "#333333",
+ backgroundColor: "#FFEB3B",
+ hideDelay: 2000,
+ });
+ break;
+
case "SHARE TO":
shareText(itemTapData.phone);
break;
@@ -103,7 +129,14 @@ export function onItemTap(args) {
if (result === true) {
LSremove(itemIndex);
__loadData();
- alert(itemTapData.phone + " has been removed");
+ snackbar.action({
+ message: itemTapData.phone + " has been removed",
+ actionText: "X",
+ textColor: "#FFFFFF",
+ actionTextColor: "#FFFFFF",
+ backgroundColor: "#1565C0",
+ hideDelay: 2000,
+ });
}
});
break;
diff --git a/app/history/history-page.xml b/app/history/history-page.xml
index 262082e..4f03bff 100644
--- a/app/history/history-page.xml
+++ b/app/history/history-page.xml
@@ -12,10 +12,13 @@
-
-
-
-
+
+
+
+
+
+
+
diff --git a/app/home/home-page.js b/app/home/home-page.js
index 760c8dc..e579975 100644
--- a/app/home/home-page.js
+++ b/app/home/home-page.js
@@ -67,7 +67,7 @@ export function __parseCountry() {
context.set("countryName", currentCountry.name);
context.set("countryDialCode", currentCountry.dial_code);
context.set("countryFlag", currentCountry.flag);
- context.set("hint_text", "Type WhatsApp Number...");
+ context.set("hint_text", "Type Phone Number...");
context.set("phone_number", "");
} catch (error) {
console.error("Error parsing JSON:", error);
@@ -85,12 +85,16 @@ export function openApps() {
Utils.openUrl(fullUrl);
const dataInsert = {
guid: generateUUID(),
+ name: false,
phone: phoneNumber,
+ message: false,
countryName: currentCountry.name,
countryDialCode: currentCountry.dial_code,
countryFlag: currentCountry.flag,
countryCode: currentCountry.code,
dateTime: getCurrentTime(),
+ mark: false,
+ archived: false,
};
LSinsert(dataInsert);
diff --git a/app/home/home-page.xml b/app/home/home-page.xml
index 7f581b9..d3efa3f 100644
--- a/app/home/home-page.xml
+++ b/app/home/home-page.xml
@@ -9,9 +9,9 @@
-
+
-
+
diff --git a/package-lock.json b/package-lock.json
index e3ba685..1453917 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -8,6 +8,8 @@
"name": "wsn",
"version": "1.0.0",
"dependencies": {
+ "@nativescript-community/ui-material-snackbar": "^7.1.3",
+ "@nativescript-use/nativescript-clipboard": "^0.0.3",
"@nativescript/core": "~8.5.0",
"@nativescript/social-share": "^2.3.0",
"@nativescript/theme": "~3.0.2"
@@ -393,6 +395,24 @@
"integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==",
"dev": true
},
+ "node_modules/@nativescript-community/ui-material-core": {
+ "version": "7.1.3",
+ "resolved": "https://registry.npmjs.org/@nativescript-community/ui-material-core/-/ui-material-core-7.1.3.tgz",
+ "integrity": "sha512-F9KEHroozhSQiMD6j3FkQPCvGcHbB5ZAr/tw85mnGaBPp9r2u0/KwlgA4/3pker463j9DMUuWlkqVRG2ad9JmQ=="
+ },
+ "node_modules/@nativescript-community/ui-material-snackbar": {
+ "version": "7.1.3",
+ "resolved": "https://registry.npmjs.org/@nativescript-community/ui-material-snackbar/-/ui-material-snackbar-7.1.3.tgz",
+ "integrity": "sha512-fsnK7LfGX+ct4sZVMEkMt41e3CUns93eQJupnObTDHQmC90googvyiwaC/VaykRb296neNI+7gAkNhd8kVcMzQ==",
+ "dependencies": {
+ "@nativescript-community/ui-material-core": "^7.1.3"
+ }
+ },
+ "node_modules/@nativescript-use/nativescript-clipboard": {
+ "version": "0.0.3",
+ "resolved": "https://registry.npmjs.org/@nativescript-use/nativescript-clipboard/-/nativescript-clipboard-0.0.3.tgz",
+ "integrity": "sha512-UlUcVv3QWgCJIPrPBC9hIX0Mgo58K+SQ65w2aKedJIYgMXsa5peSHUb8IoDTUb8DeQZWBWRnrudJF3mIybkfIA=="
+ },
"node_modules/@nativescript/android": {
"version": "8.5.0",
"resolved": "https://registry.npmjs.org/@nativescript/android/-/android-8.5.0.tgz",
@@ -4161,6 +4181,20 @@
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz",
"integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w=="
},
+ "node_modules/typescript": {
+ "version": "5.1.6",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz",
+ "integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==",
+ "dev": true,
+ "peer": true,
+ "bin": {
+ "tsc": "bin/tsc",
+ "tsserver": "bin/tsserver"
+ },
+ "engines": {
+ "node": ">=14.17"
+ }
+ },
"node_modules/universalify": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz",
@@ -5035,6 +5069,24 @@
}
}
},
+ "@nativescript-community/ui-material-core": {
+ "version": "7.1.3",
+ "resolved": "https://registry.npmjs.org/@nativescript-community/ui-material-core/-/ui-material-core-7.1.3.tgz",
+ "integrity": "sha512-F9KEHroozhSQiMD6j3FkQPCvGcHbB5ZAr/tw85mnGaBPp9r2u0/KwlgA4/3pker463j9DMUuWlkqVRG2ad9JmQ=="
+ },
+ "@nativescript-community/ui-material-snackbar": {
+ "version": "7.1.3",
+ "resolved": "https://registry.npmjs.org/@nativescript-community/ui-material-snackbar/-/ui-material-snackbar-7.1.3.tgz",
+ "integrity": "sha512-fsnK7LfGX+ct4sZVMEkMt41e3CUns93eQJupnObTDHQmC90googvyiwaC/VaykRb296neNI+7gAkNhd8kVcMzQ==",
+ "requires": {
+ "@nativescript-community/ui-material-core": "^7.1.3"
+ }
+ },
+ "@nativescript-use/nativescript-clipboard": {
+ "version": "0.0.3",
+ "resolved": "https://registry.npmjs.org/@nativescript-use/nativescript-clipboard/-/nativescript-clipboard-0.0.3.tgz",
+ "integrity": "sha512-UlUcVv3QWgCJIPrPBC9hIX0Mgo58K+SQ65w2aKedJIYgMXsa5peSHUb8IoDTUb8DeQZWBWRnrudJF3mIybkfIA=="
+ },
"@nativescript/android": {
"version": "8.5.0",
"resolved": "https://registry.npmjs.org/@nativescript/android/-/android-8.5.0.tgz",
@@ -5429,7 +5481,8 @@
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.2.0.tgz",
"integrity": "sha512-4FB8Tj6xyVkyqjj1OaTqCjXYULB9FMkqQ8yGrZjRDrYh0nOE+7Lhs45WioWQQMV+ceFlE368Ukhe6xdvJM9Egg==",
- "dev": true
+ "dev": true,
+ "requires": {}
},
"@webpack-cli/info": {
"version": "1.5.0",
@@ -5444,7 +5497,8 @@
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.7.0.tgz",
"integrity": "sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q==",
- "dev": true
+ "dev": true,
+ "requires": {}
},
"@xtuc/ieee754": {
"version": "1.2.0",
@@ -5476,13 +5530,15 @@
"version": "1.9.0",
"resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz",
"integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==",
- "dev": true
+ "dev": true,
+ "requires": {}
},
"acorn-private-class-elements": {
"version": "0.2.7",
"resolved": "https://registry.npmjs.org/acorn-private-class-elements/-/acorn-private-class-elements-0.2.7.tgz",
"integrity": "sha512-+GZH2wOKNZOBI4OOPmzpo4cs6mW297sn6fgIk1dUI08jGjhAaEwvC39mN2gJAg2lmAQJ1rBkFqKWonL3Zz6PVA==",
- "dev": true
+ "dev": true,
+ "requires": {}
},
"acorn-private-methods": {
"version": "0.3.3",
@@ -5535,7 +5591,8 @@
"version": "3.5.2",
"resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz",
"integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==",
- "dev": true
+ "dev": true,
+ "requires": {}
},
"ansi-colors": {
"version": "4.1.3",
@@ -6518,7 +6575,8 @@
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz",
"integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==",
- "dev": true
+ "dev": true,
+ "requires": {}
},
"ignore": {
"version": "5.2.4",
@@ -7194,7 +7252,8 @@
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz",
"integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==",
- "dev": true
+ "dev": true,
+ "requires": {}
},
"postcss-modules-local-by-default": {
"version": "4.0.3",
@@ -7766,6 +7825,13 @@
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz",
"integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w=="
},
+ "typescript": {
+ "version": "5.1.6",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz",
+ "integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==",
+ "dev": true,
+ "peer": true
+ },
"universalify": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz",
@@ -8122,7 +8188,8 @@
"version": "7.5.9",
"resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz",
"integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==",
- "dev": true
+ "dev": true,
+ "requires": {}
},
"y18n": {
"version": "5.0.8",
diff --git a/package.json b/package.json
index 623e272..957fd00 100644
--- a/package.json
+++ b/package.json
@@ -4,6 +4,8 @@
"version": "1.0.0",
"private": true,
"dependencies": {
+ "@nativescript-community/ui-material-snackbar": "^7.1.3",
+ "@nativescript-use/nativescript-clipboard": "^0.0.3",
"@nativescript/core": "~8.5.0",
"@nativescript/social-share": "^2.3.0",
"@nativescript/theme": "~3.0.2"