OSDN Git Service

v2.8.1
authorAoichaan0513 <aoichaan0513@gmail.com>
Sun, 16 Jun 2019 17:24:52 +0000 (02:24 +0900)
committerAoichaan0513 <aoichaan0513@gmail.com>
Sun, 16 Jun 2019 17:24:52 +0000 (02:24 +0900)
・メニューから拡大・縮小に対応
・アプリケーションがすでに開いている場合、新たなインスタンスを開かずに、新しいウィンドウを開くように変更
・ライブラリの追加
・その他バグ・不具合の修正

14 files changed:
app/electron/Application.js
app/electron/Starter.js
app/electron/WindowManager.js
app/langs/en.js
app/langs/ja.js
app/package.json
app/src/Windows/BrowserWindow.js
app/static/fullscreen.png [new file with mode: 0644]
app/static/fullscreen@2x.png [new file with mode: 0644]
app/static/zoom_in.png [new file with mode: 0644]
app/static/zoom_in@2x.png [new file with mode: 0644]
app/static/zoom_out.png [new file with mode: 0644]
app/static/zoom_out@2x.png [new file with mode: 0644]
package.json

index 610ba98..7a70270 100644 (file)
@@ -16,6 +16,8 @@ const config = require('./Config');
 const WindowManager = require('./WindowManager');
 const windowManager = new WindowManager();
 
+const singleInstance = app.requestSingleInstanceLock();
+
 let loginCallback;
 let mainWindow;
 let subWindow;
