Activities of "liangshiwei"

Add Service.Web reference to Saas.Web project and configure the module dependence

Hi,

could you share a minimal reproduceible project with me? i will check it.

shiwei.liang@volosoft.com

Hi,

i could not reproduce the problem.

  • create a new project via suite
  • adb reverse tcp:port tcp:port
  • run backend

Update DefaultStorage

public class DefaultStorage : IStorage, ITransientDependency
{
    public async Task<string> GetAsync(string key)
    {
        return Preferences.Get(key, string.Empty);
    }

    public async Task SetAsync(string key, string value)
    {
        if (value.IsNullOrEmpty())
        {
            await RemoveAsync(key);
            return;
        }

        Preferences.Set(key, value);
    }

    public Task RemoveAsync(string key)
    {
        Preferences.Remove(key);
        return Task.CompletedTask;
    }
}
  • Remove #if DEBUG code block
  • Change mode to Release

okay

Hi,

it's very strange.

Is it possible you to share a minimal reproducible project with me? i will check it.

my email is shiwei.liang@volosoft.com

Hi,

Move AbpAspNetCoreMvcModule to HttpApi.Host project.

then open swagger pgae to check it.

it works for me

import { inject, NgModule } from '@angular/core';
import { PageModule } from '@abp/ng.components/page';
import { SharedModule } from '../shared/shared.module';
import { HomeRoutingModule } from './home-routing.module';
import { HomeComponent } from './home.component';
import { DOCUMENT } from '@angular/common';

@NgModule({
  declarations: [HomeComponent],
  imports: [SharedModule, HomeRoutingModule, PageModule],
})
export class HomeModule {
  
  protected readonly window = inject(DOCUMENT).defaultView;

  constructor(){
    this.window.addEventListener('storage', event => {
      alert(event.key)
      if (event.key === 'access_token' && event.newValue === null) {
        this.window.location.reload();
      }
    });
  }
}

you can try put debugger to check it

this.window.addEventListener('storage', event => {
  debugger
  if (event.key === 'access_token' && event.newValue === null) {
    this.window.location.reload();
  }
});

okay

Hi,

i think so, you can give it a try

Showing 471 to 480 of 5968 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 11, 2024, 11:11