mirror of
https://github.com/balena-io/etcher.git
synced 2025-04-24 15:27:17 +00:00
Group finish page components in a common directory
This commit is contained in:
parent
224b6fa318
commit
472f91a504
@ -36,10 +36,10 @@ require('./browser/modules/image-writer');
|
||||
require('./browser/modules/path');
|
||||
require('./browser/modules/notifier');
|
||||
require('./browser/modules/analytics');
|
||||
require('./browser/controllers/finish');
|
||||
require('./browser/controllers/navigation');
|
||||
require('./browser/components/progress-button/progress-button');
|
||||
require('./browser/components/drive-selector');
|
||||
require('./browser/pages/finish/finish');
|
||||
|
||||
const app = angular.module('Etcher', [
|
||||
'ui.router',
|
||||
@ -55,12 +55,14 @@ const app = angular.module('Etcher', [
|
||||
'Etcher.analytics',
|
||||
|
||||
// Controllers
|
||||
'Etcher.controllers.finish',
|
||||
'Etcher.controllers.navigation',
|
||||
|
||||
// Components
|
||||
'Etcher.Components.ProgressButton',
|
||||
'Etcher.Components.DriveSelector'
|
||||
'Etcher.Components.DriveSelector',
|
||||
|
||||
// Pages
|
||||
'Etcher.Pages.Finish'
|
||||
]);
|
||||
|
||||
app.config(function($stateProvider, $urlRouterProvider) {
|
||||
@ -72,11 +74,6 @@ app.config(function($stateProvider, $urlRouterProvider) {
|
||||
controller: 'AppController as app',
|
||||
templateUrl: './partials/main.html'
|
||||
})
|
||||
.state('success', {
|
||||
url: '/success',
|
||||
controller: 'FinishController as finish',
|
||||
templateUrl: './partials/success.html'
|
||||
})
|
||||
.state('settings', {
|
||||
url: '/settings',
|
||||
controller: 'SettingsController as settings',
|
||||
|
@ -16,29 +16,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @module Etcher.controllers.finish
|
||||
*/
|
||||
|
||||
const angular = require('angular');
|
||||
|
||||
require('angular-ui-router');
|
||||
require('../modules/selection-state');
|
||||
require('../modules/image-writer');
|
||||
require('../modules/analytics');
|
||||
const finish = angular.module('Etcher.controllers.finish', [
|
||||
'ui.router',
|
||||
'Etcher.selection-state',
|
||||
'Etcher.image-writer',
|
||||
'Etcher.analytics'
|
||||
]);
|
||||
|
||||
finish.controller('FinishController', function(
|
||||
$state,
|
||||
SelectionStateService,
|
||||
ImageWriterService,
|
||||
AnalyticsService
|
||||
) {
|
||||
module.exports = function($state, SelectionStateService, ImageWriterService, AnalyticsService) {
|
||||
|
||||
/**
|
||||
* @summary Restart the burning process
|
||||
@ -58,4 +36,4 @@ finish.controller('FinishController', function(
|
||||
$state.go('main');
|
||||
};
|
||||
|
||||
});
|
||||
};
|
53
lib/browser/pages/finish/finish.js
Normal file
53
lib/browser/pages/finish/finish.js
Normal file
@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Copyright 2016 Resin.io
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @module Etcher.Pages.Finish
|
||||
*
|
||||
* The finish page represents the application state where
|
||||
* the the burn/validation has completed.
|
||||
*
|
||||
* Its purpose is to display success or failure information,
|
||||
* as well as the "next steps".
|
||||
*/
|
||||
|
||||
const angular = require('angular');
|
||||
require('angular-ui-router');
|
||||
require('../../modules/selection-state');
|
||||
require('../../modules/image-writer');
|
||||
require('../../modules/settings');
|
||||
require('../../modules/analytics');
|
||||
|
||||
const FinishPage = angular.module('Etcher.Pages.Finish', [
|
||||
'ui.router',
|
||||
'Etcher.selection-state',
|
||||
'Etcher.image-writer',
|
||||
'Etcher.settings',
|
||||
'Etcher.analytics'
|
||||
]);
|
||||
|
||||
FinishPage.controller('FinishController', require('./controllers/finish'));
|
||||
|
||||
FinishPage.config(function($stateProvider) {
|
||||
$stateProvider
|
||||
.state('success', {
|
||||
url: '/success',
|
||||
controller: 'FinishController as finish',
|
||||
templateUrl: './browser/pages/finish/templates/success.tpl.html'
|
||||
});
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user