diff --git a/res/app/control-panes/dashboard/upload/activities/activities-controller.js b/res/app/control-panes/dashboard/upload/activities/activities-controller.js new file mode 100644 index 00000000..5724bfec --- /dev/null +++ b/res/app/control-panes/dashboard/upload/activities/activities-controller.js @@ -0,0 +1,3 @@ +module.exports = function ActivitiesCtrl($scope) { + +} diff --git a/res/app/control-panes/dashboard/upload/activities/activities-spec.js b/res/app/control-panes/dashboard/upload/activities/activities-spec.js new file mode 100644 index 00000000..720da1b2 --- /dev/null +++ b/res/app/control-panes/dashboard/upload/activities/activities-spec.js @@ -0,0 +1,17 @@ +describe('ActivitiesCtrl', function () { + + beforeEach(module('stf.activities')); + + var scope, ctrl; + + beforeEach(inject(function ($rootScope, $controller) { + scope = $rootScope.$new(); + ctrl = $controller('ActivitiesCtrl', {$scope: scope}); + })); + + it('should ...', inject(function () { + expect(1).toEqual(1); + + })); + +}); \ No newline at end of file diff --git a/res/app/control-panes/dashboard/upload/activities/activities.css b/res/app/control-panes/dashboard/upload/activities/activities.css new file mode 100644 index 00000000..c23327f6 --- /dev/null +++ b/res/app/control-panes/dashboard/upload/activities/activities.css @@ -0,0 +1,3 @@ +.stf-activities { + +} \ No newline at end of file diff --git a/res/app/control-panes/dashboard/upload/activities/activities.jade b/res/app/control-panes/dashboard/upload/activities/activities.jade new file mode 100644 index 00000000..8ecb6ada --- /dev/null +++ b/res/app/control-panes/dashboard/upload/activities/activities.jade @@ -0,0 +1,2 @@ +div(ng-controller='ActivitiesCtrl') +h1 Activities \ No newline at end of file diff --git a/res/app/control-panes/dashboard/upload/activities/index.js b/res/app/control-panes/dashboard/upload/activities/index.js new file mode 100644 index 00000000..b556c033 --- /dev/null +++ b/res/app/control-panes/dashboard/upload/activities/index.js @@ -0,0 +1,12 @@ +require('./activities.css') + +module.exports = angular.module('stf.activities', [ + +]) + .run(["$templateCache", function ($templateCache) { + $templateCache.put( + 'control-panes/dashboard/upload/activities/activities.jade', + require('./activities.jade') + ) + }]) + .controller('ActivitiesCtrl', require('./activities-controller')) diff --git a/res/app/control-panes/dashboard/upload/activities/test/manifest-1.json b/res/app/control-panes/dashboard/upload/activities/test/manifest-1.json new file mode 100644 index 00000000..51feb2e7 --- /dev/null +++ b/res/app/control-panes/dashboard/upload/activities/test/manifest-1.json @@ -0,0 +1,376 @@ +{ + "versionCode": 20, + "versionName": "1.0.18", + "installLocation": 0, + "package": "jp.ameba.palette", + "usesPermissions": [ + { + "name": "android.permission.INTERNET" + }, + { + "name": "android.permission.ACCESS_NETWORK_STATE" + }, + { + "name": "android.permission.WRITE_EXTERNAL_STORAGE" + }, + { + "name": "jp.ameba.palette.permission.C2D_MESSAGE" + }, + { + "name": "com.google.android.c2dm.permission.RECEIVE" + }, + { + "name": "android.permission.GET_ACCOUNTS" + }, + { + "name": "android.permission.WAKE_LOCK" + }, + { + "name": "android.permission.VIBRATE" + } + ], + "permissions": [ + { + "name": "jp.ameba.palette.permission.C2D_MESSAGE", + "protectionLevel": 2 + } + ], + "permissionTrees": [], + "permissionGroups": [], + "instrumentation": null, + "usesSdk": { + "minSdkVersion": 10 + }, + "usesConfiguration": null, + "usesFeatures": [], + "supportsScreens": { + "xlargeScreens": false + }, + "compatibleScreens": [], + "supportsGlTextures": [], + "application": { + "theme": "resourceId:0x7f0d005c", + "label": "resourceId:0x7f090019", + "icon": "resourceId:0x7f0200b4", + "name": "jp.ameba.palette.LaPaletteApplication", + "debuggable": true, + "allowBackup": true, + "hardwareAccelerated": true, + "activities": [ + { + "theme": "resourceId:0x7f0d0055", + "label": "resourceId:0x7f090023", + "name": "jp.ameba.palette.SplashActivity", + "screenOrientation": 1, + "configChanges": 160, + "intentFilters": [ + { + "actions": [ + { + "name": "android.intent.action.MAIN" + } + ], + "categories": [ + { + "name": "android.intent.category.LAUNCHER" + } + ], + "data": [] + }, + { + "actions": [ + { + "name": "android.intent.action.VIEW" + } + ], + "categories": [ + { + "name": "android.intent.category.DEFAULT" + } + ], + "data": [] + } + ], + "metaData": [] + }, + { + "theme": "resourceId:0x7f0d0055", + "label": "resourceId:0x7f090023", + "name": "jp.ameba.palette.MainActivity", + "screenOrientation": 1, + "configChanges": 160, + "intentFilters": [ + { + "actions": [ + { + "name": "android.intent.action.VIEW" + } + ], + "categories": [ + { + "name": "android.intent.category.BROWSABLE" + }, + { + "name": "android.intent.category.DEFAULT" + } + ], + "data": [ + { + "scheme": "jp-ajmp-6333" + } + ] + } + ], + "metaData": [] + }, + { + "theme": "resourceId:0x1030006", + "label": "resourceId:0x7f090019", + "name": "jp.ameba.palette.DecoEditorActivity", + "screenOrientation": 1, + "configChanges": 160, + "windowSoftInputMode": 16, + "intentFilters": [], + "metaData": [] + }, + { + "name": "jp.ameba.palette.GateWayActivity", + "intentFilters": [ + { + "actions": [ + { + "name": "android.intent.action.VIEW" + } + ], + "categories": [ + { + "name": "android.intent.category.DEFAULT" + }, + { + "name": "android.intent.category.BROWSABLE" + } + ], + "data": [ + { + "scheme": "ca-palette" + } + ] + }, + { + "actions": [ + { + "name": "android.intent.action.VIEW" + } + ], + "categories": [ + { + "name": "android.intent.category.DEFAULT" + }, + { + "name": "android.intent.category.BROWSABLE" + } + ], + "data": [ + { + "scheme": "https", + "host": "ca-palette.jp" + }, + { + "scheme": "http", + "host": "ca-palette.jp" + } + ] + }, + { + "actions": [ + { + "name": "android.intent.action.VIEW" + } + ], + "categories": [ + { + "name": "android.intent.category.DEFAULT" + }, + { + "name": "android.intent.category.BROWSABLE" + } + ], + "data": [ + { + "scheme": "https", + "host": "stg-ca-palette.jp" + }, + { + "scheme": "http", + "host": "stg-ca-palette.jp" + } + ] + } + ], + "metaData": [] + }, + { + "theme": "resourceId:0x1030006", + "label": "resourceId:0x7f090019", + "name": "jp.ameba.palette.CredibleSiteActivity", + "screenOrientation": 1, + "configChanges": 160, + "intentFilters": [], + "metaData": [] + } + ], + "activityAliases": [], + "launcherActivities": [ + { + "theme": "resourceId:0x7f0d0055", + "label": "resourceId:0x7f090023", + "name": "jp.ameba.palette.SplashActivity", + "screenOrientation": 1, + "configChanges": 160, + "intentFilters": [ + { + "actions": [ + { + "name": "android.intent.action.MAIN" + } + ], + "categories": [ + { + "name": "android.intent.category.LAUNCHER" + } + ], + "data": [] + }, + { + "actions": [ + { + "name": "android.intent.action.VIEW" + } + ], + "categories": [ + { + "name": "android.intent.category.DEFAULT" + } + ], + "data": [] + } + ], + "metaData": [] + } + ], + "services": [ + { + "name": "jp.ameba.palette.service.DecoResourceService", + "intentFilters": [], + "metaData": [] + }, + { + "name": "jp.ameba.palette.service.PushSynchronizeService", + "intentFilters": [], + "metaData": [] + }, + { + "name": ".GCMIntentService", + "intentFilters": [], + "metaData": [] + }, + { + "name": "jp.co.CAReward_Ack.CARAck", + "intentFilters": [], + "metaData": [] + }, + { + "name": "com.appanalyzerseed.ReferrerService", + "intentFilters": [], + "metaData": [] + } + ], + "receivers": [ + { + "name": "com.google.android.gcm.GCMBroadcastReceiver", + "permission": "com.google.android.c2dm.permission.SEND", + "intentFilters": [ + { + "actions": [ + { + "name": "com.google.android.c2dm.intent.RECEIVE" + }, + { + "name": "com.google.android.c2dm.intent.REGISTRATION" + } + ], + "categories": [ + { + "name": "jp.ameba.palette" + } + ], + "data": [] + } + ], + "metaData": [] + }, + { + "name": "jp.ameba.palette.push.GrowthPushReceiver", + "permission": "com.google.android.c2dm.permission.SEND", + "intentFilters": [ + { + "actions": [ + { + "name": "com.google.android.c2dm.intent.RECEIVE" + }, + { + "name": "com.google.android.c2dm.intent.REGISTRATION" + } + ], + "categories": [ + { + "name": "jp.ameba.palette" + } + ], + "data": [] + } + ], + "metaData": [] + }, + { + "name": "jp.co.CAReward_Receiver.CARReceiver", + "exported": true, + "intentFilters": [ + { + "actions": [ + { + "name": "com.android.vending.INSTALL_REFERRER" + } + ], + "categories": [], + "data": [] + } + ], + "metaData": [] + }, + { + "name": "com.appanalyzerseed.ReferrerReceiver", + "exported": true, + "intentFilters": [ + { + "actions": [ + { + "name": "com.android.vending.INSTALL_REFERRER" + } + ], + "categories": [], + "data": [] + } + ], + "metaData": [ + { + "name": " com.appanalyzerseed.FORWARD_REFERRER", + "value": "jp.co.CAReward_Receiver.CARReceiver" + } + ] + } + ], + "providers": [], + "usesLibraries": [] + } +} \ No newline at end of file diff --git a/res/app/control-panes/dashboard/upload/index.js b/res/app/control-panes/dashboard/upload/index.js index da549820..7eababee 100644 --- a/res/app/control-panes/dashboard/upload/index.js +++ b/res/app/control-panes/dashboard/upload/index.js @@ -1,7 +1,8 @@ require('./upload.css') module.exports = angular.module('stf.upload', [ - require('stf/common-ui/tree').name + require('stf/common-ui/tree').name, + require('./activities').name ]) .run(["$templateCache", function ($templateCache) { $templateCache.put('control-panes/dashboard/upload/upload.jade', diff --git a/res/app/control-panes/dashboard/upload/upload-controller.js b/res/app/control-panes/dashboard/upload/upload-controller.js index 87e442a3..6a4d4d10 100644 --- a/res/app/control-panes/dashboard/upload/upload-controller.js +++ b/res/app/control-panes/dashboard/upload/upload-controller.js @@ -36,7 +36,9 @@ module.exports = function UploadCtrl($scope, $rootScope, SettingsService, gettex var tx = $rootScope.control.uninstall(packageName) return tx.promise.then(function (result) { if (result.success) { - //$scope.clear() + $scope.$apply(function () { + $scope.clear() + }) } else { console.error(result.error) } diff --git a/res/app/control-panes/dashboard/upload/upload.jade b/res/app/control-panes/dashboard/upload/upload.jade index dca78c92..333e4a23 100644 --- a/res/app/control-panes/dashboard/upload/upload.jade +++ b/res/app/control-panes/dashboard/upload/upload.jade @@ -40,6 +40,11 @@ i.fa.fa-file-o span {{installation.manifest.package || "App" }} + button.btn.btn-xs.btn-danger-outline.pull-right( + ng-click='uninstall(installation.manifest.package)', ng-show='installation.settled') + i.fa.fa-trash-o + span(translate) Uninstall + div(ng-switch='installation.lastData') strong(ng-switch-when='uploading') span(translate) Starting to upload... @@ -50,10 +55,8 @@ strong(ng-switch-when='launching_app') span(translate) Launching activity... strong(ng-switch-when='success') - button.btn.btn-sm.btn-danger-outline.pull-right( - ng-click='uninstall(installation.manifest.package)', ng-show='installation.settled') - i.fa.fa-trash-o - span(translate) Uninstall + + div(ng-include='"control-panes/dashboard/upload/activities/activities.jade"') button.btn.btn-sm.btn-primary-outline(btn-checkbox, ng-model='showManifest') i.fa.fa-list