Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions build/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]'

Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -82,15 +82,15 @@ 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: []
})
] : [])
],

module: {
rules: [{
test: /manifest\/index\.js$/,
test: /manifest[\\/]index\.js$/,
use: [
{
loader: 'file-loader',
Expand Down
4 changes: 2 additions & 2 deletions src/data/sagas/collections/items.js
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand All @@ -65,7 +65,7 @@ export function* loadCollections({ ignore=false, onSuccess, onFail }) {

return item
.set('count', count)
// .set('view', view)
.set('view', view)
})

yield put({
Expand Down