diff --git a/build/extension.js b/build/extension.js index 13aa5bec8..9132a4dc9 100644 --- a/build/extension.js +++ b/build/extension.js @@ -7,8 +7,8 @@ const HtmlWebpackPlugin = require('html-webpack-plugin') const CopyPlugin = require('copy-webpack-plugin') const ZipPlugin = require('zip-webpack-plugin') -module.exports = (env={}, args={}) => { - const outputPath = path.resolve(__dirname, '..', 'dist', env.vendor, env.production?'prod':'dev') +module.exports = (env = {}, args = {}) => { + const outputPath = path.resolve(__dirname, '..', 'dist', env.vendor, env.production ? 'prod' : 'dev') env.filename = '[name]' @@ -37,7 +37,7 @@ module.exports = (env={}, args={}) => { output: { path: outputPath, - filename: ({ chunk: { name } }) => name=='background' ? 'background.js' : `assets/${env.filename}.js`, + filename: ({ chunk: { name } }) => name == 'background' ? 'background.js' : `assets/${env.filename}.js`, chunkFilename: `assets/${env.filename}.js`, publicPath: '', globalObject: 'globalThis', @@ -82,7 +82,7 @@ module.exports = (env={}, args={}) => { ...(env.production ? [ new ZipPlugin({ path: '../../', - filename: `${env.vendor}-${env.production?'prod':'dev'}.zip`, + filename: `${env.vendor}-${env.production ? 'prod' : 'dev'}.zip`, exclude: [] }) ] : []) @@ -90,7 +90,7 @@ module.exports = (env={}, args={}) => { module: { rules: [{ - test: /manifest\/index\.js$/, + test: /manifest[\\/]index\.js$/, use: [ { loader: 'file-loader', diff --git a/src/data/sagas/collections/items.js b/src/data/sagas/collections/items.js index 97bff0c63..3aa745eba 100755 --- a/src/data/sagas/collections/items.js +++ b/src/data/sagas/collections/items.js @@ -54,7 +54,7 @@ export function* loadCollections({ ignore=false, onSuccess, onFail }) { const state = yield select() const defColls = state.collections.defaults.map((item)=>{ var count = 0 - // var view = user?.config?.default_collection_view || 'list' + var view = item.view || user?.config?.default_collection_view || 'list' //count if (stat.items){ @@ -65,7 +65,7 @@ export function* loadCollections({ ignore=false, onSuccess, onFail }) { return item .set('count', count) - // .set('view', view) + .set('view', view) }) yield put({