Skip to content

Commit

Permalink
feat(stores): refacto subscribe method
Browse files Browse the repository at this point in the history
  • Loading branch information
Debaerdm committed Jan 25, 2021
1 parent f232a47 commit 279ae25
Show file tree
Hide file tree
Showing 17 changed files with 102 additions and 286 deletions.
19 changes: 15 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"@types/node": "^14.14.13",
"@types/superagent": "^4.1.10",
"@types/superagent-proxy": "^2.0.0",
"@types/uuid": "^8.3.0",
"cross-env": "^7.0.3",
"electron": "^11.1.0",
"electron-builder": "^22.9.1",
Expand Down Expand Up @@ -73,7 +74,8 @@
"ky": "^0.26.0",
"sirv-cli": "^1.0.10",
"superagent": "^6.1.0",
"superagent-proxy": "^2.1.0"
"superagent-proxy": "^2.1.0",
"uuid": "^8.3.2"
},
"auto-changelog": {
"template": "./changelog-template.hbs",
Expand Down
6 changes: 0 additions & 6 deletions src/components/Avatar/Avatar.svelte
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
<script lang="ts">
import type { PullRequestType } from 'models/skizzle/PullRequestType';
import Icons from 'components/icons';
import { ProviderEnum } from '../../models/skizzle/ProviderEnum';
import { Service } from 'services/Service';
import { settings } from 'shared/stores/default.store';
export let pullRequest: PullRequestType;
export let className: string;
const images = {
[ProviderEnum.Github]: Icons.Github,
[ProviderEnum.AzureDevOps]: Icons.AzureDevOps,
};
</script>

<style>
Expand Down
17 changes: 3 additions & 14 deletions src/components/CustomListSettings/CustomListSettings.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script lang="ts">
import { v4 as uuidv4 } from 'uuid';
import type { CustomListType } from 'models/skizzle/CustomListType';
import AccountTitle from 'components/AccountTitle';
import Fieldset from 'components/Fieldset';
Expand All @@ -21,15 +22,6 @@
const onSubmit = (event): void => {
event.preventDefault();
function uuidv4() {
return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, c =>
(
c ^
(crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (c / 4)))
).toString(16),
);
}
if (id) {
const list: CustomListType = {
id,
Expand Down Expand Up @@ -179,11 +171,8 @@
n'affichera que des pull requests de ces repositories dans votre liste${listName ? ` "${listName}"` : ''}.`}>
<div class="field">
<select
value={selectedRepoId}
id="repos"
on:change={e => {
selectedRepoId = e.target.value;
}}>
bind:value={selectedRepoId}
id="repos">
{#if !selectedRepoId}
<option>Selectionnez</option>
{/if}
Expand Down
4 changes: 1 addition & 3 deletions src/components/FollowedRepositories/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
import FollowedRepositories from './FollowedRepositories.svelte';

export default FollowedRepositories;
export { default } from './FollowedRepositories.svelte';
1 change: 0 additions & 1 deletion src/components/Github/Github.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import {
isFetchingData,
isLoading,
projects,
} from 'shared/stores/default.store';
import { authorize } from 'shared/token';
import { ProviderEnum } from 'models/skizzle/ProviderEnum';
Expand Down
3 changes: 0 additions & 3 deletions src/components/Github/index.js

This file was deleted.

1 change: 1 addition & 0 deletions src/components/Github/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from './Github.svelte';
3 changes: 0 additions & 3 deletions src/components/Modale/index.js

This file was deleted.

1 change: 1 addition & 0 deletions src/components/Modale/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from './Modale.svelte';
2 changes: 1 addition & 1 deletion src/components/Navigation/Navigation.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import Icons from '../icons';
import { Views } from 'models/skizzle/ViewsEnum';
import { Views } from 'models/skizzle';
export let currentView: Views;
export let onViewChange: Function;
Expand Down
4 changes: 2 additions & 2 deletions src/components/Pullrequest/Pullrequest.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import type { PullRequestType } from 'models/skizzle/PullRequestType';
import Labels from '../Labels';
import type { PullRequestType } from 'models/skizzle';
import Labels from 'components/Labels';
import Modale from 'components/Modale';
import { isFetchingData } from '../../shared/stores/default.store';
import Avatar from 'components/Avatar';
Expand Down
4 changes: 1 addition & 3 deletions src/components/SearchResults/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
import SearchResults from './SearchResults.svelte';

export default SearchResults;
export { default } from './SearchResults.svelte';
2 changes: 1 addition & 1 deletion src/components/Settings/Settings.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import AccountTitle from 'components/AccountTitle';
import Fieldset from 'components/Fieldset';
import Range from 'components/Range';
import { ThemeEnum } from 'models/skizzle/ThemeEnum';
import { ThemeEnum } from 'models/skizzle';
import { settings } from 'shared/stores/default.store';
import Icons from 'components/icons';
Expand Down
File renamed without changes.
164 changes: 0 additions & 164 deletions src/electron/Updater.ts

This file was deleted.

Loading

0 comments on commit 279ae25

Please sign in to comment.