From 9973b8d76618940c179037d6d2d667320ee5a387 Mon Sep 17 00:00:00 2001 From: kPherox Date: Sat, 27 Apr 2019 03:10:35 +0900 Subject: [PATCH 01/11] Change modifiers private to public in *.vue Remove mistyped --- src/components/AddColumn/PublicTimeline.vue | 2 +- src/components/Timeline/Timeline.vue | 2 +- src/components/Welcome.vue | 2 +- src/components/globals/BaseButton.vue | 2 +- src/views/About.vue | 4 ++-- src/views/App.vue | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/AddColumn/PublicTimeline.vue b/src/components/AddColumn/PublicTimeline.vue index fd4315e5..c5d5f044 100644 --- a/src/components/AddColumn/PublicTimeline.vue +++ b/src/components/AddColumn/PublicTimeline.vue @@ -147,7 +147,7 @@ export default class AddColumn extends Vue { console.log("Account dialog:" + id) } } -= + \ No newline at end of file diff --git a/src/main/Auth.ts b/src/main/Auth.ts index cdfc362c..ef305b7e 100644 --- a/src/main/Auth.ts +++ b/src/main/Auth.ts @@ -75,7 +75,7 @@ export default class Auth { accessToken: tokenData.accessToken, color: undefined } - db.insert(docs, function(err, newDocs) { + db.insert(docs, function (err, newDocs) { if (err) { event.sender.send(`error`, { id: "ERROR_YOU_TRY_ANOTHER_ACCOUNT", diff --git a/src/views/App.vue b/src/views/App.vue index ee00cf02..e1665bb5 100644 --- a/src/views/App.vue +++ b/src/views/App.vue @@ -1,21 +1,26 @@ From d3b5d057628213ae3c6d7a4e0df616902b4173a1 Mon Sep 17 00:00:00 2001 From: kPherox Date: Sat, 27 Apr 2019 05:13:34 +0900 Subject: [PATCH 08/11] Change to select timeline when add account --- src/components/Welcome.vue | 22 +++++++++++++++------- src/views/App.vue | 2 +- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/components/Welcome.vue b/src/components/Welcome.vue index d8a5a1ca..e9823f59 100644 --- a/src/components/Welcome.vue +++ b/src/components/Welcome.vue @@ -4,16 +4,20 @@

Welcome to TheDesk

{{ loginButton }} {{ publicTLButton }} - {{ TLButton }} - + - + @@ -21,11 +25,11 @@ diff --git a/src/views/App.vue b/src/views/App.vue index e1665bb5..99a2590d 100644 --- a/src/views/App.vue +++ b/src/views/App.vue @@ -41,7 +41,7 @@ export default class App extends Vue { ipcRenderer.on('change-color-theme', () => this.isDarkMode = ipcRenderer.sendSync('dark-theme')) // TODO: アカウントか公開TLの追加を確認する。初回起動時のみ if (this.isStartup) { - //ipcRenderer.once('add-account-or-timeline', () => this.isStartup = false) + //ipcRenderer.once('add-timeline', () => this.isStartup = false) } } From a19b3c899f8a7429ca64bb0a89923e5049d23bfb Mon Sep 17 00:00:00 2001 From: kPherox Date: Sat, 27 Apr 2019 05:15:24 +0900 Subject: [PATCH 09/11] Add disable close option to base overlay component --- src/components/Welcome.vue | 1 + src/components/globals/BaseOverlay.vue | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/Welcome.vue b/src/components/Welcome.vue index e9823f59..6a4631f1 100644 --- a/src/components/Welcome.vue +++ b/src/components/Welcome.vue @@ -8,6 +8,7 @@
- +

{{ title }}

@@ -19,6 +19,8 @@ import { Component, Prop, Vue } from 'vue-property-decorator' export default class BaseOverlay extends Vue { @Prop() public title?: string + @Prop() + public disableClose?: boolean public closeOverlay() { this.$emit('close') From 212cea2b59123437d2f63408e5fd6d018218c0e4 Mon Sep 17 00:00:00 2001 From: kPherox Date: Sat, 27 Apr 2019 06:33:15 +0900 Subject: [PATCH 10/11] Add user timeline component --- src/components/AddColumn/PublicTimeline.vue | 3 +- src/components/AddColumn/UserTimeline.vue | 63 +++++++++++++++++++++ src/components/Welcome.vue | 2 +- 3 files changed, 65 insertions(+), 3 deletions(-) create mode 100644 src/components/AddColumn/UserTimeline.vue diff --git a/src/components/AddColumn/PublicTimeline.vue b/src/components/AddColumn/PublicTimeline.vue index c5d5f044..6dd79759 100644 --- a/src/components/AddColumn/PublicTimeline.vue +++ b/src/components/AddColumn/PublicTimeline.vue @@ -56,7 +56,7 @@ type UpdateListener = (e: Event, status: Status) => void TimelineToot } }) -export default class AddColumn extends Vue { +export default class PublicTimeline extends Vue { public instance: Instance = "" public showInput: boolean = true public updateListeners: [string, UpdateListener][] = [] @@ -106,7 +106,6 @@ export default class AddColumn extends Vue { ipcRenderer.send("no-auth-timeline", timeline.name) } - public loadTL(timeline: Timeline, statuses: Status[]) { timeline.statuses = new Map( statuses.map((status): [number, Status] => [status.id, status]) diff --git a/src/components/AddColumn/UserTimeline.vue b/src/components/AddColumn/UserTimeline.vue new file mode 100644 index 00000000..78832b2d --- /dev/null +++ b/src/components/AddColumn/UserTimeline.vue @@ -0,0 +1,63 @@ + + + + + \ No newline at end of file diff --git a/src/components/Welcome.vue b/src/components/Welcome.vue index 6a4631f1..b46625fc 100644 --- a/src/components/Welcome.vue +++ b/src/components/Welcome.vue @@ -27,7 +27,7 @@ import { Component, Vue } from 'vue-property-decorator' import Login from './Preferences/AccountAuth.vue' -import Timeline from './Timeline/Timeline.vue' +import Timeline from './AddColumn/UserTimeline.vue' import PublicTimeline from './AddColumn/PublicTimeline.vue' type Status = 'welcome' | 'login' | 'public_timeline' | 'select_timeline' From d3f5313bd81681ba2c543343ce2daacc2fe19bff Mon Sep 17 00:00:00 2001 From: kPherox Date: Sat, 27 Apr 2019 06:45:45 +0900 Subject: [PATCH 11/11] Add username props to user timeline component --- src/components/AddColumn/UserTimeline.vue | 2 ++ src/components/Preferences/AccountAuth.vue | 13 +++++++++++-- src/components/Welcome.vue | 20 +++++++++++++++----- src/main/Auth.ts | 4 ++-- 4 files changed, 30 insertions(+), 9 deletions(-) diff --git a/src/components/AddColumn/UserTimeline.vue b/src/components/AddColumn/UserTimeline.vue index 78832b2d..5e44f6b1 100644 --- a/src/components/AddColumn/UserTimeline.vue +++ b/src/components/AddColumn/UserTimeline.vue @@ -23,6 +23,8 @@ import { Component, Prop, Vue } from "vue-property-decorator" @Component export default class UserTimeline extends Vue { + @Prop() public username!: string + public timelineType: string = 'home' public userTimelineTypes: { [key: string]: string diff --git a/src/components/Preferences/AccountAuth.vue b/src/components/Preferences/AccountAuth.vue index 97a292dd..4c3f039f 100644 --- a/src/components/Preferences/AccountAuth.vue +++ b/src/components/Preferences/AccountAuth.vue @@ -22,7 +22,16 @@