Skip to content

Commit

Permalink
feat(offline): adding offline mode and fix import repositories
Browse files Browse the repository at this point in the history
  • Loading branch information
Debaerdm committed Feb 4, 2021
1 parent 35abff4 commit ff82d7a
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 8,670 deletions.
8,585 changes: 26 additions & 8,559 deletions package-lock.json

Large diffs are not rendered by default.

39 changes: 0 additions & 39 deletions public/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -64,45 +64,6 @@ input:disabled {
background-color: #fff;
}

.skz-splashscreen {
width: 100%;
height: 100%;
display: flex;
justify-content: space-between;
align-items: center;
flex-direction: column;
}

.skz-splashscreen__logo {
height: 100%;
width: 85%;
animation: slideUp 0.7s;
animation-fill-mode: both;
animation-timing-function: ease-in-out;
}

.skz-splashscreen__logo--dark {
display: none;
}

.skz-splashscreen__progress {
width: 100%;
text-align: center;
background-color: #eee;
position: relative;
height: 2rem;
}

.skz-splashscreen__progress--bar {
height: 100%;
background-color: #23cc56;
}

.skz-splashscreen__label {
position: relative;
height: 15%;
}

.btn {
background-color: #00008f;
border: none;
Expand Down
66 changes: 0 additions & 66 deletions public/splashscreen.html

This file was deleted.

5 changes: 4 additions & 1 deletion src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import Navigation from 'components/Navigation';
import Notification from 'components/Notification';
import { Views } from 'models/skizzle/ViewsEnum';
import { settings } from 'shared/stores/default.store';
import { offline, settings } from 'shared/stores/default.store';
import { onMount } from 'svelte';
import { SkizzleUpdaterEnum } from 'models/skizzle';
const app = require('electron').ipcRenderer;
Expand All @@ -22,6 +22,9 @@
let currentView: Views = Views.Main;
const onViewChange = (view: Views) => (currentView = view);
window.addEventListener('online', () => offline.set(false));
window.addEventListener('offline', () => offline.set(true));
onMount(() => {
setInterval(() => {
app.send('check-for-update-request');
Expand Down
1 change: 0 additions & 1 deletion src/components/AzureDevOps/AzureDevOps.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@
{/if}
</section>
<section>
<AccountTitle>Vos repositories suivis</AccountTitle>
<FollowedRepositories {profile} />
</section>
</div>
Expand Down
12 changes: 8 additions & 4 deletions src/components/ImportExport/ImportExport.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,20 @@
import AccountTitle from 'components/AccountTitle';
import { copyToClipboard, isJson } from 'shared/utils';
import Icons from 'components/icons';
import type { RepositoryType } from 'models/skizzle';
export let followedRepositories;
export let followedRepositories: RepositoryType[];
let currentTab:string = 'import';
let code:string = '';
let currentTab: string = 'import';
let code: string = '';
const changeTab = (tab:string) => currentTab = tab;
const importCode = () => {
repositories.set(JSON.parse(code));
let repositoriesImported = JSON.parse(code) as RepositoryType[];
let filteredRepositories = repositoriesImported.filter(y => !$repositories.some(z => z.repositoryId === y.repositoryId));
repositories.update(x => [...x, ...filteredRepositories]);
}
</script>

Expand Down
1 change: 1 addition & 0 deletions src/shared/stores/default.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ export const organizations = createStore<OrganizationType[]>([], {
export const isLoading = createStore<boolean>(false, {});
export const isFetchingData = createStore<boolean>(false, {});
export const notifications = createStore<NotificationType[]>([], {});
export const offline = createStore<boolean>(false, {});
export const settings = createStore<SettingsType>(
{
refresh_delay: 5,
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"extends": "@tsconfig/svelte/tsconfig.json",
"compilerOptions": {
"types": ["node", "jest", "superagent", "superagent-proxy", "uuid"],
"baseUrl": "src",
"allowSyntheticDefaultImports": true,
"esModuleInterop": true
Expand Down

0 comments on commit ff82d7a

Please sign in to comment.