|
1 | | -const { Clutter, GObject, St } = imports.gi |
| 1 | +import Clutter from 'gi://Clutter' |
| 2 | +import GObject from 'gi://GObject' |
| 3 | +import St from 'gi://St' |
2 | 4 |
|
3 | | -const ExtensionUtils = imports.misc.extensionUtils |
4 | | -const Me = ExtensionUtils.getCurrentExtension() |
| 5 | +import { CommitCard } from '../../cards/commitCard.js' |
| 6 | +import { FlatList } from '../../flatList/flatList.js' |
| 7 | +import { PipelineCard } from '../../cards/pipelineCard.js' |
| 8 | +import { ProjectCard } from '../../cards/projectCard.js' |
| 9 | +import { SearchBar } from '../../searchBar/searchBar.js' |
| 10 | +import { Translations } from '../../../helpers/translations.js' |
5 | 11 |
|
6 | | -const { CommitCard } = Me.imports.components.cards.commitCard |
7 | | -const { FlatList } = Me.imports.components.flatList.flatList |
8 | | -const { PipelineCard } = Me.imports.components.cards.pipelineCard |
9 | | -const { ProjectCard } = Me.imports.components.cards.projectCard |
10 | | -const { SearchBar } = Me.imports.components.searchBar.searchBar |
11 | | -const { Translations } = Me.imports.helpers.translations |
12 | | - |
13 | | -const GitLabService = Me.imports.services.gitlab |
| 12 | +import * as GitLabService from '../../../services/gitlab.js' |
14 | 13 |
|
15 | 14 | const TABS = { |
16 | 15 | COMMITS: 'commits', |
17 | 16 | PIPELINES: 'pipelines' |
18 | 17 | } |
19 | 18 |
|
20 | | -var ProjectDetailsScreen = GObject.registerClass({}, class ProjectDetailsScreen extends St.BoxLayout { |
| 19 | +export const ProjectDetailsScreen = GObject.registerClass({}, class ProjectDetailsScreen extends St.BoxLayout { |
21 | 20 | _init (projectItem, mainEventHandler) { |
22 | 21 | super._init({ |
23 | 22 | style_class: 'screen project-details-screen', |
@@ -101,7 +100,7 @@ var ProjectDetailsScreen = GObject.registerClass({}, class ProjectDetailsScreen |
101 | 100 | // vertical: false |
102 | 101 | // }) |
103 | 102 | // |
104 | | - // this.scroll.add_actor(this.box, { expand: false, x_fill: false, x_align: St.Align.LEFT }) |
| 103 | + // this.scroll.add_actor(this.box, { expand: false, x_fill: false, x_align: Clutter.ActorAlign.LEFT }) |
105 | 104 | // } |
106 | 105 |
|
107 | 106 | _extract_filterable_search_text (commit, pipeline) { |
@@ -212,9 +211,9 @@ var ProjectDetailsScreen = GObject.registerClass({}, class ProjectDetailsScreen |
212 | 211 |
|
213 | 212 | // refresh data |
214 | 213 | if (this._selectedTab === TABS.COMMITS) { |
215 | | - this._loadCommits() |
| 214 | + this._loadCommits().catch(e => log(e)) |
216 | 215 | } else if (this._selectedTab === TABS.PIPELINES) { |
217 | | - this._loadPipelines() |
| 216 | + this._loadPipelines().catch(e => log(e)) |
218 | 217 | } |
219 | 218 | } |
220 | 219 | }) |
0 commit comments