diff --git a/manifest.json b/manifest.json index 3f40e7c6..5814777e 100644 --- a/manifest.json +++ b/manifest.json @@ -11,7 +11,7 @@ "action": { "default_title": "BuildReactor", "default_icon": "img/icon-19.png", - "default_popup": "popup.html" + "default_popup": "src/themes/popup.html" }, "background": { "service_worker": "service-worker.js", diff --git a/src/common/directives/build/_build.scss b/src/common/directives/build/_build.scss deleted file mode 100644 index 5339a477..00000000 --- a/src/common/directives/build/_build.scss +++ /dev/null @@ -1,214 +0,0 @@ -.build { - padding-left: 2px; - padding-right: 2px; - padding-bottom: 5px; - float: left; - width: 100%; - - a { - border-radius: 5px; - cursor: pointer; - margin-top: 5px; - padding: 5px 10px 5px 5px; - position: relative; - white-space: nowrap; - } - - a, - a:hover, - a:visited { - color: white; - display: block; - text-decoration: none; - width: 100%; - } - - .build-name { - font-weight: bold; - display: block; - overflow: hidden; - text-overflow: ellipsis; - } - - .tooltip { - white-space: normal; - } - - .labels { - margin-top: -1px; - max-width: 50%; - right: 1em; - overflow: hidden; - position: absolute; - } - - .label { - margin-left: .5em; - } - - .changes-container { - height: 1.5em; - overflow: hidden; - position: relative; - text-align: left; - visibility: hidden; - &.visible { - visibility: visible; - } - .changes { - display: block; - opacity: 0; - overflow: hidden; - position: absolute; - text-overflow: ellipsis; - transform: translateY(90%); - transition: opacity 1s, transform 2s; - width: 100%; - &.active { - opacity: 1; - transform: translateY(0); - transition: opacity 2s, transform 2s; - } - } - } - - .color-blind-markers { - position: absolute; - top: 2px; - right: 1em; - - i { - opacity: 0.5; - display: none; - } - } - -} - -.color-blind { - .labels { - right: 40px; - } - - &.broken .color-blind-marker-broken { - display: inline; - } - - &.offline .color-blind-marker-offline { - display: inline; - } -} - -.theme-dark .build { - a { - background-color: #360; - } - &.disabled { - a { - background-color: #888; - } - .build-name { - color: black; - } - &.broken a { - background-color: #888; - } - } - &.offline { - a, - &.broken a, - &.building a, - &.broken.building a { - background-color: #888; - } - &.disabled .build-name, - &.disabled.broken .build-name { - color: black; - } - .build-name { - color: #360; - } - &.broken .build-name { - color: #900; - } - } - &.building { - a { - background-color: #566600; - } - .label-warning { - color: #360; - } - } - &.broken { - a { - background-color: #900; - } - &.building a { - background-color: #992300; - } - } - .label-warning { - background-color: #f89406; - } - .label-default { - background-color: #444; - } -} - -.theme-light .build { - a { - background-color: #5cb85c; - } - &.disabled { - a { - background-color: #999; - } - .build-name { - color: #fff; - } - &.broken a { - background-color: #999; - } - } - &.offline { - a, - &.broken a, - &.building a, - &.broken.building a { - background-color: #999; - } - &.disabled .build-name, - &.disabled.broken .build-name { - color: #fff; - } - .build-name { - color: #fff; - } - &.broken .build-name { - color: #fff; - } - } - &.broken { - a { - background-color: #d9534f; - } - .label-warning { - background-color: #f89406; - } - &.building a { - background-color: #d9534f; - } - &.building .build-name { - color: #fff; - } - } - .label-warning, - &.disabled .label-warning, - &.offline .label-warning { - background-color: #d9534f; - } - .label-default { - background-color: #444; - } -} diff --git a/src/common/directives/build/build.html b/src/common/directives/build/build.html deleted file mode 100644 index 5fb88ef6..00000000 --- a/src/common/directives/build/build.html +++ /dev/null @@ -1,26 +0,0 @@ -
- -
- - - Offline ({{ build.error.message }}) - - - {{ tag.name }} - - Disabled - - {{ build.name }} -
- - {{ change.name }} - : {{ change.message }} - -
-
-
- - -
-
-
diff --git a/src/common/directives/build/build.js b/src/common/directives/build/build.js deleted file mode 100644 index deab0b37..00000000 --- a/src/common/directives/build/build.js +++ /dev/null @@ -1,47 +0,0 @@ -import 'angular-ui-bootstrap/src/tooltip/index-nocss.js'; -import module from 'common/directives/module'; -import templateUrl from 'common/directives/build/build.html'; - -module.directive('build', ($interval) => ({ - restrict: 'E', - scope: { - build: '=buildInfo', - viewConfig: '=' - }, - templateUrl, - controller($scope, $element, $attrs, $transclude) { - - const commentChangeInterval = 7000; - let intervalPromise; - $scope.changeIndex = 0; - - const changesLength = $scope.build && $scope.build.changes ? $scope.build.changes.length : 0; - if (changesLength > 1) { - intervalPromise = $interval(() => { - $scope.changeIndex = ($scope.changeIndex + 1) % changesLength; - }, commentChangeInterval); - } - - $scope.$on('$destroy', function() { - if (intervalPromise) { - $interval.cancel(intervalPromise); - } - }); - - $scope.getLabelClasses = (tag) => { - const tagType = tag.type || 'default'; - return `label-${tagType}`; - }; - - $scope.$watch('viewConfig', (config = {}) => { - $scope.commitsVisible = true; - if ($scope.build && !config.showCommitsWhenGreen) { - $scope.commitsVisible = Boolean( - $scope.build.isBroken || - $scope.build.isRunning || - $scope.build.isWaiting); - } - }); - - } -})); diff --git a/src/common/directives/build/build.spec.js b/src/common/directives/build/build.spec.js deleted file mode 100644 index aa9e797c..00000000 --- a/src/common/directives/build/build.spec.js +++ /dev/null @@ -1,75 +0,0 @@ -import 'common/directives/build/build'; -import angular from 'angular'; - -describe('build', () => { - - let scope; - let element; - - beforeEach(angular.mock.module( - 'app.directives' - )); - - beforeEach(angular.mock.inject(($compile, $rootScope) => { - element = $compile('')($rootScope); - $rootScope.$digest(); - scope = element.isolateScope(); - })); - - describe('commitsVisible', () => { - - it('do not show commits when build green', () => { - scope.viewConfig = { - showCommitsWhenGreen: false - }; - scope.build = { - isBroken: false, - isRunning: false - }; - scope.$digest(); - - expect(scope.commitsVisible).toBe(false); - }); - - it('show commits when build red', () => { - scope.viewConfig = { - showCommitsWhenGreen: false - }; - scope.build = { - isBroken: true, - isRunning: false - }; - scope.$digest(); - - expect(scope.commitsVisible).toBe(true); - }); - - it('show commits when build in progress', () => { - scope.viewConfig = { - showCommitsWhenGreen: false - }; - scope.build = { - isBroken: false, - isRunning: true - }; - scope.$digest(); - - expect(scope.commitsVisible).toBe(true); - }); - - it('show commits when build waiting', () => { - scope.viewConfig = { - showCommitsWhenGreen: false - }; - scope.build = { - isBroken: false, - isWaiting: true - }; - scope.$digest(); - - expect(scope.commitsVisible).toBe(true); - }); - - }); - -}); diff --git a/src/common/directives/buildGroup/_buildGroup.scss b/src/common/directives/buildGroup/_buildGroup.scss deleted file mode 100644 index 770fa994..00000000 --- a/src/common/directives/buildGroup/_buildGroup.scss +++ /dev/null @@ -1,30 +0,0 @@ -.build-group { - .group-name { - clear: both; - display: block; - font-weight: bold; - font-size: 14px; - margin-top: .5em; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } - .group-items { - float: left; - } -} - -.theme-dark { - .build-group .group-name { - color: #fff; - margin-bottom: -.3em; - padding-left: 3px; - } -} - -.theme-light { - .build-group .group-name { - border-bottom: 1px solid #999; - color: #000; - } -} diff --git a/src/common/directives/buildGroup/buildGroup.html b/src/common/directives/buildGroup/buildGroup.html deleted file mode 100644 index 2b963ab0..00000000 --- a/src/common/directives/buildGroup/buildGroup.html +++ /dev/null @@ -1,4 +0,0 @@ -
-
{{ name }}
- -
diff --git a/src/common/directives/buildGroup/buildGroup.js b/src/common/directives/buildGroup/buildGroup.js deleted file mode 100644 index a11ab0c2..00000000 --- a/src/common/directives/buildGroup/buildGroup.js +++ /dev/null @@ -1,44 +0,0 @@ -import 'common/directives/build/build'; -import module from 'common/directives/module'; -import templateUrl from 'common/directives/buildGroup/buildGroup.html'; - -module.directive('buildGroup', () => ({ - restrict: 'E', - scope: { - name: '=', - items: '=', - viewConfig: '=' - }, - templateUrl, - controller($scope, $element, $attrs, $transclude) { - - $scope.fullWidth = '100%'; - $scope.itemWidth = '100%'; - - $scope.$watch('viewConfig', (config) => recalculateWidths(config, $scope.items)); - - $scope.$watch('items', (items) => recalculateWidths($scope.viewConfig, items)); - - const recalculateWidths = (config, items) => { - if (config && items) { - $scope.fullWidth = calculateFullWidth(config, $scope.items); - $scope.itemWidth = calculateWidth(config, $scope.items); - } - }; - - const calculateWidth = function(config, items) { - const width = 100 / Math.min(items.length, config.columns); - return `${width}%`; - }; - - const calculateFullWidth = function(config, items) { - if (config.fullWidthGroups) { - return '100%'; - } - const columnWidth = 100 / config.columns; - const allColumnsWidth = columnWidth * Math.min(items.length, config.columns); - return `${allColumnsWidth}%`; - }; - - } -})); diff --git a/src/common/directives/buildGroup/buildGroup.spec.js b/src/common/directives/buildGroup/buildGroup.spec.js deleted file mode 100644 index fabef6fb..00000000 --- a/src/common/directives/buildGroup/buildGroup.spec.js +++ /dev/null @@ -1,106 +0,0 @@ -import 'common/directives/buildGroup/buildGroup'; -import angular from 'angular'; - -describe('buildGroup', () => { - - let scope; - - beforeEach(angular.mock.module( - 'app.directives' - )); - - beforeEach(angular.mock.inject(($compile, $rootScope) => { - const element = $compile('')($rootScope); - $rootScope.$digest(); - scope = element.isolateScope(); - })); - - beforeEach(() => { - scope.items = [{ - name: 'service1', - items: [] - }, { - name: 'service2', - items: [] - }, { - name: 'service3', - items: [] - }]; - }); - - describe('itemWidth', () => { - - it('should default to 100% width without config', () => { - expect(scope.itemWidth).toEqual('100%'); - }); - - it('should calculate width for fixed columns', () => { - scope.viewConfig = { - columns: 4 - }; - scope.$digest(); - - expect(scope.itemWidth).toEqual('33.333333333333336%'); - }); - - it('should calculate width for fixed columns with many builds', () => { - scope.viewConfig = { - columns: 2, - fullWidthGroups: false - }; - scope.$digest(); - - expect(scope.itemWidth).toEqual('50%'); - }); - - it('should calculate width for full-width', () => { - scope.viewConfig = { - columns: 4, - fullWidthGroups: true - }; - scope.$digest(); - - expect(scope.itemWidth).toEqual('33.333333333333336%'); - }); - - it('should calculate width for full-width with many builds', () => { - scope.viewConfig = { - columns: 2, - fullWidthGroups: true - }; - scope.$digest(); - - expect(scope.itemWidth).toEqual('50%'); - }); - - }); - - describe('fullWidth', () => { - - it('should default to full page width', () => { - expect(scope.fullWidth).toEqual('100%'); - }); - - it('should calculate width if builds take less than 100%', () => { - scope.viewConfig = { - columns: 6, - fullWidthGroups: false - }; - scope.$digest(); - - expect(scope.fullWidth).toEqual('50%'); - }); - - it('should assume full width if more builds than columns', () => { - scope.viewConfig = { - columns: 2, - fullWidthGroups: false - }; - scope.$digest(); - - expect(scope.fullWidth).toEqual('100%'); - }); - - }); - -}); diff --git a/src/common/directives/buildList/_buildList.scss b/src/common/directives/buildList/_buildList.scss deleted file mode 100644 index 426958ba..00000000 --- a/src/common/directives/buildList/_buildList.scss +++ /dev/null @@ -1,7 +0,0 @@ -.build-list .no-services-message { - color: #F90; - font-weight: bold; - margin-top: 20px; - margin-bottom: 1em; - text-align: center; -} diff --git a/src/common/directives/buildList/buildList.html b/src/common/directives/buildList/buildList.html deleted file mode 100644 index c7b7a8c3..00000000 --- a/src/common/directives/buildList/buildList.html +++ /dev/null @@ -1,4 +0,0 @@ -
- -
No services configured
-
diff --git a/src/common/directives/buildList/buildList.js b/src/common/directives/buildList/buildList.js deleted file mode 100644 index 7eec4c60..00000000 --- a/src/common/directives/buildList/buildList.js +++ /dev/null @@ -1,12 +0,0 @@ -import 'common/directives/service/service'; -import module from 'common/directives/module'; -import templateUrl from 'common/directives/buildList/buildList.html'; - -module.directive('buildList', () => ({ - restrict: 'E', - scope: { - services: '=', - viewConfig: '=' - }, - templateUrl -})); diff --git a/src/common/directives/module.js b/src/common/directives/module.js deleted file mode 100644 index 7dde0f30..00000000 --- a/src/common/directives/module.js +++ /dev/null @@ -1,2 +0,0 @@ -import angular from 'angular'; -export default angular.module('app.directives', []); diff --git a/src/common/directives/service/_service.scss b/src/common/directives/service/_service.scss deleted file mode 100644 index f5561414..00000000 --- a/src/common/directives/service/_service.scss +++ /dev/null @@ -1,22 +0,0 @@ -.service { - margin-bottom: 10px; - - .service-name { - font-size: 18px; - font-weight: bold; - padding-top: 5px; - text-align: center; - } -} - -.theme-dark { - .service .service-name { - color: #F90; - } -} - -.theme-light { - .service .service-name { - color: #000; - } -} \ No newline at end of file diff --git a/src/common/directives/service/service.html b/src/common/directives/service/service.html deleted file mode 100644 index 22e56ac6..00000000 --- a/src/common/directives/service/service.html +++ /dev/null @@ -1,4 +0,0 @@ -
-
{{ service.name }}
- -
diff --git a/src/common/directives/service/service.js b/src/common/directives/service/service.js deleted file mode 100644 index 2178d71b..00000000 --- a/src/common/directives/service/service.js +++ /dev/null @@ -1,43 +0,0 @@ -import 'common/directives/buildGroup/buildGroup'; -import 'rx/dist/rx.coincidence'; -import 'rx/dist/rx.binding'; -import Rx from 'rx'; -import ngModule from 'common/directives/module'; -import templateUrl from 'common/directives/service/service.html'; - -ngModule.directive('service', () => ({ - restrict: 'E', - scope: { - service: '=serviceInfo', - viewConfig: '=' - }, - templateUrl, - replace: true, - controller($scope, $element, $attrs, $transclude) { - let rxSubscription; - $scope.$watch('service', (service) => { - const items = $scope.service ? $scope.service.items : []; - let groups = []; - if (rxSubscription) { - rxSubscription.dispose(); - } - rxSubscription = Rx.Observable.fromArray(items) - .select((build) => { - build.group = build.group || ''; - return build; - }) - .groupBy((build) => build.group) - .selectMany((groupBy) => groupBy - .toArray() - .select((groupedItems) => ({ - name: groupBy.key, - items: groupedItems - })) - ) - .toArray().subscribe((d) => { - groups = d; - }); - $scope.groups = groups; - }); - } -})); diff --git a/src/common/directives/service/service.spec.js b/src/common/directives/service/service.spec.js deleted file mode 100644 index 939a6179..00000000 --- a/src/common/directives/service/service.spec.js +++ /dev/null @@ -1,76 +0,0 @@ -import 'common/directives/service/service'; -import angular from 'angular'; - -describe('service', function() { - - var scope; - var element; - - beforeEach(angular.mock.module( - 'app.directives' - )); - - beforeEach(angular.mock.inject(function($compile, $rootScope) { - element = $compile('')($rootScope); - $rootScope.$digest(); - scope = element.isolateScope(); - })); - - it('should default to empty groups if no builds', angular.mock.inject(function($compile, $rootScope) { - scope.service = { - name: 'service name', - items: [] - }; - - scope.$digest(); - - expect(scope.groups).toEqual([]); - })); - - it('should group builds', angular.mock.inject(function($compile, $rootScope) { - scope.service = { - name: 'service name', - items: [ - { group: 'group1', name: 'build1' }, - { group: 'group1', name: 'build2' }, - { group: 'group2', name: 'build3' } - ] - }; - scope.$digest(); - - expect(angular.copy(scope.groups)).toEqual([{ - name: 'group1', - items: [ - { group: 'group1', name: 'build1' }, - { group: 'group1', name: 'build2' } - ] - }, { - name: 'group2', - items: [ - { group: 'group2', name: 'build3' } - ] - }]); - })); - - it('should default to empty group if not specified', angular.mock.inject(function($compile, $rootScope) { - scope.service = { - name: 'service name', - items: [ - { name: 'build1' }, - { group: null, name: 'build2' }, - { group: '', name: 'build3' } - ] - }; - scope.$digest(); - - expect(angular.copy(scope.groups)).toEqual([{ - name: '', - items: [ - { group: '', name: 'build1' }, - { group: '', name: 'build2' }, - { group: '', name: 'build3' } - ] - }]); - })); - -}); diff --git a/src/dashboard/app.js b/src/dashboard/app.js deleted file mode 100644 index 020679fc..00000000 --- a/src/dashboard/app.js +++ /dev/null @@ -1,14 +0,0 @@ -import 'angular-route'; -import 'common/directives/buildList/buildList'; -import angular from 'angular'; -import tooltip from 'angular-ui-bootstrap/src/tooltip/index-nocss.js'; - -export default angular.module('dashboard', [ - 'ngRoute', - tooltip, - 'app.directives' -]).config([ - '$compileProvider', function($compileProvider) { - $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|chrome-extension|moz-extension):/); - } -]); diff --git a/src/dashboard/controller.js b/src/dashboard/controller.js deleted file mode 100644 index 0d15938b..00000000 --- a/src/dashboard/controller.js +++ /dev/null @@ -1,17 +0,0 @@ -import app from 'dashboard/app'; -import core from 'common/core'; - -export default app.controller('DashboardCtrl', ($scope) => { - core.views.subscribe((config) => { - $scope.$evalAsync(() => { - $scope.viewConfig = config; - }); - }); - - core.activeProjects.subscribe((services) => { - $scope.$evalAsync(() => { - $scope.services = services; - }); - }); - -}); diff --git a/src/dashboard/index.html b/src/dashboard/index.html deleted file mode 100644 index bb30ba7a..00000000 --- a/src/dashboard/index.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - BuildReactor dashboard - - - - - - - - diff --git a/src/dashboard/main.js b/src/dashboard/main.js deleted file mode 100644 index 5d575ac4..00000000 --- a/src/dashboard/main.js +++ /dev/null @@ -1,16 +0,0 @@ -import 'bootstrap/dist/css/bootstrap.css'; -import 'font-awesome/scss/font-awesome.scss'; -import '../common/_angular-ui.scss'; -import './main.scss'; -import 'dashboard/app'; -import 'dashboard/controller'; -import angular from 'angular'; -import core from 'common/core'; -import logger from 'common/logger'; - -core.init(); -logger.init({ prefix: 'dashboard' }); - -angular.element(document).ready(() => { - angular.bootstrap(document, ['dashboard']); -}); diff --git a/src/dashboard/main.scss b/src/dashboard/main.scss deleted file mode 100644 index 45acf37e..00000000 --- a/src/dashboard/main.scss +++ /dev/null @@ -1,26 +0,0 @@ -@import "../common/directives/buildList/_buildList.scss"; -@import "../common/directives/service/_service.scss"; -@import "../common/directives/buildGroup/_buildGroup.scss"; -@import "../common/directives/build/_build.scss"; - -html, body { - height: 100%; -} - -.label .error-message { - overflow: hidden; - text-overflow: ellipsis; - max-width: 250px; -} - -.build-list .no-services-message { - font-size: x-large; -} - -.theme-dark { - background-color: #000; -} - -.theme-light { - background-color: #fff; -} diff --git a/src/popup/app.js b/src/popup/app.js deleted file mode 100644 index 23bd75d9..00000000 --- a/src/popup/app.js +++ /dev/null @@ -1,14 +0,0 @@ -import 'angular-route'; -import 'common/directives/buildList/buildList'; -import angular from 'angular'; -import tooltip from 'angular-ui-bootstrap/src/tooltip/index-nocss.js'; - -export default angular.module('popup', [ - 'ngRoute', - tooltip, - 'app.directives' -]).config([ - '$compileProvider', function($compileProvider) { - $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|chrome-extension|moz-extension):/); - } -]); diff --git a/src/popup/controller.js b/src/popup/controller.js deleted file mode 100644 index 0e66ac75..00000000 --- a/src/popup/controller.js +++ /dev/null @@ -1,19 +0,0 @@ -import app from 'popup/app'; -import core from 'common/core'; - -export default app.controller('PopupCtrl', ($scope) => { - $scope.navbarStyle = 'navbar-inverse'; - core.views.subscribe((config) => { - $scope.$evalAsync(() => { - $scope.viewConfig = config; - $scope.navbarStyle = (config.theme === 'light') ? 'navbar-default' : 'navbar-inverse'; - }); - }); - - core.activeProjects.subscribe((services) => { - $scope.$evalAsync(() => { - $scope.services = services; - }); - }); - -}); diff --git a/src/popup/index.html b/src/popup/index.html deleted file mode 100644 index ae09f5f2..00000000 --- a/src/popup/index.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - BuildReactor popup - - - - - - - - - diff --git a/src/popup/main.js b/src/popup/main.js deleted file mode 100644 index f9d7e914..00000000 --- a/src/popup/main.js +++ /dev/null @@ -1,16 +0,0 @@ -import 'bootstrap/dist/css/bootstrap.css'; -import 'font-awesome/scss/font-awesome.scss'; -import '../common/_angular-ui.scss'; -import './main.scss'; -import 'popup/app'; -import 'popup/controller'; -import angular from 'angular'; -import core from 'common/core'; -import logger from 'common/logger'; - -core.init(); -logger.init({ prefix: 'popup' }); - -angular.element(document).ready(() => { - angular.bootstrap(document, ['popup']); -}); diff --git a/src/popup/main.scss b/src/popup/main.scss deleted file mode 100644 index 86937590..00000000 --- a/src/popup/main.scss +++ /dev/null @@ -1,37 +0,0 @@ -@import "../common/directives/buildList/_buildList.scss"; -@import "../common/directives/service/_service.scss"; -@import "../common/directives/buildGroup/_buildGroup.scss"; -@import "../common/directives/build/_build.scss"; - -body { - margin-left: .3em; - margin-right: .3em; - margin-top: 45px; - min-width: 350px; -} - -.label .error-message { - display: none; -} - -.navbar { - padding-right: 1em; - min-height: 40px; -} - -.navbar-right li { - float: right; -} - -.navbar-nav > li > a { - padding-top: 5px; - padding-bottom: 0; -} - -.theme-dark { - background-color: #000; -} - -.theme-light { - background-color: #fff; -} diff --git a/src/settings/app.js b/src/settings/app.js index 4fc5400f..5459a9de 100644 --- a/src/settings/app.js +++ b/src/settings/app.js @@ -2,7 +2,6 @@ import 'angular-animate'; import 'angular-route'; import 'angular-ui-utils/modules/highlight/highlight'; import 'angular-ui-utils/modules/indeterminate/indeterminate'; -import 'common/directives/module'; import 'angular-legacy-sortablejs-maintained'; import accordion from 'angular-ui-bootstrap/src/accordion'; import angular from 'angular'; @@ -11,14 +10,13 @@ import modal from 'angular-ui-bootstrap/src/modal/index-nocss'; import tooltip from 'angular-ui-bootstrap/src/tooltip/index-nocss.js'; export default angular.module('settings', [ - 'ngAnimate', - 'ngRoute', - accordion, - dropdown, - modal, - tooltip, - 'ui.highlight', - 'ui.indeterminate', - 'ng-sortable', - 'app.directives' + 'ngAnimate', + 'ngRoute', + accordion, + dropdown, + modal, + tooltip, + 'ui.highlight', + 'ui.indeterminate', + 'ng-sortable', ]); diff --git a/src/settings/main.scss b/src/settings/main.scss index 84b85ac0..2c2b3b8e 100644 --- a/src/settings/main.scss +++ b/src/settings/main.scss @@ -1,65 +1,62 @@ -@import "../common/directives/buildList/_buildList.scss"; -@import "../common/directives/service/_service.scss"; -@import "../common/directives/buildGroup/_buildGroup.scss"; -@import "../common/directives/build/_build.scss"; -@import "add/directives/serviceNamePanel/_serviceNamePanel.scss"; -@import "add/directives/thumbnails/_thumbnails.scss"; -@import "configuration/directives/jsonEditor/_jsonEditor.scss"; -@import "directives/alert/_alert.scss"; -@import "directives/onOffSwitch/_onOffSwitch.scss"; -@import "directives/sidebar/_sidebar.scss"; -@import "directives/topnav/_topnav.scss"; -@import "service/directives/dynamicForm/_dynamicForm.scss"; -@import "service/directives/filterQuery/_filterQuery.scss"; -@import "service/directives/projectList/_projectList.scss"; -@import "service/directives/selectedProjects/_selectedProjects.scss"; - -html, body { - height: 100%; +@import 'add/directives/serviceNamePanel/_serviceNamePanel.scss'; +@import 'add/directives/thumbnails/_thumbnails.scss'; +@import 'configuration/directives/jsonEditor/_jsonEditor.scss'; +@import 'directives/alert/_alert.scss'; +@import 'directives/onOffSwitch/_onOffSwitch.scss'; +@import 'directives/sidebar/_sidebar.scss'; +@import 'directives/topnav/_topnav.scss'; +@import 'service/directives/dynamicForm/_dynamicForm.scss'; +@import 'service/directives/filterQuery/_filterQuery.scss'; +@import 'service/directives/projectList/_projectList.scss'; +@import 'service/directives/selectedProjects/_selectedProjects.scss'; + +html, +body { + height: 100%; } body { - padding-top: 55px; + padding-top: 55px; } a { - cursor: pointer; + cursor: pointer; } .content-container { - bottom: 0; - left: 241px; - position: absolute; - right: 0; - top: 60px; + bottom: 0; + left: 241px; + position: absolute; + right: 0; + top: 60px; - .alert-danger { - clear: both; - margin: 10px; - } + .alert-danger { + clear: both; + margin: 10px; + } } .settings-container { - box-sizing: border-box; - float: left; - width: 50%; + box-sizing: border-box; + float: left; + width: 50%; } .settings-buttons { - text-align: center; + text-align: center; } .project-selection-container { - box-sizing: border-box; - float: left; - padding: 0 10px; - width: 50%; + box-sizing: border-box; + float: left; + padding: 0 10px; + width: 50%; } .theme-dark { - background-color: #000; + background-color: #000; } .theme-light { - background-color: #fff; + background-color: #fff; } diff --git a/src/settings/view/controller.tsx b/src/settings/view/controller.tsx index ae89b0cc..f193af43 100644 --- a/src/settings/view/controller.tsx +++ b/src/settings/view/controller.tsx @@ -1,4 +1,3 @@ -import 'common/directives/buildList/buildList'; import angular from 'angular'; import app from 'settings/app'; import core from 'common/core'; @@ -15,12 +14,6 @@ export default app.controller('ViewSettingsCtrl', function ($scope) { }); }); - core.activeProjects.subscribe(function (projects) { - $scope.$evalAsync(function () { - $scope.activeProjects = projects; - }); - }); - $scope.save = function (config) { if (config.columns < 0) { config.columns = 0; diff --git a/src/settings/view/view.html b/src/settings/view/view.html index e3e3735e..99b8611c 100644 --- a/src/settings/view/view.html +++ b/src/settings/view/view.html @@ -142,6 +142,5 @@
-
diff --git a/vite.config.mts b/vite.config.mts index 2f8efbef..0cf4b157 100644 --- a/vite.config.mts +++ b/vite.config.mts @@ -19,6 +19,8 @@ export default defineConfig({ rollupOptions: { input: { 'service-worker': 'src/service-worker/main.ts', + popup: 'src/themes/popup.html', + dashboard: 'src/themes/dashboard.html', }, output: { dir: 'dist/build', diff --git a/webpack.config.js b/webpack.config.js index 426f0499..59ed891b 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -11,9 +11,7 @@ module.exports = { devtool: 'source-map', context: path.join(__dirname, 'src'), entry: { - popup: './popup/main.js', settings: './settings/main.js', - dashboard: './dashboard/main.js', }, output: { path: path.join(__dirname, 'dist/build'), @@ -31,20 +29,6 @@ module.exports = { chunks: ['commons', 'settings'], minify: false, }), - new HtmlWebpackPlugin({ - template: 'popup/index.html', - filename: 'popup.html', - inject: 'body', - chunks: ['commons', 'popup'], - minify: false, - }), - new HtmlWebpackPlugin({ - template: 'dashboard/index.html', - filename: 'dashboard.html', - inject: 'body', - chunks: ['commons', 'dashboard'], - minify: false, - }), new CopyWebpackPlugin({ patterns: [ { from: '../manifest.json', to: 'manifest.json' },