├── src ├── global.d.ts ├── utils │ ├── index.ts │ ├── parseQueryString.ts │ ├── toBase64.ts │ └── DynamicImage.ts ├── routes │ ├── Redirect.svelte │ ├── ViewTweet.svelte │ ├── Oauth.svelte │ ├── LogOut.svelte │ ├── LogIn.svelte │ ├── UserLikes.svelte │ ├── UserTweets.svelte │ ├── UserMentions.svelte │ ├── Home.svelte │ ├── ViewList.svelte │ ├── UserBookmarks.svelte │ ├── Timeline.svelte │ ├── UserLists.svelte │ ├── ListFollowers.svelte │ ├── ListMembers.svelte │ ├── UserProfile.svelte │ ├── Compose.svelte │ └── AppSettings.svelte ├── main.ts ├── models │ ├── TwitterTokens.ts │ ├── Tokens.ts │ ├── NewTweet.ts │ ├── Poll.ts │ ├── TwitterList.ts │ ├── TwitterNewTweet.ts │ ├── TwitterPoll.ts │ ├── User.ts │ ├── List.ts │ ├── TwitterUser.ts │ ├── Settings.ts │ ├── index.ts │ ├── TwitterTweet.ts │ └── Tweet.ts ├── services │ ├── storage.ts │ ├── perfLogger.ts │ ├── kaiAds.ts │ ├── database.ts │ ├── data.ts │ ├── mapper.ts │ ├── authClient.ts │ └── twitter.ts ├── themes.ts ├── components │ ├── ImageRow.svelte │ ├── InlineTweetLoader.svelte │ ├── TweetLoader.svelte │ ├── PollViewer.svelte │ ├── AppMenu.svelte │ └── TweetViewer.svelte ├── stores │ └── settings.ts └── App.svelte ├── promo └── banner.png ├── .gitignore ├── .vscode └── extensions.json ├── public ├── favicon.png ├── fix.js ├── images │ ├── icon_112.png │ ├── icon_128.png │ └── icon_56.png ├── index.html ├── manifest.webapp ├── manifest.webmanifest ├── manifest.en-US.webmanifest ├── global.css └── kaiads.v5.min.js ├── deploy ├── package.sh └── version.sh ├── tsconfig.json ├── README.md ├── release.config.js ├── .circleci └── config.yml ├── package.json ├── rollup.config.js ├── CHANGELOG.md └── LICENSE /src/global.d.ts: -------------------------------------------------------------------------------- 1 | /// -------------------------------------------------------------------------------- /promo/banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotSpecCo/kaite/HEAD/promo/banner.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules/ 2 | /public/build/ 3 | 4 | .DS_Store 5 | .env 6 | stats.html -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["svelte.svelte-vscode"] 3 | } 4 | -------------------------------------------------------------------------------- /public/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotSpecCo/kaite/HEAD/public/favicon.png -------------------------------------------------------------------------------- /public/fix.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | // TODO: Why 3 | window.globalThis = window; 4 | })(); 5 | -------------------------------------------------------------------------------- /public/images/icon_112.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotSpecCo/kaite/HEAD/public/images/icon_112.png -------------------------------------------------------------------------------- /public/images/icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotSpecCo/kaite/HEAD/public/images/icon_128.png -------------------------------------------------------------------------------- /public/images/icon_56.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotSpecCo/kaite/HEAD/public/images/icon_56.png -------------------------------------------------------------------------------- /src/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * from './DynamicImage'; 2 | export * from './parseQueryString'; 3 | export * from './toBase64'; 4 | -------------------------------------------------------------------------------- /deploy/package.sh: -------------------------------------------------------------------------------- 1 | VERSION=$1 2 | 3 | echo "Packaging version ${VERSION}" 4 | 5 | cd public && zip -r ../Kaite_v${VERSION}.zip * && cd .. -------------------------------------------------------------------------------- /src/routes/Redirect.svelte: -------------------------------------------------------------------------------- 1 | 5 | -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- 1 | import App from './App.svelte'; 2 | 3 | const app = new App({ 4 | target: document.body, 5 | }); 6 | 7 | export default app; 8 | -------------------------------------------------------------------------------- /src/models/TwitterTokens.ts: -------------------------------------------------------------------------------- 1 | export type TwitterTokens = { 2 | access_token: string; 3 | refresh_token: string; 4 | expires_in: number; 5 | }; 6 | -------------------------------------------------------------------------------- /src/models/Tokens.ts: -------------------------------------------------------------------------------- 1 | export type Tokens = { 2 | accessToken: string | null; 3 | refreshToken: string | null; 4 | tokenExpiresAt: string | null; 5 | }; 6 | -------------------------------------------------------------------------------- /src/models/NewTweet.ts: -------------------------------------------------------------------------------- 1 | export type NewTweet = { 2 | text: string; 3 | replyId?: string; 4 | quoteId?: string; 5 | poll?: { 6 | options: string[]; 7 | duration: number; 8 | }; 9 | }; 10 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/svelte/tsconfig.json", 3 | "compilerOptions": { "resolveJsonModule": true }, 4 | "include": ["src/**/*"], 5 | "exclude": ["node_modules/*", "__sapper__/*", "public/*"] 6 | } 7 | -------------------------------------------------------------------------------- /src/models/Poll.ts: -------------------------------------------------------------------------------- 1 | export type Poll = { 2 | id: string; 3 | duration: number; 4 | endsAt: string; 5 | status: 'open' | 'closed'; 6 | options: { 7 | label: string; 8 | position: number; 9 | votes: number; 10 | }[]; 11 | }; 12 | -------------------------------------------------------------------------------- /src/models/TwitterList.ts: -------------------------------------------------------------------------------- 1 | export type TwitterList = { 2 | id: string; 3 | name: string; 4 | private: boolean; 5 | created_at: string; 6 | follower_count: number; 7 | member_count: number; 8 | owner_id: string; 9 | description: string; 10 | }; 11 | -------------------------------------------------------------------------------- /src/models/TwitterNewTweet.ts: -------------------------------------------------------------------------------- 1 | export type TwitterNewTweet = { 2 | text: string; 3 | quote_tweet_id?: string; 4 | reply?: { 5 | in_reply_to_tweet_id: string; 6 | }; 7 | poll?: { 8 | options: string[]; 9 | duration_minutes: number; 10 | }; 11 | }; 12 | -------------------------------------------------------------------------------- /src/models/TwitterPoll.ts: -------------------------------------------------------------------------------- 1 | export type TwitterPoll = { 2 | id: string; 3 | duration_minutes: number; 4 | end_datetime: string; 5 | voting_status: 'open' | 'closed'; 6 | options: { 7 | label: string; 8 | position: number; 9 | votes: number; 10 | }[]; 11 | }; 12 | -------------------------------------------------------------------------------- /src/services/storage.ts: -------------------------------------------------------------------------------- 1 | export class Storage { 2 | static setItem(key: string, data: any): void { 3 | window.localStorage.setItem(key, JSON.stringify(data)); 4 | } 5 | static getItem(key: string): T | null { 6 | return JSON.parse(window.localStorage.getItem(key) as string); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/services/perfLogger.ts: -------------------------------------------------------------------------------- 1 | export class PerfLogger { 2 | static enabled = false; 3 | 4 | static start(label: string) { 5 | if (!this.enabled) return; 6 | console.time(label); 7 | } 8 | 9 | static stop(label: string) { 10 | if (!this.enabled) return; 11 | console.timeEnd(label); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/utils/parseQueryString.ts: -------------------------------------------------------------------------------- 1 | export function parseQueryString(queryString: string): { [key: string]: string } { 2 | if (!queryString) return {}; 3 | 4 | return queryString.split('&').reduce((acc, part) => { 5 | const [key, val] = part.split('='); 6 | acc[key] = val; 7 | return acc; 8 | }, {}); 9 | } 10 | -------------------------------------------------------------------------------- /src/models/User.ts: -------------------------------------------------------------------------------- 1 | export type User = { 2 | id: string; 3 | name: string; 4 | username: string; 5 | avatarUrl: string; 6 | description: string; 7 | location: string; 8 | followersCount: number; 9 | followingCount: number; 10 | tweetCount: number; 11 | listedCount: number; 12 | createdAt: string; 13 | }; 14 | -------------------------------------------------------------------------------- /src/utils/toBase64.ts: -------------------------------------------------------------------------------- 1 | export function toBase64(file: File | Blob): Promise { 2 | return new Promise((resolve, reject) => { 3 | const reader = new FileReader(); 4 | reader.readAsDataURL(file); 5 | reader.onload = (): void => resolve(reader.result as string); 6 | reader.onerror = (err): void => reject(err); 7 | }); 8 | } 9 | -------------------------------------------------------------------------------- /src/models/List.ts: -------------------------------------------------------------------------------- 1 | export type List = { 2 | id: string; 3 | name: string; 4 | description: string; 5 | private: boolean; 6 | createdAt: string; 7 | followerCount: number; 8 | memberCount: number; 9 | owner: { 10 | id: string; 11 | name: string; 12 | username: string; 13 | avatarUrl: string; 14 | }; 15 | }; 16 | -------------------------------------------------------------------------------- /src/models/TwitterUser.ts: -------------------------------------------------------------------------------- 1 | export type TwitterUser = { 2 | id: string; 3 | name: string; 4 | username: string; 5 | profile_image_url: string; 6 | description: string; 7 | location: string; 8 | created_at: string; 9 | public_metrics: { 10 | followers_count: number; 11 | following_count: number; 12 | tweet_count: number; 13 | listed_count: number; 14 | }; 15 | }; 16 | -------------------------------------------------------------------------------- /src/models/Settings.ts: -------------------------------------------------------------------------------- 1 | import type { BaseSettings } from 'onyx-ui/models'; 2 | 3 | export type Settings = BaseSettings & { 4 | timestamps: 'absolute' | 'relative'; 5 | displayMentions: boolean; 6 | displayLinks: boolean; 7 | displayHashtags: boolean; 8 | displayMedia: boolean; 9 | displayStats: boolean; 10 | mediaQuality: 'lowest' | 'low' | 'medium' | 'high'; 11 | mediaSize: 'small' | 'medium' | 'large'; 12 | }; 13 | -------------------------------------------------------------------------------- /src/models/index.ts: -------------------------------------------------------------------------------- 1 | export * from './List'; 2 | export * from './NewTweet'; 3 | export * from './Poll'; 4 | export * from './Settings'; 5 | export * from './Tokens'; 6 | export * from './Tweet'; 7 | export * from './TwitterList'; 8 | export * from './TwitterNewTweet'; 9 | export * from './TwitterPoll'; 10 | export * from './TwitterTokens'; 11 | export * from './TwitterTweet'; 12 | export * from './TwitterUser'; 13 | export * from './User'; 14 | -------------------------------------------------------------------------------- /deploy/version.sh: -------------------------------------------------------------------------------- 1 | VERSION=$1 2 | 3 | echo "Applying version ${VERSION} to manifests" 4 | 5 | cd public 6 | 7 | jq ".version = \"${VERSION}\"" manifest.webapp > tmp.json && mv tmp.json manifest.webapp 8 | jq ".b2g_features.version = \"${VERSION}\"" manifest.webmanifest > tmp.json && mv tmp.json manifest.webmanifest 9 | jq ".b2g_features.version = \"${VERSION}\"" manifest.en-US.webmanifest > tmp.json && mv tmp.json manifest.en-US.webmanifest 10 | 11 | cd - 12 | 13 | echo "Done" 14 | -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Kaite 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/routes/ViewTweet.svelte: -------------------------------------------------------------------------------- 1 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Kaite 2 | 3 | [![CircleCI](https://dl.circleci.com/status-badge/img/gh/garredow/kaite/tree/main.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/garredow/kaite/tree/main) 4 | 5 | **Announcement:** Sorry everyone, this app no longer works. I lost my API key when Elon took over Twitter and pretty much shut down the developer program. 6 | 7 | A Twitter client for KaiOS. 8 | 9 | ![Device frames](/promo/banner.png?raw=true) 10 | 11 | ### Development and testing 12 | 13 | `npm run dev` builds the app in watch mode and serves the site. Great for testing your app in a desktop browser. 14 | 15 | ### Deploying to a device 16 | 17 | 1. Connect your device to your computer and make sure it appears in WebIDE. 18 | 2. `npm run build` 19 | 3. In WebIDE, load the `/public` folder as a packaged app. 20 | -------------------------------------------------------------------------------- /release.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | branches: ['main'], 3 | plugins: [ 4 | '@semantic-release/commit-analyzer', 5 | '@semantic-release/release-notes-generator', 6 | '@semantic-release/changelog', 7 | '@semantic-release/npm', 8 | [ 9 | '@semantic-release/exec', 10 | { 11 | publishCmd: './deploy/package.sh ${nextRelease.version}', 12 | }, 13 | ], 14 | [ 15 | '@semantic-release/github', 16 | { 17 | successComment: false, 18 | failComment: false, 19 | assets: [ 20 | { 21 | path: 'Kaite_v*.zip', 22 | }, 23 | ], 24 | }, 25 | ], 26 | [ 27 | '@semantic-release/git', 28 | { 29 | assets: ['CHANGELOG.md', 'package.json', 'package-lock.json', '**/manifest.*'], 30 | }, 31 | ], 32 | ], 33 | }; 34 | -------------------------------------------------------------------------------- /src/themes.ts: -------------------------------------------------------------------------------- 1 | import type { ThemeConfig } from 'onyx-ui/models'; 2 | 3 | export const themes: ThemeConfig[] = [ 4 | { 5 | id: 'light', 6 | values: { 7 | cardColorH: 0, 8 | cardColorS: 0, 9 | cardColorL: 100, 10 | 11 | accentColorH: 206, 12 | accentColorS: 82, 13 | accentColorL: 63, 14 | 15 | textColorH: 0, 16 | textColorS: 0, 17 | textColorL: 0, 18 | 19 | focusColorA: 20, 20 | dividerColorA: 10, 21 | }, 22 | }, 23 | { 24 | id: 'dark', 25 | values: { 26 | cardColorH: 192, 27 | cardColorS: 8, 28 | cardColorL: 12, 29 | 30 | accentColorH: 206, 31 | accentColorS: 82, 32 | accentColorL: 63, 33 | 34 | textColorH: 0, 35 | textColorS: 0, 36 | textColorL: 100, 37 | 38 | focusColorA: 70, 39 | dividerColorA: 10, 40 | }, 41 | }, 42 | ]; 43 | -------------------------------------------------------------------------------- /src/utils/DynamicImage.ts: -------------------------------------------------------------------------------- 1 | type Size = 'thumb' | 'small' | 'medium' | 'large'; 2 | type Quality = 'lowest' | 'low' | 'medium' | 'high'; 3 | 4 | export class DynamicImage { 5 | baseImageUrl: string; 6 | 7 | constructor(imageUrl: string) { 8 | this.baseImageUrl = imageUrl.match(/([\S]+)(\.jpg|\.png)/)[1]; 9 | } 10 | 11 | toSize(size: Size): string { 12 | return `${this.baseImageUrl}?format=jpg&name=${size}`; 13 | } 14 | 15 | toQuality(quality: Quality): string { 16 | switch (quality) { 17 | case 'lowest': 18 | return `${this.baseImageUrl}?format=jpg&name=thumb`; 19 | case 'low': 20 | return `${this.baseImageUrl}?format=jpg&name=small`; 21 | case 'medium': 22 | return `${this.baseImageUrl}?format=jpg&name=medium`; 23 | case 'high': 24 | return `${this.baseImageUrl}?format=jpg&name=large`; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/models/TwitterTweet.ts: -------------------------------------------------------------------------------- 1 | export type TwitterTweet = { 2 | attachments?: { 3 | media_keys?: string[]; 4 | poll_ids?: string[]; 5 | }; 6 | author_id: string; 7 | created_at: string; 8 | entities?: { 9 | hashtags?: { 10 | end: number; 11 | start: number; 12 | tag: string; 13 | }[]; 14 | urls?: { 15 | end: number; 16 | start: number; 17 | url: string; 18 | display_url: string; 19 | title: string; 20 | description: string; 21 | }[]; 22 | mentions?: { 23 | end: number; 24 | start: number; 25 | id: string; 26 | username: string; 27 | }[]; 28 | }; 29 | id: string; 30 | public_metrics: { 31 | like_count: number; 32 | quote_count: number; 33 | reply_count: number; 34 | retweet_count: number; 35 | }; 36 | text: string; 37 | referenced_tweets?: { 38 | id: string; 39 | type: 'quoted' | 'replied_to' | 'retweeted'; 40 | }[]; 41 | }; 42 | -------------------------------------------------------------------------------- /src/services/kaiAds.ts: -------------------------------------------------------------------------------- 1 | export class KaiAds { 2 | static startListening() { 3 | document.addEventListener('keyup', this.handler, { capture: true }); 4 | } 5 | 6 | static stopListening() { 7 | document.removeEventListener('keyup', this.handler, { capture: true }); 8 | } 9 | 10 | private static handler(ev) { 11 | if (ev.key !== '*') return; 12 | 13 | if ( 14 | ev.target?.tagName.toLowerCase() === 'input' || 15 | (ev.target?.attributes as any).role?.value === 'textbox' 16 | ) { 17 | console.log('In an input, skipping ad.'); 18 | return; 19 | } 20 | 21 | ev.preventDefault(); 22 | ev.stopPropagation(); 23 | 24 | console.log('Serving ad.'); 25 | 26 | (window as any).getKaiAd?.({ 27 | publisher: 'bfa639b9-3ae0-4e79-8042-b41d65c59ea1', 28 | app: 'Kaite', 29 | onerror: (err: any) => console.error('Custom catch:', err), 30 | onready: (ad: any) => ad.call('display'), 31 | }); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /public/manifest.webapp: -------------------------------------------------------------------------------- 1 | { 2 | "id": "dev.nothing.kaite", 3 | "name": "Kaite", 4 | "description": "A Twitter client for KaiOS", 5 | "version": "1.9.0", 6 | "launch_path": "/index.html", 7 | "icons": { 8 | "128": "/images/icon_128.png", 9 | "112": "/images/icon_112.png", 10 | "56": "/images/icon_56.png" 11 | }, 12 | "theme_color": "#1DA1F2", 13 | "developer": { 14 | "name": "Garrett Downs", 15 | "url": "https://nothing.dev" 16 | }, 17 | "type": "privileged", 18 | "redirects": [ 19 | { 20 | "from": "https://dev.nothing.kaite/oauth", 21 | "to": "/index.html" 22 | } 23 | ], 24 | "permissions": { 25 | "systemXHR": { 26 | "description": "Required to communicate with Twitter and other vital functions." 27 | } 28 | }, 29 | "locales": { 30 | "en-US": { 31 | "name": "Kaite", 32 | "description": "A Twitter client for KaiOS" 33 | } 34 | }, 35 | "default_locale": "en-US", 36 | "dependencies": { 37 | "ads-sdk": "1.5.8" 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/models/Tweet.ts: -------------------------------------------------------------------------------- 1 | import type { Poll } from './Poll'; 2 | 3 | export type Tweet = { 4 | id: string; 5 | author: { 6 | id: string; 7 | name: string; 8 | username: string; 9 | avatarUrl: string; 10 | }; 11 | text: string; 12 | htmlText: string; 13 | likeCount: number; 14 | quoteCount: number; 15 | replyCount: number; 16 | retweetCount: number; 17 | entities?: { 18 | hashtags?: { 19 | tag: string; 20 | }[]; 21 | urls?: { 22 | url: string; 23 | display_url: string; 24 | title: string; 25 | description: string; 26 | }[]; 27 | mentions?: { 28 | id: string; 29 | username: string; 30 | }[]; 31 | }; 32 | attachments: { 33 | media?: { 34 | id: string; 35 | type: string; 36 | url: string; 37 | }[]; 38 | poll?: Poll; 39 | }; 40 | createdAt: string; 41 | repliedToTweetId?: string; 42 | quotedTweetId?: string; 43 | retweetedTweetId?: string; 44 | nextTweetId?: string; 45 | prevTweetId?: string; 46 | }; 47 | -------------------------------------------------------------------------------- /src/components/ImageRow.svelte: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 |
13 | 21 |
22 |
23 | 24 | 45 | -------------------------------------------------------------------------------- /.circleci/config.yml: -------------------------------------------------------------------------------- 1 | version: 2.1 2 | executors: 3 | node-lts: 4 | docker: 5 | - image: circleci/node:16.13.1 6 | 7 | jobs: 8 | setup: 9 | executor: node-lts 10 | steps: 11 | - run: sudo apt-get install jq 12 | install: 13 | executor: node-lts 14 | steps: 15 | - checkout 16 | - run: npm ci 17 | - persist_to_workspace: 18 | root: ./ 19 | paths: 20 | - ./* 21 | build: 22 | executor: node-lts 23 | steps: 24 | - checkout 25 | - attach_workspace: 26 | at: . 27 | - run: npm run build 28 | - persist_to_workspace: 29 | root: ./ 30 | paths: 31 | - ./* 32 | version-and-publish: 33 | executor: node-lts 34 | steps: 35 | - attach_workspace: 36 | at: . 37 | - run: npx semantic-release 38 | 39 | workflows: 40 | build-test-deploy: 41 | jobs: 42 | - install 43 | - build: 44 | requires: 45 | - install 46 | - version-and-publish: 47 | context: 48 | - github-versioning 49 | requires: 50 | - build 51 | filters: 52 | branches: 53 | only: 54 | - main 55 | -------------------------------------------------------------------------------- /src/routes/Oauth.svelte: -------------------------------------------------------------------------------- 1 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | Logging in... 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /public/manifest.webmanifest: -------------------------------------------------------------------------------- 1 | { 2 | "lang": "en-US", 3 | "name": "Kaite", 4 | "id": "kaite", 5 | "short_name": "Kaite", 6 | "categories": [ 7 | "social" 8 | ], 9 | "description": "A Twitter client for KaiOS", 10 | "theme_color": "#1DA1F2", 11 | "background_color": "#ffffff", 12 | "icons": [ 13 | { 14 | "src": "/images/icon_128.png", 15 | "type": "image/png", 16 | "sizes": "128x128" 17 | }, 18 | { 19 | "src": "/images/icon_112.png", 20 | "type": "image/png", 21 | "sizes": "112x112" 22 | }, 23 | { 24 | "src": "/images/icon_56.png", 25 | "type": "image/png", 26 | "sizes": "56x56" 27 | } 28 | ], 29 | "start_url": "/index.html", 30 | "orientation": "portrait-primary", 31 | "b2g_features": { 32 | "version": "1.9.0", 33 | "subtitle": "A Twitter client for KaiOS", 34 | "permissions": { 35 | "systemXHR": { 36 | "description": "Required to communicate with Twitter and other vital functions." 37 | } 38 | }, 39 | "type": "signed", 40 | "focus_color": "#1DA1F2", 41 | "origin": "http://kaite.localhost", 42 | "developer": { 43 | "name": "Garrett Downs", 44 | "url": "https://nothing.dev" 45 | }, 46 | "redirects": [ 47 | { 48 | "from": "https://dev.nothing.kaite/oauth", 49 | "to": "/index.html" 50 | } 51 | ] 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /public/manifest.en-US.webmanifest: -------------------------------------------------------------------------------- 1 | { 2 | "lang": "en-US", 3 | "name": "Kaite", 4 | "id": "kaite", 5 | "short_name": "Kaite", 6 | "categories": [ 7 | "social" 8 | ], 9 | "description": "A Twitter client for KaiOS", 10 | "theme_color": "#1DA1F2", 11 | "background_color": "#ffffff", 12 | "icons": [ 13 | { 14 | "src": "/images/icon_128.png", 15 | "type": "image/png", 16 | "sizes": "128x128" 17 | }, 18 | { 19 | "src": "/images/icon_112.png", 20 | "type": "image/png", 21 | "sizes": "112x112" 22 | }, 23 | { 24 | "src": "/images/icon_56.png", 25 | "type": "image/png", 26 | "sizes": "56x56" 27 | } 28 | ], 29 | "start_url": "/index.html", 30 | "orientation": "portrait-primary", 31 | "b2g_features": { 32 | "version": "1.9.0", 33 | "subtitle": "A Twitter client for KaiOS", 34 | "permissions": { 35 | "systemXHR": { 36 | "description": "Required to communicate with Twitter and other vital functions." 37 | } 38 | }, 39 | "type": "signed", 40 | "focus_color": "#1DA1F2", 41 | "origin": "http://kaite.localhost", 42 | "developer": { 43 | "name": "Garrett Downs", 44 | "url": "https://nothing.dev" 45 | }, 46 | "redirects": [ 47 | { 48 | "from": "https://dev.nothing.kaite/oauth", 49 | "to": "/index.html" 50 | } 51 | ] 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/routes/LogOut.svelte: -------------------------------------------------------------------------------- 1 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 31 | Logging out... 32 | 33 | 34 | 35 | 36 | 37 | 47 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "kaite", 3 | "version": "1.9.0", 4 | "private": true, 5 | "scripts": { 6 | "build": "rollup -c", 7 | "dev": "rollup -c -w", 8 | "start": "sirv public --no-clear", 9 | "check": "svelte-check --tsconfig ./tsconfig.json", 10 | "commit": "cz", 11 | "postversion": "./deploy/version.sh $npm_package_version" 12 | }, 13 | "repository": { 14 | "type": "git", 15 | "url": "https://github.com/garredow/kaite.git" 16 | }, 17 | "devDependencies": { 18 | "@babel/plugin-syntax-dynamic-import": "^7.8.3", 19 | "@babel/plugin-transform-runtime": "^7.16.4", 20 | "@babel/preset-env": "^7.16.4", 21 | "@rollup/plugin-commonjs": "^17.0.0", 22 | "@rollup/plugin-json": "^4.1.0", 23 | "@rollup/plugin-node-resolve": "^11.0.0", 24 | "@rollup/plugin-replace": "^3.0.0", 25 | "@rollup/plugin-typescript": "^8.0.0", 26 | "@semantic-release/changelog": "^6.0.1", 27 | "@semantic-release/exec": "^6.0.3", 28 | "@semantic-release/git": "^10.0.1", 29 | "@semantic-release/npm": "^9.0.1", 30 | "@tsconfig/svelte": "^2.0.0", 31 | "commitizen": "^4.2.4", 32 | "cz-conventional-changelog": "^3.3.0", 33 | "rollup": "^2.3.4", 34 | "rollup-plugin-babel": "^4.4.0", 35 | "rollup-plugin-css-only": "^3.1.0", 36 | "rollup-plugin-livereload": "^2.0.0", 37 | "rollup-plugin-svelte": "^7.0.0", 38 | "rollup-plugin-terser": "^7.0.0", 39 | "rollup-plugin-visualizer": "^5.7.1", 40 | "semantic-release": "^19.0.2", 41 | "svelte": "^3.0.0", 42 | "svelte-check": "^2.0.0", 43 | "svelte-preprocess": "^4.0.0", 44 | "tslib": "^2.0.0", 45 | "typescript": "^4.0.0" 46 | }, 47 | "dependencies": { 48 | "date-fns": "^2.29.1", 49 | "dexie": "^3.2.2", 50 | "numeral": "^2.0.6", 51 | "onyx-ui": "^0.11.3", 52 | "sirv-cli": "^1.0.0", 53 | "svelte-icons": "^2.1.0", 54 | "svelte-spa-router": "^3.3.0" 55 | }, 56 | "config": { 57 | "commitizen": { 58 | "path": "./node_modules/cz-conventional-changelog" 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/routes/LogIn.svelte: -------------------------------------------------------------------------------- 1 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 42 | 43 | Hello! Welcome to Kaite, a Twitter app for KaiOS. Log in below to get started. 44 | 45 |