Skip to content

Commit 7c50d5e

Browse files
committed
better settings layout
1 parent 02c9ab1 commit 7c50d5e

4 files changed

Lines changed: 7 additions & 18 deletions

File tree

.github/workflows/deploy_static.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,23 @@
1-
# Simple workflow for deploying static content to GitHub Pages
21
name: Deploy static content to Pages
32

43
on:
5-
# Runs on pushes targeting the default branch
64
push:
7-
# branches: ["main"]
8-
branches: ["**"]
5+
tags:
6+
- "*"
97

108
# Allows you to run this workflow manually from the Actions tab
119
workflow_dispatch:
1210

13-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
1411
permissions:
1512
contents: read
1613
pages: write
1714
id-token: write
1815

19-
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
20-
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
2116
concurrency:
2217
group: "pages"
2318
cancel-in-progress: false
2419

2520
jobs:
26-
# Single deploy job since we're just deploying
2721
deploy:
2822
environment:
2923
name: github-pages

esbuild.config.mjs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import process from "process";
33
import { builtinModules } from 'node:module';
44

55
const banner =
6-
`/*
6+
`/*
77
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
88
if you want to view the source, please visit the github repository of this plugin
99
*/
@@ -31,8 +31,7 @@ const context = await esbuild.context({
3131
"@lezer/common",
3232
"@lezer/highlight",
3333
"@lezer/lr",
34-
...builtinModules,
35-
...builtinModules.map(m => `node:${m}`)],
34+
...builtinModules],
3635
format: "cjs",
3736
target: "es2018",
3837
logLevel: "info",

src/main.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ export default class AtmospherePlugin extends Plugin {
9191
return true
9292
} catch (e) {
9393
console.error("Failed to restore session:", e);
94-
// Clear invalid session data
9594
this.settings.did = undefined;
9695
await this.saveSettings();
9796
new Notice("Session expired. Please login by opening settings");

src/settings.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,12 @@ export class SettingTab extends PluginSettingTab {
3131
const { containerEl } = this;
3232
containerEl.empty();
3333

34-
if (this.plugin.settings.did) {
34+
if (this.plugin.client.loggedIn) {
3535
const displayName = this.plugin.client.actor?.handle || this.plugin.settings.did;
3636

3737
new Setting(containerEl)
38-
.setName("Logged in")
39-
.setDesc(displayName);
40-
41-
new Setting(containerEl)
42-
.setName("Log out")
38+
.setName("Logged in as @" + displayName)
39+
.setDesc(this.plugin.client.actor?.did as string || "")
4340
.addButton((button) =>
4441
button
4542
.setButtonText("Log out")

0 commit comments

Comments
 (0)