@@ -34,7 +36,7 @@ getBaseWindow = (width = 1100, height = 680, minWidth = 500, minHeight = 360, x,
 }
 
 module.exports = class Application {
-    loadWindow = () => {
+    loadApplication = () => {
         protocol.registerSchemesAsPrivileged([
             { scheme: protocolStr, privileges: { standard: true, bypassCSP: true, secure: true } },
             { scheme: fileProtocolStr, privileges: { standard: false, bypassCSP: true, secure: true } }
@@ -59,53 +61,59 @@ module.exports = class Application {
             console.log('Update downloaded.');
         });
 
-        app.on('ready', () => {
-            process.env.GOOGLE_API_KEY = config.googleAPIKey;
-
-            app.setAppUserModelId(pkg.flast_package_id);
-            session.defaultSession.setUserAgent(session.defaultSession.getUserAgent().replace(/ Electron\/[0-9\.]*/g, ''));
-
-            autoUpdater.checkForUpdatesAndNotify();
-            Menu.setApplicationMenu(null);
-
-            windowManager.addWindow();
-            // this.loadExtension('gmngpagflejjoblmmamaonmnkghjmebh');
-            // this.loadExtension('bdiadchoogngocfifcomfeakccmcecee');
-        });
-
-        app.on('window-all-closed', () => {
-            if (process.platform !== 'darwin') {
-                app.quit();
-            }
-        });
-
-        app.on('activate', () => {
-        });
-
-        app.on('login', (e, webContents, request, authInfo, callback) => {
-            e.preventDefault();
-
-            subWindow = getBaseWindow(320, 230, 320, 230);
-            // subWindow.setParentWindow(mainWindow);
-            subWindow.setMovable(false);
-            subWindow.setResizable(false);
-            subWindow.setMinimizable(false);
-            subWindow.setMaximizable(false);
-            const startUrl = process.env.ELECTRON_START_URL || url.format({
-                pathname: path.join(__dirname, '/../build/index.html'),
-                protocol: 'file:',
-                slashes: true,
-                hash: '/authentication',
+        if (!singleInstance) {
+            app.quit();
+        } else {
+            app.on('second-instance', (e, line, directory) => {
+                windowManager.addWindow();
             });
 
-            subWindow.loadURL(startUrl);
-            loginCallback = callback;
-        });
-
-        ipcMain.on('authorization', (event, arg) => {
-            loginCallback(arg.username, arg.password);
-            subWindow.close();
-        });
+            app.on('ready', () => {
+                process.env.GOOGLE_API_KEY = config.googleAPIKey;
+    
+                app.setAppUserModelId(pkg.flast_package_id);
+                session.defaultSession.setUserAgent(session.defaultSession.getUserAgent().replace(/ Electron\/[0-9\.]*/g, ''));
+    
+                autoUpdater.checkForUpdatesAndNotify();
+                Menu.setApplicationMenu(null);
+    
+                windowManager.addWindow();
+            });
+    
+            app.on('window-all-closed', () => {
+                if (process.platform !== 'darwin') {
+                    app.quit();
+                }
+            });
+    
+            app.on('activate', () => {
+            });
+    
+            app.on('login', (e, webContents, request, authInfo, callback) => {
+                e.preventDefault();
+    
+                subWindow = getBaseWindow(320, 230, 320, 230);
+                // subWindow.setParentWindow(mainWindow);
+                subWindow.setMovable(false);
+                subWindow.setResizable(false);
+                subWindow.setMinimizable(false);
+                subWindow.setMaximizable(false);
+                const startUrl = process.env.ELECTRON_START_URL || url.format({
+                    pathname: path.join(__dirname, '/../build/index.html'),
+                    protocol: 'file:',
+                    slashes: true,
+                    hash: '/authentication',
+                });
+    
+                subWindow.loadURL(startUrl);
+                loginCallback = callback;
+            });
+    
+            ipcMain.on('authorization', (event, arg) => {
+                loginCallback(arg.username, arg.password);
+                subWindow.close();
+            });
+        }
     }
 
     loadExtension = (id) => {
@@ -114,8 +122,6 @@ module.exports = class Application {
         const versions = fs.readdirSync(`${extensionDir}/${id}`).sort();
         const version = versions.pop();
 
-        // BrowserWindow.addExtension(`${extensionDir}/${id}/${version}`);
-        // BrowserWindow.addDevToolsExtension(`${extensionDir}/${id}/${version}`);
         extensionsMain.setSession(session.defaultSession);
         extensionsMain.load(`${extensionDir}/${id}/${version}`);
     }
index 46883e1..8595621 100644 (file)
@@ -1,4 +1,4 @@
 const Application = require('./Application');
 
 global.Application = new Application();
-global.Application.loadWindow();
\ No newline at end of file
+global.Application.loadApplication();
\ No newline at end of file
index 2154acd..e79d9c0 100644 (file)
@@ -389,6 +389,10 @@ module.exports = class WindowManager {
         ipcMain.on('window-add', (e, args) => {
             this.addWindow(args.isPrivate);
         });
+        
+        ipcMain.on('window-fullScreen', (e, args) => {
+            this.addWindow(args.isPrivate);
+        });
 
         ipcMain.on('window-fixBounds', (e, args) => {
             this.windows.forEach((value, key) => {
@@ -568,6 +572,13 @@ module.exports = class WindowManager {
             view.webContents.reloadIgnoringCache();
         });
 
+        localShortcut.register(window, 'F11', () => {
+            const window = this.windows.get(id);
+            
+            window.setFullScreen(!window.isFullScreen());
+            this.fixBounds(id, (floatingWindows.indexOf(id) != -1));
+        })
+
         this.windows.set(id, window);
 
         if (process.argv != undefined) {
@@ -576,19 +587,26 @@ module.exports = class WindowManager {
     }
 
     registerListeners = (id) => {
-        ipcMain.on(`browserview-add-${id}`, (e, args) => {
+        ipcMain.on(`window-fullScreen-${id}`, (e, args) => {
+            const window = this.windows.get(id);
+            
+            window.setFullScreen(!window.isFullScreen());
+            this.fixBounds(id, (floatingWindows.indexOf(id) != -1));
+        });
+
+        ipcMain.on(`browserView-add-${id}`, (e, args) => {
             this.addView(id, args.url, args.isActive);
         });
 
-        ipcMain.on(`browserview-remove-${id}`, (e, args) => {
+        ipcMain.on(`browserView-remove-${id}`, (e, args) => {
             this.removeView(id, args.id);
         });
 
-        ipcMain.on(`browserview-select-${id}`, (e, args) => {
+        ipcMain.on(`browserView-select-${id}`, (e, args) => {
             this.selectView(id, args.id);
         });
 
-        ipcMain.on(`browserview-get-${id}`, (e, args) => {
+        ipcMain.on(`browserView-get-${id}`, (e, args) => {
             let datas = [];
 
             views[id].map((item) => {
@@ -596,10 +614,10 @@ module.exports = class WindowManager {
 
                 datas.push({ id: item.view.webContents.id, title: item.view.webContents.getTitle(), url, icon: this.getFavicon(url), color: '#0a84ff', isBookmarked: false });
             });
-            e.sender.send(`browserview-get-${id}`, { views: datas });
+            e.sender.send(`browserView-get-${id}`, { views: datas });
         });
 
-        ipcMain.on(`browserview-goBack-${id}`, (e, args) => {
+        ipcMain.on(`browserView-goBack-${id}`, (e, args) => {
             views[id].filter(function (view, i) {
                 if (view.view.webContents.id == args.id) {
                     let webContents = views[id][i].view.webContents;
@@ -609,7 +627,7 @@ module.exports = class WindowManager {
             });
         });
 
-        ipcMain.on(`browserview-goForward-${id}`, (e, args) => {
+        ipcMain.on(`browserView-goForward-${id}`, (e, args) => {
             views[id].filter(function (view, i) {
                 if (view.view.webContents.id == args.id) {
                     let webContents = views[id][i].view.webContents;
@@ -619,7 +637,7 @@ module.exports = class WindowManager {
             });
         });
 
-        ipcMain.on(`browserview-reload-${id}`, (e, args) => {
+        ipcMain.on(`browserView-reload-${id}`, (e, args) => {
             views[id].filter(function (view, i) {
                 if (view.view.webContents.id == args.id) {
                     let webContents = views[id][i].view.webContents;
@@ -628,7 +646,7 @@ module.exports = class WindowManager {
             });
         });
 
-        ipcMain.on(`browserview-stop-${id}`, (e, args) => {
+        ipcMain.on(`browserView-stop-${id}`, (e, args) => {
             views[id].filter(function (view, i) {
                 if (view.view.webContents.id == args.id) {
                     let webContents = views[id][i].view.webContents;
@@ -637,7 +655,7 @@ module.exports = class WindowManager {
             });
         });
 
-        ipcMain.on(`browserview-goHome-${id}`, (e, args) => {
+        ipcMain.on(`browserView-goHome-${id}`, (e, args) => {
             views[id].filter(function (view, i) {
                 if (view.view.webContents.id == args.id) {
                     let webContents = views[id][i].view.webContents;
@@ -646,7 +664,7 @@ module.exports = class WindowManager {
             });
         });
 
-        ipcMain.on(`browserview-loadURL-${id}`, (e, args) => {
+        ipcMain.on(`browserView-loadURL-${id}`, (e, args) => {
             views[id].filter(function (view, i) {
                 if (view.view.webContents.id == args.id) {
                     let webContents = views[id][i].view.webContents;
@@ -655,7 +673,7 @@ module.exports = class WindowManager {
             });
         });
 
-        ipcMain.on(`browserview-loadFile-${id}`, (e, args) => {
+        ipcMain.on(`browserView-loadFile-${id}`, (e, args) => {
             views[id].filter(function (view, i) {
                 if (view.view.webContents.id == args.id) {
                     let webContents = views[id][i].view.webContents;
@@ -664,6 +682,26 @@ module.exports = class WindowManager {
             });
         });
 
+        ipcMain.on(`browserView-zoomIn-${id}`, (e, args) => {
+            views[id].filter(function (view, i) {
+                if (view.view.webContents.id == args.id) {
+                    let webContents = views[id][i].view.webContents;
+                    console.log(webContents.getZoomFactor());
+                    webContents.setZoomFactor(webContents.getZoomFactor() + 0.1);
+                }
+            });
+        });
+
+        ipcMain.on(`browserView-zoomOut-${id}`, (e, args) => {
+            views[id].filter(function (view, i) {
+                if (view.view.webContents.id == args.id) {
+                    let webContents = views[id][i].view.webContents;
+                    console.log(webContents.getZoomFactor());
+                    webContents.setZoomFactor(webContents.getZoomFactor() - 0.1);
+                }
+            });
+        });
+
         ipcMain.on(`data-bookmark-add-${id}`, (e, args) => {
             views[id].filter((view, i) => {
                 if (view.view.webContents.id == args.id) {
@@ -715,7 +753,7 @@ module.exports = class WindowManager {
         db.bookmarks.find({ url: view.webContents.getURL(), isPrivate: (String(id).startsWith('private')) }, (err, docs) => {
             const url = view.webContents.getURL();
 
-            window.webContents.send(`browserview-load-${id}`, { id: view.webContents.id, title: view.webContents.getTitle(), url: url, icon: this.getFavicon(url), color: '#0a84ff', isAudioPlaying: !view.webContents.isCurrentlyAudible(), isBookmarked: (docs.length > 0 ? true : false) });
+            window.webContents.send(`browserView-load-${id}`, { id: view.webContents.id, title: view.webContents.getTitle(), url: url, icon: this.getFavicon(url), color: '#0a84ff', isAudioPlaying: !view.webContents.isCurrentlyAudible(), isBookmarked: (docs.length > 0 ? true : false) });
         });
     }
 
@@ -878,7 +916,7 @@ module.exports = class WindowManager {
                 this.updateNavigationState(windowId, item.view);
                 this.updateViewState(windowId, item.view);
 
-                window.webContents.send(`browserview-set-${windowId}`, { id: id });
+                window.webContents.send(`browserView-set-${windowId}`, { id: id });
                 this.fixBounds(windowId, (floatingWindows.indexOf(windowId) != -1));
             }
         });
@@ -890,7 +928,7 @@ module.exports = class WindowManager {
 
         window.setBrowserView(item.view);
         window.setTitle(`${item.view.webContents.getTitle()} - ${pkg.name}`);
-        window.webContents.send(`browserview-set-${windowId}`, { id: item.id });
+        window.webContents.send(`browserView-set-${windowId}`, { id: item.id });
         this.fixBounds(windowId, (floatingWindows.indexOf(windowId) != -1));
     }
 
@@ -902,7 +940,7 @@ module.exports = class WindowManager {
             datas.push({ id: views[windowId][i].view.webContents.id, title: views[windowId][i].view.webContents.getTitle(), url: url, icon: this.getFavicon(url) });
         }
         const window = this.windows.get(windowId);
-        window.webContents.send(`browserview-get-${windowId}`, { views: datas });
+        window.webContents.send(`browserView-get-${windowId}`, { views: datas });
     }
 
     addTab = (windowId, url = config.get('homePage.defaultPage'), isActive = true) => {
@@ -919,6 +957,8 @@ module.exports = class WindowManager {
             }
         });
 
+        view.webContents.setVisualZoomLevelLimits(1, 3);
+
         const window = this.windows.get(windowId);
         const id = view.webContents.id;
 
@@ -930,12 +970,12 @@ module.exports = class WindowManager {
         view.webContents.on('did-start-loading', () => {
             if (view.isDestroyed()) return;
 
-            window.webContents.send(`browserview-start-loading-${windowId}`, { id: id });
+            window.webContents.send(`browserView-start-loading-${windowId}`, { id: id });
         });
         view.webContents.on('did-stop-loading', () => {
             if (view.isDestroyed()) return;
 
-            window.webContents.send(`browserview-stop-loading-${windowId}`, { id: id });
+            window.webContents.send(`browserView-stop-loading-${windowId}`, { id: id });
         });
 
         view.webContents.on('did-start-navigation', (e) => {
@@ -980,7 +1020,7 @@ module.exports = class WindowManager {
             viewId = this.getRandString(12);
 
             this.getCertificate(view.webContents.getURL()).then((certificate) => {
-                window.webContents.send(`browserview-certificate-${windowId}`, { id, certificate });
+                window.webContents.send(`browserView-certificate-${windowId}`, { id, certificate });
             });
 
             window.setTitle(`${view.webContents.getTitle()} - ${pkg.name}`);
@@ -1027,7 +1067,7 @@ module.exports = class WindowManager {
             this.updateViewState(windowId, view);
             this.updateNavigationState(windowId, view);
 
-            window.webContents.send(`browserview-theme-color-${windowId}`, { id: view.webContents.id, color });
+            window.webContents.send(`browserView-theme-color-${windowId}`, { id: view.webContents.id, color });
         });
 
         view.webContents.on('update-target-url', (e, url) => {
@@ -1550,7 +1590,7 @@ module.exports = class WindowManager {
         views[windowId].push({ id, view, isNotificationBar: false });
 
         if (isActive) {
-            window.webContents.send(`browserview-set-${windowId}`, { id: id });
+            window.webContents.send(`browserView-set-${windowId}`, { id: id });
             window.setBrowserView(view);
         }
 
index a3d2df5..5c22a02 100644 (file)
@@ -56,11 +56,17 @@ module.exports = {
                     newTab: 'New tab',
                     newWindow: 'New window',
                     openPrivateWindow: 'Open Private window',
+                    zoom: {
+                        name: 'Zoom',
+                        zoomIn: 'Zoom in',
+                        zoomOut: 'Zoom out',
+                        fullScreen: 'Full Screen'
+                    },
                     history: 'History',
                     downloads: 'Downloads',
                     bookmarks: 'Bookmarks',
                     app: {
-                        app: 'Application',
+                        name: 'Application',
                         list: 'App list',
                         store: 'Flast Store',
                         install: 'Install {title}',
index 59889ec..f5ba900 100644 (file)
@@ -56,6 +56,12 @@ module.exports = {
                     newTab: '新しいタブ',
                     newWindow: '新しいウィンドウ',
                     openPrivateWindow: 'プライベート ウィンドウを開く',
+                    zoom: {
+                        name: 'ズーム',
+                        zoomIn: '拡大',
+                        zoomOut: '縮小',
+                        fullScreen: '全画面表示'
+                    },
                     history: '履歴',
                     downloads: 'ダウンロード',
                     bookmarks: 'ブックマーク',
index b9b7806..458282e 100644 (file)
@@ -1,7 +1,7 @@
 {
        "name": "Flast",
        "description": "Cross-platform browser based on Chromium.",
-       "version": "2.7.4",
+       "version": "2.8.1",
        "flast_channel": "Stable",
        "flast_package_id": "org.aoichaan0513.Flast",
        "private": true,
index c7afa1c..da8e1ab 100644 (file)
@@ -171,20 +171,20 @@ class BrowserView extends Component {
                });
                */
 
-               ipcRenderer.on(`browserview-start-loading-${this.props.windowId}`, (e, args) => {
+               ipcRenderer.on(`browserView-start-loading-${this.props.windowId}`, (e, args) => {
                        if (args.id === this.props.index) {
                                this.setState({ isLoading: true });
                                this.blockCount = 0;
                        }
                });
 
-               ipcRenderer.on(`browserview-stop-loading-${this.props.windowId}`, (e, args) => {
+               ipcRenderer.on(`browserView-stop-loading-${this.props.windowId}`, (e, args) => {
                        if (args.id === this.props.index) {
                                this.setState({ isLoading: false });
                        }
                });
 
-               ipcRenderer.on(`browserview-load-${this.props.windowId}`, (e, args) => {
+               ipcRenderer.on(`browserView-load-${this.props.windowId}`, (e, args) => {
                        if (args.id === this.props.index) {
                                this.props.updateTab();
                                this.setState({ viewUrl: args.url, isBookmarked: args.isBookmarked });
@@ -193,7 +193,7 @@ class BrowserView extends Component {
                        }
                });
 
-               ipcRenderer.on(`browserview-certificate-${this.props.windowId}`, (e, args) => {
+               ipcRenderer.on(`browserView-certificate-${this.props.windowId}`, (e, args) => {
                        if (args.id === this.props.index) {
                                this.setState({ certificate: args.certificate });
                        }
@@ -211,7 +211,7 @@ class BrowserView extends Component {
                        }
                });
 
-               ipcRenderer.on(`browserview-permission-${this.props.windowId}`, (e, args) => {
+               ipcRenderer.on(`browserView-permission-${this.props.windowId}`, (e, args) => {
                        if (args.id === this.props.index) {
                                const toolTip = findDOMNode(this.infomationTooltip)._tippy;
                                toolTip.setContent(args.content);
@@ -240,16 +240,16 @@ class BrowserView extends Component {
                if (this.state.barText.length > 0 || this.state.barText !== '') {
                        this.setState({ isInputed: false });
                        if (isURL(this.state.barText) && !this.state.barText.includes('://')) {
-                               ipcRenderer.send(`browserview-loadURL-${this.props.windowId}`, { id: this.props.index, url: `http://${this.state.barText}` });
+                               ipcRenderer.send(`browserView-loadURL-${this.props.windowId}`, { id: this.props.index, url: `http://${this.state.barText}` });
                        } else if (!this.state.barText.includes('://')) {
-                               ipcRenderer.send(`browserview-loadURL-${this.props.windowId}`, { id: this.props.index, url: this.getSearchEngine().url.replace('%s', this.state.barText) });
+                               ipcRenderer.send(`browserView-loadURL-${this.props.windowId}`, { id: this.props.index, url: this.getSearchEngine().url.replace('%s', this.state.barText) });
                        } else {
                                const pattern = /^(file:\/\/\S.*)\S*$/;
 
                                if (pattern.test(this.state.barText)) {
-                                       ipcRenderer.send(`browserview-loadFile-${this.props.windowId}`, { id: this.props.index, url: this.state.barText.replace('file:///', '') });
+                                       ipcRenderer.send(`browserView-loadFile-${this.props.windowId}`, { id: this.props.index, url: this.state.barText.replace('file:///', '') });
                                } else {
-                                       ipcRenderer.send(`browserview-loadURL-${this.props.windowId}`, { id: this.props.index, url: this.state.barText });
+                                       ipcRenderer.send(`browserView-loadURL-${this.props.windowId}`, { id: this.props.index, url: this.state.barText });
                                }
                        }
                } else {
@@ -309,23 +309,23 @@ class BrowserView extends Component {
        }
 
        goBack = () => {
-               ipcRenderer.send(`browserview-goBack-${this.props.windowId}`, { id: this.props.index });
+               ipcRenderer.send(`browserView-goBack-${this.props.windowId}`, { id: this.props.index });
        }
 
        goForward = () => {
-               ipcRenderer.send(`browserview-goForward-${this.props.windowId}`, { id: this.props.index });
+               ipcRenderer.send(`browserView-goForward-${this.props.windowId}`, { id: this.props.index });
        }
 
        reload = () => {
                if (!this.state.isLoading) {
-                       ipcRenderer.send(`browserview-reload-${this.props.windowId}`, { id: this.props.index });
+                       ipcRenderer.send(`browserView-reload-${this.props.windowId}`, { id: this.props.index });
                } else {
-                       ipcRenderer.send(`browserview-stop-${this.props.windowId}`, { id: this.props.index });
+                       ipcRenderer.send(`browserView-stop-${this.props.windowId}`, { id: this.props.index });
                }
        }
 
        goHome = () => {
-               ipcRenderer.send(`browserview-goHome-${this.props.windowId}`, { id: this.props.index });
+               ipcRenderer.send(`browserView-goHome-${this.props.windowId}`, { id: this.props.index });
        }
 
        certificate = () => {
@@ -370,7 +370,7 @@ class BrowserView extends Component {
                ]);
                menu.popup({
                        x: remote.getCurrentWindow().getSize()[0] - 57,
-                       y: 65
+                       y: 67
                });
        }
 
@@ -393,6 +393,29 @@ class BrowserView extends Component {
                        },
                        { type: 'separator' },
                        {
+                               label: lang.window.toolBar.menu.menus.zoom.name,
+                               type: 'submenu',
+                               submenu: [
+                                       {
+                                               label: lang.window.toolBar.menu.menus.zoom.zoomIn,
+                                               icon: `${app.getAppPath()}/static/zoom_in.png`,
+                                               click: () => { ipcRenderer.send(`browserView-zoomIn-${this.props.windowId}`, { id: this.props.index }); }
+                                       },
+                                       {
+                                               label: lang.window.toolBar.menu.menus.zoom.zoomOut,
+                                               icon: `${app.getAppPath()}/static/zoom_out.png`,
+                                               click: () => { ipcRenderer.send(`browserView-zoomOut-${this.props.windowId}`, { id: this.props.index }); }
+                                       },
+                                       { type: 'separator' },
+                                       {
+                                               label: lang.window.toolBar.menu.menus.zoom.fullScreen,
+                                               icon: `${app.getAppPath()}/static/fullscreen.png`,
+                                               click: () => { ipcRenderer.send(`window-fullScreen-${this.props.windowId}`, {}); }
+                                       }
+                               ]
+                       },
+                       { type: 'separator' },
+                       {
                                label: lang.window.toolBar.menu.menus.history,
                                icon: `${app.getAppPath()}/static/history.png`,
                                click: () => { this.props.addTab(`${protocolStr}://history/`); }
@@ -457,7 +480,7 @@ class BrowserView extends Component {
                ]);
                menu.popup({
                        x: remote.getCurrentWindow().getSize()[0] - 24,
-                       y: 65
+                       y: 67
                });
        }
 
@@ -536,11 +559,11 @@ class BrowserWindow extends Component {
                        this.addTab(args.url);
                });
 
-               ipcRenderer.on(`browserview-get-${this.props.match.params.windowId}`, (e, args) => {
+               ipcRenderer.on(`browserView-get-${this.props.match.params.windowId}`, (e, args) => {
                        this.setState({ tabs: args.views });
                });
 
-               ipcRenderer.on(`browserview-set-${this.props.match.params.windowId}`, (e, args) => {
+               ipcRenderer.on(`browserView-set-${this.props.match.params.windowId}`, (e, args) => {
                        this.setState({ current: args.id });
                });
        }
@@ -582,18 +605,18 @@ class BrowserWindow extends Component {
        }
 
        getTabs = () => {
-               ipcRenderer.send(`browserview-get-${this.props.match.params.windowId}`, {});
+               ipcRenderer.send(`browserView-get-${this.props.match.params.windowId}`, {});
        }
 
        addTab = (url = (config.get('homePage.isDefaultHomePage') ? `${protocolStr}://home/` : config.get('homePage.defaultPage'))) => {
-               ipcRenderer.send(`browserview-add-${this.props.match.params.windowId}`, { url, isActive: true });
-               ipcRenderer.send(`browserview-get-${this.props.match.params.windowId}`, {});
+               ipcRenderer.send(`browserView-add-${this.props.match.params.windowId}`, { url, isActive: true });
+               ipcRenderer.send(`browserView-get-${this.props.match.params.windowId}`, {});
                this.setState({ current: this.state.tabs.length });
        }
 
        removeTab = (i) => {
-               ipcRenderer.send(`browserview-remove-${this.props.match.params.windowId}`, { id: i });
-               ipcRenderer.send(`browserview-get-${this.props.match.params.windowId}`, {});
+               ipcRenderer.send(`browserView-remove-${this.props.match.params.windowId}`, { id: i });
+               ipcRenderer.send(`browserView-get-${this.props.match.params.windowId}`, {});
 
                this.forceUpdate();
                if ((this.state.tabs.length - 1) < 1) {
@@ -602,7 +625,7 @@ class BrowserWindow extends Component {
        }
 
        updateTab = () => {
-               ipcRenderer.send(`browserview-get-${this.props.match.params.windowId}`, {});
+               ipcRenderer.send(`browserView-get-${this.props.match.params.windowId}`, {});
        }
 
        getForegroundColor = (hexColor) => {
@@ -662,7 +685,7 @@ class BrowserWindow extends Component {
                                                <TabContainer ref={ref => { this.tabContainer = ref; }}>
                                                        {this.state.tabs.map((tab, i) => {
                                                                return (
-                                                                       <Tab isDarkModeOrPrivateMode={config.get('design.isDarkTheme') || String(this.props.match.params.windowId).startsWith('private')} isActive={tab.id === this.state.current} isFixed={tab.fixed} accentColor={tab.color} onClick={() => { ipcRenderer.send(`browserview-select-${this.props.match.params.windowId}`, { id: tab.id }); this.forceUpdate(); }} onContextMenu={this.handleContextMenu.bind(this, tab.id)}>
+                                                                       <Tab isDarkModeOrPrivateMode={config.get('design.isDarkTheme') || String(this.props.match.params.windowId).startsWith('private')} isActive={tab.id === this.state.current} isFixed={tab.fixed} accentColor={tab.color} onClick={() => { ipcRenderer.send(`browserView-select-${this.props.match.params.windowId}`, { id: tab.id }); this.forceUpdate(); }} onContextMenu={this.handleContextMenu.bind(this, tab.id)}>
                                                                                <TabIcon src={tab.icon !== undefined ? tab.icon : (config.get('design.isDarkTheme') || String(this.props.match.params.windowId).startsWith('private') ? DarkPublicIcon : LightPublicIcon)} width={18} height={18} />
                                                                                <TabTitle color={this.getForegroundColor(!config.get('design.isDarkTheme') || !String(this.props.match.params.windowId).startsWith('private') ? (platform.isWin32 || platform.isDarwin ? `#${systemPreferences.getAccentColor()}` : '#353535') : '#353535')} isAudioPlaying={tab.isAudioPlaying} isFixed={tab.fixed} title={tab.title}>{tab.title}</TabTitle>
                                                                                <TabCloseButton isActive={tab.id === this.state.current} isFixed={tab.fixed} isRight={true} src={this.isDarkModeOrPrivateMode.bind(this, LightCloseIcon, DarkCloseIcon)} size={14} title={lang.window.titleBar.tab.close} onClick={() => { this.removeTab(tab.id); this.forceUpdate(); }} />
diff --git a/app/static/fullscreen.png b/app/static/fullscreen.png
new file mode 100644 (file)
index 0000000..106bfd1
Binary files /dev/null and b/app/static/fullscreen.png differ
diff --git a/app/static/fullscreen@2x.png b/app/static/fullscreen@2x.png
new file mode 100644 (file)
index 0000000..909007b
Binary files /dev/null and b/app/static/fullscreen@2x.png differ
diff --git a/app/static/zoom_in.png b/app/static/zoom_in.png
new file mode 100644 (file)
index 0000000..f589a00
Binary files /dev/null and b/app/static/zoom_in.png differ
diff --git a/app/static/zoom_in@2x.png b/app/static/zoom_in@2x.png
new file mode 100644 (file)
index 0000000..d8f2ca7
Binary files /dev/null and b/app/static/zoom_in@2x.png differ
diff --git a/app/static/zoom_out.png b/app/static/zoom_out.png
new file mode 100644 (file)
index 0000000..d8f3332
Binary files /dev/null and b/app/static/zoom_out.png differ
diff --git a/app/static/zoom_out@2x.png b/app/static/zoom_out@2x.png
new file mode 100644 (file)
index 0000000..f9b0c23
Binary files /dev/null and b/app/static/zoom_out@2x.png differ
index c9c197d..4ffca24 100644 (file)
@@ -1,7 +1,7 @@
 {
        "name": "Flast",
        "description": "Cross-platform browser based on Chromium.",
-       "version": "2.7.4",
+       "version": "2.8.1",
        "flast_channel": "Stable",
        "flast_package_id": "org.aoichaan0513.Flast",
        "private": true,