Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
95567ef
commit c6bdb32
Showing
331 changed files
with
107,175 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"projects": { | ||
"default": "chat-v2-dev" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# chat21-ionic ver 1.0 | ||
|
||
### next release | ||
- (da fare) immagine senza bordo nel msg conversazione | ||
- (da fare) apri immagine nel dettaglio conversazione in una nw finestra | ||
- (da fare) aggiungo br nel messaggio | ||
- (da fare) ottimizzare view contatti (css header, titolo, <-, img profile, cache) | ||
|
||
### 1.0.11 | ||
- enables authentication outside of tiledesk domains | ||
|
||
### 1.0.8 | ||
- fixes bug on new conversation (detail conversation hidden) | ||
|
||
### 1.0.7 | ||
- fixes bug on change user (logout/login) | ||
- fixes bug on change conversation selected and conversation archived selected | ||
|
||
### 1.0.6 | ||
- fixes bug leave group and close group | ||
|
||
### 1.0.5 | ||
- add button login on tiledesk (if hostname is tiledesk) | ||
|
||
### 1.0.3 | ||
- change color css conversation selected | ||
- change position blue point on new message | ||
- fixes bug css archived conversations (image, point, header, icon) | ||
- fixes bug link in message | ||
- fixes bug button 'Request detail' only support-group | ||
- fixes bug truncate message in list conversations | ||
- load image profile from firestore url in conv. list, info conv., Participants | ||
- fixes bug user info: load image profilo | ||
- fixes bug info conversation on first load | ||
- change get 'date last access' for id in support-group (sostituito senderAuthInfo.authVar.uid con requester_id) | ||
- fixes bug conversation selected for first open (blank page) | ||
- fixes bug open page 'message info' (message selected = null) | ||
|
||
|
||
### 1.0.2 | ||
- added timestamp = firebase.database.ServerValue.TIMESTAMP in send message | ||
- fixes bug spinner il list conversations | ||
- fixes bug load image profile | ||
- deleted IonicImageLoader | ||
- fixes bug info conversation (load image) in archived conversations | ||
- change css in the header of list conversation | ||
- added number of conversations with new messages | ||
- fixes bug image conversation in info conversation | ||
- change css in the conversation list (new message, close message) | ||
- fixes bug load image on firebase storage | ||
- added IonicImageLoader for load and cache images | ||
- fixes bug cache for user (conversation list, contacts and settings) | ||
- add IonicStorageModule | ||
- add popup on videochat | ||
- fixes bug format date last access | ||
- fixed bug local time in send | ||
- add num version in package | ||
- add npm publish | ||
|
||
### 0.934 | ||
- link projectId open in _blank | ||
- change the color of the text message to in the selected conversation | ||
- fixes bug on metadata conversation | ||
- fixes bug multiple sound on changed / added message | ||
|
||
### 0.933 | ||
- add user status in header detail conversation | ||
- modified css detail conversation | ||
- adds CHANGELOG.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM nginx:alpine | ||
|
||
COPY nginx.conf /etc/nginx/nginx.conf | ||
|
||
WORKDIR /usr/share/nginx/html | ||
COPY platforms/browser/www/ . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
Chat21 is the core of the open source live chat platform [Tiledesk.com](http://www.tiledesk.com). | ||
|
||
# Features # | ||
With Chat21-ionic you can: | ||
* Send a direct message to a user (one to one message) | ||
* View the messages history | ||
* The read receipts feature allows your users to see when a message has been sent, delivered and read | ||
* Conversations list view with the last messages sent (like Whatsapp) | ||
* With the Presense Manager you can view when a user is online or offline and the inactivity period | ||
* Responsive design (desktop and mobile) | ||
* View the user profile with fullname and email | ||
* Login with email and password (Use firebase email and password authentication method ) | ||
* Signup with fullname, email, password and profile picture | ||
* Contacts list view with fulltext search for fullname field | ||
|
||
# Live Demo # | ||
Visit https://web.chat21.org/ to see a live demo of chat21-ionic. | ||
<img src="http://www.dariodepascalis.com/wp-content/uploads/2017/10/chat21-ionic-desk-new.png" alt="A screenshot of chat21-ionic demo" style="max-width:100%;"> | ||
|
||
# Documentation # | ||
In progress | ||
|
||
# Prerequisites # | ||
* Install nodejs: `https://nodejs.org/en/download/` | ||
* Install git: `https://git-scm.com/book/id/v2/Getting-Started-Installing-Git` | ||
* Install Ionic CLI and Cordova : `https://ionicframework.com/docs/intro/installation/` | ||
* A Firebase project. Create one free on `https://firebase.google.com` | ||
* "Chat21 Firebase cloud functions" installed. Instructions:`https://github.com/chat21/chat21-cloud-functions` | ||
|
||
# Installation # | ||
* Clone this repository. Run: `git clone https://github.com/frontiere21/chat21-ionic.git` in the folder in which you'd like to contain the project. | ||
* Next you will need to get all your node_modules back into your application. All these modules are based on your package.json file. In the project folder “chat21-ionic” run: `npm install` | ||
|
||
# Firebase Configuration # | ||
* Create account Firebase | ||
* Create a Firebase project in the Firebase console, if you don't already have one. https://console.firebase.google.com/ | ||
|
||
## Firebase DB Configuration ## | ||
* in the Firebase console click 'Add Firebase to your web app' and copy | ||
``` | ||
var config = { | ||
apiKey: "<your api key>", | ||
authDomain: "<your authDomain>", | ||
databaseURL: "<your databaseURL>", | ||
projectId: "<your projectId>", | ||
storageBucket: "<your storageBucket>", | ||
messagingSenderId: "< your messagingSenderId >" | ||
}; | ||
``` | ||
* Update app.module.ts: | ||
* go to the root of your project | ||
* open /src/app/app.module.ts and replace `firebaseConfig : {...}` whit | ||
``` | ||
firebaseConfig : { | ||
apiKey: "<your api key>", | ||
authDomain: "<your authDomain>", | ||
databaseURL: "<your databaseURL>", | ||
projectId: "<your projectId>", | ||
storageBucket: "<your storageBucket>", | ||
messagingSenderId: "< your messagingSenderId >" | ||
};``` | ||
* Config Firebase auth | ||
In the Firebase Console open the Authentication section > SIGN IN METHOD tab you need to enable the Email/password Sign-in Provider and click SAVE. This will allow users to sign-in the Web app with their Email | ||
https://firebase.google.com/docs/auth/ | ||
* Update app.module.ts: | ||
* open `/src/app/app.module.ts` and change tenant name (optional) | ||
* Update firebase-messaging-sw.js: | ||
* open `/src/firebase-messaging-sw.js` and replace messagingSenderId: "..." with < your messagingSenderId > | ||
More info here : https://angularfirebase.com/lessons/send-push-notifications-in-angular-with-firebase-cloud-messaging/ | ||
* Update manifest.json: | ||
* open `/src/manifest.json` and replace "name": "chat21-ionic" and "short_name": "chat21-ionic" with the name of your project (optional) | ||
|
||
## Run App on Browser ## | ||
* Now you will need to serve the app. Run: `ionic serve` in the terminal. (Update the plugins if required) | ||
|
||
## Deploy Chat21 Firebase Cloud Functions ## | ||
* Readme: https://github.com/chat21/chat21-cloud-functions | ||
|
||
## Create build browser ## | ||
* Run: `cordova platform add browser@latest` | ||
* Run: `ionic cordova build browser` | ||
|
||
## Upload project on firebase hosting ## | ||
https://firebase.google.com/docs/hosting/quickstart?authuser=0 | ||
* Install the Firebase CLI. run: `npm install -g firebase-tools` | ||
* Run: `firebase login` | ||
(these steps can be avoided if you have already done before) | ||
* Change directories in the terminal to your desired project directory(run: `cd platforms/browser`) and run: `firebase init` | ||
* select hosting (press Spacebar to select) and press return | ||
* select your project and press return | ||
* answer the following questions: | ||
* "what do you want to use as your public directory?" www and press return | ||
* "configure as a single-page app?" N and press return | ||
* "file www/index.html alredy exists. Overwrite?" N and press return | ||
* Run: `firebase deploy` | ||
* In your firebase consol click hosting and click on link your project | ||
|
||
## Run on Android and iOS | ||
* Run on simulator : `ionic cordova run android` | ||
* Run on device : `ionic cordova run android --device` | ||
|
||
* Run on simulator : `ionic cordova run ios` | ||
* Run on device : `ionic cordova run ios --device` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"name": "chat21-ionic-dev", | ||
"description": "App Description", | ||
"repository": "https://github.com/username/app-repo", | ||
"logo": "http://pereless360.com/img/SP/Ghost/360-logo-white.png", | ||
"keywords": ["ionic2", "heroku", "pereless360"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
<?xml version='1.0' encoding='utf-8'?> | ||
<widget id="com.ionicframework.listautenti875753" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> | ||
<name>Chat21 Ionic chat </name> | ||
<description>Chat21 Ionic3 chat for browser and mobile (ios and android).</description> | ||
<author email="info@frontiere21.it" href="http://www.frontiere21.it/">Frontiere21 SRL</author> | ||
<content src="index.html" /> | ||
<access origin="*" /> | ||
<allow-navigation href="http://ionic.local/*" /> | ||
<allow-intent href="http://*/*" /> | ||
<allow-intent href="https://*/*" /> | ||
<allow-intent href="tel:*" /> | ||
<allow-intent href="sms:*" /> | ||
<allow-intent href="mailto:*" /> | ||
<allow-intent href="geo:*" /> | ||
<preference name="webviewbounce" value="false" /> | ||
<preference name="UIWebViewBounce" value="false" /> | ||
<preference name="DisallowOverscroll" value="true" /> | ||
<preference name="android-minSdkVersion" value="16" /> | ||
<preference name="BackupWebStorage" value="none" /> | ||
<preference name="SplashMaintainAspectRatio" value="true" /> | ||
<preference name="FadeSplashScreenDuration" value="300" /> | ||
<preference name="SplashShowOnlyFirstTime" value="false" /> | ||
<preference name="SplashScreen" value="screen" /> | ||
<preference name="SplashScreenDelay" value="3000" /> | ||
<platform name="android"> | ||
<allow-intent href="market:*" /> | ||
<icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" /> | ||
<icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" /> | ||
<icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" /> | ||
<icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" /> | ||
<icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" /> | ||
<icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" /> | ||
<splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" /> | ||
<splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" /> | ||
<splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" /> | ||
<splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" /> | ||
<splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" /> | ||
<splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" /> | ||
<splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" /> | ||
<splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" /> | ||
<splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" /> | ||
<splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" /> | ||
<splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" /> | ||
<splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" /> | ||
<resource-file src="google-services.json" target="google-services.json" /> | ||
</platform> | ||
<platform name="ios"> | ||
<allow-intent href="itms:*" /> | ||
<allow-intent href="itms-apps:*" /> | ||
<icon height="57" src="resources/ios/icon/icon.png" width="57" /> | ||
<icon height="114" src="resources/ios/icon/icon@2x.png" width="114" /> | ||
<icon height="40" src="resources/ios/icon/icon-40.png" width="40" /> | ||
<icon height="80" src="resources/ios/icon/icon-40@2x.png" width="80" /> | ||
<icon height="120" src="resources/ios/icon/icon-40@3x.png" width="120" /> | ||
<icon height="50" src="resources/ios/icon/icon-50.png" width="50" /> | ||
<icon height="100" src="resources/ios/icon/icon-50@2x.png" width="100" /> | ||
<icon height="60" src="resources/ios/icon/icon-60.png" width="60" /> | ||
<icon height="120" src="resources/ios/icon/icon-60@2x.png" width="120" /> | ||
<icon height="180" src="resources/ios/icon/icon-60@3x.png" width="180" /> | ||
<icon height="72" src="resources/ios/icon/icon-72.png" width="72" /> | ||
<icon height="144" src="resources/ios/icon/icon-72@2x.png" width="144" /> | ||
<icon height="76" src="resources/ios/icon/icon-76.png" width="76" /> | ||
<icon height="152" src="resources/ios/icon/icon-76@2x.png" width="152" /> | ||
<icon height="167" src="resources/ios/icon/icon-83.5@2x.png" width="167" /> | ||
<icon height="29" src="resources/ios/icon/icon-small.png" width="29" /> | ||
<icon height="58" src="resources/ios/icon/icon-small@2x.png" width="58" /> | ||
<icon height="87" src="resources/ios/icon/icon-small@3x.png" width="87" /> | ||
<splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" /> | ||
<splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" /> | ||
<splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" /> | ||
<splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208" /> | ||
<splash height="1536" src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048" /> | ||
<splash height="2048" src="resources/ios/splash/Default-Landscape@~ipadpro.png" width="2732" /> | ||
<splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" /> | ||
<splash height="2048" src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" /> | ||
<splash height="2732" src="resources/ios/splash/Default-Portrait@~ipadpro.png" width="2048" /> | ||
<splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" /> | ||
<splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640" /> | ||
<splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" /> | ||
<icon height="1024" src="resources/ios/icon/icon-1024.png" width="1024" /> | ||
<splash height="2732" src="resources/ios/splash/Default@2x~universal~anyany.png" width="2732" /> | ||
</platform> | ||
<allow-navigation href="http://192.168.1.8:8100" /> | ||
<engine name="android" spec="^7.1.4" /> | ||
<engine name="browser" spec="^5.0.4" /> | ||
<engine name="osx" spec="~4.0.1" /> | ||
<plugin name="cordova-plugin-console" spec="^1.1.0" /> | ||
<plugin name="cordova-plugin-device" spec="^1.1.7" /> | ||
<plugin name="cordova-plugin-splashscreen" spec="^4.1.0" /> | ||
<plugin name="cordova-plugin-statusbar" spec="^2.4.2" /> | ||
<plugin name="cordova-plugin-whitelist" spec="^1.3.3" /> | ||
<plugin name="cordova-sqlite-storage" spec="^2.6.0" /> | ||
<plugin name="ionic-plugin-keyboard" spec="^2.2.1" /> | ||
<plugin name="phonegap-plugin-push" spec="^2.2.3"> | ||
<variable name="SENDER_ID" value="1096415488178" /> | ||
</plugin> | ||
<plugin name="uk.co.workingedge.cordova.plugin.sqliteporter" spec="^1.1.0" /> | ||
</widget> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
curl -X POST -H "Authorization: key=AAAA_0d0qLI:APA91bHytQr_aYxLz3Qf9e8RRx-mNwKZyctlEnOjFlI-XaogTiwsNia7zbBo9hPU0lQ5wIbUDY92RWshfiZ1BMUNgLlBR59T9QJ15BAgzf3B2zMTU_t52--Slp_oaeE2khdJQDReB5WJ" -H "Content-Type: application/json" -d '{"notification": {"title": "Portugal vs. Denmark", "body": "5 to 1","icon": "firebase-logo.png","click_action": "http://localhost:8100"},"to": "eFQnRKTO8DI:APA91bHmVd3ZuuXK7iiKJAJ3dkQLQRhsbqKPsObjKtiThCuyhS80n6sMhT1nx5dyfDvltid6wuDh-HU56UAj9hs9ztycNViSzgchF38KBA03rBArvgHwFsgr5mPu_i7ipiBQCeldtdR6"}' "https://fcm.googleapis.com/fcm/send" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
npm version patch | ||
version=`node -e 'console.log(require("./package.json").version)'` | ||
echo "version $version" | ||
|
||
URL_VER=${version//[.]//} | ||
echo 'URL_VER: ---->'$URL_VER | ||
|
||
if [ "$version" != "" ]; then | ||
git tag -a "v$version-RC" -m "`git log -1 --format=%s`" | ||
echo "Created a new tag, v$version" | ||
git push --tags | ||
npm publish --tag RC | ||
fi | ||
|
||
sed -i -e "s/$URL_VER/g" src/utils/constants.ts | ||
ionic cordova platform add browser --save | ||
ionic cordova build browser | ||
|
||
cp -p src/firebase-messaging-sw.js platforms/browser/www/ | ||
cp -p src/manifest.json platforms/browser/www/ | ||
cd platforms/browser/www | ||
aws s3 sync . s3://tiledesk-dashboard/chat/dev/$URL_VER/ | ||
cd ../../../ | ||
|
||
echo new version deployed on s3://tiledesk-dashboard/chat/dev/$URL_VER/ | ||
echo available on https://s3.eu-west-1.amazonaws.com/tiledesk-dashboard/chat/dev/$URL_VER/index.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
environment=$(< src/utils/constants.ts) | ||
start="CURR_VER_PROD = '0." | ||
end="'" | ||
one=${environment#*$start} | ||
build=${one%%$end*} #two=${one%,*} -> %% prendo la prima istanza; % prendo la seconda | ||
NEW_BUILD=$(($build + 1)) | ||
sed -i -e "s/$start$build/$start$NEW_BUILD/g" src/utils/constants.ts | ||
# ng build --prod --base-href /$NEW_BUILD/ | ||
#ionic cordova build browser --prod | ||
|
||
ionic cordova platform add browser --save | ||
ionic cordova build browser | ||
|
||
cp -p src/firebase-messaging-sw.js platforms/browser/www/ | ||
cp -p src/manifest.json platforms/browser/www/ | ||
|
||
cd platforms/browser/www | ||
aws s3 sync . s3://tiledesk-dashboard-pre/chat/ | ||
cd ../../../ | ||
|
||
#aws cloudfront create-invalidation --distribution-id E2DTAKWHWQ7C3J --paths "/*" | ||
|
||
echo new version deployed on s3://tiledesk-dashboard-pre/chat/ | ||
echo available on https://s3.eu-west-1.amazonaws.com/tiledesk-dashboard-pre/chat/index.html |
Oops, something went wrong.