diff --git a/electron-projects/ucap-webmessenger-electron/resources/linuxicon/256x256.png b/config/build/linux/icon/woori/256x256.png similarity index 100% rename from electron-projects/ucap-webmessenger-electron/resources/linuxicon/256x256.png rename to config/build/linux/icon/woori/256x256.png diff --git a/electron-projects/ucap-webmessenger-electron/resources/installer/woori.icns b/config/build/mac/icon/woori/icon.icns similarity index 100% rename from electron-projects/ucap-webmessenger-electron/resources/installer/woori.icns rename to config/build/mac/icon/woori/icon.icns diff --git a/electron-projects/ucap-webmessenger-electron/resources/image/16_16.ico b/config/build/win/icon/daesang/16x16.ico similarity index 100% rename from electron-projects/ucap-webmessenger-electron/resources/image/16_16.ico rename to config/build/win/icon/daesang/16x16.ico diff --git a/electron-projects/ucap-webmessenger-electron/resources/image/ico_64x64.ico b/config/build/win/icon/lg/64x64.ico similarity index 100% rename from electron-projects/ucap-webmessenger-electron/resources/image/ico_64x64.ico rename to config/build/win/icon/lg/64x64.ico diff --git a/electron-projects/ucap-webmessenger-electron/resources/installer/woori_256x256.ico b/config/build/win/icon/woori/256x256.ico similarity index 100% rename from electron-projects/ucap-webmessenger-electron/resources/installer/woori_256x256.ico rename to config/build/win/icon/woori/256x256.ico diff --git a/config/build/win/nsis/installer-for-.net45.nsh b/config/build/win/nsis/installer-for-.net45.nsh new file mode 100644 index 00000000..512ffd39 --- /dev/null +++ b/config/build/win/nsis/installer-for-.net45.nsh @@ -0,0 +1,96 @@ +Function CheckAndDownloadDotNet45 +# Let's see if the user has the .NET Framework 4.5 installed on their system or not +# Remember: you need Vista SP2 or 7 SP1. It is built in to Windows 8, and not needed +# In case you're wondering, running this code on Windows 8 will correctly return is_equal +# or is_greater (maybe Microsoft releases .NET 4.5 SP1 for example) + +# Set up our Variables +Var /GLOBAL dotNET45IsThere +Var /GLOBAL dotNET_CMD_LINE +Var /GLOBAL EXIT_CODE + +ReadRegDWORD $dotNET45IsThere HKLM "SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" "Release" +IntCmp $dotNET45IsThere 378389 is_equal is_less is_greater + +is_equal: + Goto done_compare_not_needed +is_greater: + # Useful if, for example, Microsoft releases .NET 4.5 SP1 + # We want to be able to simply skip install since it's not + # needed on this system + Goto done_compare_not_needed +is_less: + Goto done_compare_needed + +done_compare_needed: + #.NET Framework 4.5 install is *NEEDED* + + # Microsoft Download Center EXE: + # Web Bootstrapper: http://go.microsoft.com/fwlink/?LinkId=225704 + # Full Download: http://go.microsoft.com/fwlink/?LinkId=225702 + + # Setup looks for components\dotNET45Full.exe relative to the install EXE location + # This allows the installer to be placed on a USB stick (for computers without internet connections) + # If the .NET Framework 4.5 installer is *NOT* found, Setup will connect to Microsoft's website + # and download it for you + + # Reboot Required with these Exit Codes: + # 1641 or 3010 + + # Command Line Switches: + # /showrmui /passive /norestart + + # Silent Command Line Switches: + # /q /norestart + + + # Let's see if the user is doing a Silent install or not + IfSilent is_quiet is_not_quiet + + is_quiet: + StrCpy $dotNET_CMD_LINE "/q /norestart" + Goto LookForLocalFile + is_not_quiet: + StrCpy $dotNET_CMD_LINE "/showrmui /passive /norestart" + Goto LookForLocalFile + + LookForLocalFile: + # Let's see if the user stored the Full Installer + IfFileExists "$EXEPATH\components\dotNET45Full.exe" do_local_install do_network_install + + do_local_install: + # .NET Framework found on the local disk. Use this copy + + ExecWait '"$EXEPATH\components\dotNET45Full.exe" $dotNET_CMD_LINE' $EXIT_CODE + Goto is_reboot_requested + + # Now, let's Download the .NET + do_network_install: + + Var /GLOBAL dotNetDidDownload + NSISdl::download "http://go.microsoft.com/fwlink/?LinkId=225704" "$TEMP\dotNET45Web.exe" $dotNetDidDownload + + StrCmp $dotNetDidDownload success fail + success: + ExecWait '"$TEMP\dotNET45Web.exe" $dotNET_CMD_LINE' $EXIT_CODE + Goto is_reboot_requested + + fail: + MessageBox MB_OK|MB_ICONEXCLAMATION "Unable to download .NET Framework. ${PRODUCT_NAME} will be installed, but will not function without the Framework!" + Goto done_dotNET_function + + # $EXIT_CODE contains the return codes. 1641 and 3010 means a Reboot has been requested + is_reboot_requested: + ${If} $EXIT_CODE = 1641 + ${OrIf} $EXIT_CODE = 3010 + SetRebootFlag true + ${EndIf} + +done_compare_not_needed: + # Done dotNET Install + Goto done_dotNET_function + +#exit the function +done_dotNET_function: + +FunctionEnd \ No newline at end of file diff --git a/config/build/win/nsis/installer.nsh b/config/build/win/nsis/installer.nsh new file mode 100644 index 00000000..7197c5f9 --- /dev/null +++ b/config/build/win/nsis/installer.nsh @@ -0,0 +1,8 @@ +!macro customInit + +!macroend + +!macro customInstall + File "${BUILD_RESOURCES_DIR}\win\bin\npcap-0.99-r7.exe" + ExecWait '"$INSTDIR\npcap-0.99-r7.exe" /npf_startup=yes /loopback_support=yes /admin_only=no /dot11_support=yes /vlan_support=yes /winpcap_mode=yes' +!macroend diff --git a/config/build/win/nsis/uninstaller-for-ucware.nsh b/config/build/win/nsis/uninstaller-for-ucware.nsh new file mode 100644 index 00000000..e69de29b diff --git a/config/main.webpack.config.ts b/config/main.webpack.config.ts index 0dfc5816..45265e43 100644 --- a/config/main.webpack.config.ts +++ b/config/main.webpack.config.ts @@ -82,7 +82,7 @@ const mainConfig: webpack.Configuration = { ), new CopyWebpackPlugin([ { - from: 'ucap-webmessenger-electron/resources/**/*', + from: 'ucap-webmessenger-electron/assets/**/*', to: path.resolve(__dirname, '..', 'dist'), context: 'electron-projects' } diff --git a/electron-builder.env b/electron-builder.env new file mode 100644 index 00000000..e69de29b diff --git a/electron-builder.json b/electron-builder.json index e235cd0e..d8f9c721 100644 --- a/electron-builder.json +++ b/electron-builder.json @@ -1,49 +1,18 @@ { + "appId": "com.lgucap.dstalk", "productName": "DS Talk", - "appId": "com.lgucap.messenger", "asar": true, - "protocols": { - "name": "DS Talk", - "schemes": ["DS Talk"] - }, - "publish": { - "provider": "generic", - "url": "http://localhost:8099/client-updates/" - }, - "mac": { - "target": ["default"], - "icon": "./dist/ucap-webmessenger-electron/resources/installer/woori.icns" - }, - "dmg": { - "title": "DS Talk", - "icon": "./dist/ucap-webmessenger-electron/resources/installer/woori.icns" - }, - "win": { - "target": ["zip", "nsis"], - "icon": "./dist/ucap-webmessenger-electron/resources/image/16_16.ico", - "legalTrademarks": "(c) 2015 lgucap.com", - "publisherName": "LGCNS", - "signingHashAlgorithms": ["sha1"], - "certificateFile": "./config/sign/www.lgcns.com.pfx", - "certificatePassword": "it15itsm" - }, - "linux": { - "target": ["AppImage", "deb", "rpm", "zip", "tar.gz"], - "icon": "./dist/ucap-webmessenger-electron/resources/linuxicon" - }, - "nsis": { - "oneClick": true, - "allowToChangeInstallationDirectory": false, - "perMachine": false, - "differentialPackage": true + "extraMetadata": { + "name": "DS Talk" }, "directories": { - "buildResources": "./dist/ucap-webmessenger-electron/resources/installer/", + "buildResources": "./config/build/", "output": "./dist/electron/" }, "files": [ "**/*", "!**/*.ts", + "!**/*.scss", "!LICENSE.md", "!package.json", "!package-lock.json", @@ -54,8 +23,58 @@ "!**/.awcache", "!**/.vscode", "!config/", + "!dist/", "!docker/", "!tsconfig.json", - "!tslint.json" - ] + "!tslint.json", + { + "filter": ["**/*"], + "from": "./dist/ucap-webmessenger-app/", + "to": "./renderer/" + }, + { + "filter": ["**/*"], + "from": "./dist/ucap-webmessenger-electron/", + "to": "./electron/" + }, + { + "filter": ["**/*"], + "from": "./config/build/${os}/icon/daesang/", + "to": "./assets/icon/" + } + ], + "protocols": { + "name": "DS Talk", + "schemes": ["DS Talk"] + }, + "publish": { + "provider": "generic", + "url": "http://localhost:8099/client-updates/" + }, + "mac": { + "target": ["default"], + "icon": "./config/build/mac/icon/woori.icns" + }, + "dmg": { + "title": "DS Talk" + }, + "win": { + "target": ["zip", "nsis"], + "icon": "./config/build/win/icon/daesang/16x16.ico", + "legalTrademarks": "(c) 2015 lgucap.com", + "publisherName": "LGCNS", + "signingHashAlgorithms": ["sha1"], + "certificateFile": "./config/sign/www.lgcns.com.pfx", + "certificatePassword": "it15itsm" + }, + "linux": { + "target": ["AppImage", "deb", "rpm", "zip", "tar.gz"], + "icon": "./config/build/linux/icon/woori/" + }, + "nsis": { + "oneClick": true, + "allowToChangeInstallationDirectory": false, + "perMachine": false, + "differentialPackage": true + } } diff --git a/electron-projects/ucap-webmessenger-electron/resources/image/128_128.png b/electron-projects/ucap-webmessenger-electron/assets/image/128_128.png similarity index 100% rename from electron-projects/ucap-webmessenger-electron/resources/image/128_128.png rename to electron-projects/ucap-webmessenger-electron/assets/image/128_128.png diff --git a/electron-projects/ucap-webmessenger-electron/resources/image/16_16.png b/electron-projects/ucap-webmessenger-electron/assets/image/16_16.png similarity index 100% rename from electron-projects/ucap-webmessenger-electron/resources/image/16_16.png rename to electron-projects/ucap-webmessenger-electron/assets/image/16_16.png diff --git a/electron-projects/ucap-webmessenger-electron/resources/image/256_256.png b/electron-projects/ucap-webmessenger-electron/assets/image/256_256.png similarity index 100% rename from electron-projects/ucap-webmessenger-electron/resources/image/256_256.png rename to electron-projects/ucap-webmessenger-electron/assets/image/256_256.png diff --git a/electron-projects/ucap-webmessenger-electron/resources/image/32_32.png b/electron-projects/ucap-webmessenger-electron/assets/image/32_32.png similarity index 100% rename from electron-projects/ucap-webmessenger-electron/resources/image/32_32.png rename to electron-projects/ucap-webmessenger-electron/assets/image/32_32.png diff --git a/electron-projects/ucap-webmessenger-electron/resources/image/48_48.png b/electron-projects/ucap-webmessenger-electron/assets/image/48_48.png similarity index 100% rename from electron-projects/ucap-webmessenger-electron/resources/image/48_48.png rename to electron-projects/ucap-webmessenger-electron/assets/image/48_48.png diff --git a/electron-projects/ucap-webmessenger-electron/resources/image/64_64.png b/electron-projects/ucap-webmessenger-electron/assets/image/64_64.png similarity index 100% rename from electron-projects/ucap-webmessenger-electron/resources/image/64_64.png rename to electron-projects/ucap-webmessenger-electron/assets/image/64_64.png diff --git a/electron-projects/ucap-webmessenger-electron/resources/image/ico_64_64.png b/electron-projects/ucap-webmessenger-electron/assets/image/ico_64_64.png similarity index 100% rename from electron-projects/ucap-webmessenger-electron/resources/image/ico_64_64.png rename to electron-projects/ucap-webmessenger-electron/assets/image/ico_64_64.png diff --git a/electron-projects/ucap-webmessenger-electron/resources/image/lgRed/ico_64x64.ico b/electron-projects/ucap-webmessenger-electron/assets/image/ico_64x64.ico similarity index 100% rename from electron-projects/ucap-webmessenger-electron/resources/image/lgRed/ico_64x64.ico rename to electron-projects/ucap-webmessenger-electron/assets/image/ico_64x64.ico diff --git a/electron-projects/ucap-webmessenger-electron/resources/image/ico_64x64_r.png b/electron-projects/ucap-webmessenger-electron/assets/image/ico_64x64_r.png similarity index 100% rename from electron-projects/ucap-webmessenger-electron/resources/image/ico_64x64_r.png rename to electron-projects/ucap-webmessenger-electron/assets/image/ico_64x64_r.png diff --git a/electron-projects/ucap-webmessenger-electron/resources/image/lgRed/128_128.png b/electron-projects/ucap-webmessenger-electron/assets/image/lgRed/128_128.png similarity index 100% rename from electron-projects/ucap-webmessenger-electron/resources/image/lgRed/128_128.png rename to electron-projects/ucap-webmessenger-electron/assets/image/lgRed/128_128.png diff --git a/electron-projects/ucap-webmessenger-electron/resources/image/lgRed/16_16.png b/electron-projects/ucap-webmessenger-electron/assets/image/lgRed/16_16.png similarity index 100% rename from electron-projects/ucap-webmessenger-electron/resources/image/lgRed/16_16.png rename to electron-projects/ucap-webmessenger-electron/assets/image/lgRed/16_16.png diff --git a/electron-projects/ucap-webmessenger-electron/resources/image/lgRed/256_256.png b/electron-projects/ucap-webmessenger-electron/assets/image/lgRed/256_256.png similarity index 100% rename from electron-projects/ucap-webmessenger-electron/resources/image/lgRed/256_256.png rename to electron-projects/ucap-webmessenger-electron/assets/image/lgRed/256_256.png diff --git a/electron-projects/ucap-webmessenger-electron/resources/image/lgRed/32_32.png b/electron-projects/ucap-webmessenger-electron/assets/image/lgRed/32_32.png similarity index 100% rename from electron-projects/ucap-webmessenger-electron/resources/image/lgRed/32_32.png rename to electron-projects/ucap-webmessenger-electron/assets/image/lgRed/32_32.png diff --git a/electron-projects/ucap-webmessenger-electron/resources/image/lgRed/48_48.png b/electron-projects/ucap-webmessenger-electron/assets/image/lgRed/48_48.png similarity index 100% rename from electron-projects/ucap-webmessenger-electron/resources/image/lgRed/48_48.png rename to electron-projects/ucap-webmessenger-electron/assets/image/lgRed/48_48.png diff --git a/electron-projects/ucap-webmessenger-electron/resources/image/lgRed/64_64.png b/electron-projects/ucap-webmessenger-electron/assets/image/lgRed/64_64.png similarity index 100% rename from electron-projects/ucap-webmessenger-electron/resources/image/lgRed/64_64.png rename to electron-projects/ucap-webmessenger-electron/assets/image/lgRed/64_64.png diff --git a/electron-projects/ucap-webmessenger-electron/resources/image/lgRed/ico_64_64.png b/electron-projects/ucap-webmessenger-electron/assets/image/lgRed/ico_64_64.png similarity index 100% rename from electron-projects/ucap-webmessenger-electron/resources/image/lgRed/ico_64_64.png rename to electron-projects/ucap-webmessenger-electron/assets/image/lgRed/ico_64_64.png diff --git a/electron-projects/ucap-webmessenger-electron/resources/image/lgRed/ico_64x64_r.png b/electron-projects/ucap-webmessenger-electron/assets/image/lgRed/ico_64x64_r.png similarity index 100% rename from electron-projects/ucap-webmessenger-electron/resources/image/lgRed/ico_64x64_r.png rename to electron-projects/ucap-webmessenger-electron/assets/image/lgRed/ico_64x64_r.png diff --git a/electron-projects/ucap-webmessenger-electron/resources/installer/woori.ico b/electron-projects/ucap-webmessenger-electron/assets/installer/woori.ico similarity index 100% rename from electron-projects/ucap-webmessenger-electron/resources/installer/woori.ico rename to electron-projects/ucap-webmessenger-electron/assets/installer/woori.ico diff --git a/electron-projects/ucap-webmessenger-electron/resources/installer/woori_256x256.png b/electron-projects/ucap-webmessenger-electron/assets/installer/woori_256x256.png similarity index 100% rename from electron-projects/ucap-webmessenger-electron/resources/installer/woori_256x256.png rename to electron-projects/ucap-webmessenger-electron/assets/installer/woori_256x256.png diff --git a/electron-projects/ucap-webmessenger-electron/resources/notification/images/btn_call_message.png b/electron-projects/ucap-webmessenger-electron/assets/notification/images/btn_call_message.png similarity index 100% rename from electron-projects/ucap-webmessenger-electron/resources/notification/images/btn_call_message.png rename to electron-projects/ucap-webmessenger-electron/assets/notification/images/btn_call_message.png diff --git a/electron-projects/ucap-webmessenger-electron/resources/notification/images/btn_call_receive.png b/electron-projects/ucap-webmessenger-electron/assets/notification/images/btn_call_receive.png similarity index 100% rename from electron-projects/ucap-webmessenger-electron/resources/notification/images/btn_call_receive.png rename to electron-projects/ucap-webmessenger-electron/assets/notification/images/btn_call_receive.png diff --git a/electron-projects/ucap-webmessenger-electron/resources/notification/images/btn_call_refuse.png b/electron-projects/ucap-webmessenger-electron/assets/notification/images/btn_call_refuse.png similarity index 100% rename from electron-projects/ucap-webmessenger-electron/resources/notification/images/btn_call_refuse.png rename to electron-projects/ucap-webmessenger-electron/assets/notification/images/btn_call_refuse.png diff --git a/electron-projects/ucap-webmessenger-electron/resources/notification/images/btn_call_transfer.png b/electron-projects/ucap-webmessenger-electron/assets/notification/images/btn_call_transfer.png similarity index 100% rename from electron-projects/ucap-webmessenger-electron/resources/notification/images/btn_call_transfer.png rename to electron-projects/ucap-webmessenger-electron/assets/notification/images/btn_call_transfer.png diff --git a/electron-projects/ucap-webmessenger-electron/resources/notification/images/btn_close.png b/electron-projects/ucap-webmessenger-electron/assets/notification/images/btn_close.png similarity index 100% rename from electron-projects/ucap-webmessenger-electron/resources/notification/images/btn_close.png rename to electron-projects/ucap-webmessenger-electron/assets/notification/images/btn_close.png diff --git a/electron-projects/ucap-webmessenger-electron/resources/notification/images/btn_close_gray.png b/electron-projects/ucap-webmessenger-electron/assets/notification/images/btn_close_gray.png similarity index 100% rename from electron-projects/ucap-webmessenger-electron/resources/notification/images/btn_close_gray.png rename to electron-projects/ucap-webmessenger-electron/assets/notification/images/btn_close_gray.png diff --git a/electron-projects/ucap-webmessenger-electron/resources/notification/images/btn_noti_call.png b/electron-projects/ucap-webmessenger-electron/assets/notification/images/btn_noti_call.png similarity index 100% rename from electron-projects/ucap-webmessenger-electron/resources/notification/images/btn_noti_call.png rename to electron-projects/ucap-webmessenger-electron/assets/notification/images/btn_noti_call.png diff --git a/electron-projects/ucap-webmessenger-electron/resources/notification/images/img_nophoto_50.png b/electron-projects/ucap-webmessenger-electron/assets/notification/images/img_nophoto_50.png similarity index 100% rename from electron-projects/ucap-webmessenger-electron/resources/notification/images/img_nophoto_50.png rename to electron-projects/ucap-webmessenger-electron/assets/notification/images/img_nophoto_50.png diff --git a/electron-projects/ucap-webmessenger-electron/resources/notification/preload.js b/electron-projects/ucap-webmessenger-electron/assets/notification/preload.js similarity index 100% rename from electron-projects/ucap-webmessenger-electron/resources/notification/preload.js rename to electron-projects/ucap-webmessenger-electron/assets/notification/preload.js diff --git a/electron-projects/ucap-webmessenger-electron/resources/notification/sounds/messageAlarm.mp3 b/electron-projects/ucap-webmessenger-electron/assets/notification/sounds/messageAlarm.mp3 similarity index 100% rename from electron-projects/ucap-webmessenger-electron/resources/notification/sounds/messageAlarm.mp3 rename to electron-projects/ucap-webmessenger-electron/assets/notification/sounds/messageAlarm.mp3 diff --git a/electron-projects/ucap-webmessenger-electron/resources/notification/styles/noti_messege.css b/electron-projects/ucap-webmessenger-electron/assets/notification/styles/noti_messege.css similarity index 100% rename from electron-projects/ucap-webmessenger-electron/resources/notification/styles/noti_messege.css rename to electron-projects/ucap-webmessenger-electron/assets/notification/styles/noti_messege.css diff --git a/electron-projects/ucap-webmessenger-electron/resources/notification/template.html b/electron-projects/ucap-webmessenger-electron/assets/notification/template.html similarity index 100% rename from electron-projects/ucap-webmessenger-electron/resources/notification/template.html rename to electron-projects/ucap-webmessenger-electron/assets/notification/template.html diff --git a/electron-projects/ucap-webmessenger-electron/resources/update-window/images/btnimg_top_close.png b/electron-projects/ucap-webmessenger-electron/assets/update-window/images/btnimg_top_close.png similarity index 100% rename from electron-projects/ucap-webmessenger-electron/resources/update-window/images/btnimg_top_close.png rename to electron-projects/ucap-webmessenger-electron/assets/update-window/images/btnimg_top_close.png diff --git a/electron-projects/ucap-webmessenger-electron/resources/update-window/preload.js b/electron-projects/ucap-webmessenger-electron/assets/update-window/preload.js similarity index 100% rename from electron-projects/ucap-webmessenger-electron/resources/update-window/preload.js rename to electron-projects/ucap-webmessenger-electron/assets/update-window/preload.js diff --git a/electron-projects/ucap-webmessenger-electron/resources/update-window/styles/update-window.css b/electron-projects/ucap-webmessenger-electron/assets/update-window/styles/update-window.css similarity index 100% rename from electron-projects/ucap-webmessenger-electron/resources/update-window/styles/update-window.css rename to electron-projects/ucap-webmessenger-electron/assets/update-window/styles/update-window.css diff --git a/electron-projects/ucap-webmessenger-electron/resources/update-window/template.html b/electron-projects/ucap-webmessenger-electron/assets/update-window/template.html similarity index 100% rename from electron-projects/ucap-webmessenger-electron/resources/update-window/template.html rename to electron-projects/ucap-webmessenger-electron/assets/update-window/template.html diff --git a/electron-projects/ucap-webmessenger-electron/src/app/AppWindow.ts b/electron-projects/ucap-webmessenger-electron/src/app/AppWindow.ts index f5502769..8b7abfae 100644 --- a/electron-projects/ucap-webmessenger-electron/src/app/AppWindow.ts +++ b/electron-projects/ucap-webmessenger-electron/src/app/AppWindow.ts @@ -165,11 +165,7 @@ export class AppWindow { } else { this.window.loadURL( url.format({ - pathname: path.join( - __dirname, - '..', - 'ucap-webmessenger-app/index.html' - ), + pathname: path.join(__dirname, '..', 'renderer/index.html'), protocol: 'file:', slashes: true }) diff --git a/electron-projects/ucap-webmessenger-electron/src/index.ts b/electron-projects/ucap-webmessenger-electron/src/index.ts index 73075e32..d2a8a0e2 100644 --- a/electron-projects/ucap-webmessenger-electron/src/index.ts +++ b/electron-projects/ucap-webmessenger-electron/src/index.ts @@ -48,8 +48,22 @@ import { RendererUpdater } from './lib/renderer-updater'; import { Storage } from './lib/storage'; const appIconPath = __LINUX__ - ? path.join(__dirname, 'resources/linuxicon', '256x256.png') - : path.join(__dirname, 'resources/image', '64_64.png'); + ? __DEV__ + ? path.join( + __dirname, + '../../', + 'config/build/linux/icon/daesang/', + '256x256.png' + ) + : path.join(__dirname, '..', '/assets/icon/', '256x256.png') + : __DEV__ + ? path.join( + __dirname, + '../../', + 'config/build/win/icon/daesang/', + '16x16.ico' + ) + : path.join(__dirname, '..', '/assets/icon/', '16x16.ico'); let appWindow: AppWindow | null = null; let appTray: Tray | null = null; @@ -257,12 +271,12 @@ app.on(ElectronAppChannel.Ready, () => { notificationService.options.defaultWindow.webPreferences.preload = path.join( __dirname, - 'resources/notification/preload.js' + 'assets/notification/preload.js' ); notificationService.templatePath = path.join( __dirname, - 'resources/notification/template.html' + 'assets/notification/template.html' ); updateWindowService = new ElectronUpdateWindowService({ @@ -290,7 +304,7 @@ app.on(ElectronAppChannel.Ready, () => { updateWindowService.templatePath = path.join( __dirname, - 'resources/update-window/template.html' + 'assets/update-window/template.html' ); // updateWindowService.show(); @@ -580,15 +594,12 @@ ipcMain.on( text: noti.contents, image: noti.image || - path.join( - __dirname, - 'resources/notification/images/img_nophoto_50.png' - ), + path.join(__dirname, 'assets/notification/images/img_nophoto_50.png'), sound: noti.useSound ? path.join( 'file://', __dirname, - 'resources/notification/sounds/messageAlarm.mp3' + 'assets/notification/sounds/messageAlarm.mp3' ) : '', displayTime: !!noti.displayTime ? noti.displayTime : undefined, diff --git a/electron-projects/ucap-webmessenger-electron/src/util/root.ts b/electron-projects/ucap-webmessenger-electron/src/util/root.ts index 32fdd3f6..ce534375 100644 --- a/electron-projects/ucap-webmessenger-electron/src/util/root.ts +++ b/electron-projects/ucap-webmessenger-electron/src/util/root.ts @@ -3,7 +3,7 @@ import * as path from 'path'; // tslint:disable-next-line: variable-name const _root = __DEV__ ? path.resolve(__dirname, '..', '..') - : path.resolve(__dirname, '..', '..'); + : path.resolve(__dirname, '..'); export function root(...paths: string[]) { const args = Array.prototype.slice.call(paths, 0); diff --git a/package.json b/package.json index 078d38a4..cb1df3fc 100644 --- a/package.json +++ b/package.json @@ -145,5 +145,5 @@ "webpack-node-externals": "^1.7.2", "zone.js": "~0.9.1" }, - "main": "./dist/ucap-webmessenger-electron/main.js" + "main": "./electron/main.js" } diff --git a/projects/ucap-webmessenger-app/src/app/app-translate.module.ts b/projects/ucap-webmessenger-app/src/app/app-translate.module.ts index 9034d687..531600ca 100644 --- a/projects/ucap-webmessenger-app/src/app/app-translate.module.ts +++ b/projects/ucap-webmessenger-app/src/app/app-translate.module.ts @@ -19,7 +19,7 @@ export function createTranslateLoader(nativeService: NativeService) { break; case NativeType.Electron: prefix = environment.production - ? '/dist/ucap-webmessenger-app/assets/i18n/' + ? '/renderer/assets/i18n/' : '/projects/ucap-webmessenger-app/src/assets/i18n/'; break; diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.scss b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.scss index 076be47c..b02892d1 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.scss +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.scss @@ -50,6 +50,16 @@ line-height: 40px; } } + width: 50px; + height: 50px; + &.thumbnail-mask { + border-radius: 50%; + overflow: hidden; + img { + width: 50px; + height: auto; + } + } } .room-info { display: flex; diff --git a/projects/ucap-webmessenger-app/src/assets/scss/global/_default.scss b/projects/ucap-webmessenger-app/src/assets/scss/global/_default.scss index 05fd1daf..6346aee1 100644 --- a/projects/ucap-webmessenger-app/src/assets/scss/global/_default.scss +++ b/projects/ucap-webmessenger-app/src/assets/scss/global/_default.scss @@ -90,8 +90,8 @@ $lg-red: ( $aquaBlue-daesang: ( 50: #f9feff, //#e0f7fa, - 100: #b2ebf2, - 200: #4dd0e1, + /* 100: #b2ebf2,*/ 100: #ebfdff, + 200: #65e4f5, //#80deea, 300: #4dd0e1, 400: #26c6da, @@ -221,6 +221,9 @@ $daesang-grey: ( .text-primary-color { color: mat-color($primary); } + .text-accent-dark { + color: mat-color($accent, 600); + } .text-accent-darkest { color: mat-color($accent, 800); } @@ -379,4 +382,25 @@ $daesang-grey: ( background-color: mat-color($accent, B100); } } + + .message-row { + .message-main { + .bubble { + background-color: mat-color($accent, 100); + border: 1px solid mat-color($accent, 200); + overflow: hidden; + } + } + &.me { + .message-main { + .bubble { + background-color: #ffffff; + border: 1px solid mat-color($primary, 300); + .event-info { + border-radius: 0 0 0 6px; + } + } + } + } + } } diff --git a/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/schedule.component.html b/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/schedule.component.html index d4b70a6a..84d8abf8 100644 --- a/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/schedule.component.html +++ b/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/schedule.component.html @@ -1,4 +1,4 @@ -
+
- +
diff --git a/projects/ucap-webmessenger-ui-chat/src/lib/components/search.component.scss b/projects/ucap-webmessenger-ui-chat/src/lib/components/search.component.scss index 79c31be4..bfb83a0c 100644 --- a/projects/ucap-webmessenger-ui-chat/src/lib/components/search.component.scss +++ b/projects/ucap-webmessenger-ui-chat/src/lib/components/search.component.scss @@ -1,6 +1,7 @@ .chatroom-search { display: flex; flex: 1 1 auto; + justify-items: center; .search-form { flex-flow: row; flex: 1 1 auto; @@ -11,6 +12,10 @@ flex-flow: row; flex: 1 1 auto; margin-right: 20px; + .mat-form-field-label, + .mat-hint { + color: rgba(0, 0, 0, 0.54); + } } .text-amount { display: inline-flex; @@ -24,3 +29,41 @@ flex: 0 0 0%; } } + +.mat-form-field-label, +.mat-hint { + color: rgba(0, 0, 0, 0.54); +} + +::ng-deep .btns { + border: 1px solid #dddddd; + border-radius: 4px; + height: 42px; + .mat-stroked-button { + border: none; + min-width: 40px; + height: 42px; + padding: 0 10px; + &.btn-toggle { + display: flex; + border-right: 1px solid #dddddd; + justify-items: center; + &:last-child { + border-right: none; + } + .mat-button-wrapper { + display: flex; + line-height: inherit; + justify-content: center; + justify-items: center; + width: 20px; + height: 20px; + svg { + width: 100%; + height: 100%; + stroke: #555555; + } + } + } + } +} diff --git a/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/sound-viewer.component.html b/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/sound-viewer.component.html index b603f572..4a40a037 100644 --- a/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/sound-viewer.component.html +++ b/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/sound-viewer.component.html @@ -12,9 +12,20 @@ (click)="onClickDownload()" > - - + + @@ -24,8 +35,17 @@ class="ucap-image-viewer-action btn-close" (click)="onClickClose()" > - + @@ -60,7 +80,21 @@ (loadeddata)="onLoadedDataAudio()" >
- music_note + + music_note + +
+
+
+
+
+
+
+
+
+
+
+
@@ -83,7 +117,6 @@ class="ucap-sound-viewer-sound-controls" fxLayout="row" fxLayout.xs="column" - fxLayoutAlign="center center" >
{{ currentTime | ucapSecondsToMinutes }} @@ -105,4 +138,4 @@
- \ No newline at end of file + diff --git a/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/sound-viewer.component.scss b/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/sound-viewer.component.scss index 9fb05407..726d0a6e 100644 --- a/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/sound-viewer.component.scss +++ b/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/sound-viewer.component.scss @@ -13,7 +13,7 @@ } .ucap-sound-viewer-title { - font-size:16px; + font-size: 16px; } .stroke-bar { width: 1px; @@ -33,29 +33,38 @@ width: 100%; height: calc(100% - 60px); - .circle-box{ - display:flex; - width:140px; - height:140px; - border-radius:50%; + .circle-box { + position: relative; + display: flex; + width: 140px; + height: 140px; + border-radius: 50%; justify-content: center; align-items: center; - border:2px solid #ffffff; - background-color:rgba(256, 256, 256, 0.7); - .mat-icon{ + border: 2px solid #ffffff; + background-color: rgba(256, 256, 256, 0.7); + .mat-icon { font-size: 100px; height: 100px; width: 100px; } + .sound-wave { + height: 80px; + left: 50%; + margin: -35px 0 0 -35px; + position: absolute; + bottom: 30px; + width: 70px; + } } - .ucap-sound-viewer-sound-icon{ + .ucap-sound-viewer-sound-icon { width: 100%; - height: calc(100% - 80px); + height: calc(100% - 80px); } - .viewer-bottom{ + .viewer-bottom { background-color: #212121; - color:#ffffff; + color: #ffffff; .ucap-sound-viewer-sound-time { width: 100%; height: 30px; @@ -78,22 +87,83 @@ flex: 1 1 auto; } .ucap-sound-viewer-action { - .mat-icon{ + .mat-icon { font-size: 40px; width: 100%; height: 100%; - line-height:40px; + line-height: 50px; } } } +.sound-bar { + bottom: 1px; + height: 10px; + position: absolute; + width: 5px; + animation: sound-play 0ms -800ms linear infinite alternate; +} +.sound-bar:nth-child(1) { + left: 0px; + animation-duration: 474ms; +} +.sound-bar:nth-child(2) { + left: 7px; + animation-duration: 433ms; +} +.sound-bar { + left: 14px; + animation-duration: 407ms; +} +.sound-bar:nth-child(4) { + left: 21px; + animation-duration: 458ms; +} +.sound-bar:nth-child(5) { + left: 28px; + animation-duration: 400ms; +} +.sound-bar:nth-child(6) { + left: 35px; + animation-duration: 427ms; +} +.sound-bar:nth-child(7) { + left: 42px; + animation-duration: 441ms; +} +.sound-bar:nth-child(8) { + left: 49px; + animation-duration: 419ms; +} +.sound-bar:nth-child(9) { + left: 56px; + animation-duration: 487ms; +} +.sound-bar:nth-child(10) { + left: 63px; + animation-duration: 442ms; +} + +@keyframes sound-play { + 0% { + opacity: 0.35; + height: 10px; + } + 100% { + opacity: 1; + height: 60px; + } +} + mat-slider { width: 94%; } -::ng-deep .mat-slider-horizontal .mat-slider-track-background{ +::ng-deep .mat-slider-horizontal .mat-slider-track-background { background-color: #999999 !important; } -::ng-deep .mat-slider-min-value:not(.mat-slider-thumb-label-showing) .mat-slider-thumb{ +::ng-deep + .mat-slider-min-value:not(.mat-slider-thumb-label-showing) + .mat-slider-thumb { border-color: #999999 !important; -} \ No newline at end of file +}