mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-28 18:00:09 +00:00
reworked first load logic...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
543ce468e5
commit
43f412f26e
@ -254,7 +254,7 @@ DEPENDENCIES = node npm wget zip unzip zipnote git \
|
||||
# User targets...
|
||||
|
||||
.PHONY: all
|
||||
all: check dev dist
|
||||
all: check dev dist deploy
|
||||
|
||||
|
||||
.PHONY: css
|
||||
@ -276,29 +276,49 @@ cleanall: clean
|
||||
|
||||
|
||||
.PHONY: electron-dist
|
||||
electron-dist: $(DIST_DIR)/$(APP_NAME)-$(VERSION)-$(TARGET_OS)-$(ARCH).zip
|
||||
electron-dist: VERSION := $(VERSION)-el
|
||||
electron-dist: DIST := $(DIST_DIR)/$(APP_NAME)-$(VERSION)-$(TARGET_OS)-$(ARCH).zip
|
||||
electron-dist: $(DIST)
|
||||
|
||||
# add a time stamp to version...
|
||||
.PHONY: test-electron-dist
|
||||
test-electron-dist: VERSION := $(VERSION)-$(DATE)
|
||||
test-electron-dist: $(DIST_DIR)/$(APP_NAME)-$$(VERSION)-$(TARGET_OS)-$(ARCH).zip
|
||||
test-electron-dist: VERSION := $(VERSION)-$(DATE)-el
|
||||
test-electron-dist: DIST := $(DIST_DIR)/$(APP_NAME)-$(VERSION)-$(TARGET_OS)-$(ARCH).zip
|
||||
test-electron-dist: $$(DIST)
|
||||
#test-electron-dist: $(DIST_DIR)/$(APP_NAME)-$$(VERSION)-$(TARGET_OS)-$(ARCH).zip
|
||||
|
||||
|
||||
# NOTE: the "/" at the end here is significant...
|
||||
.PHONY: electron-unpacked
|
||||
electron-unpacked: $(BUILD_DIR)/$(APP_NAME)-$(VERSION)-$(TARGET_OS)-$(ARCH)/
|
||||
electron-unpacked: VERSION := $(VERSION)-el
|
||||
electron-unpacked: $(BUILD_DIR)/$(APP_NAME)-$$(VERSION)-$(TARGET_OS)-$(ARCH)/
|
||||
|
||||
|
||||
#.PHONY: electron-inst
|
||||
#electron-inst: $(DIST_DIR)/$(APP_NAME)-$(VERSION)-$(TARGET_OS)-$(ARCH).msi
|
||||
|
||||
|
||||
.PHONY: web
|
||||
web: $(DIST_DIR)/$(APP_NAME)-$(VERSION)-web.zip
|
||||
|
||||
|
||||
.PHONY: dist
|
||||
dist: test-electron-dist
|
||||
#dist: electron-dist
|
||||
|
||||
|
||||
.PHONY: web
|
||||
web: $(DIST_DIR)/$(APP_NAME)-$(VERSION)-web.zip
|
||||
# NOTE: with the default sort order this gets the "latest" file, not sure
|
||||
# how portable this is...
|
||||
# XXX when ./dist is empty or non existent this will deploy the second arg...
|
||||
# XXX HACK-ish...
|
||||
# - deploy only when scrip both the script AND target are available
|
||||
.PHONY: deploy
|
||||
deploy: $(wildcard $(DIST_DIR)/$(APP_NAME)-*.zip) $(wildcard scripts/deploy.sh)
|
||||
@[ -e $(DIST_DIR)/$(APP_NAME)-*.zip ] \
|
||||
|| echo "Deploy error: Nothing to deploy, skipping."
|
||||
@[ -e ./scripts/deploy.sh ] \
|
||||
&& bash ./scripts/deploy.sh "$(DIST_DIR)/$(APP_NAME)-*.zip" \
|
||||
|| echo "Deploy error: No deploy.sh script found in ./scripts/, skipping."
|
||||
|
||||
|
||||
|
||||
@ -358,6 +378,7 @@ $(BUILD_INFO): $(CSS_FILES) $(NODE_DIR) $(PROJECT_FILES) \
|
||||
$(NODE_DIR): package.json
|
||||
npm install
|
||||
electron-rebuild
|
||||
@touch "$@"
|
||||
|
||||
|
||||
# build app dir...
|
||||
@ -374,6 +395,7 @@ $(BUILD_DIR)/$(APP_NAME)/: $(PROJECT_FILES) \
|
||||
$(BUILD_INFO) \
|
||||
"$(BUILD_DIR)/$(APP_NAME)"
|
||||
# cleanup vim swap files...
|
||||
# NOTE: we need to do this as we copy whole directories...
|
||||
cd "$@" ; \
|
||||
find . -name *.sw[po] -delete
|
||||
@touch "$@"
|
||||
|
||||
@ -99,6 +99,12 @@ module.Demo = core.ImageGridFeatures.Feature({
|
||||
data: data.Data(demo_data),
|
||||
//images: images.Images(),
|
||||
images: images.Images(demo_images),
|
||||
|
||||
location: {
|
||||
path: 'Demo data',
|
||||
method: 'loadDemoIndex',
|
||||
check: true,
|
||||
}
|
||||
})
|
||||
}],
|
||||
})
|
||||
|
||||
@ -1573,8 +1573,7 @@ var pushToHistory = function(action, to_top, checker){
|
||||
if(to_top){
|
||||
this.setTopURLHistory(path)
|
||||
}
|
||||
}]
|
||||
}
|
||||
}] }
|
||||
|
||||
var FileSystemURLHistory =
|
||||
module.FileSystemLoaderURLHistory = core.ImageGridFeatures.Feature({
|
||||
|
||||
@ -129,7 +129,7 @@ var URLHistoryActions = actions.Actions({
|
||||
var item = !clear ? (this.url_history[url] || {}) : {}
|
||||
|
||||
open = item.open = open || this.location.method
|
||||
check = item.check = check || 'checkPath'
|
||||
check = item.check = check || this.location.check || 'checkPath'
|
||||
|
||||
// remove the old value...
|
||||
if(url in this.url_history && this.config['url-history-push-up-on-open']){
|
||||
@ -182,7 +182,10 @@ var URLHistoryActions = actions.Actions({
|
||||
if(url && this.url_history[url] && this.url_history[url].check){
|
||||
var check = this.url_history[url].check
|
||||
|
||||
if(typeof(check) == typeof('str')){
|
||||
if(check === true || check === false){
|
||||
return check
|
||||
|
||||
} else if(typeof(check) == typeof('str')){
|
||||
return this[check](url)
|
||||
|
||||
} else {
|
||||
|
||||
@ -166,6 +166,7 @@ $(function(){
|
||||
// setup the viewer...
|
||||
ig
|
||||
.load({ viewer: $('.viewer') })
|
||||
/* XXX load the intro index...
|
||||
.on('ready', function(){
|
||||
// load some testing data if nothing else loaded...
|
||||
if(!this.url_history || Object.keys(this.url_history).length == 0){
|
||||
@ -178,6 +179,7 @@ $(function(){
|
||||
.syncTags('both')
|
||||
}
|
||||
})
|
||||
//*/
|
||||
.start()
|
||||
})
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user