Skip to content

Commit 795c755

Browse files
committed
some typos fixed
1 parent 974f5c0 commit 795c755

File tree

3 files changed

+16
-6
lines changed

3 files changed

+16
-6
lines changed

src/main/js/constants/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ export default {
1313
lulumiPreloadPath: `${lulumiHelperPath}/preload`,
1414
lulumiPagesPath: `${lulumiHelperPath}/pages`,
1515
lulumiPDFJSPath: `${lulumiHelperPath}/pdfjs`,
16-
lulumiRev: 'dfe8d84ca60e9bce61309d095e30f8868b988c6f',
16+
lulumiRev: '974f5c0552b9267c277de2f68e7a2c350435eca9',
1717
};

src/renderer/components/BrowserMainView/Navbar.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@
249249
newElement.removeEventListener('click', this.clickHandler, false);
250250
originalInput.removeEventListener('blur', this.blurHandler, false);
251251
}
252+
this.$refs.input.suggestions = [];
252253
}
253254
},
254255
},

src/renderer/store/modules/browser.js

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,21 @@ const mutations = {
110110
state.pages[payload.pageIndex].canRefresh = true;
111111
},
112112
[types.DID_STOP_LOADING](state, payload) {
113+
const regexp = new RegExp('^lulumi(-extension)?://.+$');
113114
const url = payload.webview.getURL();
114115
state.pages[payload.pageIndex].location = decodeURIComponent(url);
115-
if (url.startsWith(config.lulumiPagesCustomProtocol)) {
116-
const guestUrl = require('url').parse(url);
117-
const guestHash = guestUrl.hash.substr(2);
118-
state.pages[payload.pageIndex].title = `${guestUrl.host} : ${guestHash === '' ? 'about' : guestHash}`;
119-
state.pages[payload.pageIndex].location = decodeURIComponent(url);
116+
if (url.match(regexp)) {
117+
if (url.match(regexp)[1] === undefined) {
118+
const guestUrl = require('url').parse(url);
119+
const guestHash = guestUrl.hash.substr(2);
120+
state.pages[payload.pageIndex].title = `${guestUrl.host} : ${guestHash === '' ? 'about' : guestHash}`;
121+
state.pages[payload.pageIndex].location = decodeURIComponent(url);
122+
} else {
123+
state.pages[payload.pageIndex].statusText = false;
124+
state.pages[payload.pageIndex].canGoBack = payload.webview.canGoBack();
125+
state.pages[payload.pageIndex].canGoForward = payload.webview.canGoForward();
126+
state.pages[payload.pageIndex].isLoading = false;
127+
}
120128
state.pages[payload.pageIndex].favicon = config.tabConfig.lulumiFavicon;
121129
} else {
122130
if (!state.pages[payload.pageIndex].title) {
@@ -125,6 +133,7 @@ const mutations = {
125133
if (!state.pages[payload.pageIndex].favicon) {
126134
state.pages[payload.pageIndex].favicon = config.tabConfig.defaultFavicon;
127135
}
136+
// history
128137
if (state.pages[payload.pageIndex].title !== 'error') {
129138
if (state.history.length !== 0) {
130139
if (state.history[state.history.length - 1].url

0 commit comments

Comments
 (0)