-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
2,791 additions
and
2,795 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
import { app, BrowserWindow } from "electron"; | ||
import * as path from "path"; | ||
declare var __dirname: string | ||
let mainWindow: Electron.BrowserWindow | ||
declare var __dirname: string; | ||
let mainWindow: Electron.BrowserWindow; | ||
|
||
function onReady() { | ||
mainWindow = new BrowserWindow({ | ||
height: 700, | ||
minHeight: 700, | ||
minWidth: 390, | ||
width: 390, | ||
height: 700, | ||
webPreferences: { | ||
webSecurity: false | ||
} | ||
}) | ||
}); | ||
|
||
// mainWindow.setMenu(null); | ||
|
||
mainWindow.loadURL(`file://${__dirname}/index.html`) | ||
mainWindow.on("close", () => app.quit()) | ||
mainWindow.loadURL(`file://${__dirname}/index.html`); | ||
mainWindow.on("close", () => app.quit()); | ||
} | ||
|
||
app.on("ready", () => onReady()) | ||
app.on("window-all-closed", () => app.quit()) | ||
console.log(`Electron Version ${app.getVersion()}`) | ||
app.on("ready", () => onReady()); | ||
app.on("window-all-closed", () => app.quit()); | ||
console.log(`Electron Version ${app.getVersion()}`); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,55 @@ | ||
|
||
function generate_endpoints() { | ||
const PREFIX = "http://service.narvii.com/api/v1"; | ||
const SECURE_WEBSOCKET = "https://ws3.narvii.com/"; | ||
const GET_BLOG_POST = PREFIX + "/{0}/s/blog/{1}"; | ||
return { | ||
// // ===[ AUTH ENDPOINTS ]=== | ||
LOGIN: PREFIX + "/g/s/auth/login", | ||
REGISTER: PREFIX + "/g/s/auth/register", | ||
REGISTER_CHECK: PREFIX + "/g/s/auth/register-check", | ||
const PREFIX = "http://service.narvii.com/api/v1"; | ||
const SECURE_WEBSOCKET = "https://ws3.narvii.com/"; | ||
const GET_BLOG_POST = PREFIX + "/{0}/s/blog/{1}"; | ||
return { | ||
// // ===[ AUTH ENDPOINTS ]=== | ||
LOGIN: PREFIX + "/g/s/auth/login", | ||
REGISTER: PREFIX + "/g/s/auth/register", | ||
REGISTER_CHECK: PREFIX + "/g/s/auth/register-check", | ||
|
||
// // ===[ USER ENDPOINTS ]=== | ||
AFFILIATIONS: PREFIX + "/g/s/account/affiliations?type=active", | ||
HEADLINES: PREFIX + "/g/s/feed/headlines?start={0}&size={1}", | ||
DEVICE_INFO: PREFIX + "/g/s/device", | ||
// // ===[ USER ENDPOINTS ]=== | ||
AFFILIATIONS: PREFIX + "/g/s/account/affiliations?type=active", | ||
HEADLINES: PREFIX + "/g/s/feed/headlines?start={0}&size={1}", | ||
DEVICE_INFO: PREFIX + "/g/s/device", | ||
|
||
// // ===[ COMMUNITY ENDPOINTS ]=== | ||
LINK_IDENTIFY: PREFIX + "/g/s/community/link-identify?q={0}", | ||
JOIN_COMMUNITY: PREFIX + "/{0}/s/community/join", | ||
LEAVE_COMMUNITY: PREFIX + "/{0}/s/community/leave", | ||
COMMUNITY_INFO: PREFIX + "/g/s-x{0}/community/info", | ||
SUGGESTED_COMMUNITIES: PREFIX + "/g/s/community/suggested?language={0}", | ||
TRENDING_COMMUNITIES: PREFIX + "/g/s/community/trending?start={0}&size={1}&language={2}", | ||
COMMUNITY_FEED: PREFIX + "/{0}/s/feed/blog-all?start={1}&size={2}", | ||
COMMUNITY_ONLINE_MEMBERS: PREFIX + "/{0}/s/community/online-members-check", | ||
SUGGESTED_KEYWORDS: PREFIX + "/g/s/community/search/suggested-keywords?q={0}&start={1}&size={2}&language={3}", | ||
SEARCH_TAGS: PREFIX + "/g/s/community/search/tags?q={0}", | ||
SEARCH_COMMUNITIES: PREFIX + "/g/s/community/search?q={0}&start={1}&size={2}&language={3}&completeKeyword={4}", | ||
JOINED_COMMUNITIES: PREFIX + "/g/s/community/joined?start={0}&size={1}", | ||
SUPPORTED_LANGUAGES: PREFIX + "/g/s/community-collection/supported-languages?start={0}&size={1}", | ||
COMMUNITY_COLLECTION_SECTIONS: PREFIX + "/g/s/community-collection/view/explore/sections?language={0}&start={1}&size={2}", | ||
COMMUNITY_CHECK_IN: PREFIX + "/x{0}/s/check-in", | ||
// // ===[ COMMUNITY ENDPOINTS ]=== | ||
LINK_IDENTIFY: PREFIX + "/g/s/community/link-identify?q={0}", | ||
JOIN_COMMUNITY: PREFIX + "/{0}/s/community/join", | ||
LEAVE_COMMUNITY: PREFIX + "/{0}/s/community/leave", | ||
COMMUNITY_INFO: PREFIX + "/g/s-x{0}/community/info", | ||
SUGGESTED_COMMUNITIES: PREFIX + "/g/s/community/suggested?language={0}", | ||
TRENDING_COMMUNITIES: PREFIX + "/g/s/community/trending?start={0}&size={1}&language={2}", | ||
COMMUNITY_FEED: PREFIX + "/{0}/s/feed/blog-all?start={1}&size={2}", | ||
COMMUNITY_ONLINE_MEMBERS: PREFIX + "/{0}/s/community/online-members-check", | ||
SUGGESTED_KEYWORDS: PREFIX + "/g/s/community/search/suggested-keywords?q={0}&start={1}&size={2}&language={3}", | ||
SEARCH_TAGS: PREFIX + "/g/s/community/search/tags?q={0}", | ||
SEARCH_COMMUNITIES: PREFIX + "/g/s/community/search?q={0}&start={1}&size={2}&language={3}&completeKeyword={4}", | ||
JOINED_COMMUNITIES: PREFIX + "/g/s/community/joined?start={0}&size={1}", | ||
SUPPORTED_LANGUAGES: PREFIX + "/g/s/community-collection/supported-languages?start={0}&size={1}", | ||
COMMUNITY_COLLECTION_SECTIONS: PREFIX + "/g/s/community-collection/view/explore/sections?language={0}&start={1}&size={2}", | ||
COMMUNITY_CHECK_IN: PREFIX + "/x{0}/s/check-in", | ||
|
||
// // ===[ NOTIFICATION ENDPOINTS ]=== | ||
COMMUNITY_NOTIFICATIONS: PREFIX + "/{0}/s/notification?start={1}&size={2}&cv={3}", | ||
REMINDERS: PREFIX + "/g/s/reminder/check?ndcIds={0}&timezone={1}", | ||
// // ===[ NOTIFICATION ENDPOINTS ]=== | ||
COMMUNITY_NOTIFICATIONS: PREFIX + "/{0}/s/notification?start={1}&size={2}&cv={3}", | ||
REMINDERS: PREFIX + "/g/s/reminder/check?ndcIds={0}&timezone={1}", | ||
|
||
// // ===[ BLOG ENDPOINTS ]=== | ||
GET_BLOG_POST, | ||
POST_VOTE: GET_BLOG_POST + "/vote", | ||
POST_COMMENT: GET_BLOG_POST + "/comment", | ||
// // ===[ BLOG ENDPOINTS ]=== | ||
GET_BLOG_POST, | ||
POST_VOTE: GET_BLOG_POST + "/vote", | ||
POST_COMMENT: GET_BLOG_POST + "/comment", | ||
|
||
// ===[ CHAT ENDPOINTS ]=== | ||
COMMUNITY_THREAD: PREFIX + "/x{0}/s/chat/thread/{1}", | ||
COMMUNITY_CHAT_THREAD: PREFIX + "/x{0}/s/chat/thread?type={1}&start={2}&size={3}", | ||
COMMUNITY_JOIN_CHAT_THREAD: PREFIX + "/x{0}/s/chat/thread/{1}/member/{2}", | ||
COMMUNITY_CHAT_SEND_MESSAGE: PREFIX + "/x{0}/s/chat/thread/{1}/message", | ||
COMMUNITY_CHAT_GET_MESSAGES: PREFIX + "/x{0}/s/chat/thread/{1}/message?start={2}&size={3}", | ||
COMMUNITY_CHAT_GET_MESSAGES_SINCE: PREFIX + "/x{0}/s/chat/thread/{1}/message?start={2}&size={3}&starttime={4}", | ||
// ===[ CHAT ENDPOINTS ]=== | ||
COMMUNITY_THREAD: PREFIX + "/x{0}/s/chat/thread/{1}", | ||
COMMUNITY_CHAT_THREAD: PREFIX + "/x{0}/s/chat/thread?type={1}&start={2}&size={3}", | ||
COMMUNITY_JOIN_CHAT_THREAD: PREFIX + "/x{0}/s/chat/thread/{1}/member/{2}", | ||
COMMUNITY_CHAT_SEND_MESSAGE: PREFIX + "/x{0}/s/chat/thread/{1}/message", | ||
COMMUNITY_CHAT_GET_MESSAGES: PREFIX + "/x{0}/s/chat/thread/{1}/message?start={2}&size={3}", | ||
COMMUNITY_CHAT_GET_MESSAGES_SINCE: PREFIX + "/x{0}/s/chat/thread/{1}/message?start={2}&size={3}&starttime={4}", | ||
|
||
// ===[ LIVE LAYERS ]=== | ||
LIVE_LAYERS_PUBLIC_CHAT: PREFIX + "/x{0}/s/live-layer/public-chats?start=0&size=25" | ||
} | ||
// ===[ LIVE LAYERS ]=== | ||
LIVE_LAYERS_PUBLIC_CHAT: PREFIX + "/x{0}/s/live-layer/public-chats?start=0&size=25" | ||
}; | ||
} | ||
export default generate_endpoints(); |
Oops, something went wrong.