Skip to content

Commit c715c26

Browse files
committed
adjust to mdfriday.com
1 parent 2a16d27 commit c715c26

5 files changed

Lines changed: 25 additions & 3 deletions

File tree

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "mdfriday",
33
"name": "Friday",
4-
"version": "26.1.5",
4+
"version": "26.1.6",
55
"minAppVersion": "0.15.0",
66
"description": "Notes to Website. Friday helps you turn Markdown documents into websites in minutes.",
77
"author": "sunwei",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "obsidian-friday-plugin",
3-
"version": "26.1.5",
3+
"version": "26.1.6",
44
"description": "Friday is an Obsidian plugin that empowers users to focus on content creation by writing Markdown files, while we handle the distribution. From creating websites to content deployment, Friday serves as a creative output assistant, helping users turn their work into publishable sites with ease.",
55
"main": "main.js",
66
"type": "module",

src/main.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ export default class FridayPlugin extends Plugin {
121121
setSitePath: ((path: string) => void) | null = null
122122
startPreviewAndWait: (() => Promise<boolean>) | null = null
123123
selectMDFShare: (() => void) | null = null
124+
refreshLicenseState: (() => void) | null = null
124125

125126
// PC-only state
126127
private previousDownloadServer: 'global' | 'east' = 'global'
@@ -1961,6 +1962,11 @@ class FridaySettingTab extends PluginSettingTab {
19611962
if (this.plugin.settings.syncEnabled && response.first_time) {
19621963
await this.plugin.initializeSyncService();
19631964
}
1965+
1966+
// Step 13: Refresh license state in Site panel (if open)
1967+
if (this.plugin.refreshLicenseState) {
1968+
this.plugin.refreshLicenseState();
1969+
}
19641970
}
19651971
}
19661972

src/svelte/Site.svelte

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@
175175
plugin.setSitePath = setSitePathExternal;
176176
plugin.startPreviewAndWait = startPreviewAndWait;
177177
plugin.selectMDFShare = selectMDFShare;
178+
plugin.refreshLicenseState = refreshLicenseState;
178179
});
179180
180181
// External method to set site path
@@ -200,6 +201,20 @@
200201
}
201202
}
202203
204+
// Refresh license state from plugin settings (called after license activation)
205+
function refreshLicenseState() {
206+
// Update userDir and isMDFShareAvailable by triggering reactive update
207+
userDir = plugin.settings.licenseUser?.userDir || '';
208+
isMDFShareAvailable = !!(plugin.settings.license && userDir);
209+
210+
// Update publish options
211+
publishOptions = [
212+
{ value: 'netlify', label: t('ui.publish_option_netlify') },
213+
{ value: 'ftp', label: t('ui.publish_option_ftp') },
214+
...(isMDFShareAvailable ? [{ value: 'mdf-share', label: t('ui.publish_option_mdfriday_share') }] : []),
215+
];
216+
}
217+
203218
onDestroy(() => {
204219
if (serverRunning) {
205220
httpServer.stopWatching();

versions.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@
1313
"26.1.2": "0.15.0",
1414
"26.1.3": "0.15.0",
1515
"26.1.4": "0.15.0",
16-
"26.1.5": "0.15.0"
16+
"26.1.5": "0.15.0",
17+
"26.1.6": "0.15.0"
1718
}

0 commit comments

Comments
 (0)