Giter Club home page Giter Club logo

app's Introduction

Puraku 你最愛的噗浪終於登陸 macOS啦!

跟噗浪官方 iOS App 有 87% 像的電腦版噗浪 App!

還算活躍的開發中,有關專案進度、技術問題或功能建議都可以到 issue#6 討論

下載請到 GitHub 的 Releases 頁面

Screentshots

Development

請確定已經安裝好 node、npm 環境。

  1. 開啟終端機,在專案目錄下執行:

    bin/setup

    此 bash 腳本會幫你安裝 yarn,並且把需要的 npm 套件裝好。

  2. 接下來請編輯 app/config.js,填入你在噗浪開發者申請的 oauth consumer key 和 secret key。要注意的是,在申請 App 時,OAuth callback 需填入:

    puraku://oauth_callback

    如下圖:

  3. 最後開啟兩個 Terminal 分別執行以下指令:

    npm run dev          # Terminal 1, webpack Development server
    
    npm run electron:dev # Terminal 2, start electron

Directory Structure

├── app    # electron source
├── bin    # setup scripts
├── docs   # documents and images(if any)
├── src    # Vue.js SPA source
├── static # html template
├── ...
├── ...
└── yarn.lock

Q&A

  1. 為毛還要做一個桌面版的 App 呀?不是都有網頁版惹?

    我也不知道為什麼 Twiiter 會有那麼多開發者出桌面版 App,可能都是吃飽太閒吧 😅 有 App 是好事啊,代表 API 有人在用耶 XD

  2. 選用 Web 技術 Vue.js 有什麼特別的考量嗎?

    去年有用過用 React.js + Electon 做的 Twitter App - Tweetman,體驗並沒有想像中的美好,開發者也沒有後續更新。既然自己號稱 Web Developer ,就來自己幹一個八。選用 Vue.js 原因之一是因為他的簡潔易學,做完這個專案也剛好證明邊做邊學 Vue 是可行的。

License

MIT

app's People

Contributors

yukaii avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

app's Issues

Plan v1.0

本專案有兩大目的:

  1. 學習 Vue.js
  2. 填以前挖的坑

一直以來 macOS 都沒有一個足夠好用的 Plurk App,用慣了 macOS 下優質 App 的我想當然爾應當貢獻一下。雖然截止目前並不是一個十分活躍的噗浪使用者,希望做完之後除了變腦粉外,也能順便推廣 Plurk。附帶一題,最終的 App 會是全平臺的,順便連 Windows App 都給他上架一下 😈

目前專案在做完「Basic Layout #4 」和「Basic API Usage #5 」之後,整體的樣貌就慢慢可以想像了。因為 Plurk API 實在有些歷史,近年來的改動也不多,API 的部分只要隨著 UI 的演進慢慢擴增即可 🎉

以下是 v1.0 需完成事項:

📓 架構、套件

🎁 UI

  • THE 河道 #8
    • timeline day tag #14
    • other details polishment
  • Plurk show 頁面 #10
  • 個人頁面 Profile #12
    • THE 視差滾動 #16
    • Slider dot & animation
    • 追蹤、加朋友功能
  • CRUD 剩餘項目
  • Replurk 0cb5c2a
  • Every programmer needs a DARK MODE #17
  • 發文界面,希望是獨立 Pop out #18
  • 回覆 Plurk 界面
  • Top Plurks
  • 收藏頁面
  • THE 貼圖 emoticons
  • 設定頁面
  • Scroll to refresh

📜 雜項

  • 完成過場動畫,無限逼近原生 App
  • App theming,噗浪令人最喜愛的地方就是能用 css 自訂個人頁面,如果 App 也能達成就太好了。
  • config: always on top mainWindow.isAlwaysOnTop()mainWindow.setAlwaysOnTop(true)
  • 多帳號支援
  • 用 BrowserWindow setBounds 的 API 做個漂亮的 Image viewer
  • webpack resolve path,import 的更漂亮一點 3da1e67
  • plurk content DOM event inject 7f92e41
    • image opener。對所有 image 註冊事件,按了之後開 BrowserWindow。不知道 Vue 裡面能不能直接幫 dom 加 listener,還是要直接加 jquery 咧 XD e1e0a7c
    • handle external link 7f92e41
  • open external link in browser or customized BrowserWindow
  • electron devtools

Error when rendering component (Response)

[Vue warn]: Error when rendering component <Response> at /puraku/puraku-client/src/components/Response.vue: 

Uncaught TypeError: Cannot read property 'display_name' of undefined

Plurk Detail first load error

plurkHelper.js?b5bf:48 Uncaught (in promise) TypeError: dom.querySelectorAll is not a function(…)registerContentEvent @ plurkHelper.js?b5bf:48mounted @ PlurkCard.vue?2d84:185callHook @ vue.js?3de6:1830insert @ vue.js?3de6:1999invokeInsertHook @ vue.js?3de6:4119patch @ vue.js?3de6:4261Vue._update @ vue.js?3de6:1722(anonymous function) @ vue.js?3de6:1695get @ vue.js?3de6:740run @ vue.js?3de6:809flushSchedulerQueue @ vue.js?3de6:627nextTickHandler @ vue.js?3de6:405
vue.js?3de6:2252 Uncaught TypeError: Cannot read property 'id' of undefined

OAuth key protection

electron-builder 封裝成 asar 檔,然後 asar 就只是個壓縮檔,config.js 裡面的 key 就一起包進去啦。

雖然說 OAuth 的流程就是讓使用者知道誰拿的你資料,不過之後要想辦法改善。

TypeError: The header content contains invalid characters

TypeError: The header content contains invalid characters
    at ClientRequest.OutgoingMessage.setHeader (_http_outgoing.js:346:11)
    at new ClientRequest (_http_client.js:85:14)
    at Object.exports.request (http.js:31:10)

WTF 系列,OAuth 都設定好了,只差呼叫 API endpoint,卻又出這種問題 = =,找找看要怎麼修,如果無法就又要重刻 OAuth 了 Zzz

Choosing view library

沒意外的話就是 Vue.js 了。

原本想玩玩 Aurelia,但一打開 skeleton 就是基八一大包,想直接腦內客製導入也麻煩。看到 vuejs 的模板專案 webpack-simple 的確非常 simple,導入時遇到 npm package dependency 的問題,rm -rf node_modules 之後重裝就沒事了。

Sometimes plurk card won't show in Detail page

因為目前在 render plurk-card 元件時有傳遞下 userList 這個 Object,但有時 userList 卻是從 response API 拿到的,所以 user 會少原始噗主的。

把兩次 API 的使用者列表拿出來就解決了,之後 User 存到 vuex store 甚至做 cache 之後應該寫起來會更精簡。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.